-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add contract global state in VM #208
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #208 +/- ##
========================================
- Coverage 16.8% 15.4% -1.3%
========================================
Files 32 33 +1
Lines 3896 4175 +279
========================================
- Hits 653 644 -9
- Misses 3243 3531 +288
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
It seems good.
I think it's a good approach to do validation in the next version.
When you merge this PR, I will update my PR and finish implementing the opcodes, ok?
@crisdut well, the whole idea is to merge this PR after v0.11 release (i.e. in v0.12), while we need the refactored opcodes in v0.11, thus your PR can't be based on this one |
29a0d8c
to
7472d06
Compare
Do you mean refactor the common opcodes in the aluvm or the contract-level opcodes in the rgb-core vm? |
He was referring to the average contract-level opcodes in the RGB, because this PR is about state verifications on the "current state" of the contract. |
Yes, I agree with you, we need to refactor the contract-level opcodes, and then maybe there is a lack of the other state types. |
Closing in favor of #264 |
This is WIP on adding contract state (not just operation state, but whole contract state) to the VM required for #201
It seems like this will require refactoring of the validation workflow, since now we must evaluate the contract state not in stdlib, but right during the validation procedure itself...
I think it will be nice to postpone this until v0.12
NB: this is WIP since the global state for the contract IS NOT COMPUTED, i.e. validator always sees an empty contract state.