Skip to content

Commit 31db020

Browse files
dylanlottanna-carroll
authored andcommitted
testing out host block number n + 1
1 parent 9b206ca commit 31db020

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/tasks/block/sim.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ impl Simulator {
137137
sim_env: &SimEnv,
138138
) -> eyre::Result<BuiltBlock> {
139139
let concurrency_limit = self.config.concurrency_limit();
140-
let max_host_gas = self.config.max_host_gas(sim_env.prev_host().gas_limit);
141140

142141
let rollup_env = sim_env.sim_rollup_env(self.constants(), self.ru_provider.clone());
143142

@@ -150,7 +149,7 @@ impl Simulator {
150149
concurrency_limit,
151150
sim_items,
152151
self.config.rollup_block_gas_limit,
153-
max_host_gas,
152+
self.config.max_host_gas(sim_env.prev_host().gas_limit),
154153
);
155154

156155
let built_block = block_build.build().in_current_span().await;

src/tasks/env.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use signet_constants::SignetSystemConstants;
1313
use signet_sim::{HostEnv, RollupEnv};
1414
use tokio::{sync::watch, task::JoinHandle};
1515
use tokio_stream::StreamExt;
16-
use tracing::{Instrument, Span, debug, info_span};
16+
use tracing::{Instrument, Span, info_span};
1717
use trevm::revm::{
1818
context::BlockEnv,
1919
context_interface::block::BlobExcessGasAndPrice,
@@ -209,7 +209,7 @@ impl EnvTask {
209209
/// Construct a [`BlockEnv`] by the previous host header.
210210
fn construct_host_env(&self, previous: Header) -> Environment {
211211
let env = BlockEnv {
212-
number: U256::from(previous.number),
212+
number: U256::from(previous.number + 1),
213213
beneficiary: self.config.builder_rewards_address,
214214
// NB: EXACTLY the same as the previous block
215215
timestamp: U256::from(previous.timestamp + self.config.slot_calculator.slot_duration()),
@@ -288,8 +288,6 @@ impl EnvTask {
288288
let rollup_env = self.construct_rollup_env(rollup_header.into());
289289
let host_env = self.construct_host_env(host_header);
290290

291-
debug!(host_env_block_number = ?host_env.block_env().number, %host_block_number, "host block number comparisons");
292-
293291
span_debug!(
294292
span,
295293
rollup_env_number = rollup_env.block_env.number.to::<u64>(),

0 commit comments

Comments
 (0)