-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix NextFeeMultiplier update before Revive::on_finalize #10271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1a02cb8
store base_fee and gas_limit in the block builder
pgherveou 3976315
nit
pgherveou ab2a047
Update from github-actions[bot] running command 'prdoc --audience run…
github-actions[bot] a2ad902
fix
pgherveou 03ed2c1
nit
pgherveou 59a61b8
Update from github-actions[bot] running command 'fmt'
github-actions[bot] 9c8e637
nit
pgherveou ed05939
PR review: only derive default in tests
pgherveou 6eb4993
PR review: Add comment
pgherveou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| title: fix NextFeeMultiplier update before Revive::on_finalize | ||
| doc: | ||
| - audience: Runtime Dev | ||
| description: | | ||
| Fix https://github.com/paritytech/polkadot-sdk/issues/10177 | ||
|
|
||
| Store `base_fee_per_gas` and `block_gas_limit` in the EthBlockBuilderIR, since these values are derived from the NextFeeMultiplier and we can't read it from Revive::on_finalize since this runs (in most Runtime) after TransactionPayment::on_finalize where the value is updated for the next block. | ||
|
|
||
| also use `BlockNumberFor<T>` for the BlockHash map instead of U256. No release have been performed yet since the introduction of that change, so that should not require any migration. | ||
| ```rust | ||
| #[pallet::storage] | ||
| pub(crate) type BlockHash<T: Config> = | ||
| StorageMap<_, Identity, BlockNumberFor<T>, H256, ValueQuery>; | ||
| ``` | ||
| crates: | ||
| - name: pallet-revive | ||
| bump: major |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Nice! This makes the code much easier to follow!
Unrelated note: At some point we were considering creating the builder as runtime agnostic, since we believed the core logic could be moved out of the runtime in case we encounter edge-cases/exceed memory limits within revive. However, having the core logic in a single place makes it easier to backport if need be in the future