neoneo-go/pkg/core
Roman Khimov 236438d799 core: do MPT compaction every once in a while
We need to compact our in-memory MPT from time to time, otherwise it quickly
fills up all available memory. This raises two obvious quesions --- when to do
that and to what level do that.

As for 'when', I think it's quite easy to use our regular persistence interval
as an anchor (and it also frees up some memory), but we can't do that in the
persistence routine itself because of synchronization issues (adding some
synchronization primitives would add some cost that I'd also like to avoid),
so do it indirectly by comparing persisted and current height in `storeBlock`.

Choosing proper level is another problem, but if we're to roughly estimate one
full branch node to use 1K of memory (usually it's way less than that) then we
can easily store 1K of these nodes and that gives us a depth of 10 for our
trie.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2020-07-30 12:42:15 +03:00
..
block rpc: adjust getblock RPC-call JSON fields names 2020-07-09 17:34:53 +03:00
blockchainer core: update MPT during block processing 2020-07-30 12:42:15 +03:00
dao core: update MPT during block processing 2020-07-30 12:42:15 +03:00
interop interop: add Secp2k to the list of crypto interops 2020-07-29 13:43:33 +03:00
mempool transaction: drop old attributes 2020-07-10 20:40:27 +03:00
mpt mpt: fix extension node cache invalidation 2020-07-30 12:42:15 +03:00
native core: decouple native contracts from interop service 2020-07-29 10:33:18 +03:00
state core: update MPT during block processing 2020-07-30 12:42:15 +03:00
storage mpt: implement MPT trie 2020-07-30 12:42:15 +03:00
test_data rpc: adjust getrawtransaction RPC-call JSON fields names 2020-07-15 14:44:13 +03:00
transaction Merge pull request #1169 from nspcc-dev/neo3/rpc/fields_names_adjustment 2020-07-15 18:24:54 +03:00
blockchain.go core: do MPT compaction every once in a while 2020-07-30 12:42:15 +03:00
blockchain_test.go core, vm: store VMState as byte instead of string 2020-07-29 10:14:08 +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 *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
helper_test.go core: decouple native contracts from interop service 2020-07-29 10:33:18 +03:00
interop_neo.go dao: migrate nep5 balances with the contract 2020-07-17 19:03:12 +03:00
interop_neo_test.go manifest: remove EntryPoint from manifest 2020-07-27 11:08:01 +03:00
interop_system.go *: support _initialize method in contracts 2020-07-27 13:00:35 +03:00
interop_system_test.go core: allow to restrict creating callbacks from syscalls 2020-07-29 13:41:08 +03:00
interops.go core: allow to restrict creating callbacks from syscalls 2020-07-29 13:41:08 +03:00
interops_test.go block/transaction: add network magic into the hash 2020-06-18 12:39:50 +03:00
native_contract_test.go core: decouple native contracts from interop service 2020-07-29 10:33:18 +03:00
native_policy_test.go core, vm: store VMState as byte instead of string 2020-07-29 10:14:08 +03:00
opcode_price.go core: add prices for TRY* opcodes 2020-07-29 13:41:08 +03:00
prometheus.go core: refactor out MemPool 2020-01-16 10:16:24 +03:00
util.go core: fix CalculateNetworkFee() for multisig contracts 2020-07-13 18:05:46 +03:00
util_test.go core: rename Neo.Crypto.CheckMultisig to Neo.Crypto.CheckMultisigWithECDsaSecp256r1 2020-07-14 16:19:12 +03:00