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

Minor da task fix #3792

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
10 changes: 4 additions & 6 deletions crates/task-impls/src/da.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use hotshot_types::{
block_contents::vid_commitment,
election::Membership,
network::ConnectedNetwork,
node_implementation::{ConsensusTime, NodeImplementation, NodeType, Versions},
node_implementation::{NodeImplementation, NodeType, Versions},
signature_key::SignatureKey,
storage::Storage,
},
Expand Down Expand Up @@ -107,12 +107,10 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>, V: Versions> DaTaskState<TYP

// Allow a DA proposal that is one view older, in case we have voted on a quorum
// proposal and updated the view.
// `self.cur_view` should be at least 1 since there is a view change before getting
// the `DaProposalRecv` event. Otherwise, the view number subtraction below will
// cause an overflow error.
// TODO ED Come back to this - we probably don't need this, but we should also never receive a DAC where this fails, investigate block ready so it doesn't make one for the genesis block
//
// Anything older is discarded because it is no longer relevant.
ensure!(
self.cur_view == TYPES::View::genesis() || view >= self.cur_view - 1,
self.cur_view <= view + 1,
"Throwing away DA proposal that is more than one view older"
);

Expand Down