mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Educe migration
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
use crate::{test_utils::TestRandom, *};
|
||||
use derivative::Derivative;
|
||||
use educe::Educe;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use test_random_derive::TestRandom;
|
||||
use tree_hash_derive::TreeHash;
|
||||
|
||||
#[derive(
|
||||
Default, Debug, Clone, Serialize, Encode, Decode, Deserialize, TreeHash, Derivative, TestRandom,
|
||||
Default, Debug, Clone, Serialize, Encode, Decode, Deserialize, TreeHash, Educe, TestRandom,
|
||||
)]
|
||||
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
|
||||
#[derivative(PartialEq, Hash)]
|
||||
#[educe(PartialEq, Hash)]
|
||||
#[context_deserialize(ForkName)]
|
||||
// https://github.com/ethereum/consensus-specs/blob/master/specs/gloas/beacon-chain.md#executionpayloadbid
|
||||
pub struct ExecutionPayloadBid {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::test_utils::TestRandom;
|
||||
use crate::*;
|
||||
use beacon_block_body::KzgCommitments;
|
||||
use derivative::Derivative;
|
||||
use educe::Educe;
|
||||
use serde::de::{Deserializer, Error as _};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
@@ -22,10 +22,10 @@ use tree_hash_derive::TreeHash;
|
||||
Decode,
|
||||
TreeHash,
|
||||
TestRandom,
|
||||
Derivative
|
||||
Educe
|
||||
),
|
||||
cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary)),
|
||||
derivative(PartialEq, Hash(bound = "E: EthSpec")),
|
||||
educe(PartialEq, Hash(bound(E: EthSpec))),
|
||||
serde(bound = "E: EthSpec", deny_unknown_fields),
|
||||
cfg_attr(feature = "arbitrary", arbitrary(bound = "E: EthSpec"))
|
||||
),
|
||||
@@ -36,8 +36,8 @@ use tree_hash_derive::TreeHash;
|
||||
cast_error(ty = "Error", expr = "BeaconStateError::IncorrectStateVariant"),
|
||||
partial_getter_error(ty = "Error", expr = "BeaconStateError::IncorrectStateVariant")
|
||||
)]
|
||||
#[derive(Debug, Clone, Serialize, Encode, Deserialize, TreeHash, Derivative)]
|
||||
#[derivative(PartialEq, Hash(bound = "E: EthSpec"))]
|
||||
#[derive(Debug, Clone, Serialize, Encode, Deserialize, TreeHash, Educe)]
|
||||
#[educe(PartialEq, Hash(bound(E: EthSpec)))]
|
||||
#[serde(bound = "E: EthSpec", untagged)]
|
||||
#[ssz(enum_behaviour = "transparent")]
|
||||
#[tree_hash(enum_behaviour = "transparent")]
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
use crate::test_utils::TestRandom;
|
||||
use crate::*;
|
||||
use derivative::Derivative;
|
||||
use educe::Educe;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use test_random_derive::TestRandom;
|
||||
use tree_hash_derive::TreeHash;
|
||||
|
||||
#[derive(
|
||||
TestRandom, TreeHash, Debug, Clone, Encode, Decode, Serialize, Deserialize, Derivative,
|
||||
)]
|
||||
#[derive(TestRandom, TreeHash, Debug, Clone, Encode, Decode, Serialize, Deserialize, Educe)]
|
||||
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
|
||||
#[serde(bound = "E: EthSpec", deny_unknown_fields)]
|
||||
#[cfg_attr(feature = "arbitrary", arbitrary(bound = "E: EthSpec"))]
|
||||
#[derivative(PartialEq, Hash)]
|
||||
#[educe(PartialEq, Hash)]
|
||||
#[context_deserialize(ForkName)]
|
||||
pub struct PayloadAttestation<E: EthSpec> {
|
||||
pub aggregation_bits: BitList<E::PTCSize>,
|
||||
|
||||
@@ -1,16 +1,14 @@
|
||||
use crate::test_utils::TestRandom;
|
||||
use crate::*;
|
||||
use derivative::Derivative;
|
||||
use educe::Educe;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
use test_random_derive::TestRandom;
|
||||
use tree_hash_derive::TreeHash;
|
||||
|
||||
#[derive(
|
||||
TestRandom, TreeHash, Debug, Clone, Encode, Decode, Serialize, Deserialize, Derivative,
|
||||
)]
|
||||
#[derive(TestRandom, TreeHash, Debug, Clone, Encode, Decode, Serialize, Deserialize, Educe)]
|
||||
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
|
||||
#[derivative(PartialEq, Hash)]
|
||||
#[educe(PartialEq, Hash)]
|
||||
#[context_deserialize(ForkName)]
|
||||
// https://github.com/ethereum/consensus-specs/blob/master/specs/gloas/beacon-chain.md#signedexecutionpayloadbid
|
||||
pub struct SignedExecutionPayloadBid {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use crate::test_utils::TestRandom;
|
||||
use crate::*;
|
||||
use derivative::Derivative;
|
||||
use educe::Educe;
|
||||
use serde::de::{Deserializer, Error as _};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use ssz_derive::{Decode, Encode};
|
||||
@@ -20,10 +20,10 @@ use tree_hash_derive::TreeHash;
|
||||
Decode,
|
||||
TreeHash,
|
||||
TestRandom,
|
||||
Derivative
|
||||
Educe
|
||||
),
|
||||
cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary)),
|
||||
derivative(PartialEq, Hash(bound = "E: EthSpec")),
|
||||
educe(PartialEq, Hash(bound(E: EthSpec))),
|
||||
serde(bound = "E: EthSpec", deny_unknown_fields),
|
||||
cfg_attr(feature = "arbitrary", arbitrary(bound = "E: EthSpec"))
|
||||
),
|
||||
@@ -34,8 +34,8 @@ use tree_hash_derive::TreeHash;
|
||||
cast_error(ty = "Error", expr = "BeaconStateError::IncorrectStateVariant"),
|
||||
partial_getter_error(ty = "Error", expr = "BeaconStateError::IncorrectStateVariant")
|
||||
)]
|
||||
#[derive(Debug, Clone, Serialize, Encode, Deserialize, TreeHash, Derivative)]
|
||||
#[derivative(PartialEq, Hash(bound = "E: EthSpec"))]
|
||||
#[derive(Debug, Clone, Serialize, Encode, Deserialize, TreeHash, Educe)]
|
||||
#[educe(PartialEq, Hash(bound(E: EthSpec)))]
|
||||
#[serde(bound = "E: EthSpec", untagged)]
|
||||
#[ssz(enum_behaviour = "transparent")]
|
||||
#[tree_hash(enum_behaviour = "transparent")]
|
||||
|
||||
Reference in New Issue
Block a user