-
Notifications
You must be signed in to change notification settings - Fork 354
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
Re-Prioritize pool transactions by effective gas price #581
Re-Prioritize pool transactions by effective gas price #581
Conversation
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.
Interesting idea. Keep in mind that EIP-1559 will make Ethereum's gas structure look more like Substrate's pallet-transaction-payment
, although if we adopt it we will probably want backwards-compatibility (as Ethereum will do).
runtime/moonshadow/src/lib.rs
Outdated
None => 0, | ||
Some((_, _, signed_extra)) => { | ||
// Yuck, this depends on the index of charge transaction in Signed Extra | ||
let charge_transaction = signed_extra.6; |
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.
👀
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, this is ugly. I think the more thorough approach would be to have a pallet-ethereum-transaction-payment that properly handles fees in a Frontier-equipped chain. This is a stop-gap measure.
This comment has been minimized.
This comment has been minimized.
This will make sense again in conjunction with paritytech/substrate#9596 EDIT: That is not merge in Substrate yet, so I've put it on our pinned Susbtrate fork. See moonbeam-foundation/substrate@2af6e2c |
So the test failure here is legit. It happens with the call to |
This PR is a stop-gap measure that allows ethereum transactions to be properly prioritized by
gas_price
and also properly prioritized alongside non-ethereum transactions that specify a flat tip amount rather than a gas price.It makes two concrete changes to our transaction prioritization:
Cargo.lock
.)GasWeightMapping
.The latter is a bit of a stop-gap measure. A more complete ethereum-first approach would be to replace pallet-transaction-payment with a new pallet that allows users to specify gas price for all transactions including "normal" frame transactions.
This stopgap approach was also explored briefly in the Frontier repo in polkadot-evm/frontier#378.