Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Comments

Fix invalid blocks marked as seen#2391

Merged
refcell merged 7 commits intoop-rs:mainfrom
JoshdfG:Fix-Invalid-Blocks-Marked-as-Seen
Jul 21, 2025
Merged

Fix invalid blocks marked as seen#2391
refcell merged 7 commits intoop-rs:mainfrom
JoshdfG:Fix-Invalid-Blocks-Marked-as-Seen

Conversation

@JoshdfG
Copy link
Contributor

@JoshdfG JoshdfG commented Jul 10, 2025

Closes #2361

@codecov
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 82.3%. Comparing base (0a1aaa6) to head (28adc0d).
Report is 47 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/node/p2p/src/gossip/block_validity.rs 0.0% 5 Missing ⚠️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JoshdfG
Copy link
Contributor Author

JoshdfG commented Jul 11, 2025

@refcell @emhane can you help review this please

@JoshdfG JoshdfG requested a review from emhane July 17, 2025 18:18
Copy link
Contributor

@emhane emhane left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@emhane emhane left a comment

Choose a reason for hiding this comment

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

could also add an assertion that handler.seen_hashes.is_empty() in the test test_invalid_signature

@JoshdfG
Copy link
Contributor Author

JoshdfG commented Jul 21, 2025

could also add an assertion that handler.seen_hashes.is_empty() in the test test_invalid_signature

done ✅

signature_bytes[0] = !signature_bytes[0];
envelope.signature = Signature::from_raw_array(&signature_bytes).unwrap();

assert!(handler.seen_hashes.is_empty());
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice addition to the unit test

@refcell refcell added this pull request to the merge queue Jul 21, 2025
Merged via the queue into op-rs:main with commit c2b623c Jul 21, 2025
28 of 29 checks passed
@JoshdfG JoshdfG deleted the Fix-Invalid-Blocks-Marked-as-Seen branch July 25, 2025 19:01
@JoshdfG JoshdfG restored the Fix-Invalid-Blocks-Marked-as-Seen branch July 25, 2025 19:01
@JoshdfG JoshdfG deleted the Fix-Invalid-Blocks-Marked-as-Seen branch July 25, 2025 19:02
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(node/p2p): Invalid Blocks Marked as Seen

3 participants