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

Showcase Request: Stateless EVM Coprocessor #228

Open
puma314 opened this issue Feb 14, 2024 · 4 comments
Open

Showcase Request: Stateless EVM Coprocessor #228

puma314 opened this issue Feb 14, 2024 · 4 comments
Labels
good first issue Good for newcomers showcase A program to showcase SP1's capabilities

Comments

@puma314
Copy link
Contributor

puma314 commented Feb 14, 2024

Today, onchain applications are highly restricted in what computations they can do because of Ethereum's high gas costs. With ZKPs, developers can make use of more powerful compute in their onchain application by utilizing a "coprocessor": a method of moving computation off-chain and then verifying a succinct proof of this computation onchain (for only ~200k gas).

With SP1, it is trivial to implement your coprocessor logic in Rust. But a lot of Solidity developers are used to writing their code in Solidity and might not want to use Rust for their coprocessor. But, there is an easy way to enable Solidity coprocessors with SP1: we can use the revm interpreter to execute EVM bytecode inside SP1 and prove valid execution of Solidity functions.

You can look at this repo for inspiration on how to use revm and its InMemoryDb to verify execution of stateless EVM bytecode.

A great demo example would be showing how SP1 can prove valid execution of a Solidity library (as libraries are stateless) using the revm interpreter and other EVM-related Rust crates.

@puma314 puma314 added good first issue Good for newcomers showcase A program to showcase SP1's capabilities labels Feb 14, 2024
@supernovahs
Copy link

Can I take this ?

@puma314
Copy link
Contributor Author

puma314 commented Feb 15, 2024

@supernovahs definitely, feel free to work on it and ask any questions in the chat!

@LucasMartinCalderon
Copy link

Interested, LFG

@supernovahs
Copy link

sp1-reth is public . issue can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers showcase A program to showcase SP1's capabilities
Projects
None yet
Development

No branches or pull requests

3 participants