-
Notifications
You must be signed in to change notification settings - Fork 204
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
Open
ensi321
wants to merge
19
commits into
ethereum:master
Choose a base branch
from
ensi321:focil
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f734ec3
Add IL related endpoints
ensi321 431edac
Remove multiple ILs support on endpoints
ensi321 affe983
Add note about chain reorgs to duties endpoint
nflaig f701d02
Fix lint errors
nflaig a6cd27f
Update endpoint descriptions
nflaig 4b188b8
Make inclusion endpoints fork-aware to be forward compatible
nflaig d76b9b3
Add inclusion_list event
nflaig 7624890
Add focil to word list
nflaig 743298f
Tag new inclusion list endpoint / event as Experimental
nflaig c036152
Add EIPs to word list
nflaig b6c2d93
Rename tag from Experimental to Draft
nflaig 808a41b
Simplifies produceInclusionList. Move ILC root to ILC duty
ensi321 194cff3
Remove version meta, shouldn't be required if it's jsut a list of txs
nflaig 1f84c51
Use eip7805 instead of focil as fork name
nflaig d535b58
Use EIP-7805 as tag to separate new apis
nflaig 21fc5a7
Update word list
nflaig 5960c4f
Update tag description
nflaig 2406ef0
Rebase on fulu
ensi321 a7ba2f0
Update payload_attributes example
ensi321 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| post: | ||
| tags: | ||
| - EIP-7805 | ||
| 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/EIP7805.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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| get: | ||
| tags: | ||
| - EIP-7805 | ||
| 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: | ||
| - EIP-7805 | ||
| 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/EIP7805.SignedInclusionList" | ||
| responses: | ||
| "200": | ||
| description: "Successful response" | ||
| "400": | ||
| $ref: "../../beacon-node-oapi.yaml#/components/responses/InvalidRequest" | ||
| "500": | ||
| $ref: "../../beacon-node-oapi.yaml#/components/responses/InternalError" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| EIP7805: | ||
| InclusionList: | ||
| type: object | ||
| description: "The [`InclusionList`](https://github.com/ethereum/consensus-specs/blob/v1.6.0-alpha.5/specs/_features/eip7805/beacon-chain.md#inclusionlist) object from the CL 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" | ||
| transactions: | ||
| $ref: "../bellatrix/transactions.yaml#/Bellatrix/Transactions" | ||
|
|
||
| SignedInclusionList: | ||
| type: object | ||
| description: "The [`SignedInclusionList`](https://github.com/ethereum/consensus-specs/blob/v1.6.0-alpha.5/specs/_features/eip7805/beacon-chain.md#signedinclusionlist) object from the CL spec." | ||
| required: [message, signature] | ||
| properties: | ||
| message: | ||
| $ref: "#/EIP7805/InclusionList" | ||
| signature: | ||
| $ref: "../primitive.yaml#/Signature" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,3 +37,6 @@ KZGProofs | |
| KZGCommitmentInclusionProof | ||
| LMD | ||
| fulu | ||
| EIPs | ||
| FOCIL | ||
| eip7805 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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