Skip to content

Commit

Permalink
author eligible
Browse files Browse the repository at this point in the history
  • Loading branch information
pompon0 committed Dec 16, 2024
1 parent eda2754 commit 89cca7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions node/components/bft/src/chonky_bft/new_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ impl StateMachine {
let message = &signed_message.msg;
let author = &signed_message.key;

// If the replica is already in this view, then ignore it.
// TODO: allow for the same view number for the proposer.
if message.view().number <= self.view_number {
// If the replica is already in this view (and the message is NOT from the leader), then ignore it.
// See `start_new_view()` for explanation why we need to process the message from the
// leader.
if message.view().number < self.view_number
|| (message.view().number == self.view_number
&& author != &self.config.genesis().view_leader(self.view_number))
{
return Err(Error::Old {
current_view: self.view_number,
});
Expand Down
2 changes: 1 addition & 1 deletion node/tools/src/bin/localnet_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn main() -> anyhow::Result<()> {
.metrics_server_port
.map(|port| SocketAddr::new(Ipv4Addr::UNSPECIFIED.into(), port)),
genesis: setup.genesis.clone(),
max_payload_size: 100000,
max_payload_size: args.payload_size,
node_key: node_keys[i].clone(),
validator_key: validator_keys.get(i).cloned(),
attester_key: attester_keys.get(i).cloned(),
Expand Down

0 comments on commit 89cca7f

Please sign in to comment.