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

Optimize vote reward data #2892

Merged
merged 1 commit into from
Apr 20, 2023

Conversation

ZhangTao1596
Copy link

@ZhangTao1596 ZhangTao1596 commented Jan 30, 2023

Problem

Close #2844

Solution

neo-project/neo#2815 (comment)

Test

GAS balances

GAS balances are compared
through FindStates and GetState at specific height by https://github.com/ZhangTao1596/NeoUtil/blob/4eb7f0bb9f8cbef30216bb597d3b2da328d222e8/Compare/GasComparer.cs#L83

Sync

network & config branch chains size sync time (h:m)
mainnet fullstate master 28G 2:27
this patch 25G 2:15
fs mainnet fullstate master 9.3G 1:17
this patch 8.6G 1:11
testnet fullstate master 6G 0:42
this patch 4.8G 0:37
mainnet lateststate 2911479 master 4.5G 6:10
4.6G 7:45
4.6G 6:29
this patch 4.2G 4:06
4.2G 4:10
BoltDB mainnet fullstate master 49G 22:11
this patch 43G 18:09

Copy link
Member

@roman-khimov roman-khimov left a 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).

pkg/core/native/native_neo.go Outdated Show resolved Hide resolved
pkg/core/native/native_neo.go Outdated Show resolved Hide resolved
pkg/core/native/native_neo.go Show resolved Hide resolved
pkg/core/native/native_neo.go Show resolved Hide resolved
pkg/services/rpcsrv/server.go Outdated Show resolved Hide resolved
@roman-khimov roman-khimov added the performance More of something per second label Jan 30, 2023
@ZhangTao1596 ZhangTao1596 force-pushed the optimize-vote-reward branch 2 times, most recently from 56e54bb to decd660 Compare February 1, 2023 10:19
@ZhangTao1596
Copy link
Author

ZhangTao1596 commented Feb 1, 2023

Gas balances are retested today on Testnet.

@roman-khimov
Copy link
Member

Can you also check NeoFS mainnet sync? The config is in config/protocol.mainnet.neofs.yml. Another thing to try is BoltDB, it's somewhat different. And KeepOnlyLatestState to see if it affects this as well.

@roman-khimov
Copy link
Member

@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.

@ZhangTao1596
Copy link
Author

ZhangTao1596 commented Feb 10, 2023

BoltDB is still of interest, we use it a lot

I'm still testing bloltdb sync. But it seems performance is poor with boltdb and I met an out of memory problem.
It only takes nearly 2hours when sync mannet fullstate with leveldb while boltdb takes around 20+hours.

I will add new comment when test finished.

@roman-khimov
Copy link
Member

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.

@ZhangTao1596
Copy link
Author

Mainnet fullstate sync with BoltDB

branch sync time data size
master 22:11 49G
this patch 18:09 43G

pkg/core/native/native_neo.go Outdated Show resolved Hide resolved
pkg/core/native/native_neo.go Outdated Show resolved Hide resolved
@ZhangTao1596 ZhangTao1596 force-pushed the optimize-vote-reward branch from decd660 to 658a12d Compare March 1, 2023 09:12
pkg/core/native/native_neo.go Outdated Show resolved Hide resolved
pkg/core/state/native_state.go Outdated Show resolved Hide resolved
ROADMAP.md Outdated Show resolved Hide resolved
pkg/core/state/native_state.go Show resolved Hide resolved
pkg/core/native/native_neo.go Outdated Show resolved Hide resolved
pkg/core/native/native_test/neo_test.go Show resolved Hide resolved
pkg/interop/native/neo/neo.go Show resolved Hide resolved
@ZhangTao1596 ZhangTao1596 force-pushed the optimize-vote-reward branch from 8d2f098 to c94722b Compare March 29, 2023 03:08
go.work.sum Outdated Show resolved Hide resolved
pkg/core/native/native_test/neo_test.go Show resolved Hide resolved
@ZhangTao1596 ZhangTao1596 force-pushed the optimize-vote-reward branch from c94722b to 1d4e735 Compare March 30, 2023 02:18
Copy link
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg/core/blockchain.go Outdated Show resolved Hide resolved
@ZhangTao1596 ZhangTao1596 force-pushed the optimize-vote-reward branch from 1d4e735 to 1a6bee3 Compare March 31, 2023 02:16
AnnaShaleva
AnnaShaleva previously approved these changes Mar 31, 2023
Copy link
Member

