Skip to content

SSZ-REST Engine API transport (EL server)#19670

Draft
Giulio2002 wants to merge 9 commits intoerigontech:mainfrom
Giulio2002:eip-8161-ssz-rest
Draft

SSZ-REST Engine API transport (EL server)#19670
Giulio2002 wants to merge 9 commits intoerigontech:mainfrom
Giulio2002:eip-8161-ssz-rest

Conversation

@Giulio2002
Copy link
Copy Markdown
Collaborator

@Giulio2002 Giulio2002 commented Mar 5, 2026

Summary

Implements SSZ-REST Engine API transport on the execution layer (server side), as specified in ethereum/execution-apis#764.

  • Adds HTTP REST server on the engine port (enabled via --authrpc.ssz-rest)
  • SSZ-encoded request/response bodies for all Engine API methods
  • JWT authentication reused from JSON-RPC
  • Supports: new_payload (v1-v5), forkchoice_updated (v1-v3), get_payload (v1-v5), exchange_capabilities, get_blobs, get_client_version

Test

Kurtosis devnet with Erigon+Prysm: chain finalizes, SSZ-REST active end-to-end.

Giulio2002 and others added 9 commits March 2, 2026 00:21
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>
@Giulio2002 Giulio2002 changed the title EIP-8161: SSZ-REST Engine API transport (EL server) SSZ-REST Engine API transport (EL server) Mar 8, 2026
@Giulio2002
Copy link
Copy Markdown
Collaborator Author

Implements the SSZ-REST Engine API transport spec: ethereum/execution-apis#764

@Giulio2002 Giulio2002 added github_actions Pull requests that update GitHub Actions code RPC labels Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code RPC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant