Very minor own nitpicks (#4845)
This commit is contained in:
parent
2d662f78ae
commit
cf544b3996
@ -468,8 +468,6 @@ pub fn gossipsub_config(
|
|||||||
) -> Vec<u8> {
|
) -> Vec<u8> {
|
||||||
let topic_bytes = message.topic.as_str().as_bytes();
|
let topic_bytes = message.topic.as_str().as_bytes();
|
||||||
match fork_context.current_fork() {
|
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 => {
|
ForkName::Altair | ForkName::Merge | ForkName::Capella | ForkName::Deneb => {
|
||||||
let topic_len_bytes = topic_bytes.len().to_le_bytes();
|
let topic_len_bytes = topic_bytes.len().to_le_bytes();
|
||||||
let mut vec = Vec::with_capacity(
|
let mut vec = Vec::with_capacity(
|
||||||
|
@ -540,7 +540,7 @@ impl<T: BeaconChainTypes> Router<T> {
|
|||||||
seen_timestamp: timestamp_now(),
|
seen_timestamp: timestamp_now(),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
debug!(
|
crit!(
|
||||||
self.log,
|
self.log,
|
||||||
"All blobs by range responses should belong to sync"
|
"All blobs by range responses should belong to sync"
|
||||||
);
|
);
|
||||||
|
@ -49,7 +49,7 @@ pub type DownloadedBlock<T> = (Hash256, RpcBlock<T>);
|
|||||||
const FAILED_CHAINS_CACHE_EXPIRY_SECONDS: u64 = 60;
|
const FAILED_CHAINS_CACHE_EXPIRY_SECONDS: u64 = 60;
|
||||||
pub const SINGLE_BLOCK_LOOKUP_MAX_ATTEMPTS: u8 = 3;
|
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.
|
/// 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
|
/// 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
|
/// components of a block. This peer has either sent an attestation for the requested block
|
||||||
@ -449,7 +449,7 @@ impl<T: BeaconChainTypes> BlockLookups<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
CachedChild::DownloadIncomplete => {
|
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,
|
// 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
|
// we should penalize the blobs peer because they did not provide all blobs on the
|
||||||
// initial request.
|
// initial request.
|
||||||
|
@ -48,4 +48,5 @@ custom RPC error messages.
|
|||||||
|
|
||||||
| Code | Message | Description |
|
| 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 |
|
||||||
|
Loading…
Reference in New Issue
Block a user