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

feat(raiko): support pacaya fork #456

Merged
merged 54 commits into from
Mar 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
03dc36b
working on batch mode api
smtmfft Jan 20, 2025
113f87e
add boost rpc(preflight rpc) support
smtmfft Jan 23, 2025
98a67c3
fix prefligh bug, not perfect though
smtmfft Feb 1, 2025
1e8061c
init providerDB to avoid optimistic execution iteration
smtmfft Feb 4, 2025
eb80a25
filter out null address to avoid db query 0x0 code hash
smtmfft Feb 4, 2025
68d0c38
dev
smtmfft Feb 5, 2025
0ad0ae7
remove preflight API support for now
smtmfft Feb 9, 2025
9259699
add upper level API and sync protocol changes
smtmfft Feb 11, 2025
85e2327
fix api call issues
smtmfft Feb 11, 2025
5df6fc9
add missing files
smtmfft Feb 11, 2025
b295ff9
fix sgx block builder
smtmfft Feb 11, 2025
e9ac5ef
auto aggregate single batch
smtmfft Feb 11, 2025
0e7b2e4
code refine and aligh tx distribution algo with client
smtmfft Feb 13, 2025
76caceb
code refine: clean warnings
smtmfft Feb 13, 2025
2f8455f
Merge branch 'main' into pacaya-dev
smtmfft Feb 14, 2025
0d9c24e
add gas limit check
smtmfft Feb 16, 2025
b3aba69
Merge remote-tracking branch 'origin/main' into pacaya-dev
smtmfft Feb 19, 2025
515512a
feat: add gaiko submodule for project integration
johntaiko Feb 25, 2025
7e7c56a
feat(raiko): align with protocol pacaya (#473)
smtmfft Feb 28, 2025
8d73929
Revert "feat(raiko): align with protocol pacaya (#473)" (#476)
smtmfft Mar 3, 2025
cea307f
support force inclusion batch (#480)
smtmfft Mar 4, 2025
6027998
fix: update gaiko submodule branch to main and adjust taiko-reth sources
johntaiko Mar 7, 2025
6abc9ac
feat: handle batch requeset (#469)
keroro520 Mar 7, 2025
99c46e0
Merge branch 'main' into pacaya-dev
smtmfft Mar 7, 2025
bb234c2
fix pacaya transtion (#483)
smtmfft Mar 7, 2025
3890467
support calldata txlist (#484)
smtmfft Mar 10, 2025
f01e0af
improve(cycle): use a constant for empty ETH deposit root in BlockMet…
johntaiko Mar 10, 2025
2d3c7ca
fix pi hash (#486)
smtmfft Mar 10, 2025
abe0fe2
fix pi sequence
smtmfft Mar 10, 2025
087118c
add a testcase for pacaya pi (#487)
smtmfft Mar 10, 2025
9d5d529
Pacaya add testcase (#488)
smtmfft Mar 10, 2025
b41de24
add more check (#491)
smtmfft Mar 12, 2025
c410400
fix compile
smtmfft Mar 12, 2025
0f4900f
fix sgx env loading (#492)
smtmfft Mar 12, 2025
6e95b51
fix pacaya block number
smtmfft Mar 12, 2025
ac59c4b
hotfix for hekla (#493)
smtmfft Mar 13, 2025
eb0d3da
fix block time shift calculation (#494)
smtmfft Mar 13, 2025
570b675
chore: set the default concurrency limit to 2 (#490)
keroro520 Mar 13, 2025
005e9c9
feat(host/v3/batch): support zk_any (#489)
keroro520 Mar 13, 2025
7c55122
feat: update sgx params (#495)
keroro520 Mar 17, 2025
36392e5
fix k8s release image registration (#496)
smtmfft Mar 17, 2025
da7f209
reuse memdb in batch mode (#497)
smtmfft Mar 19, 2025
6be576e
fix(sgx): instance_id bytes length is 4 (#499)
keroro520 Mar 19, 2025
0ae1022
feat: add alloy dependencies for v0.1.4-patch (#501)
johntaiko Mar 20, 2025
52e18bb
feat: add pretty diff print when mismatch (#503)
johntaiko Mar 20, 2025
3db22b1
enable statedb lru by default
smtmfft Mar 20, 2025
9619626
code refine
smtmfft Mar 20, 2025
5e7e1c5
update hekla pacaya config
smtmfft Mar 20, 2025
632200f
update reth dependency
smtmfft Mar 21, 2025
f31dc34
update pacaya fork verifier config (#508)
smtmfft Mar 21, 2025
613ad5f
fix CI
smtmfft Mar 22, 2025
e4c2938
fix CI
smtmfft Mar 22, 2025
f47dc26
fix CI sp1 build and test
smtmfft Mar 22, 2025
640e5ee
disable elf unit test due to dummy input
smtmfft Mar 22, 2025
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
Prev Previous commit
Next Next commit
code refine: clean warnings
smtmfft committed Feb 13, 2025
commit 76caceb4ee2c041544a0da190feb858887f80511
5 changes: 1 addition & 4 deletions core/src/preflight/util.rs
Original file line number Diff line number Diff line change
@@ -309,7 +309,7 @@ pub async fn prepare_taiko_chain_batch_input(
let fork = taiko_chain_spec.active_fork(batch_blocks[0].number, batch_blocks[0].timestamp)?;
let provider_l1 = RpcBlockDataProvider::new(&l1_chain_spec.rpc, 0).await?;
// todo: duplicate code with parse_l1_batch_proposal_tx_for_pacaya_fork(), better to make these values fn parameters
let (l1_inclusion_height, batch_proposal_tx, batch_proposed_fork) =
let (l1_inclusion_height, _batch_proposal_tx, batch_proposed_fork) =
get_block_proposed_event_by_height(
provider_l1.provider(),
taiko_chain_spec.clone(),
@@ -328,10 +328,7 @@ pub async fn prepare_taiko_chain_batch_input(

if let BlockProposedFork::Pacaya(batch_proposed) = batch_proposed_fork {
let batch_info = &batch_proposed.info;
let batch_meta = &batch_proposed.meta;
let blob_hashes = batch_info.blobHashes.clone();
let blob_byte_offset = batch_info.blobByteOffset as usize;
let blob_byte_size = batch_info.blobByteSize as usize;
let blob_tx_buffers = get_batch_tx_data_with_proofs(
blob_hashes,
l1_inclusion_header.timestamp,
9 changes: 2 additions & 7 deletions host/src/server/api/v4/proof.rs
Original file line number Diff line number Diff line change
@@ -3,16 +3,11 @@ use crate::{
metrics::{inc_current_req, inc_guest_req_count, inc_host_req_count},
server::{
api::{v2, v3::Status},
prove_aggregation,
utils::to_v3_status,
},
};
use axum::{extract::State, routing::post, Json, Router};
use raiko_core::{
interfaces::{AggregationRequest, ProofRequest, ProofRequestOpt},
provider::{get_batch_task_data, get_task_data},
};
use raiko_lib::proof_type;
use raiko_core::interfaces::ProofRequest;
use raiko_reqactor::Actor;
use raiko_reqpool::{
AggregationRequestEntity, AggregationRequestKey, BatchProofRequestEntity, BatchProofRequestKey,
@@ -41,7 +36,7 @@ use utoipa::OpenApi;
/// - risc0 - uses the risc0 prover
async fn proof_handler(
State(actor): State<Actor>,
Json(mut batch_request_opt): Json<Value>,
Json(batch_request_opt): Json<Value>,
) -> HostResult<Status> {
inc_current_req();

2 changes: 1 addition & 1 deletion host/src/server/handler.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use raiko_reqactor::{Action, Actor};
use raiko_reqpool::{
AggregationRequestEntity, AggregationRequestKey, RequestEntity, RequestKey,
SingleProofRequestEntity, SingleProofRequestKey, Status,
SingleProofRequestKey, Status,
};

// NOTE: HTTP handlers should not check the status of the request, but just send the request to the Actor. In
6 changes: 2 additions & 4 deletions lib/src/builder.rs
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ use std::sync::Arc;

use crate::primitives::keccak::keccak;
use crate::primitives::mpt::StateAccount;
use crate::utils::{generate_transactions_for_batch_blocks, generate_transactions};
use crate::utils::{generate_transactions, generate_transactions_for_batch_blocks};
use crate::{
consts::{ChainSpec, MAX_BLOCK_HASH_AGE},
guest_mem_forget,
@@ -15,9 +15,7 @@ use anyhow::{bail, ensure, Result};
use reth_chainspec::{
ChainSpecBuilder, Hardfork, HOLESKY, MAINNET, TAIKO_A7, TAIKO_DEV, TAIKO_MAINNET,
};
use reth_evm::execute::{
self, BlockExecutionOutput, BlockValidationError, Executor, ProviderError,
};
use reth_evm::execute::{BlockExecutionOutput, BlockValidationError, Executor, ProviderError};
use reth_evm_ethereum::execute::{
validate_block_post_execution, Consensus, EthBeaconConsensus, EthExecutorProvider,
};
1 change: 0 additions & 1 deletion lib/src/input.rs
Original file line number Diff line number Diff line change
@@ -181,7 +181,6 @@ impl BlockProposedFork {
BlockProposedFork::Hekla(block) => block.meta.blobHash,
BlockProposedFork::Ontake(block) => block.meta.blobHash,
// meaningless for pakaya
BlockProposedFork::Pacaya(batch) => B256::default(),
_ => B256::default(),
}
}
2 changes: 0 additions & 2 deletions lib/src/prover.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
use reth_primitives::{ChainId, B256};
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use std::sync::Mutex;
use utoipa::ToSchema;

use crate::input::{