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: VersionedAttestations #447

Merged
merged 8 commits into from
Mar 5, 2025
Merged

feat: VersionedAttestations #447

merged 8 commits into from
Mar 5, 2025

Conversation

samcm
Copy link
Member

@samcm samcm commented Mar 5, 2025

No description provided.

This commit updates the go modules and dependencies, including:
- Replacing github.com/probe-lab/hermes with github.com/ethpandaops/hermes
- Upgrading github.com/libp2p/go-libp2p to v0.38.1
- Upgrading go.opentelemetry.io/otel and related modules to v1.33.0
- Updating various other dependencies to their latest versions

chore: update go.sum dependencies

This commit updates the dependencies in go.sum to their latest
versions. This includes updates to libraries such as aws-sdk-go-v2,
go-openapi, pion, and others. These updates may include bug fixes,
performance improvements, and new features.

chore: update go.sum dependencies to latest versions

This commit updates dependencies in go.sum to their latest
versions to ensure compatibility and access to the newest
features and security patches.

chore: update go.sum dependencies

This commit updates the dependencies in go.sum to their latest versions.
This ensures that the project is using the most up-to-date and
compatible versions of its dependencies.

feat: add electra support to beacon block processing

This commit adds support for the Electra fork version in beacon block
processing. It includes changes to handle Electra blocks in gossipsub
beacon block handling, event data extraction, and validator block
filtering. This ensures that the system can correctly process and
interpret Electra-formatted beacon blocks.
The darwin builds are disabled because cross-compilation is not working.
refactor: use local beacon package instead of github one
The go-eth2-client dependency was updated to the latest version
v0.24.1-0.20250219090147-b41ce952806c to address potential bugs
and incorporate the newest features.
… handling

This commit refactors the attestation event processing logic to improve data handling and error management. The main changes include:

- Modified the `NewEventsAttestation` function to accept `spec.VersionedAttestation` instead of `beacon.VersionedAttestation`.
- Added error handling to the `NewEventsAttestation` function to return an error if the event is nil or if it fails to get attestation data.
- Added `attestationData` field to the `EventsAttestation` struct to store the attestation data.
- Modified the `getAdditionalData` function to use the `attestationData` field instead of calling methods on the `event` field.
- Modified the `getAdditionalData` function to get the aggregation bits from the event and append the validator index if the attestation is unaggregated.
- Updated the `OnAttestation` function in `sentry.go` to use the new `NewEventsAttestation` function and handle errors.

These changes improve the data handling and error management of the attestation event processing logic.
@samcm samcm requested a review from Savid as a code owner March 5, 2025 08:17
samcm added 3 commits March 5, 2025 09:19
This commit introduces support for handling single attestation events in the clmimicry package. It includes the creation of a new file, gossipsub_single_attestation.go, which contains the logic for processing and handling these events. Additionally, the commit updates the go.mod and go.sum files to reflect changes in dependencies. The changes in beacon.go remove the sync distance check.
fix(events_attestation.go): use attestationData instead of event.Phase0.Data to get slot and index
The attestationData field was removed from the EventsAttestation struct.
Instead of storing the data directly, the AttestationData method is now
used to retrieve it when needed. This change reduces the struct size and
avoids storing redundant data.
@samcm samcm merged commit 3eddacb into master Mar 5, 2025
4 of 5 checks passed
@samcm samcm deleted the feat/v2-attestations branch March 5, 2025 08:31
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