Skip to content

Commit

Permalink
doc: add setTrieFlushInterval method (#26366)
Browse files Browse the repository at this point in the history
debug: add setTrieFlushInterval method docs
  • Loading branch information
s1na committed Dec 15, 2022
1 parent 761fcd5 commit 5e3047d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/_rpc/ns-debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,19 @@ 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.
Expand Down

0 comments on commit 5e3047d

Please sign in to comment.