diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index ca36f4c7b..4167b03de 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -2055,11 +2055,9 @@ proc p2pProtocolBackendImpl*(p: P2PProtocol): Backend = ## ## Implement Senders and Handshake ## - if msg.kind == msgHandshake: - macros.error "Handshake messages are not supported in LibP2P protocols" - else: - var sendProc = msg.createSendProc() - implementSendProcBody sendProc + + var sendProc = msg.createSendProc() + implementSendProcBody sendProc protocol.outProcRegistrations.add( newCall(registerMsg, diff --git a/beacon_chain/networking/eth2_protocol_dsl.nim b/beacon_chain/networking/eth2_protocol_dsl.nim index 7bb86bef7..0d2668ccd 100644 --- a/beacon_chain/networking/eth2_protocol_dsl.nim +++ b/beacon_chain/networking/eth2_protocol_dsl.nim @@ -16,7 +16,6 @@ export chronos, results type MessageKind* = enum - msgHandshake msgNotification msgRequest msgResponse @@ -89,7 +88,6 @@ type messages*: seq[Message] # Messages by type: - handshake*: Message notifications*: seq[Message] requests*: seq[Request] @@ -529,7 +527,7 @@ proc createSendProc*(msg: Message, result.msgParams.add param case msg.kind - of msgHandshake, msgRequest: + of msgRequest: # Add a timeout parameter for all request procs def.addTimeoutParam(msg.protocol.timeouts) @@ -558,8 +556,6 @@ proc createSendProc*(msg: Message, ident "untyped" elif msg.kind == msgRequest and not isRawSender: ident "auto" - elif msg.kind == msgHandshake and not isRawSender: - Fut(msg.recName) else: Fut(Void) @@ -665,27 +661,6 @@ proc useStandardBody*(sendProc: SendProc, `sendCall` -proc correctSerializerProcParams(params: NimNode) = - # A serializer proc is just like a send proc, but: - # 1. it has a void return type - params[0] = ident "void" - # 2. The peer params is replaced with OutputStream - params[1] = newIdentDefs(streamVar, bindSym "OutputStream") - # 3. The timeout param is removed - params.del(params.len - 1) - -proc createSerializer*(msg: Message, procType = nnkProcDef): NimNode = - var serializer = msg.createSendProc(procType, nameSuffix = "Serializer") - correctSerializerProcParams serializer.def.params - - serializer.setBody writeParamsAsRecord( - serializer.msgParams, - streamVar, - msg.protocol.backend.SerializationFormat, - msg.recName) - - return serializer.def - proc defineThunk*(msg: Message, thunk: NimNode) = let protocol = msg.protocol @@ -739,29 +714,6 @@ proc netInit*(p: P2PProtocol): NimNode = # p.backend.NetworkType, # p.NetworkStateType) -proc createHandshakeTemplate*(msg: Message, - rawSendProc, handshakeImpl, - nextMsg: NimNode): SendProc = - let - handshakeExchanger = msg.createSendProc(procType = nnkTemplateDef) - forwardCall = newCall(rawSendProc).appendAllInputParams(handshakeExchanger.def) - peerValue = forwardCall[1] - msgRecName = msg.recName - - forwardCall[1] = peerVar - forwardCall.del(forwardCall.len - 1) - - let peerVar = genSym(nskLet ,"peer") - handshakeExchanger.setBody quote do: - let `peerVar` = `peerValue` - let sendingFuture = `forwardCall` - `handshakeImpl`(`peerVar`, - sendingFuture, - `nextMsg`(`peerVar`, `msgRecName`), - `timeoutVar`) - - return handshakeExchanger - proc peerInit*(p: P2PProtocol): NimNode = if p.PeerStateType == nil: newNilLit() @@ -774,7 +726,6 @@ proc processProtocolBody*(p: P2PProtocol, protocolBody: NimNode) = ## This procs handles all DSL statements valid inside a p2pProtocol. ## ## It will populate the protocol's fields such as: - ## * handshake ## * requests ## * notifications ## * onPeerConnected @@ -803,16 +754,6 @@ proc processProtocolBody*(p: P2PProtocol, protocolBody: NimNode) = p.requests.add Request(queries: queries, response: responseMsg) - elif eqIdent(n[0], "handshake"): - let procs = expectBlockWithProcs(n) - if procs.len != 1: - error "handshake expects a block with a single proc definition", n - - if p.handshake != nil: - error "The handshake for the protocol is already defined", n - - p.handshake = p.newMsg(msgHandshake, procs[0]) - elif eqIdent(n[0], "onPeerConnected"): p.onPeerConnected = p.eventHandlerToProc(n[1], "PeerConnected") diff --git a/beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim b/beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim index 91911deeb..3c02d54b7 100644 --- a/beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim +++ b/beacon_chain/spec/eth2_apis/eth2_rest_serialization.nim @@ -424,8 +424,6 @@ type GetGraffitiResponse | GetAggregatedAttestationV2Response - DecodeConsensysTypes* = ProduceBlindedBlockResponse - RestVersioned*[T] = object data*: T jsonVersion*: ConsensusFork diff --git a/beacon_chain/spec/eth2_apis/rest_types.nim b/beacon_chain/spec/eth2_apis/rest_types.nim index e1e8457ba..06182eb2b 100644 --- a/beacon_chain/spec/eth2_apis/rest_types.nim +++ b/beacon_chain/spec/eth2_apis/rest_types.nim @@ -545,7 +545,6 @@ type GetVersionResponse* = DataEnclosedObject[RestNodeVersion] GetEpochSyncCommitteesResponse* = DataEnclosedObject[RestEpochSyncCommittee] ProduceAttestationDataResponse* = DataEnclosedObject[AttestationData] - ProduceBlindedBlockResponse* = ForkedBlindedBeaconBlock ProduceSyncCommitteeContributionResponse* = DataEnclosedObject[SyncCommitteeContribution] SubmitBlindedBlockResponseDeneb* = DataEnclosedObject[deneb_mev.ExecutionPayloadAndBlobsBundle] SubmitBlindedBlockResponseElectra* = DataEnclosedObject[electra_mev.ExecutionPayloadAndBlobsBundle] diff --git a/docs/the_nimbus_book/src/execution-client.md b/docs/the_nimbus_book/src/execution-client.md index b41d80fb9..0f24910e5 100644 --- a/docs/the_nimbus_book/src/execution-client.md +++ b/docs/the_nimbus_book/src/execution-client.md @@ -43,7 +43,7 @@ In addition to the era files themselves, you will need at least 200GB of free sp === "Mainnet" * https://mainnet.era.nimbus.team/ - * https://era1.ethportal.net/ + * https://mainnet.era1.nimbus.team/ === "Holesky" * https://holesky.era.nimbus.team/ diff --git a/vendor/nim-faststreams b/vendor/nim-faststreams index c246d00ea..cf8d4d226 160000 --- a/vendor/nim-faststreams +++ b/vendor/nim-faststreams @@ -1 +1 @@ -Subproject commit c246d00eaa7d6f52019464b37da510a8be23e939 +Subproject commit cf8d4d22636b8e514caf17e49f9c786ac56b0e85 diff --git a/vendor/nim-snappy b/vendor/nim-snappy index 590edb152..0c308d342 160000 --- a/vendor/nim-snappy +++ b/vendor/nim-snappy @@ -1 +1 @@ -Subproject commit 590edb152071bca4901bcbe689fc0856efd8c4e7 +Subproject commit 0c308d34241c9f0764f6d111a0288428ded173bc diff --git a/vendor/nimbus-build-system b/vendor/nimbus-build-system index 4afb05266..8fafcd0ba 160000 --- a/vendor/nimbus-build-system +++ b/vendor/nimbus-build-system @@ -1 +1 @@ -Subproject commit 4afb0526629f51aef4c124368365ebe90a782d37 +Subproject commit 8fafcd0bac9f409091b7bcaee62ab6330f57441e