Skip to content

Commit e92ac27

Browse files
committed
merge conflict
1 parent 453f3ea commit e92ac27

File tree

3 files changed

+43
-53
lines changed

3 files changed

+43
-53
lines changed

Cargo.lock

+12-45
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/flashblocks/service.rs

+18-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use std::sync::Arc;
1212
use thiserror::Error;
1313
use tokio::sync::RwLock;
1414
use tokio::sync::mpsc;
15-
use tracing::error;
15+
use tracing::{debug, error};
1616
#[derive(Debug, Error)]
1717
pub enum FlashblocksError {
1818
#[error("Missing base payload for initial flashblock")]
@@ -162,16 +162,26 @@ impl FlashblocksService {
162162
) -> Result<Option<OpExecutionPayloadEnvelopeV3>, FlashblocksError> {
163163
// consume the best payload and reset the builder
164164
let payload = {
165+
debug!(
166+
message =
167+
"Acquiring best payload write lock: get_best_payload() to use best_payload"
168+
);
165169
let mut builder = self.best_payload.write().await;
166170
std::mem::take(&mut *builder).into_envelope()?
167171
};
172+
debug!(
173+
message = "Acquiring best payload write lock: get_best_payload() to reset best_payload"
174+
);
168175
*self.best_payload.write().await = FlashblockBuilder::new();
169176

170177
Ok(Some(payload))
171178
}
172179

173180
pub async fn set_current_payload_id(&self, payload_id: PayloadId) {
174181
tracing::debug!(message = "Setting current payload ID", payload_id = %payload_id);
182+
debug!(
183+
message = "Acquiring current payload id write lock: set_current_payload_id() to use current_payload_id"
184+
);
175185
*self.current_payload_id.write().await = payload_id;
176186
}
177187

@@ -185,12 +195,19 @@ impl FlashblocksService {
185195
);
186196

187197
// make sure the payload id matches the current payload id
198+
debug!(
199+
message = "Acquiring current payload id read lock: on_event() to use current_payload_id"
200+
);
188201
let current_payload_id = *self.current_payload_id.read().await;
189202
if current_payload_id != payload.payload_id {
190203
error!(message = "Payload ID mismatch", current_payload_id = %current_payload_id, payload_id = %payload.payload_id);
191204
return;
192205
}
193206

207+
debug!(
208+
message =
209+
"Acquiring best payload write lock: on_event() to extend best_payload"
210+
);
194211
if let Err(e) = self.best_payload.write().await.extend(payload.clone()) {
195212
error!(message = "Failed to extend payload", error = %e);
196213
} else {

src/server.rs

+13-7
Original file line numberDiff line numberDiff line change
@@ -584,13 +584,19 @@ impl RollupBoostServer {
584584

585585
let builder = self.builder_client.clone();
586586

587-
// Fallback to the get_payload_v3 from the builder if no flashblocks payload is available
588-
let payload = if let Some(payload) = payload {
589-
info!(message = "using flashblocks payload");
590-
OpExecutionPayloadEnvelope::V3(payload)
591-
} else {
592-
builder.get_payload(payload_id, version).await?
593-
};
587+
// // Fallback to the get_payload_v3 from the builder if no flashblocks payload is available
588+
// let payload = if let Some(payload) = payload {
589+
// info!(message = "using flashblocks payload");
590+
// OpExecutionPayloadEnvelope::V3(payload)
591+
// } else {
592+
// builder.get_payload(payload_id, version).await?
593+
// };
594+
595+
if let Some(payload) = payload {
596+
info!(message = "flashblocks paylod found, but not using it");
597+
}
598+
599+
let payload = builder.get_payload(payload_id, version).await?;
594600

595601
// Send the payload to the local execution engine with engine_newPayload to validate the block from the builder.
596602
// Otherwise, we do not want to risk the network to a halt since op-node will not be able to propose the block.

0 commit comments

Comments
 (0)