Skip to content
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

Clarifies that processProposal may be called for set of transactions different from the one returned in the preceding prepareProposal (backport #1033) #1053

Merged
merged 3 commits into from
Jun 29, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jun 29, 2023

This is an automatic backport of pull request #1033 done by Mergify.
Cherry-pick of b23ef56 has failed:

On branch mergify/bp/v0.37.x/pr-1033
Your branch is up to date with 'origin/v0.37.x'.

You are currently cherry-picking commit b23ef56f8.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   spec/abci/abci++_example_scenarios.md
	modified:   spec/abci/abci++_methods.md

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   spec/abci/abci++_basic_concepts.md
	both modified:   spec/abci/abci++_comet_expected_behavior.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

…different from the one returned in the preceding prepareProposal (#1033)

If a proposer fails after calling prepareProposal and before calling processProposal, then the following may happen upon restarting:
- if failed before signing another message, then will invoke prepareProposal again, sign a new block, probably empty, and propose it;
- if failed after signing a proposal but before writing the  proposal message into the WAL, then will invoke prepareProposal and produce a new, probably empty block, [fail to sign it](https://github.com/cometbft/cometbft/blob/2789a59a9cc61c6ea56a6b266eeadf0f26ca2456/consensus/state.go#L1221), and not invoke processProposal; prevote timeouts will ensure the CometBFT is not stuck;
- if failed after writing the proposal message to the WAL, then will invoke prepareProposal, produce a new, probably empty block, fail to sign it, and invoke processProposal with the block signed before crashing.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code comments

(cherry picked from commit b23ef56)

# Conflicts:
#	spec/abci/abci++_basic_concepts.md
#	spec/abci/abci++_comet_expected_behavior.md
@mergify mergify bot requested review from a team as code owners June 29, 2023 10:40
@mergify mergify bot added the conflicts label Jun 29, 2023
@lasarojc lasarojc self-assigned this Jun 29, 2023
@lasarojc lasarojc merged commit 5806f5a into v0.37.x Jun 29, 2023
@lasarojc lasarojc deleted the mergify/bp/v0.37.x/pr-1033 branch June 29, 2023 12:28
nivasan1 pushed a commit to skip-mev/cometbft that referenced this pull request Jan 16, 2024
…different from the one returned in the preceding prepareProposal (backport cometbft#1033) (cometbft#1053)

* Clarifies that processProposal may be called for set of transactions different from the one returned in the preceding prepareProposal (cometbft#1033)

If a proposer fails after calling prepareProposal and before calling processProposal, then the following may happen upon restarting:
- if failed before signing another message, then will invoke prepareProposal again, sign a new block, probably empty, and propose it;
- if failed after signing a proposal but before writing the  proposal message into the WAL, then will invoke prepareProposal and produce a new, probably empty block, [fail to sign it](https://github.com/cometbft/cometbft/blob/2789a59a9cc61c6ea56a6b266eeadf0f26ca2456/consensus/state.go#L1221), and not invoke processProposal; prevote timeouts will ensure the CometBFT is not stuck;
- if failed after writing the proposal message to the WAL, then will invoke prepareProposal, produce a new, probably empty block, fail to sign it, and invoke processProposal with the block signed before crashing.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code comments

(cherry picked from commit b23ef56)

# Conflicts:
#	spec/abci/abci++_basic_concepts.md
#	spec/abci/abci++_comet_expected_behavior.md

* solving cherry pick conflicts

* solving cherry pick conflicts

---------

Co-authored-by: Lasaro <lasaro@informal.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant