neoneo-go/pkg/core
Roman Khimov 55b2cbb74d core: refactor and improve verification and pooling
Now we have VerifyTx() and PoolTx() APIs that either verify transaction in
isolation or verify it against the mempool (either the primary one or the one
given) and then add it there. There is no possibility to check against the
mempool, but not add a transaction to it, but I doubt we really need it.

It allows to remove some duplication between old PoolTx and verifyTx where
they both tried to check transaction against mempool (verifying first and then
adding it). It also saves us utility token balance check because it's done by
the mempool anyway and we no longer need to do that explicitly in verifyTx.

It makes AddBlock() and verifyBlock() transaction's checks more correct,
because previously they could miss that even though sender S has enough
balance to pay for A, B or C, he can't pay for all of them.

Caveats:
 * consensus is running concurrently to other processes, so things could
   change while verifyBlock() is iterating over transactions, this will be
   mitigated in subsequent commits

Improves TPS value for single node by at least 11%.

Fixes #667, fixes #668.
2020-08-20 18:50:18 +03:00
..
block block: update binary test data 2020-08-18 14:52:30 +03:00
blockchainer core: refactor and improve verification and pooling 2020-08-20 18:50:18 +03:00
dao state: drop Neo 2 Account and everything related 2020-08-11 20:42:02 +03:00
interop names: implement FromID 2020-08-14 14:22:45 +03:00
mempool core: refactor and improve verification and pooling 2020-08-20 18:50:18 +03:00
mpt *: fix misspellings found in Go Report Card 2020-08-14 12:16:24 +03:00
native core: fix getOnPersistWrapper for native contracts 2020-08-18 09:52:46 +03:00
state *: fix misspellings found in Go Report Card 2020-08-14 12:16:24 +03:00
storage always wrap errors when creating new ones with fmt.Errorf() 2020-08-07 12:21:52 +03:00
test_data block: update binary test data 2020-08-18 14:52:30 +03:00
transaction transaction: update binary test data 2020-08-18 15:09:30 +03:00
blockchain.go core: refactor and improve verification and pooling 2020-08-20 18:50:18 +03:00
blockchain_test.go core: refactor and improve verification and pooling 2020-08-20 18:50:18 +03:00
doc.go core: add Blockchain event subscription mechanism 2020-05-25 00:27:39 +03:00
gas_price.go *: move syscall handling out of VM 2020-07-29 13:41:08 +03:00
header_hash_list.go core: fix (*HeaderHashList).Write comment 2020-08-11 20:33:16 +03:00
helper_test.go core: replace interop names with named constants 2020-08-14 14:21:54 +03:00
interop_neo.go *: fix ineffassign where the value should really be used 2020-08-14 12:08:57 +03:00
interop_neo_test.go transaction: there are no valid attributes defined for preview3 2020-08-11 21:10:12 +03:00
interop_system.go vm: check return value on context unload 2020-08-10 11:52:33 +03:00
interop_system_test.go Merge pull request #1318 from nspcc-dev/fix/verifytests 2020-08-14 17:24:03 +03:00
interops.go core: replace interop names with named constants 2020-08-14 14:21:54 +03:00
interops_test.go core: add VM into interop context 2020-08-07 16:15:24 +03:00
native_contract_test.go core: add test to call contract from native 2020-08-07 20:31:16 +03:00
native_neo_test.go native: sort GetValidators result 2020-08-10 19:49:09 +03:00
native_policy_test.go *: fix ineffassign where the value should really be used 2020-08-14 12:08:57 +03:00
opcode_price.go core: add prices for TRY* opcodes 2020-07-29 13:41:08 +03:00
prometheus.go core: add state height to prometheus metrics 2020-07-30 12:42:15 +03:00
util.go core: replace interop names with named constants 2020-08-14 14:21:54 +03:00
util_test.go core: remove unnecessary comment 2020-08-04 17:34:06 +03:00