(
#[allow(unused)] context: &ContextCell<R>,
block: &Block,
new_height: u64,
state: &mut ConsensusState,
consts: &ProtocolConsts,
)
| 1717 | } |
| 1718 | outcome = HandleOutcome::Buffered(()); |
| 1719 | // The next block in `to_process` will be processed. |
| 1720 | // Potential orphaned children of the current block won't |
| 1721 | // be added to `to_process`, since the current block has to be |
| 1722 | // executed before them. |
| 1723 | continue; |
| 1724 | } |
| 1725 | ExecuteOutcome::InvalidPayload => { |
| 1726 | warn!( |
| 1727 | height, |
| 1728 | ?block_digest, |
| 1729 | "discarding notarized block with invalid payload" |
| 1730 | ); |
| 1731 | #[cfg(feature = "prom")] |
| 1732 | counter!("notarized_block_invalid_total").increment(1); |
| 1733 | continue; |
| 1734 | } |
| 1735 | } |
| 1736 | |
| 1737 | // Store the new fork state |
| 1738 | self.fork_states.entry(height).or_default().insert( |
| 1739 | block_digest, |
| 1740 | ForkState { |
| 1741 | block_digest, |
| 1742 | parent_digest, |
| 1743 | consensus_state: fork_state.clone(), |
| 1744 | }, |
| 1745 | ); |
| 1746 | |
| 1747 | // The fork forkchoice was already committed to reth (and its status |
| 1748 | // gated) inside `execute_block`, so validators can build/verify on it. |
| 1749 | |
| 1750 | let total_fork_count: usize = self.fork_states.values().map(|f| f.len()).sum(); |
| 1751 | info!( |
| 1752 | height, |
| 1753 | view = block.view(), |
| 1754 | ?block_digest, |
| 1755 | "executed notarized block into fork" |
| 1756 | ); |
| 1757 | trace!( |
| 1758 | height, |
| 1759 | total_fork_states = total_fork_count, |
| 1760 | heights_tracked = self.fork_states.len(), |
| 1761 | "fork state summary" |
| 1762 | ); |
| 1763 | self.height_notify_executed(height, block_digest); |
| 1764 | |
| 1765 | // Add orphaned children to the processing queue |
| 1766 | if let Some(children) = self |
| 1767 | .orphaned_blocks |
| 1768 | .get(&(height + 1)) |
| 1769 | .and_then(|children_map| children_map.get(&block_digest)) |
| 1770 | { |
| 1771 | debug!( |
| 1772 | height, |
| 1773 | num_children = children.len(), |
| 1774 | "queueing orphaned children" |
| 1775 | ); |
| 1776 | to_process.extend(children.clone()); |
no test coverage detected