Skip to content
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

Testnet can break after ContractManagement's update #2673

Closed
roman-khimov opened this issue Mar 9, 2022 · 7 comments
Closed

Testnet can break after ContractManagement's update #2673

roman-khimov opened this issue Mar 9, 2022 · 7 comments

Comments

@roman-khimov
Copy link
Contributor

Describe the bug
I'm not sure what's the current C# node (master/develop) behavior is, but it looks like #2653 fix for #2652 breaks testnet chain processing at block 558659. In NeoGo it looks like this:

2022-03-09T18:11:36.668+0300    WARN    contract invocation failed      {"tx": "657312ac7d7e38d92d0de7496556f92d6ad710af71c519a0f657e072b21ae7ba", "block": 558655, "error": "at instruction 43 (SYSCALL): failed to invoke syscall 1736177434: missing call flags for native 0 `update` operation call: 01011 vs 01111"}
2022-03-09T18:11:36.670+0300    WARN    contract invocation failed      {"tx": "9007ffb1d24fc076422929844bb31560e5f2dbe7f33c1b427ea5ba11e4344afe", "block": 558658, "error": "at instruction 91 (SYSCALL): failed to invoke syscall 1381727586: method not found: request/3"}
2022-03-09T18:11:36.671+0300    INFO    shutting down service   {"service": "Pprof", "endpoint": ":2113"}
2022-03-09T18:11:36.671+0300    INFO    shutting down service   {"service": "Prometheus", "endpoint": ":2112"}
2022-03-09T18:11:36.728+0300    INFO    persisted to disk       {"blocks": 715, "keys": 16956, "headerHeight": 558659, "blockHeight": 558658, "took": "54.395466ms"}
failed to add block 558659: onPersist failed: VM has failed: at instruction 0 (SYSCALL): insufficient funds

New rules break some old transaction which leads to incorrect GAS balance for an account that is a sender of another transaction in one of subsequent blocks. There is not enough GAS to cover for this transaction fees, so the chain can't be processed.

Expected behavior
I think we need height-dependent logic for it, maybe using NativeUpdateHistory.

(Optional) Additional context
Please try it on C# node.

@ZhangTao1596
Copy link

ZhangTao1596 commented Mar 10, 2022

image
Same error on C# node.
txid=0xf83243dde7525e3c805bb15bb593a00c68593ab8b0e372d57befc267e6c92aa2 sender=0xfe924b7cfe89ddd271abaf7210a80a7e11178758 needGas=10000000 gasBalance=0

@shargon
Copy link
Member

shargon commented Mar 11, 2022

I think we need height-dependent logic for it, maybe using NativeUpdateHistory.

Agree. We need versioning... #2632

@erikzhang
Copy link
Member

How is the situation on the mainnet?

@cloud8little
Copy link
Contributor

cloud8little commented Mar 17, 2022

How is the situation on the mainnet?

Data sync well on mainnet. But the issue still remains when nativecontract update, how will we process neo core update. this issue happens on testnet mainly because a contract update with a method with its parameters count changed from one to three.

@roman-khimov
Copy link
Contributor Author

Confirming mainnet operation, it works fine with full stateroot-level compatibility.

@superboyiii
Copy link
Member

image
Mainner is OK since there's no such kind of transaction.But we still have to solve this on testnet.

@roman-khimov
Copy link
Contributor Author

Solved by the new testnet (T5).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants