Skip to content

Commit c428982

Browse files
authored
Merge pull request #3716 from autonomys/farmer-stack-overflow
Upgrade rust-kzg to reduce farmer stack overflows
2 parents 616b2e6 + 96b6f1b commit c428982

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ hex = { version = "0.4.3", default-features = false }
9797
hex-literal = "0.4.1"
9898
hwlocality = "1.0.0-alpha.6"
9999
jsonrpsee = "0.24.5"
100-
kzg = { git = "https://github.com/grandinetech/rust-kzg", rev = "6c8fcc623df3d7e8c0f30951a49bfea764f90bf4", default-features = false }
100+
kzg = { git = "https://github.com/grandinetech/rust-kzg", rev = "8f5f1a0f73b3c529c77cb880ff8d265830c7d7ac", default-features = false }
101101
libc = "0.2.159"
102102
libp2p = { version = "0.54.2", git = "https://github.com/subspace/rust-libp2p", rev = "4ff21ede371f14ea0b90075f676ae21239ef8fbf", default-features = false }
103103
libp2p-swarm-test = { version = "0.5.0", git = "https://github.com/subspace/rust-libp2p", rev = "4ff21ede371f14ea0b90075f676ae21239ef8fbf" }
@@ -164,7 +164,7 @@ reqwest = { version = "0.12.9", default-features = false }
164164
ring = "0.17.8"
165165
rlp = "0.6"
166166
rs_merkle = { version = "1.4.2", default-features = false }
167-
rust-kzg-blst = { git = "https://github.com/grandinetech/rust-kzg", rev = "6c8fcc623df3d7e8c0f30951a49bfea764f90bf4", default-features = false }
167+
rust-kzg-blst = { git = "https://github.com/grandinetech/rust-kzg", rev = "8f5f1a0f73b3c529c77cb880ff8d265830c7d7ac", default-features = false }
168168
sc-basic-authorship = { git = "https://github.com/subspace/polkadot-sdk", rev = "e831132867930ca90a7088c7246301ab29f015ba" }
169169
sc-block-builder = { git = "https://github.com/subspace/polkadot-sdk", rev = "e831132867930ca90a7088c7246301ab29f015ba" }
170170
sc-chain-spec = { git = "https://github.com/subspace/polkadot-sdk", rev = "e831132867930ca90a7088c7246301ab29f015ba" }
@@ -314,7 +314,6 @@ blake2 = { opt-level = 3 }
314314
blake3 = { opt-level = 3 }
315315
blake2b_simd = { opt-level = 3 }
316316
blst = { opt-level = 3 }
317-
rust-kzg-blst = { opt-level = 3 }
318317
chacha20 = { opt-level = 3 }
319318
chacha20poly1305 = { opt-level = 3 }
320319
cranelift-codegen = { opt-level = 3 }
@@ -362,6 +361,15 @@ x25519-dalek = { opt-level = 3 }
362361
yamux = { opt-level = 3 }
363362
zeroize = { opt-level = 3 }
364363

364+
# These crates are always compiled with small code size, to mitigate farmer stack overflows.
365+
# For details, see: https://github.com/autonomys/subspace/issues/3698
366+
rust-kzg-blst = { opt-level = "s" }
367+
rayon-core = { opt-level = "s" }
368+
369+
[profile.release.package]
370+
rust-kzg-blst = { opt-level = "s" }
371+
rayon-core = { opt-level = "s" }
372+
365373
[profile.release]
366374
# Substrate runtime requires unwinding.
367375
panic = "unwind"

0 commit comments

Comments
 (0)