-
Notifications
You must be signed in to change notification settings - Fork 77
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
interop: post-preview2 adjustment #1187
Conversation
b251fc6
to
d9ace68
Compare
Codecov Report
@@ Coverage Diff @@
## master #1187 +/- ##
==========================================
+ Coverage 66.71% 66.79% +0.08%
==========================================
Files 198 198
Lines 16833 16893 +60
==========================================
+ Hits 11230 11284 +54
- Misses 5006 5009 +3
- Partials 597 600 +3
Continue to review full report at Codecov.
|
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.
System.Contract.Update needs a bit more love, it also checks for script hash equality now and checks that the new contract can only be non-storage-enabled if there are no storage items lef
t for the old one. It also isn't tested at all.
It'd also be nice to squash 28cab40 with 172b026 and d9ace68, it basically is the same feature.
9e573e5 changes all of syscall definitions and while doing so it'd be nice to sort them by packages.
9e573e5 updates interops, but they should be updated along with implementations, technically you have a broken system between syscall and compiler changes.
But it's a nice update overall.
Part of #1055. There'll be a lot of interops which result with a struct on stack instead of interop interface, and sometimes their names are the same, so it's unrelyable to take into account interop name only and don't pay attention to it's API (package). Also sort syscalls by package and name.
To match C# implementation, we should pick all arguments from stack first.
Part of #1055. It should check not only stored contracts, but also interop context script container in case if it's a transaction.
d9ace68
to
54eca98
Compare
I also re-orginised commits, so now we don't have the system broken between commits. The last thing that remains is |
Part of #1055. It should put on stack an array instead of interop interface.
Part of #1055. It should check given scripthash against manifest groups and return the contract state as a struct (not interop interface).
Part of #1055. We should check contract scripthash against the one provided in manifest and manifest groups. We shouldn't put on stack anything after return. And ofcourse, we mast not destroy the old contract at the end, as `contractDestroy` removes all storage items associated with the old contract ID (which equals to the new contract ID). We just remove old contract state - it's enough.
Part of #1055. It returns calling flags of the current context.
54eca98
to
74d2f43
Compare
First part of #1055.
Were added:
Were fixed:
No errors in:
Separate adjustment is needed (see core: adjust
System.Contract.Call*
interops #1181)