Conversation
|
Here's my review of PR #471 - Eiger Wormhole Audit. PR #471 Review: Eiger Wormhole AuditAuthor: illuzen | +1501 / -531 across 18 files | CI: Format check failing OverviewThis PR addresses 11 findings from the Eiger wormhole audit. The changes span the wormhole pallet, mining-rewards pallet, runtime config, and the Critical: Duplicate Proof Recording from Event ScanningThe refactored
Every transfer gets recorded N times where N is the number of subsequent successful transactions in the block. This inflates Fix: Capture the event count in type Pre = u32; // event count snapshot
fn prepare(...) -> Result<Self::Pre, ...> {
Ok(frame_system::Pallet::<Runtime>::event_count())
}
fn post_dispatch(event_count_before: Self::Pre, ...) {
if result.is_ok() {
Self::record_proofs_from_events_since(event_count_before);
}
}High: Weight Underestimation for Event-Based Proof RecordingThe Each recorded proof still performs: 1 storage read ( Suggestion: Either:
Medium: Potential Double-Recording of Mining Reward ProofsThe extension now records proofs for Additionally, the Low: CI Formatting FailureTwo formatting issues flagged by
These are trivially fixable by running What Looks Good
Minor Notes
Summary
The audit remediations are solid in intent and the test coverage is impressive. The critical issue with duplicate proof recording from event scanning needs to be fixed before merging. |
|
PR Review: #471 (Eiger Wormhole Audit) Hey! This is a really solid PR overall — great job tackling 11 audit items across the wormhole pallet, mining rewards, runtime config, and transaction extensions. The direction is excellent, the test coverage is impressive, and there are some nice cleanups (especially the config trait refactor and DRY test helpers in Critical Issue (Must Fix Before Merge)The refactor in
This inflates Recommended fix (as suggested in the review): Change High PriorityWeight underestimation in Consider restoring call inspection for weight estimation or using MediumPotential double-recording of Also, confirm Low / Quick Wins
What Looks Really Good
The PR follows our principles well: concise changes where possible, good DRY improvements, and minimal comments. |
|
Critical issue addressed here : #472 |
* Update transaction_extensions.rs * test * add unit test * fmt --------- Co-authored-by: illuzen <illuzen@users.noreply.github.com>
|
Now I have a thorough picture of the PR. Here's my review: PR #471 Review: Eiger Wormhole AuditOverall this is a really strong PR - the audit remediations are well-implemented, the test coverage is impressive, and the DRY improvements in shared test helpers are excellent. The critical bug fix from PR #472 (event count snapshot) is correctly integrated. Status of Previously Identified IssuesCritical (Duplicate Proof Recording) - FIXED The event count snapshot approach is correctly implemented: And the regression test at line 789 ( High (Weight Underestimation) - FIXED Weight estimation was restored to per-transfer call inspection: Low (CI Formatting) - PARTIALLY FIXED The uncommitted local changes are exactly the formatting fixes. These 3 files need to be committed:
Remaining Concern: Weight for Minted Events
Medium: Mining Rewards Double-RecordingAfter careful analysis, this is not an issue in the current design:
Minor Nits
What Looks Great
Summary
The PR is in good shape. The uncommitted formatting changes should be committed, and then this should be ready to merge. Want me to commit those formatting fixes? |
addresses the following issues