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

A feature to add syscall precompiles #1775

Open
kimurayu45z opened this issue Nov 8, 2024 · 2 comments
Open

A feature to add syscall precompiles #1775

kimurayu45z opened this issue Nov 8, 2024 · 2 comments

Comments

@kimurayu45z
Copy link

kimurayu45z commented Nov 8, 2024

Component

sp1-sdk, sp1-zkvm

Describe the feature you would like

When we consider to build a smart contract VM (like Ethereum Virtual Machine) with SP1 zkVM, there are two theoretical ways:

  1. Compiling smart contract as a program being run in zkVM
  2. Compiling smart contract as conventional ways and compiling smart contract VM as a program being run in zkVM

To keep the consistency with conventional smart contract compiler ecosystem, the 2nd would be better. (There is also a possibility of the 1st being better than 2nd due to the proof sizes.)
However, in either ways, there is a requirement to access database and storage.
If we implement database and storage stuff in zkVM, the proof size would be significantly large, so I think it would be better to add a feature to add syscall precompiles for stuff like database/storage access. The diff of the storage can be input/output of the proof.

Additional context

No response

@kimurayu45z
Copy link
Author

Isn't there a way to add precompiles without editing sp1 repository directly?

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

No branches or pull requests

1 participant