Consensus Reactor communication specification#74
Conversation
1a9007c to
b7a7ece
Compare
* [cherry-picked] ABCI++: Update new protos to use enum instead of bool (#8158) This pull request updates the new ABCI++ protos to use `enum`s in place of `bool`s. `enums` may be preferred over `bool` because an `enum` can be udpated to include new statuses in the future, whereas a `bool` cannot and is fixed as just `true` or `false` over the whole lifecycle of the API. * Detect and handle UNKNOWN in `ResponseVerifyVoteExtension` Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Merge `main` into `feature/abci++vef`
5a8e35d to
2863828
Compare
… passed-through to application (#8216) (#98) closes: #7950 Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
josef-widder
left a comment
There was a problem hiding this comment.
I left some comments that we can discuss during our next meeting.
spec/consensus/reactor/reactor.md
Outdated
|
|
||
| |Communication with Supersession| | ||
| |-----| | ||
| | If process $p$ broadcast message $m2$, then $p$ does not broadcast any message $m1$, $m2.\text{SSS}(m1)$.[^todo1] |
There was a problem hiding this comment.
Is this already formalized? Should be m2.\text{SSS}(m1) -> G (bc(p,m2) -> G \neg bc(p,m1))
There was a problem hiding this comment.
What does G stand for?
There was a problem hiding this comment.
I would phrase this property like the following one, in terms of "not required". In the current shape, not broadcasting
sergio-mena
left a comment
There was a problem hiding this comment.
Thanks Lásaro for advancing on this. This is an awesome step forward, I'm excited about the prospect of having a complete spec of this part of the system.
In particular, I like that the part that deals with consensus gossip spec, could be reused for non-consensus upper layers almost verbatim.
|
|
||
| - Message delivery | ||
| - `Receive` | ||
| - Processes messages delivered by the Gossip layer and updates consensus (`State`) and peer information (`PeerState`) |
There was a problem hiding this comment.
According to what I've seen elsewhere PeerState is used by other reactors? Is that so? If that's the case we need decide what to do with this (not modular!)
| - `Receive` | ||
| - Processes messages delivered by the Gossip layer and updates consensus (`State`) and peer information (`PeerState`) | ||
| - Messages are received through multiple channels | ||
| - `StateChannel`: `NewRoundStepMessage`, `NewValidBlockMessage`, `HasVoteMessage`, `VoteSetMaj23Message` |
There was a problem hiding this comment.
HasVoteMessage not part of VoteChannel or VotBitsChannel ? (good) reason?
spec/consensus/reactor/reactor.md
Outdated
|
|
||
| |[REQ-GOSSIP-CONS-SUPERSESSION.2]| | ||
| |----| | ||
| | There exists a constant $c \in Int$ such that, at any point in time, for any process $p$, the subset of messages in bMsgs[p] that have not been superseded is smaller than $c$. |
There was a problem hiding this comment.
We would need to be careful here, as the 2f+1 precommits allowing a node to decide for every height need to be kept around, and my understanding is they cannot be superseded.
There was a problem hiding this comment.
The question is for what these messages are needed? For consensus? Or for some other protocol? I guess bMsgs[p] should just keep the messages that consensus needs, while the 2f+1 precommits could be archived somewhere else? If this is possible, then
There was a problem hiding this comment.
These are goo good points. Since precommits are evaluated consensus, I guess they will need to be in bMsgs. But I guess that makes it necessary that
BTW, I've now hidden bMsgs to simplify some definition. bMsgs and dMsgs became witness variables to the GOSSIP layer and CONS expressions cannot be expressed in terms of them.
spec/consensus/reactor/reactor.md
Outdated
| > **TODO**: Provide an outline | ||
|
|
||
|
|
||
| # Part 1: Background |
There was a problem hiding this comment.
To think about: this section does not consider the "dynamic model" that the system is assuming (
There was a problem hiding this comment.
Good point.
Processes that go are failed ones. Processes that come could be seen as always existing, but slow, but that would complicate the definitions. I will need to think more about them.
|
To register some of what we discussed today
|
…metbft into lasarojc/spec/gossip
* Renames cmd/tendermint to cmd/cometbft * Replacing TMHOME for CMTHOME. On reading the environment variable we still try TMHOME if CMTHOME is not found. TMHOME is deprecated and will be removed in the future releases. * Include TMHOME deprecation in the changelog * Updating the config * updating uses of .tendermint to .cometbft * Updating the Makefile * Fix test of debug level flags. * Update .changelog/unreleased/breaking-changes/211-deprecate-tmhome.md Co-authored-by: Thane Thomson <connect@thanethomson.com> --------- Co-authored-by: Thane Thomson <connect@thanethomson.com>
* Fix multiversion e2e when `version <= v0.34.24` * Changes we want no matter what we do * Approach 1: With docker-compose up recreating image * Revert "Approach 1: With docker-compose up recreating image" This reverts commit 068f5b78d3b7cf99fb21296707117e4f4e2ef3e0. * Approach 2: With distinct docker-compose service * Fix the case when 'upgrade' is not the last perturbation * Update generator * Simplify template * bump * Update test/e2e/pkg/manifest.go * changelog * doc * fix doc
* add peer gossip sleep * add changelog * Update .changelog/unreleased/bug-fixes/4-busy-loop-send-block-part.md Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com> * Update .changelog/unreleased/bug-fixes/4-busy-loop-send-block-part.md --------- Co-authored-by: jhernandezb <contact@jhernandez.me> Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
Looking at Dependabot updates like #233, it makes no sense that the code generation check is failing, because running `make mockery` locally on that dependabot branch works just fine. This should hopefully help debug what's going on there. --- #### PR checklist - [x] Tests written/updated, or no tests needed - [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed - [x] Updated relevant documentation (`docs/`) and code comments, or no documentation updates needed
…a time t from definitions.
…tests and invariant checks on their own modules. All modules on a single file since quint cannot handle multiple files yet.
…c P2P mocking. Removed hack to do named import.
… all tests passing. Reworking the Gossip part
…ional for now) and of fully connected (type issue).
…metbft into lasarojc/spec/gossip
|
instead of this large PR, breaking the (updated) changes into a series of smaller PRs |
…ft#3017)… (backport cometbft#74) (cometbft#79) * perf: Minor speedup to consenus metrics MarkLateVote (backport cometbft#3017) (cometbft#3026) Minor speedup to metrics MarkLateVote. I saw the excess string allocation calls, so made a quick PR to remove it. This saves between .18s-25s from the consensus mutex across this one hour block sync. (Likely not at all consensus critical) It also appears in receiving votes  (Saves ToLower(), .String(), .TrimPrefix() and newObject calls. The new call has comparable complexity to .String()) --- #### PR checklist - [x] Tests written/updated - [x] 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 - [x] Title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec <hr>This is an automatic backport of pull request cometbft#3017 done by [Mergify](https://mergify.com). --------- Co-authored-by: Dev Ojha <ValarDragon@users.noreply.github.com> Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com> (cherry picked from commit 29dd011) * Add changelog (cherry picked from commit 6392e64) # Conflicts: # CHANGELOG.md --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Dev Ojha <dojha@berkeley.edu>
Original PR: tendermint/tendermint#9870
Contributes to #15