neoneo-go/pkg
Roman Khimov 423c7883b8 core: implement basic GC for value-based storage scheme
The key idea here is that even though we can't ensure MPT code won't make the
node active again we can order the changes made to the persistent store in
such a way that it practically doesn't matter. What happens is:
 * after persist if it's time to collect our garbage we do it synchronously
   right in the same thread working the underlying persistent store directly
 * all the other node code doesn't see much of it, it works with bc.dao or
   layers above it
 * if MPT doesn't find some stale deactivated node in the storage it's OK,
   it'll recreate it in bc.dao
 * if MPT finds it and activates it, it's OK too, bc.dao will store it
 * while GC is being performed nothing else changes the persistent store
 * all subsequent bc.dao persists only happen after the GC is completed which
   means that any changes to the (potentially) deleted nodes have a priority,
   it's OK for GC to delete something that'll be recreated with the next
   persist cycle

Otherwise it's a simple scheme with node status/last active height stored in
the value. Preliminary tests show that it works ~18% worse than the simple
KeepOnlyLatest scheme, but this seems to be the best result so far.

Fixes #2095.
2022-02-11 14:19:54 +03:00
..
compiler compiler: check overloaded methods for safeness one more time 2022-01-21 18:03:04 +03:00
config core: implement basic GC for value-based storage scheme 2022-02-11 14:19:54 +03:00
consensus config/core: allow to change the number of validators 2022-01-31 23:14:38 +03:00
core core: implement basic GC for value-based storage scheme 2022-02-11 14:19:54 +03:00
crypto core: drop GetStandBy* methods 2022-01-31 23:14:38 +03:00
encoding *: use internal variables for simple big.NewInt() values 2021-12-01 21:36:25 +03:00
interop interop: use All flags for management deploy and update calls 2022-01-31 22:21:08 +03:00
io io: optimize WriteString, avoid allocation 2021-12-01 21:36:25 +03:00
neotest compiler: update x/tools package 2022-01-20 13:21:26 +03:00
network config/core: allow to change the number of validators 2022-01-31 23:14:38 +03:00
rpc Merge pull request #2334 from nspcc-dev/extendable-validators 2022-02-01 12:09:56 +03:00
services Merge pull request #2323 from nspcc-dev/drop-blockchainer 2022-01-14 20:47:26 +03:00
smartcontract compiler: check overloaded methods for safeness one more time 2022-01-21 18:03:04 +03:00
util util: reduce allocations in util.Uint256DecodeStringLE 2021-08-17 16:53:39 +03:00
vm compiler: implement custom logic for go1.15 2022-01-21 17:43:28 +03:00
wallet Merge pull request #2264 from nspcc-dev/fix-win-tests 2021-11-29 11:25:35 +03:00