Skip to content

Commit

Permalink
chore: add docs on 0 height (#14723)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored Jan 23, 2023
1 parent e3b37dc commit 6081491
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/docs/basics/00-app-anatomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ Once the main binary is built, the node can be started by running the [`start` c

1. Create an instance of the state-machine defined in [`app.go`](#core-application-file).
2. Initialize the state-machine with the latest known state, extracted from the `db` stored in the `~/.app/data` folder. At this point, the state-machine is at height `appBlockHeight`.
3. Create and start a new Tendermint instance. Among other things, the node performs a handshake with its peers. It gets the latest `blockHeight` from them and replays blocks to sync to this height if it is greater than the local `appBlockHeight`. If `appBlockHeight` is `0`, the node is starting from genesis and Tendermint sends an `InitChain` message via the ABCI to the `app`, which triggers the [`InitChainer`](#initchainer).
3. Create and start a new Tendermint instance. Among other things, the node performs a handshake with its peers. It gets the latest `blockHeight` from them and replays blocks to sync to this height if it is greater than the local `appBlockHeight`. The node starts from genesis and Tendermint sends an `InitChain` message via the ABCI to the `app`, which triggers the [`InitChainer`](#initchainer).

:::note
When starting an tendermint instance, the genesis file is the `0` height and the state within the genesis file is committed at block height `1`. When querying the state of the node, querying block height 0 will return an error.
:::

## Core Application File

Expand Down

0 comments on commit 6081491

Please sign in to comment.