neoneo-go/pkg/core/interop
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
..
contract interop/contract: fix state rollbacks for nested contexts 2023-06-29 11:58:12 +03:00
crypto interop: wrap contract.LoadToken in context.LoadToken 2022-06-06 21:53:03 +03:00
interopnames runtime: implement System.Runtime.LoadScript, fix #2701 2022-11-25 15:11:49 +03:00
iterator rpc: implement iterator sessions 2022-07-08 17:05:18 +03:00
runtime *: fix Neo and NeoGo misuses 2022-12-07 17:29:09 +03:00
storage core: extend error text for storage context in dynamic script 2022-11-28 17:17:36 +03:00
context.go config: add a special Blockchain type to configure Blockchain 2022-12-07 17:35:53 +03:00
doc.go *: add more package-specific documentation 2021-03-19 16:18:45 +03:00
gas_price.go interop: fetch baseExecFee once and keep it in the Context 2021-08-11 15:42:23 +03:00