This code was never invoked since we had no native contract enabled
starting from some hardfork, Notary is the first one. And luckily, we
have plenty of tests that fail due to this bug.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
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>
Use this constant as a dummy contract storage item prefix for those
situations when Billet is used as an MPT search wrapper. Otherwise it's
confusing to see `0` passed as a storage prefix to the billet
constructor and then panic inside the Billet's code if this prefix is
`0`.
Ref. https://github.com/nspcc-dev/neo-go/pull/2201.
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
The C# implementation only decrements the nesting depth once in the
parent composite condition (And, Or, or Not) and then passes that
already‐decremented value onto its subconditions without further
decrementing inside the loop.
Close#3809
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
Ignoring them is not correct. Notice that block-level aers are always present
and if filtering returns nothing the value of the resulting slice still remains
nil, so the behavior is the same.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
Add new RPC method to retrieve block notifications organized by trigger type.
Signed-off-by: Ricardo Prado <ricardo.prado@simpli.com.br>
Signed-off-by: Roman Khimov <roman@nspcc.ru>
Follow-up to 00e22b9751, while
stackitem.Convertible is good for vm/emit we still need
smartcontract.Convertible for invokers.
Signed-off-by: Roman Khimov <roman@nspcc.ru>
Reverting a part of 1b83dc2, because ranging over integers is not
supported by smart contract compiler, ref. #3525.
Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>