-
Notifications
You must be signed in to change notification settings - Fork 301
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 PostAttestationV2 API #8448
Add PostAttestationV2 API #8448
Conversation
8e1b367
to
e7094ad
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
- Added new PostAttestationV2 API endpoint (
/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/JsonTypeDefinitionBeaconRestApi.java
,/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/PostAttestationV2.java
) - Introduced header-based schema selector (
/data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/MilestoneDependentTypesUtil.java
) - Enhanced deserialization for arrays with different item types (
/infrastructure/json/src/main/java/tech/pegasys/teku/infrastructure/json/types/DeserializableOneOfTypeDefinition.java
,/infrastructure/restapi/src/main/java/tech/pegasys/teku/infrastructure/restapi/endpoints/EndpointMetadata.java
) - Added comprehensive tests for new API and schema selector (
/data/beaconrestapi/src/test/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/PostAttestationV2Test.java
,/data/beaconrestapi/src/test/java/tech/pegasys/teku/beaconrestapi/schema/MilestoneDependentTypesUtilTest.java
) - Introduced new JSON files for testing and error responses (
/data/beaconrestapi/src/test/resources/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/errorListBadRequest.json
,/data/beaconrestapi/src/test/resources/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/postAttestationRequestBodyElectra.json
,/data/beaconrestapi/src/test/resources/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/postAttestationRequestBodyPhase0.json
)
14 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
...ain/java/tech/pegasys/teku/beaconrestapi/handlers/v1/beacon/MilestoneDependentTypesUtil.java
Show resolved
Hide resolved
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
(updates since last review)
- Added
postAttestationRequestBodyELECTRA.json
for PostAttestationV2 API testing - Added
postAttestationRequestBodyPHASE0.json
for PostAttestationV2 API testing - Ensure deserialization of arrays with different item types
- Verify header-based schema selector functionality
2 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.
PR Summary
(updates since last review)
- Introduced PostAttestationV2 API in
data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/paths/_eth_v2_beacon_pool_attestations.json
- Added header parameter 'Eth-Consensus-Version' for version handling
- Supported multiple attestation schemas based on 'Eth-Consensus-Version'
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
7f7abcd
to
c295f56
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
(updates since last review)
- Added PostAttestationV2 API in
data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/PostAttestationV2.java
- Implemented header-based schema selection in
MilestoneDependentTypesUtil.java
- Added support for arrays with different item types in
EndpointMetadata.java
- Introduced
OneOfArrayJsonRequestContentTypeDefinition.java
for complex request body handling - Added IPv6 support in
DiscV5Service.java
andNodeRecordConverter.java
18 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.
PR Summary
(updates since last review)
- Added PostAttestationV2 API in
data/beaconrestapi/src/main/java/tech/pegasys/teku/beaconrestapi/handlers/v2/beacon/PostAttestationV2.java
- Implemented header-based schema selection for attestation deserialization
- Simplified error handling in
MilestoneDependentTypesUtil.java
- Removed
listOf
method fromDeserializableOneOfTypeDefinition.java
- Renamed
requestBodyTypeForList
torequestBodyType
inEndpointMetadata.java
4 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.
PR Summary
(updates since last review)
- Added integration tests for
PostAttestationsV2
API indata/beaconrestapi/src/integration-test/java/tech/pegasys/teku/beaconrestapi/v2/beacon/PostAttestationsV2IntegrationTest.java
- Updated
JsonTypeDefinitionBeaconRestApi.java
to usePostAttestationsV2
class - Introduced
PostAttestationsV2.java
to handle new API endpoint/eth/v2/beacon/pool/attestations
- Renamed and updated tests in
PostAttestationsV2Test.java
to reflect new API endpoint
4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
4f1c076
to
4b28766
Compare
4b28766
to
0472e2a
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.
lgtm with some minor asks
PR Description
Fixed Issue(s)
#8424
Documentation
doc-change-required
label to this PR if updates are required.Changelog