neo-go/pkg/core
Roman Khimov 20b19d4599 interop/contract: fix state rollbacks for nested contexts
Our wrapping optimization relied on the caller context having a TRY block,
but each context (including internal calls!) has an exception handling stack
of its own, which means that for an invocation stack of

    entry
    A.someMethodFromEntry()   # this one has a TRY
    A.internalMethodViaCALL() # this one doesn't
    B.someMethod()

we get `HasTryBlock() == false` for `A.internalMethodViaCALL()` context, which
leads to missing wrapper and missing rollbacks if B is to THROW. What this
patch does instead is it checks for any context within contract boundaries.

Fixes #3045.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2023-06-29 11:35:10 +03:00
..
block *: use require.ErrorIs instead of require.True(t, error.Is()) 2023-05-04 17:03:47 +03:00
chaindump *: use require.ErrorIs instead of require.True(t, error.Is()) 2023-05-04 17:03:47 +03:00
dao *: use require.ErrorIs instead of require.True(t, error.Is()) 2023-05-04 17:03:47 +03:00
fee vm: add PUSHT and PUSHF opcodes 2022-12-02 10:02:33 +03:00
interop interop/contract: fix state rollbacks for nested contexts 2023-06-29 11:35:10 +03:00
mempool mempool: adjust the rule of conflicting transaction ranking 2023-06-01 13:33:21 +03:00
mempoolevent *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
mpt *: use require.ErrorIs instead of require.True(t, error.Is()) 2023-05-04 17:03:47 +03:00
native native: move BLS12-381-related operations to a separate file 2023-06-15 18:58:27 +03:00
state native: optimize vote reward data (fix #2844) 2023-04-20 17:41:14 +08:00
stateroot *: adjust Prometheus metrics initialisation on node start 2023-04-25 16:25:18 +03:00
statesync config: replace VerifyBlocks with SkipBlockVerification 2022-12-07 17:35:56 +03:00
storage *: add nolint comments to multiple errors wrapping 2023-03-15 16:38:01 +03:00
test_data core: refactor helper test contracts generation 2022-03-30 11:46:29 +03:00
transaction *: use require.ErrorIs instead of require.True(t, error.Is()) 2023-05-04 17:03:47 +03:00
basic_chain_test.go config: add a special Blockchain type to configure Blockchain 2022-12-07 17:35:53 +03:00
bench_test.go core: make GetHeaderHash accept uint32 2022-11-25 14:30:51 +03:00
blockchain.go core: add nolint comment for deprecated error format style 2023-04-28 12:13:21 +03:00
blockchain_core_test.go *: use require.ErrorIs instead of require.True(t, error.Is()) 2023-05-04 17:03:47 +03:00
blockchain_neotest_test.go *: use require.ErrorIs instead of require.True(t, error.Is()) 2023-05-04 17:03:47 +03:00
doc.go *: apply go 1.19 formatter heuristics 2022-08-09 15:37:52 +03:00
headerhashes.go core: don't always store all hashes in memory 2022-11-25 14:30:51 +03:00
helper_test.go config: add a special Blockchain type to configure Blockchain 2022-12-07 17:35:53 +03:00
interops.go runtime: implement System.Runtime.LoadScript, fix #2701 2022-11-25 15:11:49 +03:00
native_designate_test.go *: use require.ErrorIs instead of require.True(t, error.Is()) 2023-05-04 17:03:47 +03:00
prometheus.go core: distinguish notarypool/mempool metrics 2023-04-13 18:40:19 +03:00
util.go core: simplify header hash list restoration logic 2022-11-25 13:08:03 +03:00
util_test.go core: export CreateGenesisBlock 2022-06-08 18:20:34 +03:00