-
Notifications
You must be signed in to change notification settings - Fork 766
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 |
Now I have the option to set the gas limit for a ETH transaction either manually or by estimating it (dry-run). Will both option work after this change? |
prdoc/pr_6689.prdoc
Outdated
- audience: Runtime Dev | ||
description: |- | ||
Update the current approach to attach the `ref_time`, `pov` and `deposit` 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. |
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.
Previously, these three parameters were passed along with the signed payload, and the fees resulting from gas × gas_price
were checked to ensure they matched the actual fees paid by the user for the extrinsic ?
You can but you need to setting sufficient values for the 6 lowers digits that encode the weights and deposit |
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