neoneo-go/pkg
Roman Khimov 70aed34d77 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:58:12 +03:00
..
compiler compiler: don't panic, return error for strange range loops 2023-01-11 16:21:40 +03:00
config config: fix the default P2P ping settings 2022-12-07 21:29:40 +03:00
consensus consensus: perform batched chain's block sync 2023-03-15 17:45:56 +03:00
core interop/contract: fix state rollbacks for nested contexts 2023-06-29 11:58:12 +03:00
crypto *: fix Neo and NeoGo misuses 2022-12-07 17:29:09 +03:00
encoding bigint: don't reallocate big.Int in ToBytes(), fix #2864 2023-01-10 22:51:45 +03:00
interop interop: add getContractByID and getContractHashes to management 2022-12-02 10:54:45 +03:00
io *: fix Neo and NeoGo misuses 2022-12-07 17:29:09 +03:00
neorpc neorpc: add Copy to filters for easy deep copying 2023-03-16 23:43:00 +03:00
neotest config: replace VerifyBlocks with SkipBlockVerification 2022-12-07 17:35:56 +03:00
network consensus: enqueue newly created blocks 2023-03-15 17:37:47 +03:00
rpcclient Merge pull request #2938 from nspcc-dev/failing-actor-test 2023-03-17 11:46:31 +03:00
services rpc: emit Null in case of Any parameter with zero-len value 2023-06-29 11:51:40 +03:00
smartcontract rpcbinding: fix wrappers for Any type, fix #2898 2023-02-18 00:06:45 +03:00
util slice: add Clean microfunction 2022-09-02 14:44:32 +03:00
vm interop/contract: fix state rollbacks for nested contexts 2023-06-29 11:58:12 +03:00
wallet Merge pull request #2725 from nspcc-dev/move-cli-tests 2022-10-06 13:43:39 +07:00