Skip to content

fixes memleak and refactors submission pipe a bit#425

Merged
0w3n-d merged 6 commits intodevelopfrom
od/fix_memleak_plus_refactor
Mar 25, 2026
Merged

fixes memleak and refactors submission pipe a bit#425
0w3n-d merged 6 commits intodevelopfrom
od/fix_memleak_plus_refactor

Conversation

@0w3n-d
Copy link
Copy Markdown
Collaborator

@0w3n-d 0w3n-d commented Mar 24, 2026

@0w3n-d 0w3n-d requested review from ninaiiad and vladimir-ea March 24, 2026 21:06
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

block_number: payload.block_number,
parent_hash: payload.parent_hash,
fee_recipient: payload.fee_recipient,
bid_slot: bid_trace.slot,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: maybe just call it slot? bid.bid_slot

Comment on lines +450 to +454
None => return s.can_hydrate_inner(
&FxHashMap::default(),
&FxHashMap::default(),
max_blobs_per_block,
),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

very much a nit: is this worth an early return?

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 9 additional findings in Devin Review.

Open in Devin Review

Comment on lines +97 to +103
let (submission, maybe_tx_root) = match self.hydrate(submission_data.submission) {
Ok(v) => v,
Err(e) => {
send_submission_result(producers, &self.future_results, submission_ref, Err(e));
error!(?e, "hydration failed after pre-check passed");
return;
}
};
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot Mar 25, 2026

Choose a reason for hiding this comment

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

🟡 Optimistic bid left in sorter when hydration fails post-sort in handle_submission

In handle_submission (crates/relay/src/auctioneer/submit_block.rs), the optimistic bid is sorted into bid_sorter at line 71 and the success result is sent to the builder at line 79. The sim request is sent at line 95. Then at line 97-101, if self.hydrate() fails, the function returns early without storing the payload or cleaning up the bid from the sorter. The bid sorter now references a block_hash with no corresponding entry in self.payloads. When get_header is called (crates/relay/src/auctioneer/get_header.rs:41-43), it finds the block_hash from the sorter but fails to look up the payload, triggering the "this should never happen" error path. While the can_hydrate pre-check in validate_submission (crates/relay/src/auctioneer/validation.rs:35-38) makes this path practically unreachable, the lack of cleanup on the error path means a subtle cache inconsistency or future code change could expose this.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

0w3n-d and others added 5 commits March 25, 2026 17:24
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@0w3n-d 0w3n-d force-pushed the od/fix_memleak_plus_refactor branch from bdd30d1 to 3aa518d Compare March 25, 2026 17:26
devin-ai-integration[bot]

This comment was marked as resolved.

@0w3n-d 0w3n-d merged commit 2c79a63 into develop Mar 25, 2026
2 of 3 checks passed
@0w3n-d 0w3n-d deleted the od/fix_memleak_plus_refactor branch March 25, 2026 17:58
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