-
Notifications
You must be signed in to change notification settings - Fork 278
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
[Merge] add merge Beacon API support #4537
Conversation
c8a6093
to
cac5e7b
Compare
@@ -30,39 +28,38 @@ | |||
public final UInt64 slot; | |||
|
|||
@Schema(type = "string", format = "uint64") | |||
public final UInt64 proposer_index; | |||
public final UInt64 proposerIndex; |
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.
so by doing this, we effectively create some duplication - now the interface isn't sure about whether its proposer_index
or proposerIndex
, so we have both.
Need to at least put @JsonProperty("proposer_index")
to define it. this will also get rid of the typing issue appearing because of the proposer_index type not being given a schema definition.
same goes for all renamed fields here.
The standard dictates the names of these fields, so it's important they're consistent.
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.
the other option is leave them named the way the api requires them, given that it's only an object that the api uses...
data/serializer/src/main/java/tech/pegasys/teku/api/schema/merge/BeaconStateMerge.java
Show resolved
Hide resolved
this.previousEpochParticipation = previousEpochParticipation; | ||
this.currentEpochParticipation = currentEpochParticipation; | ||
this.inactivityScores = inactivityScores; | ||
this.currentSyncCommittee = currentSyncCommittee; | ||
this.nextSyncCommittee = nextSyncCommittee; |
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.
kind of a repeat, but basically all these fields are now incorrect in the api returns, which is why I'm suggesting putting their names back unless we have a good reason.
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.
at the end I was more close to have cammelCase stuff, if you agree, so lets have it as it is for now and wait for the new API framework to clean everything up
@Schema( | ||
name = "parent_hash", | ||
type = "string", | ||
format = "byte", | ||
pattern = PATTERN_BYTES32, | ||
description = DESCRIPTION_BYTES32) | ||
public final Bytes32 parentHash; | ||
|
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 think all of these have come out incorrectly because of the abstract class usage. i'm not sure how you'd get around that, but the swagger is all busted for this class...
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 guess you are not seeing the latest version, can you do a clean rebuild?
cbf5bcf
to
866d70a
Compare
@rolfyone to me looks ok now.. hopefully! |
improvement in BeaconBlock* constructors
add BeaconStateMerge in State schema annotation add BeaconBlockMerge in UnsignedBlock schema annotation fix BeaconStateAltair schema properties names
add BeaconStateMerge in State schema annotation add BeaconBlockMerge in UnsignedBlock schema annotation fix BeaconStateAltair schema properties names add UInt256 serializer\deserializer expand BeaconState api UT
…rge, ExecutionPayload and ExecutionPayloadHeader
8c79eac
to
ecbc02a
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.
I wasn't able to easily run it today, just had a messed up environment of my own, but from the screenshots it looks like exactly what we talked about - looks good!
PR Description
add Merge support in REST beacon APIs
related to #4504
SignedBeaconBlock
andBeaconBlock*
Documentation
documentation
label to this PR if updates are required.Changelog