@@ -32,8 +32,8 @@ use execution_layer::{
32
32
use futures:: channel:: mpsc:: Receiver ;
33
33
pub use genesis:: { DEFAULT_ETH1_BLOCK_HASH , InteropGenesisBuilder } ;
34
34
use int_to_bytes:: int_to_bytes32;
35
+ use kzg:: Kzg ;
35
36
use kzg:: trusted_setup:: get_trusted_setup;
36
- use kzg:: { Kzg , TrustedSetup } ;
37
37
use logging:: create_test_tracing_subscriber;
38
38
use merkle_proof:: MerkleTree ;
39
39
use operation_pool:: ReceivedPreCapella ;
@@ -81,33 +81,18 @@ pub const TEST_DATA_COLUMN_SIDECARS_SSZ: &[u8] =
81
81
pub const DEFAULT_TARGET_AGGREGATORS : u64 = u64:: MAX ;
82
82
83
83
static KZG : LazyLock < Arc < Kzg > > = LazyLock :: new ( || {
84
- let trusted_setup: TrustedSetup = serde_json:: from_reader ( get_trusted_setup ( ) . as_slice ( ) )
85
- . map_err ( |e| format ! ( "Unable to read trusted setup file: {}" , e) )
86
- . expect ( "should have trusted setup" ) ;
87
- let kzg = Kzg :: new_from_trusted_setup ( trusted_setup) . expect ( "should create kzg" ) ;
88
- Arc :: new ( kzg)
89
- } ) ;
90
-
91
- static KZG_PEERDAS : LazyLock < Arc < Kzg > > = LazyLock :: new ( || {
92
- let trusted_setup: TrustedSetup = serde_json:: from_reader ( get_trusted_setup ( ) . as_slice ( ) )
93
- . map_err ( |e| format ! ( "Unable to read trusted setup file: {}" , e) )
94
- . expect ( "should have trusted setup" ) ;
95
- let kzg = Kzg :: new_from_trusted_setup_das_enabled ( trusted_setup) . expect ( "should create kzg" ) ;
84
+ let kzg = Kzg :: new_from_trusted_setup ( & get_trusted_setup ( ) ) . expect ( "should create kzg" ) ;
96
85
Arc :: new ( kzg)
97
86
} ) ;
98
87
99
88
static KZG_NO_PRECOMP : LazyLock < Arc < Kzg > > = LazyLock :: new ( || {
100
- let trusted_setup: TrustedSetup = serde_json:: from_reader ( get_trusted_setup ( ) . as_slice ( ) )
101
- . map_err ( |e| format ! ( "Unable to read trusted setup file: {}" , e) )
102
- . expect ( "should have trusted setup" ) ;
103
- let kzg = Kzg :: new_from_trusted_setup_no_precomp ( trusted_setup) . expect ( "should create kzg" ) ;
89
+ let kzg =
90
+ Kzg :: new_from_trusted_setup_no_precomp ( & get_trusted_setup ( ) ) . expect ( "should create kzg" ) ;
104
91
Arc :: new ( kzg)
105
92
} ) ;
106
93
107
94
pub fn get_kzg ( spec : & ChainSpec ) -> Arc < Kzg > {
108
95
if spec. fulu_fork_epoch . is_some ( ) {
109
- KZG_PEERDAS . clone ( )
110
- } else if spec. deneb_fork_epoch . is_some ( ) {
111
96
KZG . clone ( )
112
97
} else {
113
98
KZG_NO_PRECOMP . clone ( )
0 commit comments