* Ignore generated/copied RPC docs Signed-off-by: Thane Thomson <connect@thanethomson.com> * Sync vuepress config with main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Sync docs package-lock.json with main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Sync docs redirects with main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Sync docs versions with main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update OpenAPI version to v0.34 Signed-off-by: Thane Thomson <connect@thanethomson.com> * Sync DOCS_README with main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update all v0.34.x docs references from master to main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update v0.34 OpenAPI references from master to main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update repo doc links from master to main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update code comment references from master to main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update repo root doc links from master to main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update repo root doc links for docs.tendermint.com from master to main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Build v0.34.x as "latest" Signed-off-by: Thane Thomson <connect@thanethomson.com> * Explicitly mark v0.34 docs as latest in version selector Signed-off-by: Thane Thomson <connect@thanethomson.com> * Add nav link to main and clearly mark as unstable Signed-off-by: Thane Thomson <connect@thanethomson.com> * Direct all docs.tendermint.com links to v0.34 on v0.34.x Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update all relevant links on v0.34.x branch to be v0.34-specific Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update changelog refs to docs.tendermint.com Signed-off-by: Thane Thomson <connect@thanethomson.com> * Update remaining GH master link to main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Sync docs build and nav config with main Signed-off-by: Thane Thomson <connect@thanethomson.com> * Migrate spec links to GitHub repo from docs site Signed-off-by: Thane Thomson <connect@thanethomson.com> Signed-off-by: Thane Thomson <connect@thanethomson.com>
1.4 KiB
WAL
Consensus module writes every message to the WAL (write-ahead log).
It also issues fsync syscall through File#Sync for messages signed by this node (to prevent double signing).
Under the hood, it uses autofile.Group, which rotates files when those get too big (> 10MB).
The total maximum size is 1GB. We only need the latest block and the block before it, but if the former is dragging on across many rounds, we want all those rounds.
Replay
Consensus module will replay all the messages of the last height written to WAL before a crash (if such occurs).
The private validator may try to sign messages during replay because it runs somewhat autonomously and does not know about replay process.
For example, if we got all the way to precommit in the WAL and then crash,
after we replay the proposal message, the private validator will try to sign a
prevote. But it will fail. That's ok because we’ll see the prevote later in the
WAL. Then it will go to precommit, and that time it will work because the
private validator contains the LastSignBytes and then we’ll replay the
precommit from the WAL.
Make sure to read about WAL corruption and recovery strategies.