Skip to content

Commit ab08be4

Browse files
authored
feat: patch sha2 0.9.9 and bump tendermint (#41)
* feat: patch v4 correctly * fix * add * add * fix * add * fix * fix
1 parent 2a068a7 commit ab08be4

File tree

16 files changed

+531
-393
lines changed

16 files changed

+531
-393
lines changed

Cargo.lock

Lines changed: 436 additions & 313 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,43 @@
11
[workspace]
2-
members = ["primitives", "script", "program"]
2+
members = [
3+
"primitives",
4+
"script",
5+
"program",
6+
]
37
resolver = "2"
48

59
[workspace.dependencies]
6-
alloy = { version = "0.8", default-features = false }
10+
# sp1-blobstream
11+
sp1-blobstream-primitives = { path = "primitives" }
12+
13+
alloy = { version = "0.9", default-features = false }
14+
tendermint = { version = "0.40.1", default-features = false }
15+
tendermint-light-client-verifier = { version = "0.40.1", default-features = false, features = [
16+
"rust-crypto",
17+
] }
18+
19+
reqwest = { version = "0.11", features = ["json"] }
20+
tokio = { version = "^1.38.0", features = ["full"] }
21+
serde = { version = "1.0", default-features = false, features = ["derive"] }
22+
serde_cbor = "0.11.2"
23+
dotenv = "0.15.0"
24+
subtle-encoding = "0.5.1"
25+
anyhow = "1.0.82"
26+
clap = { version = "4.0", features = ["derive", "env"] }
27+
log = "0.4.21"
28+
hex = "0.4.3"
29+
futures = "0.3.30"
30+
env_logger = "0.11.3"
31+
serde_json = "1"
32+
chrono = "0.4.38"
33+
csv = "1.3.1"
34+
sha2 = "0.10"
35+
36+
# sp1
37+
sp1-sdk = "4.0.0-rc.9"
38+
sp1-zkvm = "4.0.0-rc.9"
739

840
[patch.crates-io]
9-
sha2 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.10.8-sp1-4.0.0-rc.3" }
41+
sha2-v0-9-9 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.9.9-sp1-4.0.0-rc.3" }
42+
sha2-v0-10-8 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha2", tag = "patch-sha2-0.10.8-sp1-4.0.0-rc.3" }
1043
curve25519-dalek-ng = { git = "https://github.com/sp1-patches/curve25519-dalek-ng", tag = "patch-4.1.1-sp1-4.0.0-rc.3" }

book/reproducible-builds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ When deploying SP1 Blobstream in production, it's important to ensure that the p
66

77
## Prerequisites
88

9-
You first need to install the [cargo prove](https://docs.succinct.xyz/getting-started/install.html#option-1-prebuilt-binaries-recommended) toolchain.
9+
You first need to install the [cargo prove](https://docs.succinct.xyz/docs/getting-started/install.html#option-1-prebuilt-binaries-recommended) toolchain.
1010

1111
Ensure that you have the latest version of the toolchain by running:
1212

contracts/script/UpdateVkey.s.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ contract UpdateVkeyScript is BaseScript {
2424
SP1Blobstream sp1Blobstream = SP1Blobstream(address(existingProxyAddress));
2525

2626
// v4 program vkey
27-
sp1Blobstream.updateProgramVkey(0x00a4a07806c0cb9bc8fcc14fed368a161b947d13b4a4fd58eb382d07a3373ef7);
27+
sp1Blobstream.updateProgramVkey(0x00e30cadab0b8ad6a5f115c5131a14afce4ec4bbf8acf7c821951778a2d97660);
2828
}
2929
}

elf/blobstream-elf

23.9 KB
Binary file not shown.

primitives/Cargo.toml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
[package]
2-
name = "primitives"
2+
name = "sp1-blobstream-primitives"
33
version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
alloy = { version = "0.7.0", default-features = false, features = [
8-
"sol-types",
9-
] }
10-
tendermint = { version = "0.35.0", default-features = false }
11-
tendermint-light-client-verifier = { version = "0.35.0", default-features = false, features = [
12-
"rust-crypto",
13-
] }
14-
serde = { version = "1.0", default-features = false, features = ["derive"] }
7+
alloy = { workspace = true, default-features = false, features = ["sol-types"] }
8+
tendermint = { workspace = true, default-features = false }
9+
tendermint-light-client-verifier = { workspace = true, default-features = false, features = ["rust-crypto"] }
10+
serde = { workspace = true, default-features = false, features = ["derive"] }

primitives/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::time::Duration;
2-
32
use tendermint_light_client_verifier::{
43
options::Options,
54
types::{LightBlock, TrustThreshold},

program/Cargo.toml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
[package]
22
version = "0.1.0"
3-
name = "blobstream-program"
3+
name = "sp1-blobstream-program"
44
edition = "2021"
55

66
[dependencies]
7-
primitives = { path = "../primitives" }
8-
sp1-zkvm = "4.0.0-rc.8"
9-
tendermint-light-client-verifier = { version = "0.35.0", default-features = false, features = [
10-
"rust-crypto",
11-
] }
12-
tendermint = "0.35.0"
13-
sha2 = "0.10"
14-
serde_cbor = "0.11.2"
15-
alloy = { workspace = true, features = ["sol-types"] }
7+
sp1-blobstream-primitives = { workspace = true }
8+
sp1-zkvm = { workspace = true }
9+
tendermint-light-client-verifier = { workspace = true, default-features = false, features = ["rust-crypto"] }
10+
tendermint = { workspace = true, default-features = false }
11+
sha2 = { workspace = true }
12+
serde_cbor = { workspace = true }
13+
alloy = { workspace = true, default-features = false, features = ["sol-types"] }

program/src/main.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
#![no_main]
22
sp1_zkvm::entrypoint!(main);
33

4-
use alloy::primitives::B256;
5-
use alloy::primitives::U256;
6-
use alloy::sol;
7-
use alloy::sol_types::SolType;
8-
use primitives::get_header_update_verdict;
9-
use primitives::types::ProofInputs;
10-
use primitives::types::ProofOutputs;
4+
use alloy::{primitives::B256, primitives::U256, sol, sol_types::SolType};
115
use sha2::Sha256;
12-
use std::collections::HashSet;
13-
use std::ops::Add;
6+
use sp1_blobstream_primitives::{
7+
get_header_update_verdict,
8+
types::{ProofInputs, ProofOutputs},
9+
};
10+
use std::{collections::HashSet, ops::Add};
1411
use tendermint::{block::Header, merkle::simple_hash_from_byte_vectors};
15-
use tendermint_light_client_verifier::types::LightBlock;
16-
use tendermint_light_client_verifier::Verdict;
12+
use tendermint_light_client_verifier::{types::LightBlock, Verdict};
1713
type DataRootTuple = sol! {
1814
tuple(uint64, bytes32)
1915
};

script/Cargo.toml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
version = "0.1.0"
3-
name = "blobstream-script"
3+
name = "sp1-blobstream-script"
44
edition = "2021"
55

66
[[bin]]
@@ -24,27 +24,28 @@ name = "costs"
2424
path = "bin/costs.rs"
2525

2626
[dependencies]
27-
primitives = { path = "../primitives" }
28-
sp1-sdk = "4.0.0-rc.8"
29-
reqwest = { version = "0.11", features = ["json"] }
30-
tokio = { version = "^1.38.0", features = ["full"] }
31-
serde = { version = "1.0", default-features = false, features = ["derive"] }
32-
tendermint = { version = "0.35.0", default-features = false }
33-
tendermint-light-client-verifier = { version = "0.35.0", default-features = false, features = [
27+
sp1-blobstream-primitives = { workspace = true }
28+
alloy = { workspace = true, default-features = true, features = ["full"] }
29+
tendermint = { workspace = true }
30+
tendermint-light-client-verifier = { workspace = true, features = [
3431
"rust-crypto",
3532
] }
36-
alloy = { workspace = true, default-features = true, features = ["full"] }
37-
serde_cbor = "0.11.2"
38-
dotenv = "0.15.0"
39-
subtle-encoding = "0.5.1"
40-
anyhow = "1.0.82"
41-
clap = { version = "4.0", features = ["derive", "env"] }
42-
log = "0.4.21"
43-
hex = "0.4.3"
44-
futures = "0.3.30"
45-
env_logger = "0.11.3"
46-
serde_json = "1"
47-
chrono = "0.4.38"
48-
csv = "1.3.1"
33+
sp1-sdk = { workspace = true }
34+
reqwest = { workspace = true }
35+
tokio = { workspace = true }
36+
serde = { workspace = true }
37+
serde_cbor = { workspace = true }
38+
dotenv = { workspace = true }
39+
subtle-encoding = { workspace = true }
40+
anyhow = { workspace = true }
41+
clap = { workspace = true }
42+
log = { workspace = true }
43+
hex = { workspace = true }
44+
futures = { workspace = true }
45+
env_logger = { workspace = true }
46+
serde_json = { workspace = true }
47+
chrono = { workspace = true }
48+
csv = { workspace = true }
49+
4950
[build-dependencies]
5051
sp1-build = "4.0.0-rc.8"

0 commit comments

Comments
 (0)