Skip to content

Commit 826f493

Browse files
committed
Bump tips-core and add state_flashblock_index field to meter response
1 parent 20b881b commit 826f493

File tree

3 files changed

+38
-49
lines changed

3 files changed

+38
-49
lines changed

Cargo.lock

Lines changed: 33 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ base-reth-transaction-tracing = { path = "crates/transaction-tracing" }
4545

4646
# base/tips
4747
# Note: default-features = false avoids version conflicts with reth's alloy/op-alloy dependencies
48-
tips-core = { git = "https://github.com/base/tips", rev = "e59327bec565808e0505d3fb3a64749dfc61a41a", default-features = false }
48+
tips-core = { git = "https://github.com/base/tips", rev = "86b275c0fd63226c3fb85ac5512033f99b67d0f5", default-features = false }
4949

5050
# reth
5151
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.8.2" }

crates/metering/src/rpc.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ where
158158
bundle_state: pb.get_bundle_state(),
159159
});
160160

161+
// Get the flashblock index if we have pending flashblocks
162+
let state_flashblock_index = pending_blocks.as_ref().map(|pb| pb.latest_flashblock_index());
163+
161164
// Meter bundle using utility function
162165
let result = meter_bundle(
163166
state_provider,
@@ -194,8 +197,6 @@ where
194197
"Bundle metering completed successfully"
195198
);
196199

197-
// TODO: Add flashblock_index to MeterBundleResponse in tips-core
198-
// The response should indicate both the canonical block number and the flashblock index
199200
Ok(MeterBundleResponse {
200201
bundle_gas_price,
201202
bundle_hash: result.bundle_hash,
@@ -204,6 +205,7 @@ where
204205
gas_fees: result.total_gas_fees.to_string(),
205206
results: result.results,
206207
state_block_number: header.number,
208+
state_flashblock_index,
207209
total_gas_used: result.total_gas_used,
208210
total_execution_time_us: result.total_execution_time_us,
209211
state_root_time_us: result.state_root_time_us,

0 commit comments

Comments
 (0)