-
Notifications
You must be signed in to change notification settings - Fork 671
feat: SSZ-REST Engine API transport #10728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
72e7835
a6d455c
04a8b8b
f4f247a
73e6c85
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |
| using Nethermind.Consensus.Rewards; | ||
| using Nethermind.Consensus.Validators; | ||
| using Nethermind.Core; | ||
| using Nethermind.Core.Authentication; | ||
| using Nethermind.Core.Crypto; | ||
| using Nethermind.Core.Exceptions; | ||
| using Nethermind.Db; | ||
|
|
@@ -33,6 +34,7 @@ | |
| using Nethermind.Merge.Plugin.GC; | ||
| using Nethermind.Merge.Plugin.Handlers; | ||
| using Nethermind.Merge.Plugin.InvalidChainTracker; | ||
| using Nethermind.Merge.Plugin.SszRest; | ||
| using Nethermind.Merge.Plugin.Synchronization; | ||
| using Nethermind.Network.Contract.P2P; | ||
| using Nethermind.Serialization.Json; | ||
|
|
@@ -225,11 +227,17 @@ public Task InitNetworkProtocol() | |
| if (_logger.IsDebug) _logger.Debug("Delayed adding post-merge eth/* capabilities until terminal block reached"); | ||
| _poSSwitcher.TerminalBlockReached += (_, _) => AddPostMergeNetworkProtocols(); | ||
| } | ||
|
|
||
| } | ||
|
|
||
| return Task.CompletedTask; | ||
| } | ||
|
|
||
| public Task InitRpcModules() | ||
| { | ||
| return Task.CompletedTask; | ||
| } | ||
|
|
||
| private void AddPostMergeNetworkProtocols() | ||
| { | ||
| if (_logger.IsInfo) _logger.Info("Adding eth/69 capability"); | ||
|
|
@@ -345,6 +353,24 @@ protected override void Load(ContainerBuilder builder) | |
| ctx.Resolve<ILogManager>()); | ||
| }) | ||
| .AddSingleton<IHttpClient, DefaultHttpClient>() | ||
|
|
||
| // EIP-8161 SSZ-REST Engine API transport (served on engine port alongside JSON-RPC) | ||
| .AddSingleton<SszRestHandler>(ctx => | ||
| { | ||
| ILogManager logManager = ctx.Resolve<ILogManager>(); | ||
|
|
||
| return new SszRestHandler( | ||
| ctx.Resolve<IAsyncHandler<ExecutionPayload, PayloadStatusV1>>(), | ||
| ctx.Resolve<IForkchoiceUpdatedHandler>(), | ||
| ctx.Resolve<IAsyncHandler<byte[], ExecutionPayload?>>(), | ||
| ctx.Resolve<IAsyncHandler<byte[], GetPayloadV2Result?>>(), | ||
| ctx.Resolve<IAsyncHandler<byte[], GetPayloadV3Result?>>(), | ||
| ctx.Resolve<IAsyncHandler<byte[], GetPayloadV4Result?>>(), | ||
| ctx.Resolve<IAsyncHandler<byte[], GetPayloadV5Result?>>(), | ||
| ctx.Resolve<IHandler<IEnumerable<string>, IEnumerable<string>>>(), | ||
| ctx.Resolve<IAsyncHandler<byte[][], IEnumerable<BlobAndProofV1?>>>(), | ||
| logManager); | ||
| }) | ||
|
Comment on lines
+357
to
+373
|
||
| ; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The image exposes port
8552, but the SSZ-REST middleware is wired to serve/engine/*on the existing authenticated Engine API port (same listener as JSON-RPC) and there is no separate SSZ-REST server bound to 8552 in this PR. Either wire up the separate port described in the PR (and config) or avoid exposing an unused port in the Dockerfile.