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

Rework API #80

Merged
merged 15 commits into from
Oct 21, 2023
Merged

Rework API #80

merged 15 commits into from
Oct 21, 2023

Conversation

mcdee
Copy link
Contributor

@mcdee mcdee commented Oct 6, 2023

Rework of API to meet new requirements. Main points:

  • use of individual options struct for each endpoint
  • use of api.Response[T] wrapper to provide additional information with response data

This is an alternative to #77 and has a wider scope. It also tidies up various rough edges that have existed in the implementation.

@Willyham please take a look and let me know what you think in terms of the changes. Note that these have not yet been applied across all APIs, that will be done prior to any merge but this should allow you to get the feel for the changes being made.

@mcdee mcdee marked this pull request as draft October 6, 2023 16:32
docs/0.19-changes.md Show resolved Hide resolved
docs/0.19-changes.md Outdated Show resolved Hide resolved
docs/0.19-changes.md Outdated Show resolved Hide resolved
docs/0.19-changes.md Outdated Show resolved Hide resolved
@Willyham
Copy link

Willyham commented Oct 7, 2023

Left a few comments, I think this is definitely a good direction 👍

docs/0.19-changes.md Outdated Show resolved Hide resolved
docs/0.19-changes.md Outdated Show resolved Hide resolved
@mcdee mcdee marked this pull request as ready for review October 16, 2023 11:55
@mcdee
Copy link
Contributor Author

mcdee commented Oct 16, 2023

I'm relatively comfortable with the changes here, opening up for final review by interested parties prior to merging.

Rename BeaconBlockBlobs to BlobSidecars.
api/metadata/consts.go Outdated Show resolved Hide resolved
Copy link
Contributor

@xenowits xenowits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I think the changes are good to go!!

// String returns a string version of the structure.
func (v *VersionedProposal) String() string {
switch v.Version {
case spec.DataVersionBellatrix:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we not checking for phase0 blocks?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the result of a partial implementation during the move to using proposals. Should now be fully updated with all forks.

// String returns a string version of the structure.
func (v *VersionedSignedProposal) String() string {
switch v.Version {
case spec.DataVersionBellatrix:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well, I believe we should add a switch case for phase0 version

mcdee and others added 4 commits October 18, 2023 21:23
Co-authored-by: Abhishek Kumar <43061995+xenowits@users.noreply.github.com>
@mcdee mcdee merged commit e34ceea into master Oct 21, 2023
1 of 2 checks passed
@mcdee mcdee deleted the rework-api branch October 21, 2023 08:34
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.

3 participants