Clean capella (#4019)

## Issue Addressed

Cleans up all the remnants of 4844 in capella. This makes sure when 4844 is reviewed there is nothing we are missing because it got included here 

## Proposed Changes

drop a bomb on every 4844 thing 

## Additional Info

Merge process I did (locally) is as follows:
- squash merge to produce one commit
- in new branch off unstable with the squashed commit create a `git revert HEAD` commit
- merge that new branch onto 4844 with `--strategy ours`
- compare local 4844 to remote 4844 and make sure the diff is empty
- enjoy

Co-authored-by: Paul Hauner <paul@paulhauner.com>
This commit is contained in:
Divma
2023-03-01 03:19:02 +00:00
parent 17d9a620cf
commit 047c7544e3
96 changed files with 199 additions and 2307 deletions

View File

@@ -1395,32 +1395,6 @@ impl BeaconNodeHttpClient {
self.get(path).await
}
/// `GET v1/validator/blocks_and_blobs/{slot}`
pub async fn get_validator_blocks_and_blobs<T: EthSpec, Payload: AbstractExecPayload<T>>(
&self,
slot: Slot,
randao_reveal: &SignatureBytes,
graffiti: Option<&Graffiti>,
) -> Result<ForkVersionedResponse<BlocksAndBlobs<T, Payload>>, Error> {
let mut path = self.eth_path(V1)?;
path.path_segments_mut()
.map_err(|()| Error::InvalidUrl(self.server.clone()))?
.push("validator")
.push("blocks_and_blobs")
.push(&slot.to_string());
path.query_pairs_mut()
.append_pair("randao_reveal", &randao_reveal.to_string());
if let Some(graffiti) = graffiti {
path.query_pairs_mut()
.append_pair("graffiti", &graffiti.to_string());
}
self.get(path).await
}
/// `GET v2/validator/blinded_blocks/{slot}`
pub async fn get_validator_blinded_blocks<T: EthSpec, Payload: AbstractExecPayload<T>>(
&self,

View File

@@ -1114,38 +1114,6 @@ pub struct LivenessResponseData {
pub is_live: bool,
}
#[derive(PartialEq, Debug, Serialize, Deserialize)]
#[serde(bound = "T: EthSpec, Payload: AbstractExecPayload<T>")]
pub struct BlocksAndBlobs<T: EthSpec, Payload: AbstractExecPayload<T>> {
pub block: BeaconBlock<T, Payload>,
pub blobs: Vec<Blob<T>>,
pub kzg_aggregate_proof: KzgProof,
}
impl<T: EthSpec, Payload: AbstractExecPayload<T>> ForkVersionDeserialize
for BlocksAndBlobs<T, Payload>
{
fn deserialize_by_fork<'de, D: serde::Deserializer<'de>>(
value: serde_json::value::Value,
fork_name: ForkName,
) -> Result<Self, D::Error> {
#[derive(Deserialize)]
#[serde(bound = "T: EthSpec")]
struct Helper<T: EthSpec> {
block: serde_json::Value,
blobs: Vec<Blob<T>>,
kzg_aggregate_proof: KzgProof,
}
let helper: Helper<T> = serde_json::from_value(value).map_err(serde::de::Error::custom)?;
Ok(Self {
block: BeaconBlock::deserialize_by_fork::<'de, D>(helper.block, fork_name)?,
blobs: helper.blobs,
kzg_aggregate_proof: helper.kzg_aggregate_proof,
})
}
}
#[cfg(test)]
mod tests {
use super::*;

View File

@@ -39,9 +39,6 @@ BELLATRIX_FORK_EPOCH: 385536
# Capella
CAPELLA_FORK_VERSION: 0x03000064
CAPELLA_FORK_EPOCH: 18446744073709551615
# Eip4844
EIP4844_FORK_VERSION: 0x04000064
EIP4844_FORK_EPOCH: 18446744073709551615
# Sharding
SHARDING_FORK_VERSION: 0x03000064
SHARDING_FORK_EPOCH: 18446744073709551615

View File

@@ -39,9 +39,6 @@ BELLATRIX_FORK_EPOCH: 144896 # Sept 6, 2022, 11:34:47am UTC
# Capella
CAPELLA_FORK_VERSION: 0x03000000
CAPELLA_FORK_EPOCH: 18446744073709551615
# Eip4844
EIP4844_FORK_VERSION: 0x04000000
EIP4844_FORK_EPOCH: 18446744073709551615
# Sharding
SHARDING_FORK_VERSION: 0x03000000
SHARDING_FORK_EPOCH: 18446744073709551615

View File

@@ -32,10 +32,6 @@ TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615
CAPELLA_FORK_VERSION: 0x90000072
CAPELLA_FORK_EPOCH: 56832
# Eip4844
EIP4844_FORK_VERSION: 0x03001020
EIP4844_FORK_EPOCH: 18446744073709551615
# Sharding
SHARDING_FORK_VERSION: 0x04001020
SHARDING_FORK_EPOCH: 18446744073709551615