You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* append to versions.json
* this works lol
* works'
* fix sidebar
* fixes
* ok
* handle special case
* add comment on special case
* sync and banners
* sync
* fixed
* re-sync
* restore v47 directory contents
Copy file name to clipboardExpand all lines: docs/build/abci/00-introduction.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
## What is ABCI?
4
4
5
-
ABCI, Application Blockchain Interface is the interface between CometBFT and the application. More information about ABCI can be found in the specs [here](https://docs.cometbft.com/v1.0/spec/abci/). Within the release of ABCI 2.0 for the 0.38 CometBFT release there were additional methods introduced.
5
+
ABC, Application Blockchain Interface is the interface between CometBFT and the application, more information about ABCI can be found [here](https://docs.cometbft.com/v0.38/spec/abci/). Within the release of ABCI 2.0 for the 0.38 CometBFT release there were additional methods introduced.
6
6
7
-
The 5 methods introduced during ABCI 2.0 (compared to ABCI v0) are:
7
+
The 5 methods introduced during ABCI 2.0 are:
8
8
9
9
*`PrepareProposal`
10
10
*`ProcessProposal`
@@ -17,11 +17,11 @@ The 5 methods introduced during ABCI 2.0 (compared to ABCI v0) are:
17
17
18
18
## PrepareProposal
19
19
20
-
Based on validator voting power, CometBFT chooses a block proposer and calls `PrepareProposal` on the block proposer's application (Cosmos SDK). The selected block proposer is responsible for collecting outstanding transactions from the mempool, adhering to the application's specifications. The application can enforce custom transaction ordering and incorporate additional transactions, potentially generated from vote extensions in the previous block.
20
+
Based on their voting power, CometBFT chooses a block proposer and calls `PrepareProposal` on the block proposer's application (Cosmos SDK). The selected block proposer is responsible for collecting outstanding transactions from the mempool, adhering to the application's specifications. The application can enforce custom transaction ordering and incorporate additional transactions, potentially generated from vote extensions in the previous block.
21
21
22
-
To perform this manipulation on the application side, a custom handler must be implemented. By default, the Cosmos SDK provides `PrepareProposalHandler`, used in conjunction with an application specific mempool. A custom handler can be written by application developer, if a noop handler provided, all transactions are considered valid.
22
+
To perform this manipulation on the application side, a custom handler must be implemented. By default, the Cosmos SDK provides `PrepareProposalHandler`, used in conjunction with an application specific mempool. A custom handler can be written by application developer, if a noop handler provided, all transactions are considered valid. Please see [this](https://github.com/fatal-fruit/abci-workshop) tutorial for more information on custom handlers.
23
23
24
-
Please note that vote extensions will only be available on the following height in which vote extensions are enabled. More information about vote extensions can be found [here](https://docs.cosmos.network/main/build/abci/vote-extensions).
24
+
Please note that vote extensions will only be available on the following height in which vote extensions are enabled. More information about vote extensions can be found [here](https://docs.cosmos.network/main/build/abci/03-vote-extensions.md).
25
25
26
26
After creating the proposal, the proposer returns it to CometBFT.
27
27
@@ -41,11 +41,11 @@ If vote extensions are enabled, `ExtendVote` will be called on every validator a
41
41
42
42
`VerifyVoteExtensions` is performed on every validator multiple times in order to verify other validators' vote extensions. This check is submitted to validate the integrity and validity of the vote extensions preventing malicious or invalid vote extensions.
43
43
44
-
Additionally, applications must keep the vote extension data concise as it can degrade the performance of their chain, see testing results [here](https://docs.cometbft.com/v1.0/references/qa/cometbft-qa-38#vote-extensions-testbed).
44
+
Additionally, applications must keep the vote extension data concise as it can degrade the performance of their chain, see testing results [here](https://docs.cometbft.com/v0.38/qa/cometbft-qa-38#vote-extensions-testbed).
45
45
46
46
`VerifyVoteExtensions` MUST be deterministic.
47
47
48
48
49
49
## FinalizeBlock
50
50
51
-
`FinalizeBlock` is then called and is responsible for updating the state of the blockchain and making the block available to users.
51
+
`FinalizeBlock` is then called and is responsible for updating the state of the blockchain and making the block available to users
Copy file name to clipboardExpand all lines: docs/build/abci/02-process-proposal.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,30 +2,30 @@
2
2
3
3
`ProcessProposal` handles the validation of a proposal from `PrepareProposal`,
4
4
which also includes a block header. Meaning, that after a block has been proposed
5
-
the other validators have the right to accept or reject that block. The validator in the
5
+
the other validators have the right to vote on a block. The validator in the
6
6
default implementation of `PrepareProposal` runs basic validity checks on each
7
7
transaction.
8
8
9
9
Note, `ProcessProposal` MAY NOT be non-deterministic, i.e. it must be deterministic.
10
10
This means if `ProcessProposal` panics or fails and we reject, all honest validator
11
-
processes should reject (i.e., prevote nil). If so, then CometBFT will start a new round with a new block proposal, and the same cycle will happen with `PrepareProposal`
12
-
and `ProcessProposal` for the new proposal.
11
+
processes will prevote nil and the CometBFT round will proceed again until a valid
12
+
proposal is proposed.
13
13
14
14
Here is the implementation of the default implementation:
ABCI2.0 (colloquially called ABCI++) allows an application to extend a pre-commit vote with arbitrary data. This process does NOT have to be deterministic, and the data returned can be unique to the
11
-
validator process. The Cosmos SDK defines [`baseapp.ExtendVoteHandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.1/types/abci.go#L26-L27):
10
+
ABCI++ allows an application to extend a pre-commit vote with arbitrary data. This
11
+
process does NOT have to be deterministic, and the data returned can be unique to the
12
+
validator process. The Cosmos SDK defines [`baseapp.ExtendVoteHandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.1/types/abci.go#L26-L27):
An application can set this handler in `app.go` via the `baseapp.SetExtendVoteHandler`
18
19
`BaseApp` option function. The `sdk.ExtendVoteHandler`, if defined, is called during
19
20
the `ExtendVote` ABCI method. Note, if an application decides to implement
20
21
`baseapp.ExtendVoteHandler`, it MUST return a non-nil `VoteExtension`. However, the vote
21
-
extension can be empty. See [here](https://docs.cometbft.com/v1.0/spec/abci/abci++_methods#extendvote)
22
+
extension can be empty. See [here](https://github.com/cometbft/cometbft/blob/v0.38.0-rc1/spec/abci/abci++_methods.md#extendvote)
22
23
for more details.
23
24
24
25
There are many decentralized censorship-resistant use cases for vote extensions.
25
26
For example, a validator may want to submit prices for a price oracle or encryption
26
27
shares for an encrypted transaction mempool. Note, an application should be careful
27
28
to consider the size of the vote extensions as they could increase latency in block
28
-
production. See [here](https://docs.cometbft.com/v1.0/references/qa/cometbft-qa-38#vote-extensions-testbed)
29
+
production. See [here](https://github.com/cometbft/cometbft/blob/v0.38.0-rc1/docs/qa/CometBFT-QA-38.md#vote-extensions-testbed)
29
30
for more details.
30
31
31
-
Click [here](https://docs.cosmos.network/main/build/abci/vote-extensions) if you would like a walkthrough of how to implement vote extensions.
32
+
Click [here](https://docs.cosmos.network/main/user/tutorials/vote-extensions) if you would like a walkthrough of how to implement vote extensions.
32
33
33
34
34
35
## Verify Vote Extension
35
36
36
37
Similar to extending a vote, an application can also verify vote extensions from
37
38
other validators when validating their pre-commits. For a given vote extension,
38
-
this process MUST be deterministic. The Cosmos SDK defines [`sdk.VerifyVoteExtensionHandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.52.0-beta.1/types/abci.go#L29-L31):
39
+
this process MUST be deterministic. The Cosmos SDK defines [`sdk.VerifyVoteExtensionHandler`](https://github.com/cosmos/cosmos-sdk/blob/v0.50.1/types/abci.go#L29-L31):
39
40
40
41
```go
41
-
type VerifyVoteExtensionHandler func(Context, *abci.VerifyVoteExtensionRequest) (*abci.VerifyVoteExtensionResponse, error)
42
+
type VerifyVoteExtensionHandler func(Context, *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error)
42
43
```
43
44
44
45
An application can set this handler in `app.go` via the `baseapp.SetVerifyVoteExtensionHandler`
45
46
`BaseApp` option function. The `sdk.VerifyVoteExtensionHandler`, if defined, is called
46
47
during the `VerifyVoteExtension` ABCI method. If an application defines a vote
47
48
extension handler, it should also define a verification handler. Note, not all
48
49
validators will share the same view of what vote extensions they verify depending
49
-
on how votes are propagated. See [here](https://docs.cometbft.com/v1.0/spec/abci/abci++_methods#verifyvoteextension)
50
+
on how votes are propagated. See [here](https://github.com/cometbft/cometbft/blob/v0.38.0-rc1/spec/abci/abci++_methods.md#verifyvoteextension)
50
51
for more details.
51
52
52
-
Additionally, please keep in mind that performance can be degraded if vote extensions are too big ([see vote extension testbed](https://docs.cometbft.com/v1.0/references/qa/cometbft-qa-38#vote-extensions-testbed)), so we highly recommend a size validation in `VerifyVoteExtensions`.
53
+
Additionally, please keep in mind that performance can be degraded if vote extensions are too big (https://docs.cometbft.com/v0.38/qa/cometbft-qa-38#vote-extensions-testbed), so we highly recommend a size validation in `VerifyVoteExtensions`.
`CheckTxHandler` allows users to extend the logic of `CheckTx`. `CheckTxHandler` is called by pasding context and the transaction bytes received through ABCI. It is required that the handler returns deterministic results given the same transaction bytes.
23
+
`CheckTxHandler` allows users to extend the logic of `CheckTx`. `CheckTxHandler` is called by passing context and the transaction bytes received through ABCI. It is required that the handler returns deterministic results given the same transaction bytes.
24
24
25
25
:::note
26
26
we return the raw decoded transaction here to avoid decoding it twice.
0 commit comments