@AnnaShaleva AnnaShaleva left a 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

@AnnaShaleva AnnaShaleva dismissed their stale review March 31, 2023 06:26

Tests are failing.

@AnnaShaleva
Copy link
Member

@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.

@ZhangTao1596 ZhangTao1596 force-pushed the optimize-vote-reward branch from 1a6bee3 to bb444b8 Compare April 20, 2023 02:39
@ZhangTao1596 ZhangTao1596 force-pushed the optimize-vote-reward branch from bb444b8 to a4442e4 Compare April 20, 2023 02:46
@ZhangTao1596
Copy link
Author

@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.

Done.

Copy link
Member

@AnnaShaleva AnnaShaleva left a 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

@ZhangTao1596
Copy link
Author

and

TestRPC/http/single_request/invokefunctionhistoric/positive,_by_stateroot

and

TestRPC/http/single_request/invokefunction/positive,_with_storage_changes

Why gitflow doesn't fail? 🤔

@AnnaShaleva
Copy link
Member

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.

@ZhangTao1596
Copy link
Author

🥲

neo-go (optimize-vote-reward*) $ go test -v -race ./... | grep FAIL                                                                                                                             ⌚ 16:02:52 
--- FAIL: TestClientNEOContract (0.13s)
--- FAIL: TestRPC (6.30s)
    --- FAIL: TestRPC/http (2.97s)
        --- FAIL: TestRPC/http/single_request (0.30s)
            --- FAIL: TestRPC/http/single_request/invokecontractverifyhistoric (0.04s)
                --- FAIL: TestRPC/http/single_request/invokecontractverifyhistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/http/single_request/invokefunctionhistoric (0.02s)
                --- FAIL: TestRPC/http/single_request/invokefunctionhistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/http/single_request/invokescripthistoric (0.04s)
                --- FAIL: TestRPC/http/single_request/invokescripthistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/http/single_request/invokefunction (0.01s)
                --- FAIL: TestRPC/http/single_request/invokefunction/positive,_with_storage_changes (0.00s)
        --- FAIL: TestRPC/http/batch_with_single_request (0.29s)
            --- FAIL: TestRPC/http/batch_with_single_request/invokescripthistoric (0.04s)
                --- FAIL: TestRPC/http/batch_with_single_request/invokescripthistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/http/batch_with_single_request/invokefunction (0.01s)
                --- FAIL: TestRPC/http/batch_with_single_request/invokefunction/positive,_with_storage_changes (0.00s)
            --- FAIL: TestRPC/http/batch_with_single_request/invokecontractverifyhistoric (0.04s)
                --- FAIL: TestRPC/http/batch_with_single_request/invokecontractverifyhistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/http/batch_with_single_request/invokefunctionhistoric (0.03s)
                --- FAIL: TestRPC/http/batch_with_single_request/invokefunctionhistoric/positive,_by_stateroot (0.00s)
        --- FAIL: TestRPC/http/batch_with_multiple_requests (0.18s)
            --- FAIL: TestRPC/http/batch_with_multiple_requests/invokecontractverifyhistoric (0.03s)
            --- FAIL: TestRPC/http/batch_with_multiple_requests/invokefunctionhistoric (0.02s)
            --- FAIL: TestRPC/http/batch_with_multiple_requests/invokescripthistoric (0.03s)
            --- FAIL: TestRPC/http/batch_with_multiple_requests/invokefunction (0.01s)
        --- FAIL: TestRPC/http/getstateroot (0.00s)
            --- FAIL: TestRPC/http/getstateroot/20 (0.00s)
    --- FAIL: TestRPC/websocket (3.33s)
        --- FAIL: TestRPC/websocket/single_request (0.41s)
            --- FAIL: TestRPC/websocket/single_request/invokecontractverifyhistoric (0.05s)
                --- FAIL: TestRPC/websocket/single_request/invokecontractverifyhistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/websocket/single_request/invokefunctionhistoric (0.03s)
                --- FAIL: TestRPC/websocket/single_request/invokefunctionhistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/websocket/single_request/invokescripthistoric (0.04s)
                --- FAIL: TestRPC/websocket/single_request/invokescripthistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/websocket/single_request/invokefunction (0.02s)
                --- FAIL: TestRPC/websocket/single_request/invokefunction/positive,_with_storage_changes (0.00s)
        --- FAIL: TestRPC/websocket/batch_with_single_request (0.40s)
            --- FAIL: TestRPC/websocket/batch_with_single_request/invokecontractverifyhistoric (0.05s)
                --- FAIL: TestRPC/websocket/batch_with_single_request/invokecontractverifyhistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/websocket/batch_with_single_request/invokefunctionhistoric (0.03s)
                --- FAIL: TestRPC/websocket/batch_with_single_request/invokefunctionhistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/websocket/batch_with_single_request/invokescripthistoric (0.05s)
                --- FAIL: TestRPC/websocket/batch_with_single_request/invokescripthistoric/positive,_by_stateroot (0.00s)
            --- FAIL: TestRPC/websocket/batch_with_single_request/invokefunction (0.02s)
                --- FAIL: TestRPC/websocket/batch_with_single_request/invokefunction/positive,_with_storage_changes (0.01s)
        --- FAIL: TestRPC/websocket/batch_with_multiple_requests (0.25s)
            --- FAIL: TestRPC/websocket/batch_with_multiple_requests/invokescripthistoric (0.03s)
            --- FAIL: TestRPC/websocket/batch_with_multiple_requests/invokefunction (0.01s)
            --- FAIL: TestRPC/websocket/batch_with_multiple_requests/invokecontractverifyhistoric (0.03s)
            --- FAIL: TestRPC/websocket/batch_with_multiple_requests/invokefunctionhistoric (0.02s)
        --- FAIL: TestRPC/websocket/getstateroot (0.00s)
            --- FAIL: TestRPC/websocket/getstateroot/20 (0.00s)
