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(json-rpc): add portal_beaconFinalizedStateRoot JSON-RPC endpoint #331

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ogenev
Copy link
Member

@ogenev ogenev commented Aug 8, 2024

A propose to add the portal_beaconFinalizedStateRoot endpoint to beacon JSON-RPC specs.

We already use this endpoint in Trin and it will be useful in hive when testing if a node keeps up with the finalized head.

@acolytec3
Copy link
Contributor

Did we ever decide whether we were going to add full-featured endpoints for beacon network stuff? I know @kdeme mentioned supporting a subset of the actual beacon endpoints specific to what we could return from Portal (e.g. /eth/v1/beacon/light_client/finality_update being the most relevant one here). I'd rather just return the whole finality_update as opposed to just the stateRoot.

@ogenev
Copy link
Member Author

ogenev commented Aug 9, 2024

Did we ever decide whether we were going to add full-featured endpoints for beacon network stuff? I know @kdeme mentioned supporting a subset of the actual beacon endpoints specific to what we could return from Portal (e.g. /eth/v1/beacon/light_client/finality_update being the most relevant one here). I'd rather just return the whole finality_update as opposed to just the stateRoot.

Yeah, I was also thinking about this. We need to decide on the public-facing endpoints, probably returning full optimistic and finality updates makes sense for users and hive testing.

For Trin's internals, we will use endpoints that return only the roots, but this is of course client specifics and any client is free to implement whatever endpoints they want as long as the "official" endpoints are implemented too.

Copy link
Collaborator

@kdeme kdeme left a comment

Choose a reason for hiding this comment

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

Yeah, I was also thinking about this. We need to decide on the public-facing endpoints, probably returning full optimistic and finality updates makes sense for users and hive testing.

Well, in the beacon API there is also /eth/v1/beacon/states/{state_id}/root.

We can add these portal json rpc versions, but I will definitely add the Beacon REST API versions, as these would be the ones that applications that are build on top of a beacon node will be familiar with.

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