neoneo-go/pkg/config
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
..
netmode config: update mainnet magic 2021-07-21 14:42:26 +03:00
testdata config: add NativeUpdateHistory 2021-03-15 12:35:14 +03:00
application_config.go config: fix duration parameter types 2021-09-25 13:13:51 +03:00
config.go config: consolidate ProtocolConfiguration consistency checks 2022-01-24 18:42:57 +03:00
config_test.go config: add NativeUpdateHistory 2021-03-15 12:35:14 +03:00
doc.go *: add more package-specific documentation 2021-03-19 16:18:45 +03:00
notary_config.go core, network: add Notary module 2021-02-02 22:01:20 +03:00
oracle_config.go oracle: check response Content-Type 2021-07-12 13:13:48 +03:00
protocol_config.go core: implement basic GC for value-based storage scheme 2022-02-11 14:19:54 +03:00
protocol_config_test.go config/core: allow to change the number of validators 2022-01-31 23:14:38 +03:00
state_root.go stateroot: allow to sign new roots 2021-03-09 13:51:11 +03:00
wallet_config.go *: move wallet config from wallet to config package 2020-06-29 09:15:29 +03:00