Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions crates/relay/src/bid_decoder/tile.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{cell::RefCell, sync::Arc};
use std::{cell::RefCell, collections::HashMap, sync::Arc};

use alloy_primitives::B256;
use bytes::Bytes;
Expand All @@ -18,8 +18,8 @@ use helix_common::{
record_submission_step,
};
use helix_types::{
BidAdjustmentData, BlockMergingData, BlsPublicKeyBytes, MergeableOrdersWithPref,
SignedBidSubmission, Submission, SubmissionVersion,
BidAdjustmentData, BlockMergingData, BlsPublicKeyBytes, MergeableOrders,
MergeableOrdersWithPref, SignedBidSubmission, Submission, SubmissionVersion,
};
use tracing::trace;
use zstd::zstd_safe::WriteBuf;
Expand Down Expand Up @@ -232,8 +232,8 @@ impl DecoderTile {
trace!("sending to auctioneer");

let merging_data = if config.block_merging_config.is_enabled {
merging_data.and_then(|data| {
if let Submission::Full(ref signed_bid_submission) = submission {
merging_data.and_then(|data| match &submission {
Submission::Full(signed_bid_submission) => {
// TODO: split up mergeable order and submission processing to
// avoid delaying the bid update
match get_mergeable_orders(signed_bid_submission, &data) {
Expand All @@ -247,9 +247,15 @@ impl DecoderTile {
None
}
}
} else {
None
}
// transactions aren't resolved yet, so orders referencing tx indices can't be
// expanded here; only append-only submissions reach this point (see
// SubmissionDecoder::decode_dehydrated), so merge_orders is always empty.
Submission::Dehydrated(_) => Some(MergeableOrdersWithPref {
allow_appending: data.allow_appending,
orders: MergeableOrders::new(data.builder_address, Vec::new(), HashMap::new()),
merge_orders: data.merge_orders,
}),
})
} else {
None
Expand Down
Loading