FAIL
FAIL	github.com/nspcc-dev/neo-go/pkg/services/rpcsrv	67.995s
--- FAIL: TestUT (0.00s)
FAIL
FAIL	github.com/nspcc-dev/neo-go/pkg/vm	2.536s
FAIL
neo-go (optimize-vote-reward*) $

@AnnaShaleva
Copy link
Member

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 block20StateRootLE constant from the RPC server tests. After that there's a invokefunction/positive,_with_storage_changes test that compares storage data, it needs to be adjusted also.

Signed-off-by: ZhangTao1596 <zhangtao@ngd.neo.org>
@ZhangTao1596 ZhangTao1596 force-pushed the optimize-vote-reward branch from a4442e4 to fb7fce0 Compare April 20, 2023 09:41
@ZhangTao1596
Copy link
Author

TestNEO_GetAccountStateInteropAPI Failed. I think it's because this branch still depends on master pkg/interop.
Same result on my machine:
image

I suggest

  • use go.work to orginize modules to solve these self dependency problem, look:
    image Glad to find out that we update go version to 1.8. I'm used to use replace in go.mod to test locally changes and remove it before commit.

  • only log FAIL tests in github workflow.

@AnnaShaleva how do you think?

@AnnaShaleva
Copy link
Member

TestNEO_GetAccountStateInteropAPI Failed

It's OK for it to fail, I'll update interop dependencies in a separate PR after merge.

use go.work to orginize modules

Let's leave it for #2982, looks useful to me.

only log FAIL tests in github workflow

Also useful, let's make it in a separate PR.

@roman-khimov roman-khimov merged commit c50ab95 into nspcc-dev:master Apr 20, 2023
AnnaShaleva added a commit that referenced this pull request Apr 20, 2023
AnnaShaleva added a commit that referenced this pull request Apr 20, 2023
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
roman-khimov added a commit that referenced this pull request Apr 20, 2023
@ZhangTao1596 ZhangTao1596 deleted the optimize-vote-reward branch April 21, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance More of something per second
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store initial voter reward data in the NEO balance
3 participants