Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
2745: Consensus Bootstrap - Increase timeout bootstrap and remove non final block r=AurelienFT a=AurelienFT

This PR is a temporary fix for : 
- massalabs#2723 
- massalabs#2722 

They will be fully fixed by massalabs#2736 

Co-authored-by: AurelienFT <[email protected]>
  • Loading branch information
bors[bot] and AurelienFT authored Jun 28, 2022
2 parents e114c23 + deee5a5 commit 0b0ca5c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
44 changes: 23 additions & 21 deletions massa-graph/src/block_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,27 +597,29 @@ impl BlockGraph {
Map::with_capacity_and_hasher(required_active_blocks.len(), BuildMap::default());
for b_id in required_active_blocks {
if let Some(BlockStatus::Active(a_block)) = self.block_statuses.get(&b_id) {
let block = self.storage.retrieve_block(&b_id).ok_or_else(|| {
GraphError::MissingBlock(format!(
"missing block in export_bootstrap_graph: {}",
b_id
))
})?;
let stored_block = block.read().clone();
active_blocks.insert(
b_id,
ExportActiveBlock {
block: stored_block,
block_id: b_id,
parents: a_block.parents.clone(),
children: a_block.children.clone(),
dependencies: a_block.dependencies.clone(),
is_final: a_block.is_final,
block_ledger_changes: a_block.block_ledger_changes.clone(),
roll_updates: a_block.roll_updates.clone(),
production_events: a_block.production_events.clone(),
},
);
if a_block.is_final {
let block = self.storage.retrieve_block(&b_id).ok_or_else(|| {
GraphError::MissingBlock(format!(
"missing block in export_bootstrap_graph: {}",
b_id
))
})?;
let stored_block = block.read().clone();
active_blocks.insert(
b_id,
ExportActiveBlock {
block: stored_block,
block_id: b_id,
parents: a_block.parents.clone(),
children: a_block.children.clone(),
dependencies: a_block.dependencies.clone(),
is_final: a_block.is_final,
block_ledger_changes: a_block.block_ledger_changes.clone(),
roll_updates: a_block.roll_updates.clone(),
production_events: a_block.production_events.clone(),
},
);
}
} else {
return Err(GraphError::ContainerInconsistency(format!(
"block {} was expected to be active but wasn't on bootstrap graph export",
Expand Down
4 changes: 2 additions & 2 deletions massa-node/base_config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@
# if ping is too high bootstrap will be interrupted after max_ping milliseconds
max_ping = 10000
# timeout for incoming message readout
read_timeout = 10000
read_timeout = 100000
# timeout for message sending
write_timeout = 10000
write_timeout = 100000
# timeout for incoming error message readout
read_error_timeout = 200
# timeout for message error sending
Expand Down

0 comments on commit 0b0ca5c

Please sign in to comment.