Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(contributoor): add events shell + sink(s) #1

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

mattevans
Copy link
Member

@mattevans mattevans commented Jan 7, 2025

Progress PR:

  • Implements basic sinks (xatu + stdout for debug)
  • Adds slim-lined event handler shell/setup (implements Attestation event only for now).
  • Handle boot/shutdown gracefully.

More to come:

  • Presets
  • Wallclock
  • Implementation of events.
  • Metrics
  • Cron/Schedule events // Clarify with Steve/Sammo if needed.
  • Telemetry
  • Tests
  • ... and more

go run ./cmd/sentry/main.go --config /Users/matty/.contributoor/config.yaml --debug true.

INFO[0000] Starting contributoor                               config_path=/Users/matty/.contributoor name=network_name_mainnet_contributoor version=0.0.2
INFO[0000] Batch item processor initialized              batch_timeout=5s export_timeout=30s max_export_batch_size=512 max_queue_size=51200 shipping_method=async workers=5
INFO[0000] Enabling keepalive                            keepalive_time=2m30s keepalive_timeout=30s output_name=network_name_mainnet_contributoor output_type=xatu
INFO[0000] Batch item processor initialized              batch_timeout=5s export_timeout=30s max_export_batch_size=512 max_queue_size=51200 shipping_method=async workers=1
INFO[0000] Starting sink                                 name=network_name_mainnet_contributoor type=stdout
INFO[0000] Starting 5 workers for xatu_output_stdout_network_name_mainnet_contributoor
INFO[0000] Starting sink                                 name=network_name_mainnet_contributoor type=xatu
INFO[0000] Starting 1 workers for xatu_output_xatu_network_name_mainnet_contributoor
INFO[0000] Starting beacon...                            module=consensus/beacon
INFO[0000] Beacon started!                               module=consensus/beacon
INFO[0000] Upstream beacon node is healthy               module=contributoor/ethereum/beacon
INFO[0000] Starting service                              module=contributoor/ethereum/beacon service=metadata
INFO[0000] Waiting for service to be ready               module=contributoor/ethereum/beacon service=metadata
INFO[0000] Detected ethereum network                     id=3151908 module=sentry/ethereum/metadata name=network_name_mainnet_contributoor
INFO[0000] Metadata service is ready                     module=sentry/ethereum/metadata
INFO[0000] Service is ready                              module=contributoor/ethereum/beacon service=metadata
INFO[0000] Starting service                              module=contributoor/ethereum/beacon service=duties
INFO[0000] Starting duties service                       beacon_committees_enabled=true module=sentry/ethereum/duties proposer_duties_enabled=true
INFO[0000] Waiting for service to be ready               module=contributoor/ethereum/beacon service=duties
INFO[0000] Service is ready                              module=contributoor/ethereum/beacon service=duties
INFO[0000] All services are ready                        module=contributoor/ethereum/beacon
INFO[0000] Setting up beacon node event subscriptions    module=contributoor/ethereum/beacon
INFO[0002] Subscribing to events upstream                module=consensus/beacon topics="[attestation block chain_reorg finalized_checkpoint head voluntary_exit contribution_and_proof blob_sidecar]"
INFO[0004] event received                                event_type=BEACON_API_ETH_V1_EVENTS_CONTRIBUTION_AND_PROOF_V2 received_at="2025-01-07T11:56:00+10:00"
INFO[0004] event received                                event_type=BEACON_API_ETH_V1_EVENTS_CONTRIBUTION_AND_PROOF_V2 received_at="2025-01-07T11:56:00+10:00"
INFO[0004] event received                                event_type=BEACON_API_ETH_V1_EVENTS_CONTRIBUTION_AND_PROOF_V2 received_at="2025-01-07T11:56:00+10:00"
INFO[0004] event received                                event_type=BEACON_API_ETH_V1_EVENTS_CONTRIBUTION_AND_PROOF_V2 received_at="2025-01-07T11:56:00+10:00"
INFO[0004] event received                                event_type=BEACON_API_ETH_V1_EVENTS_ATTESTATION_V2 received_at="2025-01-07T11:56:00+10:00"
^CINFO[0005] Received shutdown signal
INFO[0005] Context cancelled, starting shutdown
INFO[0005] Stopping beacon node                          module=contributoor/ethereum/beacon
INFO[0005] Stopping service                              module=contributoor/ethereum/beacon service=metadata
INFO[0005] Stopping service                              module=contributoor/ethereum/beacon service=duties
INFO[0005] Stopping stdout sink
INFO[0005] Stopping xatu sink
INFO[0005] Shutdown complete

@mattevans mattevans self-assigned this Jan 7, 2025
@mattevans mattevans merged commit c436b98 into master Jan 7, 2025
@mattevans mattevans deleted the feat/shell-event-structure branch January 7, 2025 02:36
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.

1 participant