taikoxyz / raiko

Multi-proofs for Taiko. SNARKS, STARKS and Trusted Execution Enclave. Our previous ZK-EVM circuits are deprecated.
Apache License 2.0
96 stars 75 forks source link

feat(raiko): raiko object #149

Closed Brechtpd closed 1 month ago

Brechtpd commented 2 months ago

Allows raiko to be used in other programs as well. Also introduces a BlockDataProvider trait so that the block data is not required to come from an RPC node but can directly hook into a node database for example.

This version of raiko can be imported in reth to prove blocks directly from within the node using reth's database. Useful for testing but also for real time proving of blocks.

Also should make it easier to set up tests. This PR contains two simple tests that actually fetches a block and proves it.

The host package should only contain the actual host stuff, the raiko stuff should move to a different package but to not unnecessarily make this PR very big with just moving stuff around, will do that in a follow up PR.