neoneo-go/pkg
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
..
compiler compiler: allow to alias interop packages 2020-08-19 10:13:36 +03:00
config *: use proper YAML library import path, fix #1306 2020-08-12 16:31:06 +03:00
consensus core: refactor and improve verification and pooling 2020-08-20 18:50:18 +03:00
core core: refactor and improve verification and pooling 2020-08-20 18:50:18 +03:00
crypto core: replace interop names with named constants 2020-08-14 14:21:54 +03:00
encoding remove github.com/pkg/errors from dependencies 2020-08-07 12:21:52 +03:00
internal core: verification script must return exactly one value 2020-08-17 22:02:15 +03:00
interop *: fix misspellings found in Go Report Card 2020-08-14 12:16:24 +03:00
io always wrap errors when creating new ones with fmt.Errorf() 2020-08-07 12:21:52 +03:00
network core: refactor and improve verification and pooling 2020-08-20 18:50:18 +03:00
rpc Merge pull request #1328 from nspcc-dev/tests/addnetworkfee 2020-08-18 15:30:47 +03:00
smartcontract Merge pull request #1318 from nspcc-dev/fix/verifytests 2020-08-14 17:24:03 +03:00
util *: use proper YAML library import path, fix #1306 2020-08-12 16:31:06 +03:00
vm vm: fix debugger and add tests 2020-08-18 11:26:27 +03:00
wallet wallet: emit proper multisignature 2020-08-18 11:24:48 +03:00