-
Notifications
You must be signed in to change notification settings - Fork 174
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
Endpoint for EIP-4881 Deposit Contract Snapshot #245
Changes from all commits
bdc2d12
48a8c70
aa3397a
912531d
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,34 @@ | ||
get: | ||
operationId: getDepositSnapshot | ||
summary: "Get Deposit Tree Snapshot" | ||
description: | | ||
Retrieve [EIP-4881](https://eips.ethereum.org/EIPS/eip-4881) Deposit Tree Snapshot. | ||
Depending on `Accept` header it can be returned either as json or as bytes serialzed by SSZ | ||
tags: | ||
- Beacon | ||
responses: | ||
"200": | ||
description: Success | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
title: GetDepositSnapshotResponse | ||
properties: | ||
data: | ||
$ref: '../../beacon-node-oapi.yaml#/components/schemas/DepositSnapshotResponse' | ||
application/octet-stream: | ||
schema: | ||
description: "SSZ serialized block bytes. Use Accept header to choose this response type" | ||
"404": | ||
description: "No Finalized Snapshot Available" | ||
content: | ||
application/json: | ||
schema: | ||
allOf: | ||
- $ref: "../../beacon-node-oapi.yaml#/components/schemas/ErrorMessage" | ||
- example: | ||
code: 404 | ||
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. we use 404 for when the "thing" is known not to exist (for example an empty slot) - a different code would probably be useful here for ephemeral error conditions (503/syncing for example) 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. I do tend to agree 404 isn't ideal (a server with a route that is missing is also 404) - even if it was a 400, or potentially 503 might work... I'll see if i can get some more opinions on this one. |
||
message: "No Finalized Snapshot Available" | ||
"500": | ||
$ref: '../../beacon-node-oapi.yaml#/components/responses/InternalError' |
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.
should there be support for downloading historical snapshots? ie when checkpoint-syncing, one will want to have a matching snapshot to the state that's being synced, which may or may not (due to race conditions or checkpoint age choice) be the same as the snapshot being served by "default"
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.
I think the main idea is just to get a starting point rather than download the whole deposit log, so I think there's probably not a need currently to get historical snapshots...