Skip to content

Commit

Permalink
Merge pull request #3913 from divagant-martian/reject-pre-fork-rpc-up…
Browse files Browse the repository at this point in the history
…grades

only support 4844 rpc methods if on 4844
  • Loading branch information
realbigsean authored Jan 25, 2023
2 parents eabe5dc + 2d2da92 commit 9fde813
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions beacon_node/lighthouse_network/src/rpc/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,15 @@ impl<TSpec: EthSpec> UpgradeInfo for RPCProtocol<TSpec> {
ProtocolId::new(Protocol::Ping, Version::V1, Encoding::SSZSnappy),
ProtocolId::new(Protocol::MetaData, Version::V2, Encoding::SSZSnappy),
ProtocolId::new(Protocol::MetaData, Version::V1, Encoding::SSZSnappy),
ProtocolId::new(Protocol::BlobsByRoot, Version::V1, Encoding::SSZSnappy),
ProtocolId::new(Protocol::BlobsByRange, Version::V1, Encoding::SSZSnappy),
];

if let ForkName::Eip4844 = self.fork_context.current_fork() {
supported_protocols.extend_from_slice(&[
ProtocolId::new(Protocol::BlobsByRoot, Version::V1, Encoding::SSZSnappy),
ProtocolId::new(Protocol::BlobsByRange, Version::V1, Encoding::SSZSnappy),
]);
}

if self.enable_light_client_server {
supported_protocols.push(ProtocolId::new(
Protocol::LightClientBootstrap,
Expand Down

0 comments on commit 9fde813

Please sign in to comment.