Upgrade Guides
5.0.0
The V5 upgrade includes important security fixes and performance improvements, it is strongly recommended to upgrade to this version as soon as possible.
First you should run sp1up, this will install the lastest compiler for the zkVM.
After upgrading the SP1 dependencies to 5.0.0, ensure you delete ALL target directories in your project,
as the V5 upgrade includes a new sp1-zkvm version that is not compatible with previous versions.
If you're using a separate workspace for your program, you must ensure that target directory is deleted.
From the root of your project, you can run rm -rf **/**/target/ to delete all target directories.
Patches
In order to upgrade to V5, some patches must be upgraded, you can find the up to date list of patches here and any caveats associated with them.
The following patches are required to be upgraded:
- P256
- K256
- BLS12_381
- Dalek(-ng)
- Secp256k1
- BN
- RSA
Common Issues
RustCrypto Provider
The current version of the sp1-sdk relies on an RPC client that defaults to enabling the ring TLS feature on Rustls,
which means any dependcies that enable the aws-lc-tls feature will cause the TLS provider to become ambigious to Rustls.
Unfortunately, the only way to solve this at the moment is to install RustCrypto::Provider
at runtime in your main function.
This problem most commonly occurs when using any aws-sdk-* crates, as they enable the aws-lc-tls feature by default.
For example, to install the aws-lc-tls provider, you can add the following to your main.rs:
fn main() {
rustls::crypto::aws_lc_rs::default_provider().install_default()
.expect("Failed to set default crypto provider");
...
}
You are using reserved file descriptor X ...
This message occurs for a few reasons:
- You are using old patches
- Ensure you are using the latest patches for your dependencies, as listed in the precompiles documentation.
- You are using an old ELF by accident, and not a newly built one.
- Ensure your build system is functioning correctly and that you are not using an old ELF file.
- You are using an old
sp1-zkvmorsp1-libversion.- Ensure, when in the
programsworkspace, thatcargo tree | grep sp1shows all >=5.0.0 crates.
- Ensure, when in the