-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Record witness access in BALANCE opcode #369
Conversation
@@ -794,3 +795,97 @@ func TestProcessVerkleContractWithEmptyCode(t *testing.T) { | |||
} | |||
} | |||
} | |||
|
|||
func TestProcessVerkleBalanceOpcode(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another reminder to eventually do some helpers to avoid repetition in these tests.
Not urgent, but just saying.
gen.AddTx(tx) | ||
}) | ||
|
||
account2BalanceTreeKey := utils.GetTreeKeyBalance(account2[:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to do this than what is done in other similar tests that hardcode directly the tree key hex value. That's fine but it's quite opaque if that value is actually the correct one for the expectation of the test logic.
Signed-off-by: Ignacio Hagopian <[email protected]>
Signed-off-by: Ignacio Hagopian <[email protected]>
Signed-off-by: Ignacio Hagopian <[email protected]>
Signed-off-by: Ignacio Hagopian <[email protected]>
480608c
to
fbee133
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* record access witness balance in BALANCE opcode Signed-off-by: Ignacio Hagopian <[email protected]> * add tests for BALANCE opcode Signed-off-by: Ignacio Hagopian <[email protected]> * add version touching Signed-off-by: Ignacio Hagopian <[email protected]> * do not touch version Signed-off-by: Ignacio Hagopian <[email protected]> --------- Signed-off-by: Ignacio Hagopian <[email protected]>
* record access witness balance in BALANCE opcode Signed-off-by: Ignacio Hagopian <[email protected]> * add tests for BALANCE opcode Signed-off-by: Ignacio Hagopian <[email protected]> * add version touching Signed-off-by: Ignacio Hagopian <[email protected]> * do not touch version Signed-off-by: Ignacio Hagopian <[email protected]> --------- Signed-off-by: Ignacio Hagopian <[email protected]>
* record access witness balance in BALANCE opcode Signed-off-by: Ignacio Hagopian <[email protected]> * add tests for BALANCE opcode Signed-off-by: Ignacio Hagopian <[email protected]> * add version touching Signed-off-by: Ignacio Hagopian <[email protected]> * do not touch version Signed-off-by: Ignacio Hagopian <[email protected]> --------- Signed-off-by: Ignacio Hagopian <[email protected]>
This PR adds missing logic to record a witness access during BALANCE opcode execution.