Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(derive): Holocene action tests / fixes #733

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .monorepo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cl/actions-fix
02d5832349a1f469adb00191459333e2032b09b4
12 changes: 10 additions & 2 deletions bin/client/src/l1/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ where
match e {
PipelineErrorKind::Temporary(_) => { /* continue */ }
PipelineErrorKind::Reset(e) => {
let system_config = self
.pipeline
.l2_chain_provider
.system_config_by_number(
self.l2_safe_head.block_info.number,
self.pipeline.rollup_config.clone(),
)
.await?;
if matches!(e, ResetError::HoloceneActivation) {
self.pipeline
.signal(
Expand All @@ -268,7 +276,7 @@ where
.pipeline
.origin()
.ok_or_else(|| anyhow!("Missing L1 origin"))?,
system_config: None,
system_config: Some(system_config),
}
.signal(),
)
Expand All @@ -284,7 +292,7 @@ where
.pipeline
.origin()
.ok_or_else(|| anyhow!("Missing L1 origin"))?,
system_config: None,
system_config: Some(system_config),
}
.signal(),
)
Expand Down
5 changes: 3 additions & 2 deletions crates/derive/src/stages/batch/batch_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ where
let expiry_epoch = epoch.number + self.cfg.seq_window_size;
let force_empty_batches = expiry_epoch <= stage_origin.number;
let first_of_epoch = epoch.number == parent.l1_origin.number + 1;
let next_timestamp = epoch.timestamp + self.cfg.block_time;
let next_timestamp = parent.block_info.timestamp + self.cfg.block_time;

// If the sequencer window did not expire,
// there is still room to receive batches for the current epoch.
Expand Down Expand Up @@ -224,13 +224,14 @@ where
};

// The batch must be a single batch - this stage does not support span batches.
let Batch::Single(next_batch) = next_batch else {
let Batch::Single(mut next_batch) = next_batch else {
error!(
target: "batch-validator",
"BatchValidator received a batch that is not a SingleBatch"
);
return Err(PipelineError::InvalidBatchType.crit());
};
next_batch.parent_hash = parent.block_info.hash;

// Check the validity of the single batch before forwarding it.
match next_batch.check_batch(
Expand Down
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ action-tests test_name='Test_ProgramAction':

if [ ! -d "monorepo/.devnet" ]; then
echo "Building devnet allocs for the monorepo"
(cd monorepo && make devnet-allocs-tests)
(cd monorepo && make devnet-allocs)
fi

echo "Building client and host programs for the native target"
Expand All @@ -42,7 +42,7 @@ action-tests test_name='Test_ProgramAction':
export KONA_CLIENT_PATH="{{justfile_directory()}}/target/release-client-lto/kona"

cd monorepo/op-e2e/actions/proofs && \
go test -run "{{test_name}}" -v ./...
go test -run "{{test_name}}" -v -count=1 ./...
clabby marked this conversation as resolved.
Show resolved Hide resolved

# Clean the action tests directory
clean-actions:
Expand Down Expand Up @@ -151,7 +151,7 @@ build-client-prestate-asterisc-image kona_tag asterisc_tag out='./prestate-artif

# Clones and checks out the monorepo at the commit present in `.monorepo`
monorepo:
[ ! -d monorepo ] && git clone https://github.com/ethereum-optimism/monorepo
([ ! -d monorepo ] && git clone https://github.com/ethereum-optimism/monorepo) || exit 0
clabby marked this conversation as resolved.
Show resolved Hide resolved
cd monorepo && git checkout $(cat ../.monorepo)

# Updates the pinned version of the monorepo
Expand Down