Skip to content

Commit

Permalink
Check for proof size % 60*32
Browse files Browse the repository at this point in the history
  • Loading branch information
mininny committed Jan 6, 2025
1 parent 953afcc commit c3b3996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rvgo/slow/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func Step(calldata []byte, po PreimageOracle) (stateHash common.Hash, outErr err

proofContentOffset := shortToU64(uint16(stateContentOffset) + paddedStateSize + 32)

if mod(b32asBEWord(calldataload(shortToU64(uint16(stateContentOffset)+paddedStateSize))), toU256(60)) != toU256(0) {
if mod(b32asBEWord(calldataload(shortToU64(uint16(stateContentOffset)+paddedStateSize))), shortToU256(60*32)) != toU256(0) {
// proof offset must be stateContentOffset+paddedStateSize+32
// proof size: 64-5+1=60 * 32 byte leaf,
// but multiple memProof can be used, so the proofSize must be a multiple of 60
Expand Down

0 comments on commit c3b3996

Please sign in to comment.