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): raiko object #149

Merged
merged 16 commits into from
May 6, 2024
Merged

feat(raiko): raiko object #149

merged 16 commits into from
May 6, 2024

Conversation

Brechtpd
Copy link
Contributor

@Brechtpd Brechtpd commented May 2, 2024

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.

@Brechtpd Brechtpd marked this pull request as ready for review May 4, 2024 00:10
# Conflicts:
#	host/src/execution.rs
#	host/src/preflight.rs
# Conflicts:
#	.github/workflows/ci.yml
#	README.md
#	host/src/execution.rs
#	host/src/preflight.rs
#	host/src/provider_db.rs
#	lib/src/utils.rs
#	provers/risc0/driver/src/bonsai.rs
#	rust-toolchain
};

// Sanity check
if input.network.is_taiko() {
if input.chain_spec.is_taiko() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we still need is_taiko when assemble_protocol_instance only make sense if we're proving taiko?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No real reason I think, just minimizing the differences between proving Ethereum and Taiko blocks. Perhaps for Ethereum blocks we can just not call assemble_protocol_instance at all which could also minimize the difference.

@Brechtpd Brechtpd merged commit c4215bd into taiko/unstable May 6, 2024
5 of 7 checks passed
@Brechtpd Brechtpd deleted the raiko-object branch May 6, 2024 23:27
CeciliaZ030 added a commit that referenced this pull request May 7, 2024
commit 56c46a8
Author: Roger <50648015+RogerLamTd@users.noreply.github.com>
Date:   Mon May 6 20:44:30 2024 -0700

    update tooltip (#166)

commit c4215bd
Author: Brecht Devos <Brechtp.Devos@gmail.com>
Date:   Tue May 7 01:27:47 2024 +0200

    feat(raiko): raiko object (#149)

    * Raiko object + update revm/alloy to reth versions

    * fix risc0

    * fix risc0 ci

    * batch fetch block data

    * remove unnecessary box

    * fmt

    * update toolchains

    * fix risc0

    * Fix compile issue

    * Fix build script not erroring out when a process encountered an error

    * Enable SP1 mock prover

    * fix fmt and compile error in test
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.

2 participants