-
Notifications
You must be signed in to change notification settings - Fork 309
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
add Electra attester slashing schema #8478
add Electra attester slashing schema #8478
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this solve an issue that I had postponed for a little later. And it does with a lot more simplicity than my approach was going for. Although this is not a very extensible approach (for future forks) I don't think we going changing this attestation related classes so soon...
...i/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/PostAttesterSlashing.java
Outdated
Show resolved
Hide resolved
...src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/GetAttesterSlashingsV2.java
Show resolved
Hide resolved
...um/spec/src/main/java/tech/pegasys/teku/spec/datastructures/operations/AttesterSlashing.java
Show resolved
Hide resolved
548ab74
to
9017a57
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request introduces schema separation for AttesterSlashing
and IndexedAttestation
based on the Ethereum 2.0 milestones Phase0
and Electra
.
-
Schema Updates:
- Added
AttesterSlashingElectra.json
andAttesterSlashingPhase0.json
indata/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/
. - Removed
AttesterSlashing.json
to avoid redundancy.
- Added
-
File Modifications:
- Updated multiple
BeaconBlockBody
JSON files to referenceAttesterSlashingPhase0
orAttesterSlashingElectra
schemas. - Modified
JsonTypeDefinitionBeaconRestApi.java
to useschemaCache
for schema definitions.
- Updated multiple
-
Handler Changes:
- Updated
GetAttesterSlashings.java
andPostAttesterSlashing.java
to useSchemaDefinitionCache
.
- Updated
-
Test Adjustments:
- Updated test files to align with the new schema separation, ensuring accurate validation and comparison.
-
Java Class Modifications:
- Introduced
isElectra
parameter inAttesterSlashing.java
andIndexedAttestation.java
to dynamically set schema names based on the milestone.
- Introduced
30 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i do see this as a step down the road, but definitely in the right direction i think...
LGTM overall.
5d86270
to
ebf58f4
Compare
PR Description
Separate the
AttesterSlashing
andIndexedAttestation
schemas based on the milestone:Phase0
andElectra
Fixed Issue(s)
Documentation
doc-change-required
label to this PR if updates are required.Changelog