mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
Final changes for fusaka-devnet-2 (#7655)
Closes #7467. This PR primarily addresses [the P2P changes](https://github.com/ethereum/EIPs/pull/9840) in [fusaka-devnet-2](https://fusaka-devnet-2.ethpandaops.io/). Specifically: * [the new `nfd` parameter added to the `ENR`](https://github.com/ethereum/EIPs/pull/9840) * [the modified `compute_fork_digest()` changes for every BPO fork](https://github.com/ethereum/EIPs/pull/9840) 90% of this PR was absolutely hacked together as fast as possible during the Berlinterop as fast as I could while running between Glamsterdam debates. Luckily, it seems to work. But I was unable to be as careful in avoiding bugs as I usually am. I've cleaned up the things *I remember* wanting to come back and have a closer look at. But still working on this. Progress: * [x] get it working on `fusaka-devnet-2` * [ ] [*optional* disconnect from peers with incorrect `nfd` at the fork boundary](https://github.com/ethereum/consensus-specs/pull/4407) - Can be addressed in a future PR if necessary * [x] first pass clean-up * [x] fix up all the broken tests * [x] final self-review * [x] more thorough review from people more familiar with affected code
This commit is contained in:
@@ -264,7 +264,7 @@ pub fn spawn<T: BeaconChainTypes>(
|
||||
fork_context: Arc<ForkContext>,
|
||||
) {
|
||||
assert!(
|
||||
beacon_chain.spec.max_request_blocks(fork_context.current_fork()) as u64 >= T::EthSpec::slots_per_epoch() * EPOCHS_PER_BATCH,
|
||||
beacon_chain.spec.max_request_blocks(fork_context.current_fork_name()) as u64 >= T::EthSpec::slots_per_epoch() * EPOCHS_PER_BATCH,
|
||||
"Max blocks that can be requested in a single batch greater than max allowed blocks in a single request"
|
||||
);
|
||||
|
||||
|
||||
@@ -879,7 +879,7 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
|
||||
request: RequestType::DataColumnsByRoot(
|
||||
request
|
||||
.clone()
|
||||
.try_into_request(self.fork_context.current_fork(), &self.chain.spec)?,
|
||||
.try_into_request(self.fork_context.current_fork_name(), &self.chain.spec)?,
|
||||
),
|
||||
app_request_id: AppRequestId::Sync(SyncRequestId::DataColumnsByRoot(id)),
|
||||
})?;
|
||||
|
||||
Reference in New Issue
Block a user