Skip to content

Commit b52a800

Browse files
authored
fix: Add span for payload and message identifiers for transaction being built by Lander (#7208)
Co-authored-by: Danil Nemirovsky <[email protected]>
1 parent 3c2df10 commit b52a800

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

rust/main/config/mainnet_config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7246,6 +7246,7 @@
72467246
"validatorAnnounce": "0xbE58F200ffca4e1cE4D2F4541E94Ae18370fC405"
72477247
},
72487248
"forma": {
7249+
"batchContractAddress": "0x5ff205935F5b01859466B6b47A3aDD0d2C0E3310",
72497250
"blockExplorers": [
72507251
{
72517252
"apiUrl": "https://explorer.forma.art/api",

rust/main/lander/src/dispatcher/stages/building_stage/building.rs

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,26 @@ impl BuildingStage {
4545
// so worst case this will be lower by `max_batch_size`
4646
self.update_metrics().await;
4747

48-
info!(?payloads, "Building transactions from payloads");
49-
let tx_building_results = self.state.adapter.build_transactions(&payloads).await;
48+
self.build_transactions(&payloads).await;
49+
}
50+
}
51+
52+
#[instrument(skip_all, fields(payload_and_message_ids = ?payloads.iter().map(|p| (p.details.uuid.to_string(), p.details.metadata.clone())).collect::<Vec<_>>()))]
53+
async fn build_transactions(&self, payloads: &Vec<FullPayload>) {
54+
info!(?payloads, "Building transactions from payloads");
55+
let tx_building_results = self.state.adapter.build_transactions(payloads).await;
5056

51-
for tx_building_result in tx_building_results {
52-
// push payloads that failed to be processed (but didn't fail simulation)
53-
// to the back of the queue
54-
if let Err(err) = self
55-
.handle_tx_building_result(tx_building_result.clone())
56-
.await
57-
{
58-
error!(?err, payloads=?tx_building_result.payloads, "Error handling tx building result");
59-
let full_payloads =
60-
get_full_payloads_from_details(&payloads, &tx_building_result.payloads);
61-
self.queue.extend(full_payloads).await;
62-
}
57+
for tx_building_result in tx_building_results {
58+
// push payloads that failed to be processed (but didn't fail simulation)
59+
// to the back of the queue
60+
if let Err(err) = self
61+
.handle_tx_building_result(tx_building_result.clone())
62+
.await
63+
{
64+
error!(?err, payloads=?tx_building_result.payloads, "Error handling tx building result");
65+
let full_payloads =
66+
get_full_payloads_from_details(payloads, &tx_building_result.payloads);
67+
self.queue.extend(full_payloads).await;
6368
}
6469
}
6570
}

0 commit comments

Comments
 (0)