This repository has been archived by the owner on May 26, 2023. It is now read-only.
cmichel - Spec: Wrong Deposited Transaction Type encoding #89
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
Reward
A payout will be made for this issue
Specification
An issue related to the specification (low severity)
cmichel
low
Spec: Wrong Deposited Transaction Type encoding
Summary
Wrong Deposited Transaction Type encoding in the specs.
Vulnerability Details
The
deposits.md
specification file says that the deposited transaction type is encoded with "the following fields (rlp encoded in the order they appear here)":However, they are missing the
isSystemTransaction
bool from the encoding and the order is also different (data
aftergasLimit
), see:Impact
Users go to the specification to see how to integrate a project. Integrating according to this spec will be wrong.
Code Snippet
https://github.com/ethereum-optimism/optimism/blob/3f4b3c328153a8aa03611158b6984d624b17c1d9/specs/deposits.md?plain=1#L55-L68
https://github.com/ethereum-optimism/optimism/blob/3f4b3c328153a8aa03611158b6984d624b17c1d9/packages/contracts-bedrock/contracts/libraries/Encoding.sol#L22
Tool used
Manual Review
Recommendation
Use the correct encoding from the
encodeDepositTransaction
function above.The text was updated successfully, but these errors were encountered: