8000 spec:ABCI2.0 - Uncommenting content related to vote xtensions and finalize block by jmalicevic · Pull Request #421 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

spec:ABCI2.0 - Uncommenting content related to vote xtensions and finalize block #421

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 12 commits into from
Mar 6, 2023

Conversation

jmalicevic
Copy link
Contributor

The PR will be a draft until PR #407 is merged. After that it will be rebased to feature/abci++vef .

Closes #403 .

@jmalicevic jmalicevic added the spec Specification-related label Feb 28, 2023
@jmalicevic jmalicevic self-assigned this Feb 28, 2023
@jmalicevic jmalicevic changed the base branch from main to feature/abci++vef March 1, 2023 11:08
@jmalicevic jmalicevic marked this pull request as ready for review March 1, 2023 11:09
@jmalicevic jmalicevic requested review from a team as code owners March 1, 2023 11:09
Copy link
Contributor
@lasarojc lasarojc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments.
Some suggestions that may be incorporated in this PR or maybe directly on main, in PR #433

lasarojc

This comment was marked as duplicate.

@jmalicevic jmalicevic changed the title ABCI2.0 - Uncommenting VE and FB spec:ABCI2.0 - Uncommenting content related to vote xtensions and finalize block Mar 1, 2023
Copy link
Contributor
@cason cason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left some comments, they should not block merging the PR, in particular since the most relevant were addressed by recent commits.

The sequence of `DeliverTx` calls is asynchronous but all those calls are enclosed by calls to `BeginBlock` and `EndBlock` which are synchronous.
-->

The Application must remember the latest height from which it
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be moved to the next sub-section, right?

@@ -286,18 +279,18 @@ In this case, potentially many proposed blocks will be disclosed to the Applicat
By the nature of Tendermint consensus algorithm, currently adopted in CometBFT, the number of proposed blocks received by the Application
for a particular height cannot be bound, so Application developers must act with care and use mechanisms
to bound memory usage. As a general rule, the Application should be ready to discard candidate states
before block execution, even if one of them might end up corresponding to the
decided block and thus have to be reexecuted upon `BeginBlock-DeliverTx-EndBlock`.
before `FinalizeBlock`, even if one of them might end up corresponding to the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is a little confusing.

decided block's data to the Application, which uses it to transition its state.

<!--
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We maybe state that this call is synchronous, isn't it?

@@ -452,7 +362,11 @@ title: Methods
that the `RequestPrepareProposal.max_tx_bytes` limit is respected by those transactions
returned in `ResponsePrepareProposal.txs` .
* As a result of executing the prepared proposal, the Application may produce block events or transaction events.
The Application must keep those events until a block is decided. It will then forward the events to the `BeginBlock-DeliverTx-EndBlock` functions depending on where each event should be placed, thereby returning the events to CometBFT.
The Application must keep those events until a block is decided and then pass them on to CometBFT via
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This here makes GitHub to format the remaining of this item list as a code. The comments, in particular, are rendered :D

Copy link
Contributor
@sergio-mena sergio-mena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Jasmina! I know it mustn't have been obvious to reconcile both versions, given that they are sprinkled with small changes we made on-the-go over months.

consensus execution: (a) at the moment a new proposal is to be created and (b) at the moment a
proposal is to be validated. The new interface allows block proposers to perform application-dependent
proposal is to be validated, and (c) at the moment a (precommit) vote is sent/received.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a numbered list, right?

I would try to avoid embarking in refactoring of the text structure at this point (this is supposed to be a backport)

Note that violation of Requirement 1 may just lead to further rounds, but will not compromise correctness.

Requirement 1 is particularly important if *p*'s Application fully executes prepared blocks in `PrepareProposal`
as a form of optimistic execution.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
as a form of optimistic execution.
as a form of immediate execution.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that optimistic is more accurate here, because it signals that the execution may be wasted, while immediate does not. It is also a term commonly used for similar execution of transactions in DBs. I understand that we have used immediate in some other places so far, though, so would need to review them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to agree with Lasaro, immediate sounds like the execution is final and the state change is persisted.

@jmalicevic jmalicevic merged commit 844331a into feature/abci++vef Mar 6, 2023
@jmalicevic jmalicevic deleted the jasmina/0.38-abci-spec-backport branch March 6, 2023 08:40
@jmalicevic
Copy link
Contributor Author

Thank you @sergio-mena , @cason and @lasarojc for reviewing. All the comments that were not applied (most of all Daniel's suggestions for text reformatting and the discussion on optimistic vs. immediate execution, I merged in a doc so we can get back to this later) but I will merge this as to unblock other minor PRs regarding the spec.

jmalicevic added a commit that referenced this pull request Mar 6, 2023
* Applied last comments from PR #421

* Spelling errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec Specification-related
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Uncomment all parts related to vote extensions, and FinalizeBlock from the spec.
4 participants
0