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

Enable withdrawals only for Eth mainnet #610

Merged
merged 1 commit into from
Sep 10, 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
5 changes: 3 additions & 2 deletions evm_arithmetization/src/cpu/kernel/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use crate::cpu::kernel::parser::parse;
pub const NUMBER_KERNEL_FILES: usize = if cfg!(feature = "eth_mainnet") {
157
} else if cfg!(feature = "cdk_erigon") {
156
} else if cfg!(feature = "polygon_pos") {
155
} else if cfg!(feature = "polygon_pos") {
154
} else {
// unreachable
0
Expand Down Expand Up @@ -54,6 +54,7 @@ pub static KERNEL_FILES: [&str; NUMBER_KERNEL_FILES] = [
include_str!("asm/core/log.asm"),
include_str!("asm/core/selfdestruct_list.asm"),
include_str!("asm/core/touched_addresses.asm"),
#[cfg(feature = "eth_mainnet")]
include_str!("asm/core/withdrawals.asm"),
include_str!("asm/core/precompiles/main.asm"),
include_str!("asm/core/precompiles/ecrec.asm"),
Expand Down
18 changes: 14 additions & 4 deletions evm_arithmetization/src/cpu/kernel/asm/main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ global start_txns:
global txn_loop:
// If the prover has no more txns for us to process, halt.
PROVER_INPUT(end_of_txns)
%jumpi(execute_withdrawals)
#[cfg(feature = eth_mainnet)]
{
%jumpi(execute_withdrawals)
}
#[cfg(not(feature = eth_mainnet))]
{
%jumpi(perform_final_checks)
}

// Call route_txn. When we return, we will process the txn receipt.
PUSH txn_loop_after
Expand All @@ -171,9 +178,12 @@ global txn_loop_after:
// stack: new_cum_gas, txn_counter, num_nibbles, new_txn_number
%jump(txn_loop)

global execute_withdrawals:
// stack: cum_gas, txn_counter, num_nibbles, txn_nb
%withdrawals
#[cfg(feature = eth_mainnet)]
{
global execute_withdrawals:
// stack: cum_gas, txn_counter, num_nibbles, txn_nb
%withdrawals
}

global perform_final_checks:
// stack: cum_gas, txn_counter, num_nibbles, txn_nb
Expand Down
Loading