Skip to content

feat: add aggregate attestation support#181

Open
samcm wants to merge 9 commits into
masterfrom
feat/capture-aggregates
Open

feat: add aggregate attestation support#181
samcm wants to merge 9 commits into
masterfrom
feat/capture-aggregates

Conversation

@samcm
Copy link
Copy Markdown
Member

@samcm samcm commented Jan 19, 2026

Summary

  • Add support for capturing aggregate attestations alongside single attestations
  • Aggregate attestations use the attestation beacon API events topic
  • Produces the same BEACON_API_ETH_V1_EVENTS_ATTESTATION_V2 event type but with populated aggregation_bits

Key Differences from Single Attestations

Aspect Single Attestation Aggregate Attestation
Data Type *electra.SingleAttestation *spec.VersionedAttestation
Topic single_attestation attestation
Handler OnSingleAttestation() OnAttestation()
AggregationBits Empty string Hex-encoded bitlist
Subnet Filtering Yes No (global broadcast)

Test plan

  • Build passes: go build ./...
  • Lint passes: golangci-lint run --new-from-rev="origin/master"
  • Unit tests pass: go test -race ./...
  • CI integration tests

Add support for capturing aggregate attestations alongside single
attestations. Aggregate attestations are broadcast on the `attestation`
beacon API events topic and produce the same
`BEACON_API_ETH_V1_EVENTS_ATTESTATION_V2` event type, but with
populated `aggregation_bits`.

Key differences from single attestations:
- Uses *spec.VersionedAttestation instead of *electra.SingleAttestation
- No subnet filtering (aggregates are broadcast globally)
- Aggregation bits are hex-encoded in the output
- No AttestingValidator metadata (aggregates represent multiple validators)

Both TopicSingleAttestation and TopicAggregateAttestation share the
same opt-in condition - if single attestation is enabled, aggregates
are also enabled.
@samcm samcm requested a review from mattevans as a code owner January 19, 2026 04:33
samcm added 6 commits January 19, 2026 14:36
- Enable attestation subnet checking in the integration test
- Add verification that attestation events (single or aggregate) are being captured
- Increase timeout from 60s to 90s to allow for attestation events
Not all consensus clients emit attestation events at the same rate.
Some clients may not have validators assigned during the test window.
Make attestation verification optional to avoid flaky test failures.
The ethereum-package starlark code now uses 'depends_on' parameter
for store_service_files which requires a newer Kurtosis version.
# By Matty Evans (18) and others
# Via GitHub (17) and Matty Evans (1)
* master: (27 commits)
  chore(typos.toml): update extend-exclude list to include go.mod and go.sum files for better typo checking coverage
  chore(integration-tests.yml): specify kurtosis_version to ensure consistent test environment
  build(deps): bump the actions group across 1 directory with 4 updates
  chore: refactor command line flags and logging fields for better clarity and maintainability
  fix(go.mod): update otlptracehttp dependency from v1.42.0 to v1.43.0 to address compatibility and improvements in functionality fix(go.sum): synchronize checksums for the updated otlptracehttp dependency to ensure integrity of the module
  build(deps): bump github.com/ethpandaops/xatu
  chore(go.mod): update dependencies to latest versions for improved stability and security chore(go.sum): update checksum values of dependencies to match the changes in go.mod
  fix(go.mod): update various dependencies to their latest versions for enhanced stability and performance chore(go.mod): add go-eth2-client dependency for additional Ethereum features chore(go.mod): adjust indirect dependencies to ensure compatibility with updated packages
  build(deps): bump crate-ci/typos in the actions group
  build(deps): bump the actions group across 1 directory with 3 updates
  style(main_test.go): remove unnecessary blank line in TestConcurrentShutdown function to improve code readability
  chore(workflow): remove unnecessary empty line in release.yml for cleaner workflow file chore(deps): update golang to version 1.26.1 and golangci-lint to version 2.11.4 for improved performance and stability refactor(sentry): replace fmt.Sprintf with fmt.Appendf in applyOutputServerCredentials for efficiency in config.go refactor(test): use sync.WaitGroup's Go method instead of a goroutine for better readability in main_test.go refactor(events): change return type from interface{} to any for improved type safety in multiple event files refactor(integration): replace strings.Split with strings.SplitSeq for more explicit handling of strings in contributoor_test.go refactor(sink): update mockEvent Data method return type from interface{} to any for type safety in sink_test.go refactor(config): update yamlMap type to map[string]any for better compatibility in config.go refactor(ethereum): use range in for loops for cleaner syntax and better readability in various test files
  chore(deps): update Go module dependencies
  fix: bump kurtosis Go SDK to v1.16.6 to match CLI version
  fix: update kurtosis apt source to sdk.kurtosis.com
  fix: resolve govulncheck CI failures by updating Go toolchain and x/net
  fix: resolve golangci-lint issues (gosec G115, unused nolint directives)
  build(deps): bump the actions group with 3 updates
  build(deps): bump the actions group with 2 updates
  chore(govulncheck): enhance vulnerability check by adding more known unfixable vulnerabilities and improving output clarity chore(integration-tests): remove unnecessary triggers for pull requests on go files and related workflow files
  ...

# Conflicts:
#	go.mod
#	go.sum
#	internal/integration/contributoor_test.go
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