Register CN for Caplin - #844
Merged
Merged
Conversation
Register `CN` for Caplin, Erigon's embedded consensus layer client. Caplin integrates the consensus layer directly into the Erigon node, removing the need for a separate CL process and its own disk storage, which reduces operational complexity and resource usage. It is a distinct consensus client and needs its own two-letter code so that blocks proposed by an Erigon + Caplin setup are correctly attributable. `EG` is already reserved for erigon (execution layer), so it cannot be reused for the consensus layer: the graffiti client-version format (`<EL code><EL commit><CL code><CL commit>`) requires distinct codes to tell the two layers apart. With `CN`, an Erigon + Caplin block encodes as e.g. `EGa53eCNa53e`, letting client-diversity tooling measure Caplin adoption independently.
MysticRyuujin
approved these changes
Jul 7, 2026
mkalinin
approved these changes
Jul 7, 2026
pull Bot
pushed a commit
to Dustin4444/erigon
that referenced
this pull request
Jul 8, 2026
…ontech#22303) ## What When a validator proposes a block without specifying graffiti, Caplin now fills the graffiti with the client-version encoding from the [client identification standard](https://github.com/ethereum/execution-apis/blob/main/src/engine/identification.md) instead of the literal `"Caplin"` string: ``` <EL code><EL commit><CN><CL commit> e.g. EGa53eCNa53e ``` This lets client-diversity tooling attribute proposed blocks to both their execution and consensus clients. Today an Erigon + Caplin node leaves no execution-client fingerprint in its blocks. ## Why Execution-layer client diversity is largely unmeasurable from block data. The standard addresses this by having the consensus client embed the execution and consensus client codes and their commit prefixes in the default graffiti. Caplin previously emitted only the literal `"Caplin"`, contributing no execution-client signal. ## How - Adds `GetClientVersionV1` to the `ExecutionEngine` interface; Caplin obtains the execution client's code and commit via `engine_getClientVersionV1`. The result is cached, so steady-state block production performs no extra engine API calls. - Caplin identifies itself with the reserved consensus client code `CN`. - When the execution client does not support the method, the graffiti degrades to the consensus-client identifier only (`CN<commit>`). - User-specified graffiti is unchanged. - Deduplicates the local client-version construction into `engine_types.NewClientVersionV1` / `LocalClientVersionV1`, now shared by the engine API handler and the in-process execution client. ## Dependency Caplin's consensus client code `CN` is registered in ethereum/execution-apis#844. This change can merge independently: the encoding works before registration (consumers must accept any two-letter code), and attribution tooling recognizes `CN` once that PR lands. ## Testing - New `cl/beacon/handler/block_production_graffiti_test.go`: encoding, execution-client-unavailable fallback, no-engine fallback, and cache behavior (the engine is queried once across multiple proposals). - `make lint`, `go vet`, and the affected package tests pass.
nflaig
pushed a commit
to ChainSafe/lodestar
that referenced
this pull request
Jul 9, 2026
Add client code for Caplin and Nimbus-EL per ethereum/execution-apis#844 and ethereum/execution-apis#848
jihoonsong
pushed a commit
to jihoonsong/execution-apis
that referenced
this pull request
Jul 16, 2026
Register `CN` for Caplin, Erigon's embedded consensus layer client. Caplin integrates the consensus layer directly into the Erigon node, removing the need for a separate CL process and its own disk storage, which reduces operational complexity and resource usage. It is a distinct consensus client and needs its own two-letter code so that blocks proposed by an Erigon + Caplin setup are correctly attributable. `EG` is already reserved for erigon (execution layer), so it cannot be reused for the consensus layer: the graffiti client-version format (`<EL code><EL commit><CL code><CL commit>`) requires distinct codes to tell the two layers apart. With `CN`, an Erigon + Caplin block encodes as e.g. `EGa53eCNa53e`, letting client-diversity tooling measure Caplin adoption independently.
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.
Register
CNfor Caplin, Erigon's embedded consensus layer client.Caplin integrates the consensus layer directly into the Erigon node, removing the need for a separate CL process and its own disk storage, which reduces operational complexity and resource usage. It is a distinct consensus client and needs its own two-letter code so that blocks proposed by an Erigon + Caplin setup are correctly attributable.
EGis already reserved for erigon (execution layer), so it cannot be reused for the consensus layer: the graffiti client-version format (<EL code><EL commit><CL code><CL commit>) requires distinct codes to tell the two layers apart. WithCN, an Erigon + Caplin block encodes as e.g.EGa53eCNa53e, letting client-diversity tooling measure Caplin adoption independently.