Upgrade to v1.4.0-beta.3 (#4862)

## Issue Addressed

Makes lighthouse compliant with new kzg changes in https://github.com/ethereum/consensus-specs/releases/tag/v1.4.0-beta.3

## Proposed Changes

1. Adds new official trusted setup
2. Refactors kzg to match upstream changes in https://github.com/ethereum/c-kzg-4844/pull/377
3. Updates pre-generated `BlobBundle` to work with official trusted setup. ~~Using json here instead of ssz to account for different value of `MaxBlobCommitmentsPerBlock` in minimal and mainnet. By using json, we can just use one pre generated bundle for both minimal and mainnet. Size of 2 separate ssz bundles is approximately equal to one json bundle cc @jimmygchen~~ 
Dunno what I was doing, ssz works without any issues  
4. Stores trusted_setup as just bytes in eth2_network_config so that we don't have kzg dependency in that lib and in lcli. 


Co-authored-by: realbigsean <seananderson33@gmail.com>
Co-authored-by: realbigsean <seananderson33@GMAIL.com>
This commit is contained in:
Pawan Dhananjay
2023-10-21 13:49:27 +00:00
parent 074c4951fc
commit 6315a81260
36 changed files with 142 additions and 467 deletions

View File

@@ -970,6 +970,7 @@ mod test {
) -> (
BeaconChainHarness<DiskHarnessType<E>>,
Arc<OverflowLRUCache<T>>,
TempDir,
)
where
E: EthSpec,
@@ -984,7 +985,7 @@ mod test {
OverflowLRUCache::<T>::new(capacity, test_store, spec.clone())
.expect("should create cache"),
);
(harness, cache)
(harness, cache, chain_db_path)
}
#[tokio::test]
@@ -992,7 +993,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = 4;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;
let (pending_block, blobs) = availability_pending_block(&harness).await;
let root = pending_block.import_data.block_root;
@@ -1104,7 +1105,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = 4;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;
let mut pending_blocks = VecDeque::new();
let mut pending_blobs = VecDeque::new();
@@ -1255,7 +1256,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = E::slots_per_epoch() as usize;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;
let n_epochs = 4;
let mut pending_blocks = VecDeque::new();
@@ -1395,7 +1396,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = E::slots_per_epoch() as usize;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;
let n_epochs = 4;
let mut pending_blocks = VecDeque::new();
@@ -1573,7 +1574,7 @@ mod test {
type E = MinimalEthSpec;
type T = DiskHarnessType<E>;
let capacity = STATE_LRU_CAPACITY * 2;
let (harness, cache) = setup_harness_and_cache::<E, T>(capacity).await;
let (harness, cache, _path) = setup_harness_and_cache::<E, T>(capacity).await;
let mut pending_blocks = VecDeque::new();
let mut states = Vec::new();