SSZ-REST Engine API transport (EL server)#19670
Draft
Giulio2002 wants to merge 9 commits intoerigontech:mainfrom
Draft
SSZ-REST Engine API transport (EL server)#19670Giulio2002 wants to merge 9 commits intoerigontech:mainfrom
Giulio2002 wants to merge 9 commits intoerigontech:mainfrom
Conversation
Implements the EL side of EIP-8161, adding an SSZ-REST HTTP server alongside the existing JSON-RPC Engine API. All engine_* methods are mapped to REST endpoints with SSZ-encoded request/response bodies, cutting payload sizes ~50% and eliminating JSON encode/decode overhead. - New SSZ-REST HTTP server with JWT auth (same secret as JSON-RPC) - SSZ encode/decode for all Engine API types (PayloadStatus, ForkchoiceUpdatedResponse, NewPayloadRequest, GetPayloadResponse, GetBlobs, ExchangeCapabilities, ClientVersion, CommunicationChannels) - CLI flags: --authrpc.ssz-rest, --authrpc.ssz-rest-port - EIP-8160 integration: advertises ssz_rest channel via engine_getClientCommunicationChannelsV1 - Handles V4 (Electra) and V5 (Fulu) with correct fork version mapping - Proper SSZ Union types for optional fields (latest_valid_hash, payload_id) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements the updated EIP-8160 spec where communication channels are returned as part of engine_exchangeCapabilitiesV2 instead of a separate engine_getClientCommunicationChannelsV1 method. The V2 response includes both capabilities and supportedProtocols fields. The old GetClientCommunicationChannelsV1 method is kept for backward compatibility but now delegates to the shared getSupportedProtocols(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ation Remove getClientCommunicationChannels, exchangeCapabilitiesV2, and getSupportedProtocols. The SSZ-REST endpoint is now enabled solely via the --authrpc.ssz-rest flag. CLs discover it via their own --ssz-rest-url flag. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace count-prefixed encoding with proper SSZ container/list encoding using commonssz.OffsetSSZ() / DecodeOffset() for EIP-8161 interop. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…Z-REST server
- new_payload → POST /engine/v{N}/payloads
- forkchoice_updated → POST /engine/v{N}/forkchoice
- get_payload → GET /engine/v{N}/payloads/{payload_id}
- get_blobs → POST /engine/v1/blobs
- exchange_capabilities → POST /engine/v1/capabilities
- get_client_version → POST /engine/v1/client/version
- Error responses now text/plain instead of JSON
- Legacy backward-compat routes for old paths
- HTTP status codes: 404 unknown payload, 409 invalid forkchoice, 422 invalid attributes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Per execution-apis PR erigontech#764 spec: - PayloadStatus.latest_valid_hash: List[Hash32, 1] - ForkchoiceUpdatedResponse.payload_id: List[Bytes8, 1] - ForkchoiceUpdatedRequest.payload_attributes: List[PayloadAttributes, 1] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove --authrpc.ssz-rest flag and separate port. SSZ-REST routes (/engine/*) are now served on the same port as JSON-RPC (8551). The CL auto-detects SSZ-REST availability on the engine endpoint. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Implements the SSZ-REST Engine API transport spec: ethereum/execution-apis#764 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements SSZ-REST Engine API transport on the execution layer (server side), as specified in ethereum/execution-apis#764.
--authrpc.ssz-rest)new_payload(v1-v5),forkchoice_updated(v1-v3),get_payload(v1-v5),exchange_capabilities,get_blobs,get_client_versionTest
Kurtosis devnet with Erigon+Prysm: chain finalizes, SSZ-REST active end-to-end.