-
Notifications
You must be signed in to change notification settings - Fork 220
Add EIP-7805 (FOCIL) endpoints #490
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
base: master
Are you sure you want to change the base?
Changes from all commits
74cd5d3
f4c722f
a76f540
bc0fd7e
9a2a545
6a5b07e
580958d
7bec89a
6d3ba47
d0c0e88
237d709
385c145
4f8236b
032eb22
8df7b4a
8c419c1
7517789
c760301
49ad0b2
a89ffd8
24a7a65
274b87a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| post: | ||
| tags: | ||
| - Heze | ||
| summary: "Get inclusion list committee duties" | ||
| operationId: "getInclusionListCommitteeDuties" | ||
| description: | ||
| "Requests the beacon node to provide a set of inclusion list committee duties for a particular epoch. | ||
|
|
||
| Duties should only need to be checked once per epoch, | ||
| however a chain reorganization (of > MIN_SEED_LOOKAHEAD epochs) could occur, | ||
| resulting in a change of duties. For full safety, you should monitor head events and confirm the | ||
| dependent root in this response matches: | ||
|
|
||
| - event.previous_duty_dependent_root when `compute_epoch_at_slot(event.slot) == epoch` | ||
|
|
||
| - event.current_duty_dependent_root when `compute_epoch_at_slot(event.slot) + 1 == epoch` | ||
|
|
||
| - event.block otherwise | ||
|
|
||
|
|
||
| The dependent_root value is `get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch - 1) - 1)` | ||
| or the genesis block root in the case of underflow." | ||
| parameters: | ||
| - name: epoch | ||
| description: "Should only be allowed 1 epoch ahead" | ||
| in: path | ||
| required: true | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Uint64" | ||
| requestBody: | ||
| description: "An array of the validator indices for which to obtain the duties." | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| title: GetInclusionListCommitteeDutiesBody | ||
| type: array | ||
| minItems: 1 | ||
| items: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Uint64" | ||
| responses: | ||
| "200": | ||
| description: Success response | ||
| content: | ||
| application/json: | ||
| schema: | ||
| title: GetInclusionListCommitteeDutiesResponse | ||
| type: object | ||
| required: [dependent_root, execution_optimistic, data] | ||
| properties: | ||
| dependent_root: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/DependentRoot" | ||
| execution_optimistic: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ExecutionOptimistic" | ||
| data: | ||
| type: array | ||
| items: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Heze.InclusionListDuty" | ||
| "400": | ||
| description: "Invalid epoch or index" | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
| example: | ||
| code: 400 | ||
| message: "Invalid epoch: -2" | ||
| "500": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/InternalError" | ||
| "503": | ||
| $ref: "../../../beacon-node-oapi.yaml#/components/responses/CurrentlySyncing" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| get: | ||
| tags: | ||
| - Heze | ||
| operationId: "produceInclusionList" | ||
| summary: "Produce an inclusion list" | ||
| description: Requests the beacon node to produce an inclusion list. | ||
| parameters: | ||
| - name: slot | ||
| in: query | ||
| required: true | ||
| description: "The slot for which an inclusion list should be created." | ||
| schema: | ||
| $ref: ../../beacon-node-oapi.yaml#/components/schemas/Uint64 | ||
| responses: | ||
| "200": | ||
| description: Success response | ||
| content: | ||
| application/json: | ||
| schema: | ||
| title: ProduceInclusionListResponse | ||
| type: object | ||
| required: [data] | ||
| properties: | ||
| data: | ||
| $ref: "../../beacon-node-oapi.yaml#/components/schemas/Bellatrix.Transactions" | ||
| "400": | ||
| $ref: "../../beacon-node-oapi.yaml#/components/responses/InvalidRequest" | ||
| "500": | ||
| $ref: "../../beacon-node-oapi.yaml#/components/responses/InternalError" | ||
| "503": | ||
| $ref: "../../beacon-node-oapi.yaml#/components/responses/CurrentlySyncing" | ||
|
|
||
| post: | ||
| tags: | ||
| - Heze | ||
| operationId: "publishInclusionList" | ||
| summary: "Publish an inclusion list" | ||
| description: "Verifies given inclusion list and publishes it on appropriate gossipsub topic." | ||
| parameters: | ||
| - in: header | ||
| schema: | ||
| $ref: "../../beacon-node-oapi.yaml#/components/schemas/ConsensusVersion" | ||
| required: true | ||
| name: Eth-Consensus-Version | ||
| description: "The active consensus version to which the inclusion list being submitted belongs." | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| required: [data] | ||
| properties: | ||
| data: | ||
| $ref: "../../beacon-node-oapi.yaml#/components/schemas/Heze.SignedInclusionList" | ||
| responses: | ||
| "200": | ||
| description: "Successful response" | ||
| "400": | ||
| $ref: "../../beacon-node-oapi.yaml#/components/responses/InvalidRequest" | ||
| "500": | ||
| $ref: "../../beacon-node-oapi.yaml#/components/responses/InternalError" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,3 +65,20 @@ PtcDuty: | |
| slot: | ||
| $ref: "./primitive.yaml#/Uint64" | ||
| description: "The slot at which the validator must perform PTC duties." | ||
|
|
||
| Heze: | ||
| InclusionListDuty: | ||
| type: object | ||
| required: [pubkey, validator_index, slot, inclusion_list_committee_root] | ||
| properties: | ||
| pubkey: | ||
| $ref: "./primitive.yaml#/Pubkey" | ||
| validator_index: | ||
| $ref: "./primitive.yaml#/Uint64" | ||
| description: "Index of validator in validator registry." | ||
| slot: | ||
| $ref: "./primitive.yaml#/Uint64" | ||
| description: "The slot at which the validator must propose an inclusion list." | ||
| inclusion_list_committee_root: | ||
| $ref: "./primitive.yaml#/Root" | ||
| description: "The root of inclusion list committee that the validator is part of." | ||
|
Comment on lines
+72
to
+84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that consensus-specs#5513 replaced |
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||||||||||||||||||||||||||||||
| Heze: | ||||||||||||||||||||||||||||||||||
| InclusionList: | ||||||||||||||||||||||||||||||||||
| type: object | ||||||||||||||||||||||||||||||||||
| description: "The [`InclusionList`](https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.11/specs/heze/beacon-chain.md#inclusionlist) object from the CL Heze spec." | ||||||||||||||||||||||||||||||||||
| required: [slot, validator_index, inclusion_list_committee_root, transactions] | ||||||||||||||||||||||||||||||||||
| properties: | ||||||||||||||||||||||||||||||||||
| slot: | ||||||||||||||||||||||||||||||||||
| $ref: "../primitive.yaml#/Uint64" | ||||||||||||||||||||||||||||||||||
| validator_index: | ||||||||||||||||||||||||||||||||||
| $ref: "../primitive.yaml#/Uint64" | ||||||||||||||||||||||||||||||||||
| inclusion_list_committee_root: | ||||||||||||||||||||||||||||||||||
| $ref: "../primitive.yaml#/Root" | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+5
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Aligning with the change added in consensus-specs#5513, which replaced this field on the |
||||||||||||||||||||||||||||||||||
| transactions: | ||||||||||||||||||||||||||||||||||
| $ref: "../bellatrix/transactions.yaml#/Bellatrix/Transactions" | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| SignedInclusionList: | ||||||||||||||||||||||||||||||||||
| type: object | ||||||||||||||||||||||||||||||||||
| description: "The [`SignedInclusionList`](https://github.com/ethereum/consensus-specs/blob/v1.7.0-alpha.11/specs/heze/beacon-chain.md#signedinclusionlist) object from the CL Heze spec." | ||||||||||||||||||||||||||||||||||
| required: [message, signature] | ||||||||||||||||||||||||||||||||||
| properties: | ||||||||||||||||||||||||||||||||||
| message: | ||||||||||||||||||||||||||||||||||
| $ref: "#/Heze/InclusionList" | ||||||||||||||||||||||||||||||||||
| signature: | ||||||||||||||||||||||||||||||||||
| $ref: "../primitive.yaml#/Signature" | ||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,3 +46,6 @@ PtcDuty | |
| produceBlockV | ||
| stateful | ||
| RLP | ||
| EIPs | ||
| FOCIL | ||
| heze | ||
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.
is this meant to return
EIP7805.InclusionList? maybe I'm reading things wrong but this seems to expect the transactions of the IL in the data property whereas description says this will request BN to produce an IL.Uh oh!
There was an error while loading. Please reload this page.
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.
depends how you define what a inclusion list is, technically it's just a list of transactions which is the return type of this api and also the engine-api
the other return type could be
InclusionList(ie. wrap it in container) but this would return useless and even confusing data, eg.validator_indexisn't even set by beacon node, so beacon node would just set some value (maybe0) and then the validator client is responsible for overriding itwe can think about if we wanna wrap this in a container, and maybe even make the api fork-aware by adding version metadata, this might be better for future forward compatibility
Uh oh!
There was an error while loading. Please reload this page.
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.
@gfukushima Yes. As @nflaig mentioned, IL can mean
Here we only return IL transactions because any additional consensus info (slot, validator index, ILC root) are all available in VC. No need to grab them from BN