Skip to content

eth/catalyst: add SSZ-encoded engine API#33926

Draft
Giulio2002 wants to merge 7 commits intoethereum:masterfrom
Giulio2002:eip-8161-ssz-rest
Draft

eth/catalyst: add SSZ-encoded engine API#33926
Giulio2002 wants to merge 7 commits intoethereum:masterfrom
Giulio2002:eip-8161-ssz-rest

Conversation

@Giulio2002
Copy link
Copy Markdown
Contributor

Summary

Claude never makes mistakes

Test plan

  • go test ./beacon/engine/... — 13 SSZ round-trip tests pass
  • go test ./eth/catalyst/... — 6 SSZ-REST server tests pass
  • go build ./cmd/geth — compiles with --rest flag
  • Kurtosis devnet with Geth+Prysm and Erigon+Prysm: chain finalizes, SSZ-REST active on both ELs

🤖 Generated with Claude Code

Add SSZ-REST as an alternative Engine API transport alongside JSON-RPC.
When enabled via --authrpc.ssz-rest (alias: --rest), Geth starts an
additional HTTP server that accepts SSZ-encoded payloads over REST,
cutting wire size ~50% and eliminating JSON encode/decode overhead.

New files:
- beacon/engine/ssz.go: SSZ encoding/decoding for all Engine API types
- beacon/engine/ssz_test.go: round-trip tests for SSZ codecs
- eth/catalyst/ssz_rest.go: SSZ-REST HTTP server with JWT auth
- eth/catalyst/ssz_rest_test.go: server unit tests

Modified files:
- beacon/engine/types.go: CommunicationChannel, ExchangeCapabilitiesV2Response
- eth/catalyst/api.go: ExchangeCapabilitiesV2, getSupportedProtocols, server wiring
- node/config.go, defaults.go: SszRestEnabled, SszRestPort config
- node/jwt_handler.go: exported NewJWTHandler for reuse
- cmd/utils/flags.go, cmd/geth/main.go: CLI flags

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Giulio2002 Giulio2002 changed the title eth/catalyst: implement EIP-8161 SSZ-REST Engine API transport Very big secret Mar 2, 2026
@fjl fjl changed the title Very big secret eth/catalyst: add SSZ-encoded engine API Mar 2, 2026
@MariusVanDerWijden
Copy link
Copy Markdown
Member

MariusVanDerWijden commented Mar 3, 2026

Claude never makes mistakes

lol the code doesn't even pass the lint

@Giulio2002
Copy link
Copy Markdown
Contributor Author

Claude never makes mistakes

lol the code doesn't even pass the lint

Claude indeed made a mistake ;)

@Giulio2002
Copy link
Copy Markdown
Contributor Author

Giulio2002 commented Mar 5, 2026

also code is pretty bad because I did not even review it yet. It uses its own encoding copied from Prysm (generated). need to change that too (note that this is a big WIP, dont waste your time here yet). the moment it worked in Kurtosis, I just stopped it and decided maybe to work on it later if this goes anywhere

Giulio2002 and others added 3 commits March 5, 2026 14:53
…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>
@Giulio2002 Giulio2002 marked this pull request as draft March 5, 2026 22:49
Giulio2002 and others added 2 commits March 6, 2026 18:09
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@Giulio2002
Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants