-
Notifications
You must be signed in to change notification settings - Fork 491
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
Simulate: Hash of Program Bytecodes in Simulation #5658
Simulate: Hash of Program Bytecodes in Simulation #5658
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5658 +/- ##
==========================================
+ Coverage 55.15% 55.19% +0.03%
==========================================
Files 465 465
Lines 65024 65042 +18
==========================================
+ Hits 35862 35897 +35
+ Misses 26769 26760 -9
+ Partials 2393 2385 -8
... and 13 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
4f727a7
to
3d55c0b
Compare
3d55c0b
to
a9cdb25
Compare
ca52227
to
fb12544
Compare
a4e6070
to
0ea486c
Compare
606f9b8
to
4966124
Compare
4966124
to
0fe8f3b
Compare
By live discussion, while unknown if it is interesting to return program byte code, I decided to divert this PR into exposing executed program bytecode's hash in simulation exec trace, and this should help debugger to pair sourcemap + teal source code with execution trace. |
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.
This looks like a good way to let debuggers know they've got the right program ready to step through.
Since this is a small value, and quick to compute, I don't think we should add options to include or not include this. The number of config flags is getting a little out of hand. Let's just always include it. I think that with JSON responses it's legitimate to add something new and still consider in "unbreaking", right?
88578db
to
88fc595
Compare
yea, even better, we can just return the hash as some always return part. JSON wont just break easily if we add something to it, sdks just ignore such field (for now) |
oh snap, I should include hash for every test now. |
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.
A hash-slinging slasher.
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.
Looks good only minor nits
28d226e
to
8e4aefb
Compare
8e4aefb
to
c1764cf
Compare
Summary
This PR implements #5567, which returns hash digests of program bytecode being executed during simulation.
Test Plan
Extending pre-existing simulation tests and rest client tests on execution trace, and activate initial-state-config which returns program bytes.