From 5437dcae9cfeb97ad64753c358aa31588c19b684 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Mon, 6 Feb 2023 14:36:38 +0100 Subject: [PATCH] Fix conflicts rebasing eip4844 --- .gitignore | 1 + Cargo.lock | 4 +++- beacon_node/execution_layer/src/lib.rs | 23 +++-------------------- beacon_node/http_api/tests/common.rs | 3 ++- beacon_node/network/src/service/tests.rs | 8 +++++--- consensus/types/Cargo.toml | 1 - 6 files changed, 14 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index 2c656632a..7e370ee35 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ perf.data* /bin genesis.ssz /clippy.toml +/.cargo # IntelliJ /*.iml diff --git a/Cargo.lock b/Cargo.lock index e38755cd7..8a44e28a0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6826,6 +6826,7 @@ dependencies = [ ] [[package]] +<<<<<<< HEAD name = "serde-big-array" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -6836,6 +6837,8 @@ dependencies = [ ] [[package]] +======= +>>>>>>> 5ef38b590 (Fix conflicts rebasing eip4844) name = "serde_array_query" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -8343,7 +8346,6 @@ dependencies = [ "rusqlite", "safe_arith", "serde", - "serde-big-array", "serde_derive", "serde_json", "serde_with", diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index 55f432b45..b8b452b11 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -38,17 +38,13 @@ use tokio::{ time::sleep, }; use tokio_stream::wrappers::WatchStream; -<<<<<<< HEAD -use types::consts::eip4844::BLOB_TX_TYPE; -use types::transaction::{AccessTuple, BlobTransaction}; -use types::{AbstractExecPayload, BeaconStateError, Blob, ExecPayload, KzgCommitment}; -======= use types::{ blobs_sidecar::{Blobs, KzgCommitments}, ExecutionPayload, ExecutionPayloadCapella, ExecutionPayloadEip4844, ExecutionPayloadMerge, }; use types::{AbstractExecPayload, BeaconStateError, ExecPayload}; ->>>>>>> d1678db12 (Fix rebase conflicts) +use types::consts::eip4844::BLOB_TX_TYPE; +use types::transaction::{AccessTuple, BlobTransaction}; use types::{ BlindedPayload, BlockType, ChainSpec, Epoch, ExecutionBlockHash, ForkName, ProposerPreparationData, PublicKeyBytes, Signature, SignedBeaconBlock, Slot, Transaction, @@ -135,14 +131,8 @@ pub enum BlockProposalContents> { }, PayloadAndBlobs { payload: Payload, -<<<<<<< HEAD - block_value: Uint256, - kzg_commitments: VariableList, - blobs: VariableList, T::MaxBlobsPerBlock>, -======= +block_value: Uint256, kzg_commitments: KzgCommitments, - blobs: Blobs, ->>>>>>> d1678db12 (Fix rebase conflicts) }, } @@ -159,17 +149,10 @@ pub struct BlockProposalContentsDeconstructed> BlockProposalContents { pub fn deconstruct(self) -> BlockProposalContentsDeconstructed { match self { -<<<<<<< HEAD Self::Payload { payload, block_value: _, } => (payload, None, None), -======= - Self::Payload(payload) => BlockProposalContentsDeconstructed { - payload, - blobs_content: None, - }, ->>>>>>> d1678db12 (Fix rebase conflicts) Self::PayloadAndBlobs { payload, block_value: _, diff --git a/beacon_node/http_api/tests/common.rs b/beacon_node/http_api/tests/common.rs index f3449d32d..f7d30c9e0 100644 --- a/beacon_node/http_api/tests/common.rs +++ b/beacon_node/http_api/tests/common.rs @@ -22,6 +22,7 @@ use logging::test_logger; use network::{NetworkReceivers, NetworkSenders}; use sensitive_url::SensitiveUrl; use slog::Logger; +use slot_clock::TestingSlotClock; use std::future::Future; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use std::sync::Arc; @@ -58,7 +59,7 @@ pub struct ApiServer> { type Initializer = Box< dyn FnOnce(HarnessBuilder>) -> HarnessBuilder>, >; -type Mutator = BoxedMutator, MemoryStore>; +type Mutator = BoxedMutator, MemoryStore, TestingSlotClock>; impl InteractiveTester { pub async fn new(spec: Option, validator_count: usize) -> Self { diff --git a/beacon_node/network/src/service/tests.rs b/beacon_node/network/src/service/tests.rs index f0dd0e75f..66d23234d 100644 --- a/beacon_node/network/src/service/tests.rs +++ b/beacon_node/network/src/service/tests.rs @@ -3,14 +3,16 @@ mod tests { use crate::persisted_dht::load_dht; use crate::{NetworkConfig, NetworkService}; - use beacon_chain::test_utils::BeaconChainHarness; + use beacon_chain::test_utils::{ + BeaconChainHarness, EphemeralSystemTimeSlotClockHarnessType as HarnessType, + }; use lighthouse_network::Enr; use slog::{o, Drain, Level, Logger}; use sloggers::{null::NullLoggerBuilder, Build}; use std::str::FromStr; use std::sync::Arc; use tokio::runtime::Runtime; - use types::MinimalEthSpec; + use types::MinimalEthSpec as E; fn get_logger(actual_log: bool) -> Logger { if actual_log { @@ -34,7 +36,7 @@ mod tests { fn test_dht_persistence() { let log = get_logger(false); - let beacon_chain = BeaconChainHarness::builder(MinimalEthSpec) + let beacon_chain = BeaconChainHarness::>::builder(E) .default_spec() .deterministic_keypairs(8) .fresh_ephemeral_store() diff --git a/consensus/types/Cargo.toml b/consensus/types/Cargo.toml index 97ce90de6..95423e5d0 100644 --- a/consensus/types/Cargo.toml +++ b/consensus/types/Cargo.toml @@ -9,7 +9,6 @@ name = "benches" harness = false [dependencies] -serde-big-array = {version = "0.3.2", features = ["const-generics"]} merkle_proof = { path = "../../consensus/merkle_proof" } bls = { path = "../../crypto/bls", features = ["arbitrary"] } kzg = { path = "../../crypto/kzg", features = ["arbitrary"] }