• Sina Mahmoodi's avatar
    core,eth: add `debug_setTrieFlushInterval` to change trie flush frequency (#24785) · 711afbc7
    Sina Mahmoodi authored
    This PR makes it possible to modify the flush interval time via RPC. On one extreme, `0s`, it would act as an archive node. If set to `1h`, means that after one hour of effective block processing time, the trie would be flushed. If one block takes 200ms, this means that a flush would occur every `5*3600=18000`  blocks -- however, if the memory size of the cached states grows too large, it will flush sooner. 
    
    Essentially, this makes it possible to configure the node to be more or less "archive:ish", and without restarting the node while reconfiguring it.  
    711afbc7
web3ext.go 19.5 KB