-
Notifications
You must be signed in to change notification settings - Fork 10
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 <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
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 <jsign.uy@gmail.com> * add tests for BALANCE opcode Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * add version touching Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * do not touch version Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> --------- Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* record access witness balance in BALANCE opcode Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * add tests for BALANCE opcode Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * add version touching Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * do not touch version Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> --------- Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* record access witness balance in BALANCE opcode Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * add tests for BALANCE opcode Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * add version touching Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * do not touch version Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> --------- Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
* record access witness balance in BALANCE opcode Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * add tests for BALANCE opcode Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * add version touching Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> * do not touch version Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com> --------- Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
This PR adds missing logic to record a witness access during BALANCE opcode execution.