forked from TrueCloudLab/neoneo-go
a7457d08a1
This solves two problems: * adds support for shortened SYSCALL form that uses IDs (similar to #434, but for NEO 2.0, supporting both forms), which is important for compatibility with C# node and mainnet chain that uses it from some height * reworks interop plugging to use callbacks rather than appending to the map, these map mangling functions are clearly visible in the VM profiling statistics and we want spawning a VM to be fast, so it makes sense optimizing it. This change moves most of the work to the init() phase making VM setup cheaper. Caveats: * InteropNameToID accepts `[]byte` because that's the thing we have in SYSCALL processing and that's the most often usecase for it, it leads to some conversions in other places but that's acceptable because those are either tests or init() * three getInterop functions are: `getDefaultVMInterop`, `getSystemInterop` and `getNeoInterop` Our 100K (1.4M->1.5M) block import time improves by ~4% with this change. |
||
---|---|---|
.. | ||
cli | ||
opcode | ||
testdata | ||
tests | ||
context.go | ||
contract_checks.go | ||
contract_checks_test.go | ||
emit.go | ||
emit_test.go | ||
interop.go | ||
json_test.go | ||
output.go | ||
serialization.go | ||
stack.go | ||
stack_item.go | ||
stack_test.go | ||
state.go | ||
state_test.go | ||
vm.go | ||
vm_test.go |