Skip to content

Commit

Permalink
[bugfix] Include code in the witness on GetCodeHash
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls committed Jul 15, 2024
1 parent 83e0f2f commit 01886f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/state/intra_block_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ func (sdb *IntraBlockState) GetCodeHash(addr libcommon.Address) libcommon.Hash {
if stateObject == nil || stateObject.deleted {
return libcommon.Hash{}
}

// Plonky2: if the code is not nil, we need to include code in the witness by calling GetCodeSize
sdb.GetCodeSize(addr)

return libcommon.BytesToHash(stateObject.CodeHash())
}

Expand Down

0 comments on commit 01886f8

Please sign in to comment.