neo-go/pkg/vm
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
..
emit vm: allow to emit uint and uint64 as a part of array 2023-05-17 19:29:42 +03:00
invocations vm: move InvocationTree into a package of its own 2022-07-08 23:30:30 +03:00
opcode *: fix Neo and NeoGo misuses 2022-12-07 17:29:09 +03:00
stackitem native: allow to use EQUAL opcode for BLS12-381 points comparison 2023-06-15 15:00:27 +03:00
testdata vm: upgrade submodule 2022-05-12 14:25:14 +03:00
vmstate vm: move State type into a package of its own 2022-07-08 18:34:52 +03:00
bench_test.go vm: optimize IsSignatureContract 2022-06-07 10:29:13 +03:00
context.go interop/contract: fix state rollbacks for nested contexts 2023-06-29 11:35:10 +03:00
contract_checks.go vm: optimize IsSignatureContract 2022-06-07 10:29:13 +03:00
contract_checks_test.go vm: avoid panic in IsScriptCorrect 2022-03-17 20:12:50 +03:00
debug_test.go cli: properly handle run VM CLI command 2023-05-19 13:26:56 +03:00
exception.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
fuzz_test.go vm: add fuzz test for ParseMultiSigContract 2022-12-28 11:50:15 +03:00
invocation_tree_test.go vm: don't use Stack for istack 2022-11-18 11:35:29 +03:00
json_test.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
opcodebench_test.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
ref_counter.go vm: optimize refcounter 2022-08-23 13:18:06 +03:00
ref_counter_test.go vm/bench: extend refcounter benchmarks 2022-08-23 13:08:42 +03:00
slot.go vm: simplify (slot).Set code 2022-05-17 16:26:22 +03:00
slot_test.go vm: count initial Null slot variables as well 2022-05-16 17:42:57 +03:00
stack.go *: replace interface{} with any keyword 2023-04-04 13:22:42 +03:00
stack_test.go vm: rework stack as a simple slice 2021-08-24 15:28:14 +03:00
vm.go interop/contract: fix state rollbacks for nested contexts 2023-06-29 11:35:10 +03:00
vm_test.go native: allow to use EQUAL opcode for BLS12-381 points comparison 2023-06-15 15:00:27 +03:00