neo-go/pkg
Roman Khimov a1c4d7ce26 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.
2020-06-04 17:25:57 +03:00
..
compiler compiler: restore support for GetUnspentCoins 2020-05-22 13:24:44 +03:00
config config: move config.go out of config/ 2020-03-31 17:55:59 +03:00
consensus Merge pull request #1008 from nspcc-dev/feature/mpt 2020-06-03 16:07:04 +03:00
core core: do MPT compaction every once in a while 2020-06-04 17:25:57 +03:00
crypto core: implement key recover interops 2020-06-03 14:36:04 +03:00
encoding *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
internal random: make use or random package in tests 2020-03-27 10:27:46 +03:00
interop compiler: restore support for GetUnspentCoins 2020-05-22 13:24:44 +03:00
io *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
network network: add MPT-related P2P payloads 2020-06-03 13:33:44 +03:00
rpc rpc/client: handle client creation error in new wsclient 2020-05-18 16:25:36 +03:00
smartcontract smartcontract: add JSON marshal/unmarshal for InteropType 2020-05-13 17:17:41 +03:00
util testserdes: implement helpers for encode/decode routines 2020-03-27 10:27:46 +03:00
vm vm: make Iterator interface public 2020-05-27 11:40:46 +03:00
wallet wallet: check for t.GetSignedPart() result correctness 2020-05-07 21:48:45 +03:00