This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Parachains should charge for proof size weight #2326
Parachains should charge for proof size weight #2326
Changes from 6 commits
c5ae80d
7855684
afedfa8
3a0d538
2c70c68
7550fdb
dbdf7e4
b6ca4b5
cbac742
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose we don't have a reference on the Relay Chain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, since the relay chain has
u64::MAX
as max block proof-size whereas parachains only have 5 MiB.We will probably need some further adjustments to find the sweet-spot, but for now this should provide something that we can work with.
There are going to be changes in Substrate soon that increase the proof size of everything (until we have https://github.com/paritytech/substrate/issues/13501), so to prevent accidental fuckups i added the tests that 1K transfers fit in a block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be simplified by implementing
WeightToFee
forTuple
? or too many tuples impls? 🙈There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we could do a simple maximum norm. In the long run i would rather make the traits 2D weight compatible in Substrate, so we wont need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now it is fine or? Since this targets 0.9.38.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah nah, you would be confused if it is addition, or max or what.
I suppose we can provide some nice helpers at he substrate layer though:
Or even a more generic:
I think you can see where I am going with this. Just an idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah fine for now. Perhaps a follow-up issue that you can mentor?