@@ -3,15 +3,14 @@ use alloy::{
3
3
rpc:: types:: beacon:: { BlsPublicKey , BlsSignature } ,
4
4
} ;
5
5
use serde:: { Deserialize , Serialize } ;
6
- use ssz_derive:: { Decode , Encode } ;
7
6
use ssz_types:: { typenum, BitList , BitVector , FixedVector , VariableList } ;
8
7
9
8
use super :: {
10
9
execution_payload:: ExecutionPayloadHeader , kzg:: KzgCommitments , spec:: EthSpec , utils:: * ,
11
10
} ;
12
11
use crate :: utils:: as_str;
13
12
14
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
13
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
15
14
pub struct BlindedBeaconBlockBody < T : EthSpec > {
16
15
pub randao_reveal : BlsSignature ,
17
16
pub eth1_data : Eth1Data ,
@@ -28,15 +27,15 @@ pub struct BlindedBeaconBlockBody<T: EthSpec> {
28
27
pub blob_kzg_commitments : KzgCommitments < T > ,
29
28
}
30
29
31
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
30
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
32
31
pub struct Eth1Data {
33
32
pub deposit_root : B256 ,
34
33
#[ serde( with = "serde_utils::quoted_u64" ) ]
35
34
pub deposit_count : u64 ,
36
35
pub block_hash : B256 ,
37
36
}
38
37
39
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
38
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
40
39
pub struct BeaconBlockHeader {
41
40
#[ serde( with = "serde_utils::quoted_u64" ) ]
42
41
pub slot : u64 ,
@@ -47,39 +46,39 @@ pub struct BeaconBlockHeader {
47
46
pub body_root : B256 ,
48
47
}
49
48
50
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
49
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
51
50
pub struct SignedBeaconBlockHeader {
52
51
pub message : BeaconBlockHeader ,
53
52
pub signature : BlsSignature ,
54
53
}
55
54
56
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
55
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
57
56
pub struct BlsToExecutionChange {
58
57
#[ serde( with = "as_str" ) ]
59
58
pub validator_index : u64 ,
60
59
pub from_bls_pubkey : BlsPublicKey ,
61
60
pub to_execution_address : Address ,
62
61
}
63
62
64
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
63
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
65
64
pub struct SignedBlsToExecutionChange {
66
65
pub message : BlsToExecutionChange ,
67
66
pub signature : BlsSignature ,
68
67
}
69
68
70
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
69
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
71
70
pub struct ProposerSlashing {
72
71
pub signed_header_1 : SignedBeaconBlockHeader ,
73
72
pub signed_header_2 : SignedBeaconBlockHeader ,
74
73
}
75
74
76
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
75
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
77
76
pub struct AttesterSlashing < T : EthSpec > {
78
77
pub attestation_1 : IndexedAttestation < T > ,
79
78
pub attestation_2 : IndexedAttestation < T > ,
80
79
}
81
80
82
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
81
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
83
82
#[ serde( bound = "T: EthSpec" ) ]
84
83
pub struct IndexedAttestation < T : EthSpec > {
85
84
/// Lists validator registry indices, not committee indices.
@@ -89,7 +88,7 @@ pub struct IndexedAttestation<T: EthSpec> {
89
88
pub signature : BlsSignature ,
90
89
}
91
90
92
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
91
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
93
92
pub struct AttestationData {
94
93
#[ serde( with = "serde_utils::quoted_u64" ) ]
95
94
pub slot : u64 ,
@@ -102,28 +101,28 @@ pub struct AttestationData {
102
101
pub target : Checkpoint ,
103
102
}
104
103
105
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
104
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
106
105
pub struct Checkpoint {
107
106
#[ serde( with = "serde_utils::quoted_u64" ) ]
108
107
pub epoch : u64 ,
109
108
pub root : B256 ,
110
109
}
111
110
112
- #[ derive( Debug , Clone , Serialize , Deserialize , Encode , Decode ) ]
111
+ #[ derive( Debug , Clone , Serialize , Deserialize ) ]
113
112
#[ serde( bound = "T: EthSpec" ) ]
114
113
pub struct Attestation < T : EthSpec > {
115
114
pub aggregation_bits : BitList < T :: MaxValidatorsPerCommittee > ,
116
115
pub data : AttestationData ,
117
116
pub signature : BlsSignature ,
118
117
}
119
118
120
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
119
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
121
120
pub struct Deposit {
122
121
pub proof : FixedVector < B256 , typenum:: U33 > , // put this in EthSpec?
123
122
pub data : DepositData ,
124
123
}
125
124
126
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
125
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
127
126
pub struct DepositData {
128
127
pub pubkey : BlsPublicKey ,
129
128
pub withdrawal_credentials : B256 ,
@@ -132,13 +131,13 @@ pub struct DepositData {
132
131
pub signature : BlsSignature ,
133
132
}
134
133
135
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
134
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
136
135
pub struct SignedVoluntaryExit {
137
136
pub message : VoluntaryExit ,
138
137
pub signature : BlsSignature ,
139
138
}
140
139
141
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
140
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
142
141
pub struct VoluntaryExit {
143
142
/// Earliest epoch when voluntary exit can be processed.
144
143
#[ serde( with = "serde_utils::quoted_u64" ) ]
@@ -147,7 +146,7 @@ pub struct VoluntaryExit {
147
146
pub validator_index : u64 ,
148
147
}
149
148
150
- #[ derive( Debug , Default , Clone , Serialize , Deserialize , Encode , Decode ) ]
149
+ #[ derive( Debug , Default , Clone , Serialize , Deserialize ) ]
151
150
#[ serde( bound = "T: EthSpec" ) ]
152
151
pub struct SyncAggregate < T : EthSpec > {
153
152
pub sync_committee_bits : BitVector < T :: SyncCommitteeSize > ,
0 commit comments