feat(cannon): implement consolidation requests iterator for Electra fork#517
Open
feat(cannon): implement consolidation requests iterator for Electra fork#517
Conversation
This implements end-to-end support for EIP-7251 consolidation requests in Xatu: - Add ConsolidationRequest deriver in Cannon to extract consolidation requests from beacon blocks starting from Electra fork - Implement server event handler for processing consolidation request events - Add protocol buffer integration and event type constants - Create ClickHouse migration (062) for canonical_beacon_block_consolidation_request table - Update Vector configuration for Kafka and ClickHouse routing - Add configuration example in example_cannon.yaml The consolidation request contains source_address, source_pubkey, and target_pubkey fields as defined in EIP-7251, enabling monitoring and analytics of validator consolidation operations on the network. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Use natural ORDER BY (slot_start_date_time, meta_network_name, block_root, position_in_block) for uniqueness instead of requiring a separate unique_key column. This combination provides guaranteed uniqueness since each block_root is unique and each consolidation request within a block has a unique position_in_block. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
feat: add new documentation for the rules system
refactor: move LLM rule files from .cursor/rules to llms/rules docs: add LLM guidelines for ClickHouse migrations directory feat(proto): add new CannonType and CannonLocation for consolidation requests by epoch refactor(proto): add new message type for beacon block consolidation request epoch This commit introduces a new message type `CannonLocationEthV2BeaconBlockConsolidationRequestEpoch` to the protobuf definition. This new message is specifically designed to handle requests for beacon block consolidation based on epoch, providing a more granular and specific request type for this operation. This change improves the clarity and organization of the protobuf messages by creating a dedicated type for this specific request. refactor(proto): rename CreateExecutionNodeRecordStatus to ListStalledExecutionNodeRecords feat(proto): add CannonLocationEthV2BeaconBlockConsolidationRequestEpoch message feat(proto): add new cannon type and location for beacon block consolidation request epoch refactor(docs): update Claude markdown files to point to new llms directory for rules feat(persistence): add marshal and unmarshal support for new cannon location type
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
This PR implements end-to-end support for EIP-7251 consolidation requests in the Xatu monitoring system:
• Adds ConsolidationRequest deriver in Cannon to extract consolidation requests from beacon blocks starting from the Electra fork
• Implements server event handler for processing consolidation request events
• Updates protocol buffer integration with new event type constants (Event number 61, CannonType number 14)
• Creates ClickHouse migration (062) for canonical_beacon_block_consolidation_request table storage
• Updates Vector configuration for complete Kafka and ClickHouse routing pipeline
• Adds configuration example in example_cannon.yaml
Architecture Overview
The implementation follows the established Xatu pattern for beacon block derivers:
Key Components
ConsolidationRequest Deriver (
pkg/cannon/deriver/beacon/eth/v2/consolidation_request.go)spec.DataVersionElectraforkExecutionRequests.consolidationsProtocol Buffer Integration
BEACON_API_ETH_V2_BEACON_BLOCK_CONSOLIDATION_REQUEST = 61to Event enumBEACON_API_ETH_V2_BEACON_BLOCK_CONSOLIDATION_REQUEST = 14to CannonType enumElectraExecutionRequestConsolidationmessage with StringValue wrappersClickHouse Schema
Table:
canonical_beacon_block_consolidation_requestKey Fields:
source_address(FixedString(42)) - Source Ethereum addresssource_pubkey(FixedString(98)) - Source BLS public keytarget_pubkey(FixedString(98)) - Target BLS public keyposition_in_block(UInt32) - Position within block's consolidation requestsData Pipeline
beacon-api-eth-v2-beacon-block-consolidation-requesttopicEIP-7251 Context
Consolidation requests enable validator stake consolidation on Ethereum post-Electra fork. Each request contains:
source_address: ExecutionAddress initiating the consolidationsource_pubkey: BLS public key of the source validatortarget_pubkey: BLS public key of the target validatorThis monitoring capability is essential for tracking validator consolidation operations and network analytics.
Test plan
Integration testing will be possible once Electra fork activates and consolidation requests are available in beacon blocks.
🤖 Generated with Claude Code