Skip to content

Commit

Permalink
Very minor own nitpicks (#4845)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgeManning authored Oct 16, 2023
1 parent 2d662f7 commit cf544b3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions beacon_node/lighthouse_network/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,6 @@ pub fn gossipsub_config(
) -> Vec<u8> {
let topic_bytes = message.topic.as_str().as_bytes();
match fork_context.current_fork() {
// according to: https://github.com/ethereum/consensus-specs/blob/dev/specs/merge/p2p-interface.md#the-gossip-domain-gossipsub
// the derivation of the message-id remains the same in the merge and for eip 4844.
ForkName::Altair | ForkName::Merge | ForkName::Capella | ForkName::Deneb => {
let topic_len_bytes = topic_bytes.len().to_le_bytes();
let mut vec = Vec::with_capacity(
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/network/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ impl<T: BeaconChainTypes> Router<T> {
seen_timestamp: timestamp_now(),
});
} else {
debug!(
crit!(
self.log,
"All blobs by range responses should belong to sync"
);
Expand Down
4 changes: 2 additions & 2 deletions beacon_node/network/src/sync/block_lookups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub type DownloadedBlock<T> = (Hash256, RpcBlock<T>);
const FAILED_CHAINS_CACHE_EXPIRY_SECONDS: u64 = 60;
pub const SINGLE_BLOCK_LOOKUP_MAX_ATTEMPTS: u8 = 3;

/// This enum is used to track what a peer *should* be able to respond with respond based on
/// This enum is used to track what a peer *should* be able to respond with based on
/// other messages we've seen from this peer on the network. This is useful for peer scoring.
/// We expect a peer tracked by the `BlockAndBlobs` variant to be able to respond to all
/// components of a block. This peer has either sent an attestation for the requested block
Expand Down Expand Up @@ -449,7 +449,7 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
}
}
CachedChild::DownloadIncomplete => {
// If this was the result of a block request, we can't determined if the block peer
// If this was the result of a block request, we can't determine if the block peer
// did anything wrong. If we already had both a block and blobs response processed,
// we should penalize the blobs peer because they did not provide all blobs on the
// initial request.
Expand Down
3 changes: 2 additions & 1 deletion book/src/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ custom RPC error messages.

| Code | Message | Description |
| ---- | ---- | ---- |
| 139 | Rate Limited | The peer has been rate limited so we return this error as a response |
| 139 | Rate Limited | The peer has been rate limited so we return this error as a response |
| 140 | Blobs Not Found For Block | We do not possess the blobs for the requested block |

0 comments on commit cf544b3

Please sign in to comment.