chore: load default KZG trusted setup from revm (#5202)

This commit is contained in:
DaniPopes
2023-10-27 11:57:52 +02:00
committed by GitHub
parent e79743fe5f
commit d232c25a90
2 changed files with 5 additions and 4167 deletions

File diff suppressed because it is too large Load Diff

View File

@ -34,13 +34,14 @@ pub const BLOB_TX_MIN_BLOB_GASPRICE: u128 = 1u128;
/// Commitment version of a KZG commitment
pub const VERSIONED_HASH_VERSION_KZG: u8 = 0x01;
/// KZG Trusted setup raw
const TRUSTED_SETUP_RAW: &[u8] = include_bytes!("../../res/eip4844/trusted_setup.txt");
/// KZG trusted setup
pub static MAINNET_KZG_TRUSTED_SETUP: Lazy<Arc<KzgSettings>> = Lazy::new(|| {
Arc::new(
load_trusted_setup_from_bytes(TRUSTED_SETUP_RAW).expect("Failed to load trusted setup"),
c_kzg::KzgSettings::load_trusted_setup(
&revm_primitives::kzg::G1_POINTS.0,
&revm_primitives::kzg::G2_POINTS.0,
)
.expect("failed to load trusted setup"),
)
});