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

Document engine_getBlobsV1 #1706

Merged
merged 6 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions docs/public-networks/reference/engine-api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,67 @@ curl -X POST --data '{"jsonrpc":"2.0","method":"engine_forkchoiceUpdatedV1","par

</Tabs>

### `engine_getBlobsV1`

Returns the blobs corresponding to the specified blob versioned hashes.

#### Parameters

`versionedHashes`: *array* of *strings* - Array of blob versioned hashes

#### Returns

`engineGetBlobsResultV1`: *array* of *objects* - Array of [blob and proof objects](objects.md#blob-and-proof-object),
items of which can be `null`

<Tabs>

<TabItem value="curl HTTP" label="curl HTTP" default>

```bash
curl -X POST --data '{"jsonrpc":"2.0","method":"engine_getBlobsV1","params":[["0x010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014","0x01f3a5c9d8e7b6a4c2d1e0f9b8a7c6d5e4f3a2b1c0d9e8f7b6a5c4d3e2f1a0b9"]],"id":1}' http://127.0.0.1:8550
```

</TabItem>

<TabItem value="wscat WS" label="wscat WS">

```json
{
"jsonrpc": "2.0",
"method": "engine_getBlobsV1",
"params": [
[
"0x010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014",
"0x01f3a5c9d8e7b6a4c2d1e0f9b8a7c6d5e4f3a2b1c0d9e8f7b6a5c4d3e2f1a0b9"
]
],
"id": 67
}
```

</TabItem>

<TabItem value="JSON result" label="JSON result">

```json
{
"jsonrpc": "2.0",
"id": 67,
"result": [
{
"blob": "0x722662154e6d76b2b2b92e70c0cac3ccf534f9b74eb5b89819ec509083d00a503ae5c198d17634e79059c2cd735491...",
"proof": "0x80c5f2e1eb23939cf3600f61872e3e9964d0acafb440634e530d6139a193b889c56a0c07d737729dbe0626706fc9f25f"
},
null
]
}
```

</TabItem>

</Tabs>

### `engine_getPayloadBodiesByHashV1`

Returns the bodies of the execution payloads corresponding to the specified block hashes.
Expand Down
9 changes: 9 additions & 0 deletions docs/public-networks/reference/engine-api/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ tags:

The following objects are parameters for or returned by the [Engine API methods](index.md).

## Blob and proof object

Returned by [`engine_getBlobsV1`](index.md#engine_getblobsv1).

| Key | Type | Value |
| --- | :-: | --- |
| `blob` | _Data_, 131072 Bytes | An SSZ-encoded `Blob` as defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844). |
alexandratran marked this conversation as resolved.
Show resolved Hide resolved
| `proof` | _Data_, 48 Bytes | A `KZGProof` as defined in [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844). |

## Execution payload object

Parameter for [`engine_newPayloadV1`](index.md#engine_newpayloadv1). Returned by [`engine_getPayloadV1`](index.md#engine_getpayloadv1).
Expand Down
2 changes: 1 addition & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ const config = {
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["solidity", "toml", "java"],
additionalLanguages: ["solidity", "toml", "java", "bash"],
},
mermaid: {
options: {
Expand Down
Loading