Fix conflicts rebasing eip4844

This commit is contained in:
Emilia Hane 2023-02-06 14:36:38 +01:00
parent 7545ae9e9b
commit 5437dcae9c
No known key found for this signature in database
GPG Key ID: E73394F9C09206FA
6 changed files with 14 additions and 26 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ perf.data*
/bin /bin
genesis.ssz genesis.ssz
/clippy.toml /clippy.toml
/.cargo
# IntelliJ # IntelliJ
/*.iml /*.iml

4
Cargo.lock generated
View File

@ -6826,6 +6826,7 @@ dependencies = [
] ]
[[package]] [[package]]
<<<<<<< HEAD
name = "serde-big-array" name = "serde-big-array"
version = "0.3.2" version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
@ -6836,6 +6837,8 @@ dependencies = [
] ]
[[package]] [[package]]
=======
>>>>>>> 5ef38b590 (Fix conflicts rebasing eip4844)
name = "serde_array_query" name = "serde_array_query"
version = "0.1.0" version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
@ -8343,7 +8346,6 @@ dependencies = [
"rusqlite", "rusqlite",
"safe_arith", "safe_arith",
"serde", "serde",
"serde-big-array",
"serde_derive", "serde_derive",
"serde_json", "serde_json",
"serde_with", "serde_with",

View File

@ -38,17 +38,13 @@ use tokio::{
time::sleep, time::sleep,
}; };
use tokio_stream::wrappers::WatchStream; 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::{ use types::{
blobs_sidecar::{Blobs, KzgCommitments}, blobs_sidecar::{Blobs, KzgCommitments},
ExecutionPayload, ExecutionPayloadCapella, ExecutionPayloadEip4844, ExecutionPayloadMerge, ExecutionPayload, ExecutionPayloadCapella, ExecutionPayloadEip4844, ExecutionPayloadMerge,
}; };
use types::{AbstractExecPayload, BeaconStateError, ExecPayload}; use types::{AbstractExecPayload, BeaconStateError, ExecPayload};
>>>>>>> d1678db12 (Fix rebase conflicts) use types::consts::eip4844::BLOB_TX_TYPE;
use types::transaction::{AccessTuple, BlobTransaction};
use types::{ use types::{
BlindedPayload, BlockType, ChainSpec, Epoch, ExecutionBlockHash, ForkName, BlindedPayload, BlockType, ChainSpec, Epoch, ExecutionBlockHash, ForkName,
ProposerPreparationData, PublicKeyBytes, Signature, SignedBeaconBlock, Slot, Transaction, ProposerPreparationData, PublicKeyBytes, Signature, SignedBeaconBlock, Slot, Transaction,
@ -135,14 +131,8 @@ pub enum BlockProposalContents<T: EthSpec, Payload: AbstractExecPayload<T>> {
}, },
PayloadAndBlobs { PayloadAndBlobs {
payload: Payload, payload: Payload,
<<<<<<< HEAD block_value: Uint256,
block_value: Uint256,
kzg_commitments: VariableList<KzgCommitment, T::MaxBlobsPerBlock>,
blobs: VariableList<Blob<T>, T::MaxBlobsPerBlock>,
=======
kzg_commitments: KzgCommitments<T>, kzg_commitments: KzgCommitments<T>,
blobs: Blobs<T>,
>>>>>>> d1678db12 (Fix rebase conflicts)
}, },
} }
@ -159,17 +149,10 @@ pub struct BlockProposalContentsDeconstructed<T: EthSpec, Payload: AbstractExecP
impl<T: EthSpec, Payload: AbstractExecPayload<T>> BlockProposalContents<T, Payload> { impl<T: EthSpec, Payload: AbstractExecPayload<T>> BlockProposalContents<T, Payload> {
pub fn deconstruct(self) -> BlockProposalContentsDeconstructed<T, Payload> { pub fn deconstruct(self) -> BlockProposalContentsDeconstructed<T, Payload> {
match self { match self {
<<<<<<< HEAD
Self::Payload { Self::Payload {
payload, payload,
block_value: _, block_value: _,
} => (payload, None, None), } => (payload, None, None),
=======
Self::Payload(payload) => BlockProposalContentsDeconstructed {
payload,
blobs_content: None,
},
>>>>>>> d1678db12 (Fix rebase conflicts)
Self::PayloadAndBlobs { Self::PayloadAndBlobs {
payload, payload,
block_value: _, block_value: _,

View File

@ -22,6 +22,7 @@ use logging::test_logger;
use network::{NetworkReceivers, NetworkSenders}; use network::{NetworkReceivers, NetworkSenders};
use sensitive_url::SensitiveUrl; use sensitive_url::SensitiveUrl;
use slog::Logger; use slog::Logger;
use slot_clock::TestingSlotClock;
use std::future::Future; use std::future::Future;
use std::net::{IpAddr, Ipv4Addr, SocketAddr}; use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use std::sync::Arc; use std::sync::Arc;
@ -58,7 +59,7 @@ pub struct ApiServer<E: EthSpec, SFut: Future<Output = ()>> {
type Initializer<E> = Box< type Initializer<E> = Box<
dyn FnOnce(HarnessBuilder<EphemeralHarnessType<E>>) -> HarnessBuilder<EphemeralHarnessType<E>>, dyn FnOnce(HarnessBuilder<EphemeralHarnessType<E>>) -> HarnessBuilder<EphemeralHarnessType<E>>,
>; >;
type Mutator<E> = BoxedMutator<E, MemoryStore<E>, MemoryStore<E>>; type Mutator<E> = BoxedMutator<E, MemoryStore<E>, MemoryStore<E>, TestingSlotClock>;
impl<E: EthSpec> InteractiveTester<E> { impl<E: EthSpec> InteractiveTester<E> {
pub async fn new(spec: Option<ChainSpec>, validator_count: usize) -> Self { pub async fn new(spec: Option<ChainSpec>, validator_count: usize) -> Self {

View File

@ -3,14 +3,16 @@
mod tests { mod tests {
use crate::persisted_dht::load_dht; use crate::persisted_dht::load_dht;
use crate::{NetworkConfig, NetworkService}; use crate::{NetworkConfig, NetworkService};
use beacon_chain::test_utils::BeaconChainHarness; use beacon_chain::test_utils::{
BeaconChainHarness, EphemeralSystemTimeSlotClockHarnessType as HarnessType,
};
use lighthouse_network::Enr; use lighthouse_network::Enr;
use slog::{o, Drain, Level, Logger}; use slog::{o, Drain, Level, Logger};
use sloggers::{null::NullLoggerBuilder, Build}; use sloggers::{null::NullLoggerBuilder, Build};
use std::str::FromStr; use std::str::FromStr;
use std::sync::Arc; use std::sync::Arc;
use tokio::runtime::Runtime; use tokio::runtime::Runtime;
use types::MinimalEthSpec; use types::MinimalEthSpec as E;
fn get_logger(actual_log: bool) -> Logger { fn get_logger(actual_log: bool) -> Logger {
if actual_log { if actual_log {
@ -34,7 +36,7 @@ mod tests {
fn test_dht_persistence() { fn test_dht_persistence() {
let log = get_logger(false); let log = get_logger(false);
let beacon_chain = BeaconChainHarness::builder(MinimalEthSpec) let beacon_chain = BeaconChainHarness::<HarnessType<E>>::builder(E)
.default_spec() .default_spec()
.deterministic_keypairs(8) .deterministic_keypairs(8)
.fresh_ephemeral_store() .fresh_ephemeral_store()

View File

@ -9,7 +9,6 @@ name = "benches"
harness = false harness = false
[dependencies] [dependencies]
serde-big-array = {version = "0.3.2", features = ["const-generics"]}
merkle_proof = { path = "../../consensus/merkle_proof" } merkle_proof = { path = "../../consensus/merkle_proof" }
bls = { path = "../../crypto/bls", features = ["arbitrary"] } bls = { path = "../../crypto/bls", features = ["arbitrary"] }
kzg = { path = "../../crypto/kzg", features = ["arbitrary"] } kzg = { path = "../../crypto/kzg", features = ["arbitrary"] }