Skip to content

Conversation

@MarcosNicolau
Copy link
Member

@MarcosNicolau MarcosNicolau commented Apr 9, 2025

Description

Aggregation mode sdk method to verify if proof has been verified by the ProofAggregationService.

Note: this should be merged after #1871

How to run it

  1. cd into sdk project: cd batcher/aligned
  2. Run verification: cargo run verify-agg-proof --network <NETWORK> --from-block <FROM_BLOCK> --proving_system SP1 --vk <VK_HASH_FILEPATH> --public_input <PUBLIC_INPUTS_FILEPATH> --beacon_url <BEACON_NODE_URL> --rpc_url <RPC_URL>

For example:

cargo run verify-agg-proof --network holesky-stage --from-block 3638552 --proving_system SP1 --public_input ../../scripts/test_files/sp1/sp1_fibonacci_4_1_3.pub --vk ../../scripts/test_files/sp1/sp1_fibonacci_4_1_3.vk --beacon_url <BEACON_URL> --rpc_url https://ethereum-holesky-rpc.publicnode.com

Notes:

  • --from-block is an optional params, if not provided it will fetch the logs from the past 24hs.

Type of change

Please delete options that are not relevant.

  • New feature

Checklist

  • “Hotfix” to testnet, everything else to staging
  • Linked to Github Issue
  • This change depends on code or research by an external entity
    • Acknowledgements were updated to give credit
  • Unit tests added
  • This change requires new documentation.
    • Documentation has been added/updated.
  • This change is an Optimization
    • Benchmarks added/run
  • Has a known issue
  • If your PR changes the Operator compatibility (Ex: Upgrade prover versions)
    • This PR adds compatibility for operator for both versions and do not change batcher/docs/examples
    • This PR updates batcher and docs/examples to the newer version. This requires the operator are already updated to be compatible

@MarcosNicolau MarcosNicolau marked this pull request as ready for review April 10, 2025 21:15
Copy link
Contributor

@MauroToscano MauroToscano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuArce needs to test it, but it looks good

Copy link
Collaborator

@JuArce JuArce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

};

let Some(beacon_block) = beacon_client
.get_block_header_from_parent_hash(beacon_parent_root.0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't a way to avoid using indexes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by indexes? If you mean the beacon_parent_root.0, that is not an index but a way to get the value that ethers library is wrapping.

- Mainnet: `https://ethereum-rpc.publicnode.com`
- Holesky: `https://ethereum-holesky-rpc.publicnode.com`
- Also, you can use your own Ethereum RPC providers.
- `--beacon_client_url <BEACON_CLIENT_URL>`: User's Ethereum Consensus provider connection address. Public nodes don't support this method.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is possible, I'd add a free beacon client

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Free beacon client don't support retrieve the blob data. Should I still add one?

@MarcosNicolau MarcosNicolau added this pull request to the merge queue Apr 21, 2025
Merged via the queue into staging with commit a089f30 Apr 21, 2025
3 checks passed
@MarcosNicolau MarcosNicolau deleted the feat/aggregation-mode-sdk branch April 21, 2025 18:20
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.

4 participants