Skip to content

Commit

Permalink
chore: fixing typos and grammar for vote extension docs (backport #17948
Browse files Browse the repository at this point in the history
) (#17949)

Co-authored-by: Hlib Kanunnikov <[email protected]>
  • Loading branch information
mergify[bot] and Wondertan authored Oct 3, 2023
1 parent 2b2d117 commit 31e603a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/docs/build/building-apps/04-vote-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ sidebar_position: 1
# Vote Extensions

:::note Synopsis
This sections describes how the application can define and use vote extensions
This section describes how the application can define and use vote extensions
defined in ABCI++.
:::

## Extend Vote

ABCI++ allows an application to extend a pre-commit vote with arbitrary data. This
process does NOT have be deterministic and the data returned can be unique to the
process does NOT have to be deterministic, and the data returned can be unique to the
validator process. The Cosmos SDK defines `baseapp.ExtendVoteHandler`:

```go
Expand Down Expand Up @@ -62,13 +62,13 @@ these vote extensions manually in the block proposal itself. This can be done by
"injecting" them into the block proposal, since the `Txs` field in `PrepareProposal`
is just a slice of byte slices.

`FinalizeBlock` will ignore any byte slice that doesn't implement an `sdk.Tx` so
`FinalizeBlock` will ignore any byte slice that doesn't implement an `sdk.Tx`, so
any injected vote extensions will safely be ignored in `FinalizeBlock`. For more
details on propagation, see the [ABCI++ 2.0 ADR](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-064-abci-2.0.md#vote-extension-propagation--verification).

### Recovery of injected Vote Extensions

As stated before, vote extensions can be injected in a block proposal (along with
As stated before, vote extensions can be injected into a block proposal (along with
other transactions in the `Txs` field). The Cosmos SDK provides a pre-FinalizeBlock
hook to allow applications to recover vote extensions, perform any necessary
computation on them, and then store the results in the cached store. These results
Expand Down Expand Up @@ -102,7 +102,7 @@ app.SetPreBlocker(func(ctx sdk.Context, req *abci.RequestFinalizeBlock) error {

```

Then in an app's module the application can retrieve the result of the computation
Then, in an app's module, the application can retrieve the result of the computation
of vote extensions from the cached store:

```go
Expand All @@ -118,4 +118,4 @@ func (k Keeper) BeginBlocker(ctx context.Context) error {

return nil
}
```
```

0 comments on commit 31e603a

Please sign in to comment.