ethereum / portal-network-specs

Official repository for specifications for the Portal Network
300 stars 81 forks source link

feat(json-rpc): add beacon network JSON-RPC endpoints #322

Closed ogenev closed 2 months ago

ogenev commented 3 months ago

Add basic beacon network endpoints to JSON_RPC specs.

All of the endpoints are copy/paste from the history network except this one:

acolytec3 commented 3 months ago
  • I'm proposing adding portal_beaconOptimisticStateRoot endpoint that returns the hex encoded recent known beacon state root.

To confirm, this new one is just returning the beacon state root embedded in the optimisticUpdate that we have stored locally?

ogenev commented 3 months ago

To confirm, this new one is just returning the beacon state root embedded in the optimisticUpdate that we have stored locally?

yes

ogenev commented 3 months ago

Thinking about the state root endpoints more, we will want also similar endpoint for the finality updates: portal_beaconFinalityStateRoot and probably adding additional field to the response object, the slot number?

Current use cases: