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

feat(raiko): support pacaya fork #456

merged 54 commits into from
Mar 23, 2025

Conversation

smtmfft
Copy link
Contributor

@smtmfft smtmfft commented Feb 7, 2025

  • align with pacaya protocol for meta data
  • get blocks in batch mode and check native proof in batch mode
  • impl batch of batch proof (now contract only support this)
  • enable calldata txlist
  • support force inclusion
  • [NO NEED] integrate preflight API (code included here but not tested, maybe should create a separated PR for it)
  • devnet test
  • sgx hekla deployment
  • ontake compatibility: pacaya changes the public input format of ontake's verifier, must test.

Gaiko

https://github.com/taikoxyz/gaiko

  • implement&align with pacaya protocol
  • integrated into raiko
    • docker build
    • makefile
    • CI/CD

Sorry, something went wrong.

@smtmfft smtmfft marked this pull request as draft February 7, 2025 06:19
@smtmfft smtmfft force-pushed the pacaya-dev branch 3 times, most recently from de2b026 to 0e1f1ed Compare February 8, 2025 15:07
@smtmfft smtmfft marked this pull request as ready for review February 14, 2025 03:06
@smtmfft smtmfft changed the title Pacaya dev feat(raiko): support pacaya fork Feb 14, 2025
@keroro520
Copy link
Contributor

keroro520 commented Feb 25, 2025

Proving Batch request is similar to proving Aggregation request. I am considering a workflow for proving Batch request:

  1. Accept BatchRequest{ batch_id } from HTTP
  2. Obtain batch and parse into l2_block_numbers
  3. Construct a AggregationRequest { block_numbers: l2_block_numbers }
  4. Return prove_aggregation(AggregationRequest)

This way can make the code simpler. What do you think?

@keroro520
Copy link
Contributor

keroro520 commented Feb 26, 2025

In order to add support for proving batch aggregation, I intend to create a new kind of proof request structure:

pub struct BatchMetadata {
    pub batch_id: u64,
    pub l1_inclusion_block_number: u64,
}

pub struct BatchProofRequest {
    // adding new field
    pub batches: Vec<BatchMetadata>,

    // old fields
    pub network: String,
    pub l1_network: String,
    pub graffiti: B256,
    #[serde_as(as = "DisplayFromStr")]
    pub prover: Address,
    pub proof_type: ProofType,
    pub blob_proof_type: BlobProofType,
    #[serde(flatten)]
    pub prover_args: HashMap<String, Value>,
}

BatchProofRequest is similar to ProofRequest, yet it is specifically designed for batch processing. This new structure eliminates the distinction between single-batch and aggregation-batch requests, and make the handling process more simplified.

smtmfft and others added 16 commits March 12, 2025 17:16
* fix block time shift calculation

* ensure timestamp calculation not overflow
* feat(host): default concurrency_limit = 2

* perf(host): successed request dont enter actor backend
* fix(host): fulfill_sp1_params

* feat(sgx): change SgxParam .instance to .instanses

* config: update devnet config

* config: update hekla and mainnet config

* fix(sgx): parse instance id from proof
* fix(host): fulfill_sp1_params

* feat(sgx): change SgxParam .instance to .instanses

* config: update devnet config

* config: update hekla and mainnet config

* fix k8s release image registration

* update entrypoint to support ids settings

* fix register tx call

* update cargo.lock

* refine testcase

---------

Co-authored-by: keroroxx520@gmail.com <keroroxx520@gmail.com>
* reuse memdb in batch mode

* fix db merge, using committed current db only

* code refine

* use a lru cache to save previous state

* use hashmap entry() instead of get()

* add missing file

* code refine

* fix initial_db code hash calculation

* use feature to enable the statedb lru
* feat: add alloy dependencies for v0.1.4-patch

* chore: update documentation for installation process

* refactor: simplify anchor block hash retrieval and clean up code

* fix: update alloy-serde dependency to use the correct patch branch

* update fake pacaya height

* fix: update alloy dependencies to use the latest commit hash

* fix(reqactor): catch all panic (#502)

* use numTrans from contract event

---------

Co-authored-by: smtmfft <smtm@taiko.xyz>
Co-authored-by: Kero <keroroxx520@gmail.com>
Signed-off-by: smtmfft <smtm@taiko.xyz>
* update pacaya fork verifier config

* update dependencies

* update guest cargo lock

* fix CI

* update risc0 image

Signed-off-by: smtmfft <smtm@taiko.xyz>

* update sp1 image

Signed-off-by: smtmfft <smtm@taiko.xyz>

---------

Signed-off-by: smtmfft <smtm@taiko.xyz>
@smtmfft smtmfft enabled auto-merge March 22, 2025 01:22
@smtmfft smtmfft disabled auto-merge March 22, 2025 01:58
@smtmfft smtmfft enabled auto-merge March 23, 2025 01:37
@smtmfft smtmfft added this pull request to the merge queue Mar 23, 2025
Merged via the queue into main with commit 76ed149 Mar 23, 2025
31 checks passed
@smtmfft smtmfft deleted the pacaya-dev branch March 23, 2025 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants