neo-go/pkg
Anna Shaleva cc960d5a95 native: fix native deploy process
It doesn't work for contracts enabled starting from non-nil hardfork:
```
--- FAIL: TestStateroot_GetLatestStateHeight (0.00s)
    logger.go:146: 2024-06-04T17:08:35.263+0300	INFO	initial gas supply is not set or wrong, setting default value	{"InitialGASSupply": "52000000"}
    logger.go:146: 2024-06-04T17:08:35.263+0300	INFO	mempool size is not set or wrong, setting default value	{"MemPoolSize": 50000}
    logger.go:146: 2024-06-04T17:08:35.263+0300	INFO	P2PNotaryRequestPayloadPool size is not set or wrong, setting default value	{"P2PNotaryRequestPayloadPoolSize": 1000}
    logger.go:146: 2024-06-04T17:08:35.263+0300	INFO	MaxBlockSize is not set or wrong, setting default value	{"MaxBlockSize": 262144}
    logger.go:146: 2024-06-04T17:08:35.263+0300	INFO	MaxBlockSystemFee is not set or wrong, setting default value	{"MaxBlockSystemFee": 900000000000}
    logger.go:146: 2024-06-04T17:08:35.263+0300	INFO	MaxTransactionsPerBlock is not set or wrong, using default value	{"MaxTransactionsPerBlock": 512}
    logger.go:146: 2024-06-04T17:08:35.263+0300	INFO	MaxValidUntilBlockIncrement is not set or wrong, using default value	{"MaxValidUntilBlockIncrement": 86400}
    logger.go:146: 2024-06-04T17:08:35.263+0300	INFO	Hardforks are not set, using default value
    logger.go:146: 2024-06-04T17:08:35.266+0300	INFO	no storage version found! creating genesis block
    chain.go:227:
        	Error Trace:	/home/anna/Documents/GitProjects/nspcc-dev/neo-go/pkg/neotest/chain/chain.go:227
        	            				/home/anna/Documents/GitProjects/nspcc-dev/neo-go/pkg/neotest/chain/chain.go:217
        	            				/home/anna/Documents/GitProjects/nspcc-dev/neo-go/pkg/services/stateroot/service_test.go:319
        	Error:      	Received unexpected error:
        	            	onPersist failed: VM has failed: at instruction 0 (SYSCALL): native contract descriptor cache is not initialized: contract c1e14f19c3e60d0b9244d06dd7ba9b113135ec3b, hardfork Default
        	Test:       	TestStateroot_GetLatestStateHeight
FAIL
coverage: 28.6% of statements

```

It happens because ActiveIn hardfork wasn't taken into account during
`latestHF` computation. This commit also removes the reusage of
`activeIn` variable in deploy procedure, it's misleading and not
necessary startign from #3444.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
2024-07-15 13:53:28 +03:00
..
compiler native: autogenerate nativehashes package 2024-05-14 09:39:53 +03:00
config core: introduce Echidna hardfork 2024-07-15 13:53:27 +03:00
consensus consensus: use better dbFT 2024-03-25 19:21:51 +03:00
core native: fix native deploy process 2024-07-15 13:53:28 +03:00
crypto crypto: export GetSignedData function 2024-05-13 09:33:42 +03:00
encoding *: drop go 1.18 support in doc and build targets 2023-10-12 17:59:42 +03:00
interop core: move P2PNotary node role out of P2PSigExtensions 2024-05-21 12:10:47 +03:00
io *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
neorpc neorpc: extend getpeers method 2024-06-27 10:41:59 +01:00
neotest crypto: add StringCompressed() for PublicKey 2024-04-11 15:24:46 +03:00
network Merge pull request #3501 from NeoGoBros/add-max-array-size-test 2024-07-03 19:34:14 +03:00
rpcclient Merge pull request #3481 from EdgeDLT/getPeerHeights 2024-06-28 11:07:09 +03:00
services rpcsrv: improve witness verification error 2024-07-11 12:03:34 +03:00
smartcontract smartcontract: ensure nil ParameterContext Item's script is marshallable 2024-04-18 13:55:05 +03:00
util *: Convert slices to arrays instead of copy where possible 2024-07-05 20:36:22 +04:00
vm Merge pull request #3460 from NeoGoBros/add-onexec-hook 2024-07-03 13:21:46 +03:00
wallet wallet: do not store deployed contract script inside Contract account 2024-06-05 15:27:20 +03:00