From 4b95418a7a8d1c3d0b1b6365ceecdf182adb1c40 Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 9 Feb 2023 12:05:02 +0000 Subject: [PATCH] fix missing method --- docs/interacting-with-geth/rpc/ns-debug.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/interacting-with-geth/rpc/ns-debug.md b/docs/interacting-with-geth/rpc/ns-debug.md index 084ec27ec0..5003b2bda4 100644 --- a/docs/interacting-with-geth/rpc/ns-debug.md +++ b/docs/interacting-with-geth/rpc/ns-debug.md @@ -347,6 +347,20 @@ Sets the rate of mutex profiling. | Console | `debug.setMutexProfileFraction(rate int)` | | RPC | `{"method": "debug_setMutexProfileFraction", "params": [rate]}` | + +### debug_setTrieFlushInterval + +Configures how often in-memory state tries are persisted to disk. The interval needs to be in a format parsable by a [time.Duration](https://pkg.go.dev/time#ParseDuration). Note that the interval is not wall-clock time. Rather it is accumulated block processing time after which the state should be flushed. +For example the value `0s` will essentially turn on archive mode. If set to `1h`, it means that after one hour of effective block processing time, the trie would be flushed. If one block takes 200ms, a flush would occur every `5*3600=18000` blocks. The default interval for mainnet is `1h`. + +**Note:** this configuration will not be presisted through restarts. + +| Client | Method invocation | +| :------ | ---------------------------------------------------------------- | +| Console | `debug.setTrieFlushInterval(interval string)` | +| RPC | `{"method": "debug_setTrieFlushInterval", "params": [interval]}` | + + ### debug_stacks Returns a printed representation of the stacks of all goroutines. Note that the web3 wrapper for this method takes care of the printing and does not return the string.