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

doc: specifies DataChannel protocol in consensus reactor and relevant parts of StateChannel communication #1129

Merged
merged 14 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions consensus/reactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"sync"
"time"

"github.com/gogo/protobuf/proto"

cstypes "github.com/cometbft/cometbft/consensus/types"
"github.com/cometbft/cometbft/libs/bits"
cmtevents "github.com/cometbft/cometbft/libs/events"
Expand All @@ -19,7 +21,6 @@ import (
sm "github.com/cometbft/cometbft/state"
"github.com/cometbft/cometbft/types"
cmttime "github.com/cometbft/cometbft/types/time"
"github.com/gogo/protobuf/proto"
)

const (
Expand Down Expand Up @@ -225,7 +226,7 @@ func (conR *Reactor) RemovePeer(peer p2p.Peer, reason interface{}) {
// ps.Disconnect()
}

// Receive implements Reactor
// ReceiveEnvelope implements Reactor
// NOTE: We process these messages even when we're fast_syncing.
// Messages affect either a peer state or the consensus state.
// Peer state updates can happen in parallel, but processing of
Expand Down Expand Up @@ -641,6 +642,7 @@ OUTER_LOOP:
Message: &cmtcons.Proposal{Proposal: *rs.Proposal.ToProto()},
}, logger) {
// NOTE[ZM]: A peer might have received different proposal msg so this Proposal msg will be rejected!
// TODO But yet we send block parts of this proposal to the peer (in the first if statement of the current function) while the proposal is rejected. This part of the protocol could be improved by sending the proposal block parts only if the proposal is accepted.
ps.SetHasProposal(rs.Proposal)
}
}
Expand Down
Loading
Loading