8000 docs: various small improvements (part 2) (backport #1683) by mergify[bot] · Pull Request #1685 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

docs: various small improvements (part 2) (backport #1683) #1685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/app-dev/abci-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ You could put the commands in a file and run

Note that the `abci-cli` is designed strictly for testing and debugging. In a real
deployment, the role of sending messages is taken by CometBFT, which
connects to the app using three separate connections, each with its own
connects to the app using four separate connections, each with its own
pattern of messages.

For examples of running an ABCI app with CometBFT, see the
Expand Down
10 changes: 5 additions & 5 deletions docs/app-dev/indexing-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ the block itself is never stored.

Each event contains a type and a list of attributes, which are key-value pairs
denoting something about what happened during the method's execution. For more
details on `Events`, see the

[ABCI](../spec/abci/abci++_basic_concepts.md#events)

documentation.
details on `Events`, see the [ABCI][abci-events] documentation.

An `Event` has a composite key associated with it. A `compositeKey` is
constructed by its type and key separated by a dot.
Expand Down Expand Up @@ -76,6 +72,7 @@ entirely in the future.

The kv indexer stores each attribute of an event individually, by creating a composite key
with

- event type,
- attribute key,
- attribute value,
Expand Down Expand Up @@ -121,6 +118,7 @@ transferBalance200FinalizeBlock12 1
transferNodeNothingFinalizeBlock12 1

```

The event number is a local variable kept by the indexer and incremented when a new event is processed.
It is an `int64` variable and has no other semantics besides being used to associate attributes belonging to the same events within a height.
This variable is not atomically incremented as event indexing is deterministic. **Should this ever change**, the event id generation
Expand Down Expand Up @@ -285,3 +283,5 @@ Users can use anything as an event value. However, if the event attribute value
of the integer it is supposed to represent, so that there is no loss of information due to insufficient precision. This was not present before CometBFT v0.38.x and all float values were ignored.
- As of CometBFT v0.38.x, queries can contain floating point numbers as well.
- Note that comparing to floats can be imprecise with a high number of decimals.

[abci-events]: ../spec/abci/abci++_basic_concepts.md#events
19 changes: 11 additions & 8 deletions docs/core/block-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ order: 8

# Block Structure

The CometBFT consensus engine records all agreements by a
supermajority of nodes into a blockchain, which is replicated among all
nodes. This blockchain is accessible via various RPC endpoints, mainly
`/block?height=` to get the full block, as well as
`/blockchain?minHeight=_&maxHeight=_` to get a list of headers. But what
exactly is stored in these blocks?
The CometBFT consensus engine records all agreements by a 2/3+ of nodes
into a blockchain, which is replicated among all nodes. This blockchain is
accessible via various RPC endpoints, mainly `/block?height=` to get the full
block, as well as `/blockchain?minHeight=_&maxHeight=_` to get a list of
headers. But what exactly is stored in these blocks?

The [specification](https://github.com/cometbft/cometbft/blob/v0.38.x/spec/core/data_structures.md) contains a detailed description of each component - that's the best place to get started.
The [specification][data_structures] contains a detailed description of each
component - that's the best place to get started.

To dig deeper, check out the [types package documentation](https://godoc.org/github.com/cometbft/cometbft/types).
To dig deeper, check out the [types package documentation][types].

[data_structures]: https://github.com/cometbft/cometbft/blob/v0.38.x/spec/core/data_structures.md
[types]: https://pkg.go.dev/github.com/cometbft/cometbft/types
4 changes: 3 additions & 1 deletion docs/core/state-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The next information you will need to acquire it through publicly exposed RPC's
- `trust_period`: Trust period is the period in which headers can be verified.
> :warning: This value should be significantly smaller than the unbonding period.

If you are relying on publicly exposed RPC's to get the need information, you can use `curl`.
If you are relying on publicly exposed RPC's to get the need information, you can use `curl` and [`jq`][jq].

Example:

Expand All @@ -46,3 +46,5 @@ The response will be:
"hash": "188F4F36CBCD2C91B57509BBF231C777E79B52EE3E0D90D06B1A25EB16E6E23D"
}
```

[jq]: https://jqlang.github.io/jq/
6 changes: 3 additions & 3 deletions docs/core/using-cometbft.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ cometbft node
```

By default, CometBFT will try to connect to an ABCI application on
`127.0.0.1:26658`. If you have the `kvstore` ABCI app installed, run it in
`tcp://127.0.0.1:26658`. If you have the `kvstore` ABCI app installed, run it in
another window. If you don't, kill CometBFT and run an in-process version of
the `kvstore` app:

Expand All @@ -139,8 +139,8 @@ cometbft node --proxy_app=kvstore
```

After a few seconds, you should see blocks start streaming in. Note that blocks
are produced regularly, even if there are no transactions. See _No Empty
Blocks_, below, to modify this setting.
are produced regularly, even if there are no transactions. See [No Empty
Blocks](#no-empty-blocks), below, to modify this setting.

CometBFT supports in-process versions of the `counter`, `kvstore`, and `noop`
apps that ship as examples with `abci-cli`. It's easy to compile your app
Expand Down
0