Organization
- @coinbase
Engagement Type
Cantina Reviews
Period
-
Repositories
Researchers
Findings
Informational
1 findings
1 fixed
0 acknowledged
Informational1 finding
Document offsets, size, and expected structs
State
Severity
- Severity: Informational
Submitted by
0xicingdeath
Description
The
initializeWithDatafunction highlights the expectedproofvalues, including selector, creator, root claim, extradata, intermediate roots, and cwia bytes. In practice, the contract stores all the above, without the selector, hence all offsets are shifted 4 bytes to the left.For documentation purposes, we would recommend adding a section in the contract that highlights the data offset, size, and item being stored. This helps with double checking that the getters are retrieving the correct bytes of correct size.
Recommendation
Consider adding the above in in-code documentation in a comment or in external documentation
Coinbase
CWIA data offset added as per recommendations in attached PR.