neoneo-go/pkg
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
..
compiler *: move syscall handling out of VM 2020-07-29 13:41:08 +03:00
config config: allow to specify config path directly 2020-07-03 11:47:56 +03:00
consensus *: move syscall handling out of VM 2020-07-29 13:41:08 +03:00
core core: do MPT compaction every once in a while 2020-07-30 12:42:15 +03:00
crypto keys: fix failing Secp256k1 test 2020-07-25 12:01:12 +03:00
encoding *: change address to the new format 2020-06-17 15:58:21 +03:00
internal core: rename Neo.Crypto.Verify to Neo.Crypto.VerifyWithECDsaSecp256r1 2020-07-14 16:19:12 +03:00
interop interop: update AppCall comment 2020-07-27 13:00:35 +03:00
io io: make maxArraySize public 2020-06-27 12:18:56 +03:00
network core: update MPT during block processing 2020-07-30 12:42:15 +03:00
rpc core: decouple native contracts from interop service 2020-07-29 10:33:18 +03:00
smartcontract *: move syscall handling out of VM 2020-07-29 13:41:08 +03:00
util util: fixed typo in method description 2020-05-20 23:26:51 +03:00
vm *: move syscall handling out of VM 2020-07-29 13:41:08 +03:00
wallet Merge pull request #1169 from nspcc-dev/neo3/rpc/fields_names_adjustment 2020-07-15 18:24:54 +03:00