Skip to content

Conversation

@vedhavyas
Copy link
Contributor

No description provided.

@vedhavyas vedhavyas merged commit a995ce1 into main Nov 13, 2025
4 checks passed
@vedhavyas vedhavyas deleted the refactor branch November 13, 2025 08:14
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment @cursor review or bugbot run to trigger another review on this PR

format!("Invalid bundle at block: {n}")
}
crate::event_types::SlashedReason::BadExecutionReceipt(h) => {
format!("Bad execution receipt: 0x{:?}", hex::encode(h))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Debug Format Quotes Hex Strings

Using {:?} debug format on hex::encode(h) will wrap the hex string in quotes, producing output like Bad execution receipt: 0x"abc123" instead of Bad execution receipt: 0xabc123. The format specifier should be {} not {:?}.

Fix in Cursor Fix in Web

fn remove_header_until(&mut self, number: BlockNumber) {
let mut to_remove = number;
while let Some(hashes) = self.block_number_hashes.remove(&to_remove) {
debug!("Removing header from cache: {number}");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Debug Log: Static Number, Not Dynamic

The debug log uses {number} which is the function parameter that never changes, instead of {to_remove} which is the actual block number being removed in each loop iteration. This causes all log messages in the loop to show the same number rather than the actual number being removed.

Fix in Cursor Fix in Web

enacted,
retracted: retracted.into_iter().rev().collect(),
common_block: tree_route.common_block().clone(),
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Data Truncation Impacts Reorg Alerts

The enacted vector has its last element removed by pop() on line 287, then the mutated vector (missing the current best block) is moved into ReorgData on line 297. This causes reorg alerts to report incomplete information, missing the latest enacted block from the reorg data.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants