Skip to content
Unverified Commit ba572ae8 authored by PG Herveou's avatar PG Herveou Committed by GitHub
Browse files

[pallet-revive] Update gas encoding (#6689)



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.

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

---------

Co-authored-by: default avatarGitHub Action <[email protected]>
Co-authored-by: command-bot <>
parent 2f7cf417
Pipeline #511366 waiting for manual action with stages
in 33 minutes and 36 seconds