Skip to content

Commit

Permalink
Use upstream version of rust-kzg
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtiomTr authored and sauliusgrigaitis committed Jan 13, 2025
1 parent 91f97d4 commit b69014a
Show file tree
Hide file tree
Showing 4 changed files with 4,109 additions and 9 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ itertools = '0.13'
jemalloc-ctl = '0.5'
jemallocator = '0.5'
jwt-simple = { version = '0.12', default-features = false, features = ['pure-rust'] }
kzg = { git = 'https://github.com/grandinetech/rust-kzg.git', branch = 'integration-raw' }
kzg = { git = 'https://github.com/grandinetech/rust-kzg.git' }
lazy_static = '1'
libmdbx = { git = 'https://github.com/paradigmxyz/reth.git', package = 'reth-libmdbx', rev = 'c228fe15808c3acbf18dc3af1a03ef5cbdcda07a' }
libp2p = { version = '0.54', default-features = false, features = ['metrics', 'dns', 'ecdsa', 'identify', 'macros', 'noise', 'plaintext', 'secp256k1', 'serde', 'tcp', 'tokio', 'yamux', 'quic', 'upnp'] }
Expand Down Expand Up @@ -399,7 +399,7 @@ regex = '1'
replace_with = '0.1'
reqwest = { version = '0.12', features = ['json', 'native-tls-vendored'] }
rusqlite = { version = '0.32', features = ['bundled'] }
rust-kzg-blst = { git = 'https://github.com/grandinetech/rust-kzg.git', branch = 'integration-raw' }
rust-kzg-blst = { git = 'https://github.com/grandinetech/rust-kzg.git' }
scrypt = '0.11'
semver = '1'
serde = { version = '1', features = ['derive', 'rc'] }
Expand Down
10 changes: 7 additions & 3 deletions kzg_utils/src/trusted_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ pub fn settings() -> &'static KZGSettings {
fn load_settings() -> Result<KZGSettings> {
let contents = include_str!("trusted_setup.txt");

let (g1_bytes, g2_bytes) =
let (g1_monomial_bytes, g1_lagrange_bytes, g2_monomial_bytes) =
load_trusted_setup_string(contents).map_err(|error| anyhow!(error))?;

load_trusted_setup_rust(g1_bytes.as_slice(), g2_bytes.as_slice())
.map_err(|error| anyhow!(error))
load_trusted_setup_rust(
g1_monomial_bytes.as_slice(),
g1_lagrange_bytes.as_slice(),
g2_monomial_bytes.as_slice(),
)
.map_err(|error| anyhow!(error))
}
Loading

0 comments on commit b69014a

Please sign in to comment.