-
Notifications
You must be signed in to change notification settings - Fork 97
Tune management callflags for aspidochelone #2848
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
Merged
roman-khimov
merged 2 commits into
master
from
tune-management-callflags-for-aspidochelone
Dec 19, 2022
Merged
Tune management callflags for aspidochelone #2848
roman-khimov
merged 2 commits into
master
from
tune-management-callflags-for-aspidochelone
Dec 19, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d5a9af5 is incompatible with the NeoFS mainnet sidechain, so we add the old logic to the pre-Aspidochelone behaviour. Changing flags at newMethodAndPrice() is a bit less convenient unfortunately because this will affect interop validity checks, so let's have this kludge here.
Codecov Report
@@ Coverage Diff @@
## master #2848 +/- ##
==========================================
- Coverage 85.06% 84.98% -0.08%
==========================================
Files 329 329
Lines 42210 42216 +6
==========================================
- Hits 35906 35878 -28
- Misses 4843 4878 +35
+ Partials 1461 1460 -1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Member
Author
|
Works like charm, mainnet/testnet compatibility is still there, neofs mainnet sidechain can be processed too. |
AnnaShaleva
reviewed
Dec 19, 2022
Member
|
Otherwise LGTM. |
AnnaShaleva
approved these changes
Dec 19, 2022
AnnaShaleva
added a commit
to neo-project/neo
that referenced
this pull request
Apr 22, 2025
#2653 changed required callflags of native ContractManagement's Update and Deploy methods from States|AllowNotify to All. This change didn't affect N3 mainnet/T5 (ref. #2673), but the problem is that this change affected NeoFS mainnet network (see nspcc-dev/neo-go#2848 and commits description). This commit fixes state difference between Go and C# nodes at height 451626 of NeoFS mainnet. Note that this commit does not affect existing N3 mainnet/testnet states, so no resynchronisation is required on update. The difference itself: ``` go run scripts/compare-dumps/compare-dumps.go ./godump-echidna-neofs-mainnet/ ../../neo-project/neo/neo-cli-notary-mainnet/Storage_0572dfa5/ Processing directory BlockStorage_0 Processing directory BlockStorage_100000 Processing directory BlockStorage_200000 Processing directory BlockStorage_300000 Processing directory BlockStorage_400000 Processing directory BlockStorage_500000 file BlockStorage_500000/dump-block-452000.json: block 451626, changes length mismatch: 25 vs 11 compare-dumps dumpDirA dumpDirB exit status 1 ``` Go node application log for the problem transaction: ``` anna@kiwi:~/Documents/GitProjects/nspcc-dev/neo-go$ curl -d '{ "jsonrpc": "2.0", "id": 1, "method": "getapplicationlog", "params": ["0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d"] }' localhost:40332 | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 592 100 450 100 142 461k 145k --:--:-- --:--:-- --:--:-- 578k { "id" : 1, "jsonrpc" : "2.0", "result" : { "executions" : [ { "exception" : null, "gasconsumed" : "900316660", "invocations" : null, "notifications" : [ { "contract" : "0xfffdc93764dbaddd97c48f252a53ea4643faa3fd", "eventname" : "Update", "state" : { "type" : "Array", "value" : [ { "type" : "ByteString", "value" : "r6jbcP2s5N7DIvRYS2ZiFdP7YXA=" } ] } } ], "stack" : [ { "type" : "Any" } ], "trigger" : "Application", "vmstate" : "HALT" } ], "txid" : "0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d" } } ``` C# application log for the same transaction: ``` anna@kiwi:~/Documents/GitProjects/nspcc-dev/neo-go$ curl -d '{ "jsonrpc": "2.0", "id": 1, "method": "getapplicationlog", "params": ["0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d"] }' localhost:50332 | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 439 0 297 100 142 3502 1674 --:--:-- --:--:-- --:--:-- 5226 { "id" : 1, "jsonrpc" : "2.0", "result" : { "executions" : [ { "exception" : "Cannot call this method with the flag States, AllowNotify.", "gasconsumed" : "5684010", "notifications" : [], "stack" : [], "trigger" : "Application", "vmstate" : "FAULT" } ], "txid" : "0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d" } } ``` Signed-off-by: Anna Shaleva <[email protected]>
11 tasks
NGDAdmin
pushed a commit
to neo-project/neo
that referenced
this pull request
Apr 24, 2025
…3909) * Native: revert Update/Deploy callflag change for pre-Aspidochelone #2653 changed required callflags of native ContractManagement's Update and Deploy methods from States|AllowNotify to All. This change didn't affect N3 mainnet/T5 (ref. #2673), but the problem is that this change affected NeoFS mainnet network (see nspcc-dev/neo-go#2848 and commits description). This commit fixes state difference between Go and C# nodes at height 451626 of NeoFS mainnet. Note that this commit does not affect existing N3 mainnet/testnet states, so no resynchronisation is required on update. The difference itself: ``` go run scripts/compare-dumps/compare-dumps.go ./godump-echidna-neofs-mainnet/ ../../neo-project/neo/neo-cli-notary-mainnet/Storage_0572dfa5/ Processing directory BlockStorage_0 Processing directory BlockStorage_100000 Processing directory BlockStorage_200000 Processing directory BlockStorage_300000 Processing directory BlockStorage_400000 Processing directory BlockStorage_500000 file BlockStorage_500000/dump-block-452000.json: block 451626, changes length mismatch: 25 vs 11 compare-dumps dumpDirA dumpDirB exit status 1 ``` Go node application log for the problem transaction: ``` anna@kiwi:~/Documents/GitProjects/nspcc-dev/neo-go$ curl -d '{ "jsonrpc": "2.0", "id": 1, "method": "getapplicationlog", "params": ["0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d"] }' localhost:40332 | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 592 100 450 100 142 461k 145k --:--:-- --:--:-- --:--:-- 578k { "id" : 1, "jsonrpc" : "2.0", "result" : { "executions" : [ { "exception" : null, "gasconsumed" : "900316660", "invocations" : null, "notifications" : [ { "contract" : "0xfffdc93764dbaddd97c48f252a53ea4643faa3fd", "eventname" : "Update", "state" : { "type" : "Array", "value" : [ { "type" : "ByteString", "value" : "r6jbcP2s5N7DIvRYS2ZiFdP7YXA=" } ] } } ], "stack" : [ { "type" : "Any" } ], "trigger" : "Application", "vmstate" : "HALT" } ], "txid" : "0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d" } } ``` C# application log for the same transaction: ``` anna@kiwi:~/Documents/GitProjects/nspcc-dev/neo-go$ curl -d '{ "jsonrpc": "2.0", "id": 1, "method": "getapplicationlog", "params": ["0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d"] }' localhost:50332 | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 439 0 297 100 142 3502 1674 --:--:-- --:--:-- --:--:-- 5226 { "id" : 1, "jsonrpc" : "2.0", "result" : { "executions" : [ { "exception" : "Cannot call this method with the flag States, AllowNotify.", "gasconsumed" : "5684010", "notifications" : [], "stack" : [], "trigger" : "Application", "vmstate" : "FAULT" } ], "txid" : "0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d" } } ``` Signed-off-by: Anna Shaleva <[email protected]> * Native: move Update/Deploy callflags check to Management implementation Make these checks implementation-specific in order not to affect the general native invocation code. Ref. #3909 (review). Signed-off-by: Anna Shaleva <[email protected]> --------- Signed-off-by: Anna Shaleva <[email protected]>
cschuchardt88
pushed a commit
to cschuchardt88/neo
that referenced
this pull request
Jun 8, 2025
…eo-project#3909) * Native: revert Update/Deploy callflag change for pre-Aspidochelone neo-project#2653 changed required callflags of native ContractManagement's Update and Deploy methods from States|AllowNotify to All. This change didn't affect N3 mainnet/T5 (ref. neo-project#2673), but the problem is that this change affected NeoFS mainnet network (see nspcc-dev/neo-go#2848 and commits description). This commit fixes state difference between Go and C# nodes at height 451626 of NeoFS mainnet. Note that this commit does not affect existing N3 mainnet/testnet states, so no resynchronisation is required on update. The difference itself: ``` go run scripts/compare-dumps/compare-dumps.go ./godump-echidna-neofs-mainnet/ ../../neo-project/neo/neo-cli-notary-mainnet/Storage_0572dfa5/ Processing directory BlockStorage_0 Processing directory BlockStorage_100000 Processing directory BlockStorage_200000 Processing directory BlockStorage_300000 Processing directory BlockStorage_400000 Processing directory BlockStorage_500000 file BlockStorage_500000/dump-block-452000.json: block 451626, changes length mismatch: 25 vs 11 compare-dumps dumpDirA dumpDirB exit status 1 ``` Go node application log for the problem transaction: ``` anna@kiwi:~/Documents/GitProjects/nspcc-dev/neo-go$ curl -d '{ "jsonrpc": "2.0", "id": 1, "method": "getapplicationlog", "params": ["0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d"] }' localhost:40332 | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 592 100 450 100 142 461k 145k --:--:-- --:--:-- --:--:-- 578k { "id" : 1, "jsonrpc" : "2.0", "result" : { "executions" : [ { "exception" : null, "gasconsumed" : "900316660", "invocations" : null, "notifications" : [ { "contract" : "0xfffdc93764dbaddd97c48f252a53ea4643faa3fd", "eventname" : "Update", "state" : { "type" : "Array", "value" : [ { "type" : "ByteString", "value" : "r6jbcP2s5N7DIvRYS2ZiFdP7YXA=" } ] } } ], "stack" : [ { "type" : "Any" } ], "trigger" : "Application", "vmstate" : "HALT" } ], "txid" : "0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d" } } ``` C# application log for the same transaction: ``` anna@kiwi:~/Documents/GitProjects/nspcc-dev/neo-go$ curl -d '{ "jsonrpc": "2.0", "id": 1, "method": "getapplicationlog", "params": ["0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d"] }' localhost:50332 | json_pp % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 439 0 297 100 142 3502 1674 --:--:-- --:--:-- --:--:-- 5226 { "id" : 1, "jsonrpc" : "2.0", "result" : { "executions" : [ { "exception" : "Cannot call this method with the flag States, AllowNotify.", "gasconsumed" : "5684010", "notifications" : [], "stack" : [], "trigger" : "Application", "vmstate" : "FAULT" } ], "txid" : "0x5028585a5c27b7f357771fa8b512c2d1b0ba40dcb3ea30e67d3db2d75d2da60d" } } ``` Signed-off-by: Anna Shaleva <[email protected]> * Native: move Update/Deploy callflags check to Management implementation Make these checks implementation-specific in order not to affect the general native invocation code. Ref. neo-project#3909 (review). Signed-off-by: Anna Shaleva <[email protected]> --------- Signed-off-by: Anna Shaleva <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Not tested yet.