-
Notifications
You must be signed in to change notification settings - Fork 741
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
[pallet-revive] Update gas encoding #6689
base: master
Are you sure you want to change the base?
Conversation
/cmd prdoc --audience runtime_dev --bump minor |
All GitHub workflows were cancelled due to failure one of the required jobs. |
All GitHub workflows were cancelled due to failure one of the required jobs. |
Update the current approach to attach the
ref_time
,pov
anddeposit
parameters to an Ethereum transaction.Previously we will pass these 3 parameters along with the signed payload, and check that the fees resulting from
gas x gas_price
match the actual fees paid by the user for the extrinsic.This approach unfortunately can be attacked. A malicious actor could force such a transaction to fail by injecting low values for some of these extra parameters as they are not part of the signed payload.
The new approach encodes these 3 extra parameters in the lower digits of the transaction gas, approximating the the log2 of the actual values to encode each components on 2 digits