neo-go/pkg/core
Anna Shaleva edfca68a17 rpc: refactor invokecontractverify
In `(c *Client) AddNetworkFee` we define network fee for contract
witness verification via `invokecontractverify` RPC call, and that's the
initial purpose of this RPC method. But it was not implemented
correctly. It used `System.Contract.Call` instead of beheiving like
`initVerificationVM`.

During real contract witness verification the whole contract's script is
loaded into VM, and then we jump to the `verify` method. Thus, to define
exact contract verification price, we should act like this (and not just
perform `System.Contract.Call` of `verify` method).

Tests are added.

This bug is the reason of adding extra GAS (c.notary.extraVerifyFee) to
pre-calculated value in
https://github.com/nspcc-dev/neofs-node/pull/404/files#diff-639db437ca2578db46c9e8cbf18f9aa01f8ca5aee30e0fa7e70ba0354822d7b3R237
2021-03-12 18:59:20 +03:00
..
block change block/tx/extensible signing process, fix #1741 2021-03-12 11:27:50 +03:00
blockchainer core: refactor initVerificationVM 2021-03-12 18:55:27 +03:00
chaindump blockchainer: allow to dump/restore chain 2020-11-24 16:43:11 +03:00
dao block: replace Base with Header 2021-03-10 13:38:44 +03:00
fee core/fee: alter opcode prices 2021-03-11 15:44:09 +03:00
interop native: support StorageFee 2021-03-11 10:12:30 +03:00
mempool *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
mpt mpt: allow to remove non-existent keys in batch 2021-02-17 12:37:44 +03:00
native native: change getCommittee/getNextBlockValidators price 2021-03-12 11:32:27 +03:00
state stateroot: move state-root related logic to core/stateroot 2021-03-09 13:48:29 +03:00
stateroot stateroot: broadcast state on new blocks 2021-03-09 13:51:11 +03:00
storage *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
test_data change block/tx/extensible signing process, fix #1741 2021-03-12 11:27:50 +03:00
transaction change block/tx/extensible signing process, fix #1741 2021-03-12 11:27:50 +03:00
blockchain.go core: refactor initVerificationVM 2021-03-12 18:55:27 +03:00
blockchain_test.go native: rename Price to CPUFee 2021-03-11 10:12:30 +03:00
doc.go core: add Blockchain event subscription mechanism 2020-05-25 00:27:39 +03:00
helper_test.go rpc: refactor invokecontractverify 2021-03-12 18:59:20 +03:00
interop_neo.go dao: use raw state.StorageItem instead of pointer 2021-03-09 12:11:25 +03:00
interop_neo_test.go dao: use raw state.StorageItem instead of pointer 2021-03-09 12:11:25 +03:00
interop_system.go dao: use raw state.StorageItem instead of pointer 2021-03-09 12:11:25 +03:00
interop_system_test.go core: remove System.Binary.[Serialize, Deserialize] syscalls 2021-03-10 19:24:19 +03:00
interops.go core: refactor Neo.Crypto.CheckMultisigWithECDsaSecpr1 2021-03-10 21:46:05 +03:00
interops_test.go core/state: remove IsConst from StorageItem 2021-03-09 11:59:08 +03:00
native_contract_test.go native: support StorageFee 2021-03-11 10:12:30 +03:00
native_designate_test.go native: add NeoFSAlphabet node role 2021-03-05 13:13:31 +03:00
native_ledger_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
native_management_test.go stateroot: move state-root related logic to core/stateroot 2021-03-09 13:48:29 +03:00
native_name_service_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
native_neo_test.go native: allow to set candidate register price 2021-03-11 10:12:30 +03:00
native_notary_test.go *: upgrade tests to use T.Cleanup() 2021-03-01 17:08:00 +03:00
native_oracle_test.go native: allow to set oracle request price 2021-03-11 10:12:30 +03:00
native_policy_test.go native: allow to set candidate register price 2021-03-11 10:12:30 +03:00
notary_test.go core: update Notary test 2021-03-01 17:08:00 +03:00
oracle_test.go native: rename Price to CPUFee 2021-03-11 10:12:30 +03:00
prometheus.go stateroot: move state-root related logic to core/stateroot 2021-03-09 13:48:29 +03:00
stateroot_test.go stateroot: broadcast state on new blocks 2021-03-09 13:51:11 +03:00
util.go block: replace Base with Header 2021-03-10 13:38:44 +03:00
util_test.go change block/tx/extensible signing process, fix #1741 2021-03-12 11:27:50 +03:00