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

Comments

feat(node/p2p): Improved validation so invalid blocks are not marked seen#2392

Closed
PoulavBhowmick03 wants to merge 2 commits intoop-rs:mainfrom
PoulavBhowmick03:feat/mark_invalid_blocks_seen
Closed

feat(node/p2p): Improved validation so invalid blocks are not marked seen#2392
PoulavBhowmick03 wants to merge 2 commits intoop-rs:mainfrom
PoulavBhowmick03:feat/mark_invalid_blocks_seen

Conversation

@PoulavBhowmick03
Copy link
Contributor

Fixes #2361

@codecov
Copy link

codecov bot commented Jul 10, 2025

Codecov Report

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

Project coverage is 82.2%. Comparing base (a1bd96d) to head (b8cfb0e).
Report is 40 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% 12 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.

Comment on lines 146 to 164
// Validate signature first
let msg = envelope.payload_hash.signature_message(self.rollup_config.l1_chain_id);
let _msg_signer = envelope
.signature
.recover_address_from_msg(&msg)
.map_err(|_| BlockInvalidError::Signature)?;

Copy link
Contributor

Choose a reason for hiding this comment

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

We actually don't want this - we just want to move lines 179 - 191 here, above the seen_hashes check. That way, a block isn't marked as seen even if it has an invalid signature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it. making the changes.
also, i was wondering, if there were any discussion groups for kona currently? would love to join and be a part of it @refcell

@PoulavBhowmick03 PoulavBhowmick03 force-pushed the feat/mark_invalid_blocks_seen branch from bc6c149 to b8cfb0e Compare July 13, 2025 09:01
@refcell
Copy link
Contributor

refcell commented Jul 21, 2025

#2391 fixes this and landed before this PR so closing this for now. Thanks for picking this issue up!

@refcell refcell closed this Jul 21, 2025
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

2 participants