-
Notifications
You must be signed in to change notification settings - Fork 81
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
Optimize vote reward data #2892
Optimize vote reward data #2892
Conversation
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.
We need more numbers and then please update the commit message with native:
prefix and mention that it fixes #2844 in the commit message (see the commit log for the general style).
56e54bb
to
decd660
Compare
Gas balances are retested today on Testnet. |
Can you also check NeoFS mainnet sync? The config is in |
@ZhangTao1596, I see there are some new numbers there and these numbers are good. But it'd be even better if we're to be notified about them, you can post a comment here when you update something. BoltDB is still of interest, we use it a lot. Other than that let's see how neo-project/neo#2841 goes, I'd really like it to be a part of the standard protocol, but we can also accept it as a useful extension. |
I'm still testing bloltdb sync. But it seems performance is poor with boltdb and I met an I will add new comment when test finished. |
Huh. That's interesting. Depending on config it can be slower/faster (like in https://neospcc.medium.com/cutting-blockchain-tail-with-neogo-5256a120f6bb), but usually OOM is not a problem. |
Mainnet fullstate sync with BoltDB
|
decd660
to
658a12d
Compare
8d2f098
to
c94722b
Compare
c94722b
to
1d4e735
Compare
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.
LGTM otherwise, good work!
@roman-khimov, what do you think about https://github.com/nspcc-dev/neo-go/pull/2892/files#r1152305735?
1d4e735
to
1a6bee3
Compare
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.
Could you, please, fix the test?
2023-03-31T02:24:38.8183186Z logger.go:130: 2023-03-31T02:18:49.714Z DEBUG done processing headers {"headerIndex": 10, "blockHeight": 9, "took": "233.403µs"}
2023-03-31T02:24:38.8183371Z === RUN TestBlockchain_GetClaimable/first_generation_period
2023-03-31T02:24:38.8183567Z blockchain_neotest_test.go:748:
2023-03-31T02:24:38.8184124Z Error Trace: /home/runner/work/neo-go/neo-go/pkg/core/blockchain_neotest_test.go:748
2023-03-31T02:24:38.8184368Z Error: Received unexpected error:
2023-03-31T02:24:38.8185013Z can't calculate bonus of height unequal (BlockHeight + 1)
2023-03-31T02:24:38.8185428Z Test: TestBlockchain_GetClaimable/first_generation_period
@ZhangTao1596, could you, please, rebase this PR onto the current master and fix the failing test I mentioned earlier? We'd like to merge this PR. |
1a6bee3
to
bb444b8
Compare
bb444b8
to
a4442e4
Compare
Done. |
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.
We have the following tests failing, could you, please, fix them?
2023-04-20T02:54:35.5729932Z --- PASS: TestClientManagementContract (0.19s)
2023-04-20T02:54:35.5730260Z === RUN TestClientNEOContract
2023-04-20T02:54:35.5731179Z logger.go:130: 2023-04-20T02:51:18.617Z INFO initial gas supply is not set or wrong, setting default value {"InitialGASSupply": "52000000"}
2023-04-20T02:54:35.5732378Z logger.go:130: 2023-04-20T02:51:18.617Z INFO P2PNotaryRequestPayloadPool size is not set or wrong, setting default value {"P2PNotaryRequestPayloadPoolSize": 1000}
2023-04-20T02:54:35.5733874Z logger.go:130: 2023-04-20T02:51:18.617Z INFO MaxBlockSize is not set or wrong, setting default value {"MaxBlockSize": 262144}
2023-04-20T02:54:35.5735256Z logger.go:130: 2023-04-20T02:51:18.618Z INFO MaxBlockSystemFee is not set or wrong, setting default value {"MaxBlockSystemFee": 900000000000}
2023-04-20T02:54:35.5736274Z logger.go:130: 2023-04-20T02:51:18.618Z INFO MaxTransactionsPerBlock is not set or wrong, using default value {"MaxTransactionsPerBlock": 512}
2023-04-20T02:54:35.5737350Z logger.go:130: 2023-04-20T02:51:18.618Z INFO MaxValidUntilBlockIncrement is not set or wrong, using default value {"MaxValidUntilBlockIncrement": 5760}
2023-04-20T02:54:35.5738197Z logger.go:130: 2023-04-20T02:51:18.620Z INFO no storage version found! creating genesis block
2023-04-20T02:54:35.5739428Z logger.go:130: 2023-04-20T02:51:18.624Z INFO ExtensiblePoolSize is not set or wrong, using default value {"ExtensiblePoolSize": 20}
2023-04-20T02:54:35.5740296Z logger.go:130: 2023-04-20T02:51:18.625Z INFO SessionPoolSize is not set or wrong, setting default value {"SessionPoolSize": 20}
2023-04-20T02:54:35.5741184Z logger.go:130: 2023-04-20T02:51:18.625Z INFO MaxWebSocketClients is not set or wrong, setting default value {"MaxWebSocketClients": 64}
2023-04-20T02:54:35.5741928Z logger.go:130: 2023-04-20T02:51:18.625Z INFO starting rpc-server {"endpoint": "localhost:0"}
2023-04-20T02:54:35.5742735Z logger.go:130: 2023-04-20T02:51:18.629Z DEBUG done processing headers {"headerIndex": 1, "blockHeight": 0, "took": "824.903µs"}
2023-04-20T02:54:35.5743698Z logger.go:130: 2023-04-20T02:51:18.632Z DEBUG done processing headers {"headerIndex": 2, "blockHeight": 1, "took": "658.102µs"}
2023-04-20T02:54:35.5744520Z logger.go:130: 2023-04-20T02:51:18.637Z DEBUG done processing headers {"headerIndex": 3, "blockHeight": 2, "took": "1.642005ms"}
2023-04-20T02:54:35.5748280Z logger.go:130: 2023-04-20T02:51:18.640Z DEBUG done processing headers {"headerIndex": 4, "blockHeight": 3, "took": "1.058404ms"}
2023-04-20T02:54:35.5749428Z logger.go:130: 2023-04-20T02:51:18.642Z DEBUG done processing headers {"headerIndex": 5, "blockHeight": 4, "took": "659.202µs"}
2023-04-20T02:54:35.5750868Z logger.go:130: 2023-04-20T02:51:18.643Z INFO bad notification {"contract": "565cff9508ebc75aadd7fe59f38dac610ab6093c", "event": "Transfer", "error": "parameter 0 type mismatch: Hash160 vs ByteString"}
2023-04-20T02:54:35.5751840Z logger.go:130: 2023-04-20T02:51:18.645Z DEBUG done processing headers {"headerIndex": 6, "blockHeight": 5, "took": "781.803µs"}
2023-04-20T02:54:35.5752674Z logger.go:130: 2023-04-20T02:51:18.648Z DEBUG done processing headers {"headerIndex": 7, "blockHeight": 6, "took": "625.402µs"}
2023-04-20T02:54:35.5753502Z logger.go:130: 2023-04-20T02:51:18.652Z DEBUG done processing headers {"headerIndex": 8, "blockHeight": 7, "took": "1.930606ms"}
2023-04-20T02:54:35.5754330Z logger.go:130: 2023-04-20T02:51:18.654Z DEBUG done processing headers {"headerIndex": 9, "blockHeight": 8, "took": "772.102µs"}
2023-04-20T02:54:35.5755138Z logger.go:130: 2023-04-20T02:51:18.658Z DEBUG done processing headers {"headerIndex": 10, "blockHeight": 9, "took": "730.302µs"}
2023-04-20T02:54:35.5755979Z logger.go:130: 2023-04-20T02:51:18.661Z DEBUG done processing headers {"headerIndex": 11, "blockHeight": 10, "took": "1.042104ms"}
2023-04-20T02:54:35.5756811Z logger.go:130: 2023-04-20T02:51:18.667Z DEBUG done processing headers {"headerIndex": 12, "blockHeight": 11, "took": "857.903µs"}
2023-04-20T02:54:35.5757644Z logger.go:130: 2023-04-20T02:51:18.670Z DEBUG done processing headers {"headerIndex": 13, "blockHeight": 12, "took": "1.025404ms"}
2023-04-20T02:54:35.5758466Z logger.go:130: 2023-04-20T02:51:18.673Z DEBUG done processing headers {"headerIndex": 14, "blockHeight": 13, "took": "796.703µs"}
2023-04-20T02:54:35.5759488Z logger.go:130: 2023-04-20T02:51:18.676Z DEBUG done processing headers {"headerIndex": 15, "blockHeight": 14, "took": "685.302µs"}
2023-04-20T02:54:35.5760340Z logger.go:130: 2023-04-20T02:51:18.681Z DEBUG done processing headers {"headerIndex": 16, "blockHeight": 15, "took": "1.615806ms"}
2023-04-20T02:54:35.5761672Z logger.go:130: 2023-04-20T02:51:18.685Z DEBUG done processing headers {"headerIndex": 17, "blockHeight": 16, "took": "864.003µs"}
2023-04-20T02:54:35.5762683Z logger.go:130: 2023-04-20T02:51:18.690Z DEBUG done processing headers {"headerIndex": 18, "blockHeight": 17, "took": "756.703µs"}
2023-04-20T02:54:35.5763462Z logger.go:130: 2023-04-20T02:51:18.693Z DEBUG done processing headers {"headerIndex": 19, "blockHeight": 18, "took": "1.319904ms"}
2023-04-20T02:54:35.5764263Z logger.go:130: 2023-04-20T02:51:18.696Z DEBUG done processing headers {"headerIndex": 20, "blockHeight": 19, "took": "818.802µs"}
2023-04-20T02:54:35.5765175Z logger.go:130: 2023-04-20T02:51:18.699Z DEBUG done processing headers {"headerIndex": 21, "blockHeight": 20, "took": "908.603µs"}
2023-04-20T02:54:35.5765971Z logger.go:130: 2023-04-20T02:51:18.702Z DEBUG done processing headers {"headerIndex": 22, "blockHeight": 21, "took": "743.902µs"}
2023-04-20T02:54:35.5766766Z logger.go:130: 2023-04-20T02:51:18.717Z DEBUG done processing headers {"headerIndex": 23, "blockHeight": 22, "took": "953.903µs"}
2023-04-20T02:54:35.5767831Z logger.go:130: 2023-04-20T02:51:18.718Z WARN contract invocation failed {"tx": "82279bfe9bada282ca0f8cb8e0bb124b921af36f00c69a518320322c6f4fef60", "block": 23, "error": "at instruction 0 (ABORT): ABORT"}
2023-04-20T02:54:35.5768777Z logger.go:130: 2023-04-20T02:51:18.720Z DEBUG processing rpc request {"method": "getversion", "params": "[]"}
2023-04-20T02:54:35.5769541Z logger.go:130: 2023-04-20T02:51:18.721Z DEBUG processing rpc request {"method": "getnativecontracts", "params": "[]"}
2023-04-20T02:54:35.5770660Z logger.go:130: 2023-04-20T02:51:18.733Z DEBUG processing rpc request {"method": "invokefunction", "params": "[ef4073a0f2b305a38ec4050e4d3d28bc40ea63f5 symbol ]"}
2023-04-20T02:54:35.5771653Z logger.go:130: 2023-04-20T02:51:18.735Z DEBUG processing rpc request {"method": "invokefunction", "params": "[ef4073a0f2b305a38ec4050e4d3d28bc40ea63f5 decimals ]"}
2023-04-20T02:54:35.5772757Z logger.go:130: 2023-04-20T02:51:18.736Z DEBUG processing rpc request {"method": "invokefunction", "params": "[ef4073a0f2b305a38ec4050e4d3d28bc40ea63f5 totalSupply ]"}
2023-04-20T02:54:35.5773809Z logger.go:130: 2023-04-20T02:51:18.737Z DEBUG processing rpc request {"method": "invokefunction", "params": "[ef4073a0f2b305a38ec4050e4d3d28bc40ea63f5 getCommittee ]"}
2023-04-20T02:54:35.5775206Z logger.go:130: 2023-04-20T02:51:18.739Z DEBUG processing rpc request {"method": "invokefunction", "params": "[ef4073a0f2b305a38ec4050e4d3d28bc40ea63f5 getNextBlockValidators ]"}
2023-04-20T02:54:35.5776334Z logger.go:130: 2023-04-20T02:51:18.741Z DEBUG processing rpc request {"method": "invokefunction", "params": "[ef4073a0f2b305a38ec4050e4d3d28bc40ea63f5 getGasPerBlock ]"}
2023-04-20T02:54:35.5777419Z logger.go:130: 2023-04-20T02:51:18.742Z DEBUG processing rpc request {"method": "invokefunction", "params": "[ef4073a0f2b305a38ec4050e4d3d28bc40ea63f5 getRegisterPrice ]"}
2023-04-20T02:54:35.5778616Z logger.go:130: 2023-04-20T02:51:18.744Z DEBUG processing rpc request {"method": "invokefunction", "params": "[ef4073a0f2b305a38ec4050e4d3d28bc40ea63f5 unclaimedGas ]"}
2023-04-20T02:54:35.5779085Z client_test.go:376:
2023-04-20T02:54:35.5779838Z Error Trace: /home/runner/work/neo-go/neo-go/pkg/services/rpcsrv/client_test.go:376
2023-04-20T02:54:35.5780331Z Error: Received unexpected error:
2023-04-20T02:54:35.5781605Z invocation failed: at instruction 113 (SYSCALL): can't calculate bonus of height unequal (BlockHeight + 1)
2023-04-20T02:54:35.5782115Z Test: TestClientNEOContract
2023-04-20T02:54:35.5782781Z logger.go:130: 2023-04-20T02:51:18.745Z INFO shutting down RPC server {"endpoint": "127.0.0.1:39477"}
2023-04-20T02:54:35.5783757Z logger.go:130: 2023-04-20T02:51:18.746Z INFO persisted to disk {"blocks": 23, "keys": 1236, "headerHeight": 23, "blockHeight": 23, "took": "1.382504ms"}
2023-04-20T02:54:35.5784263Z --- FAIL: TestClientNEOContract (0.13s)
and
TestRPC/http/single_request/invokefunctionhistoric/positive,_by_stateroot
and
TestRPC/http/single_request/invokefunction/positive,_with_storage_changes
Why gitflow doesn't fail? 🤔 |
It actually fails, see the logs of https://github.com/nspcc-dev/neo-go/actions/runs/4749984725/jobs/8437756522?pr=2892 for example. |
🥲
|
It's OK, don't be scared, all these tests are bound to the state data somehow, and it's clear that this PR changes state related data. It's not hard to fix, start with updating |
Signed-off-by: ZhangTao1596 <zhangtao@ngd.neo.org>
a4442e4
to
fb7fce0
Compare
I suggest
@AnnaShaleva how do you think? |
It's OK for it to fail, I'll update interop dependencies in a separate PR after merge.
Let's leave it for #2982, looks useful to me.
Also useful, let's make it in a separate PR. |
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
*: update interop deps after #2892
Problem
Close #2844
Solution
neo-project/neo#2815 (comment)
Test
GAS balances
GAS balances are compared
through
FindStates
andGetState
at specific height by https://github.com/ZhangTao1596/NeoUtil/blob/4eb7f0bb9f8cbef30216bb597d3b2da328d222e8/Compare/GasComparer.cs#L83Sync