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

Adding accountRange spec #2224

Merged
merged 1 commit into from
Aug 13, 2024
Merged
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
137 changes: 137 additions & 0 deletions silkworm/rpc/json_rpc/specification.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,143 @@
"version": "0.0.0"
},
"methods": [
{
"name": "debug_accountRange",
"summary": "Enumerates all accounts at a given block with paging capability.",
"params": [
{
"name": "Block",
"required": true,
"schema": {
"title": "Block number or tag",
"oneOf": [
{
"title": "Block number",
"type": "string",
"pattern": "^0x([1-9a-f]+[0-9a-f]*|0)$"
},
{
"title": "Block tag",
"type": "string",
"enum": [
"earliest",
"finalized",
"safe",
"latest",
"pending"
],
"description": "`earliest`: The lowest numbered block the client has available; `finalized`: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; `safe`: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; `latest`: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; `pending`: A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for `finalized` or `safe` block MUST be responded to with `-39001: Unknown block` error"
}
]
}
},
{
"name": "Hashed addresses",
"required": true,
"schema": {
"type": "array",
"items": {
"title": "32 hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]{0,64}$"
}
}
},
{
"name": "Maximum results",
"required": true,
"schema": {
"items": {
"title": "hex encoded 64 bit unsigned integer",
"type": "string",
"pattern": "^0x([1-9a-f]+[0-9a-f]*|0)$"
}
}
},
{
"name": "No Code",
"required": true,
"schema": {
"type": "boolean"
}
},
{
"name": "No Storage",
"required": true,
"schema": {
"type": "boolean"
}
},
{
"name": "No preimages",
"required": true,
"schema": {
"type": "boolean"
}
}
],
"result": {
"name": "DumpAccounts",
"schema": {
"title": "Dumped Accounts",
"type": "object",
"required": [
"root",
"accounts",
"next"
],
"additionalProperties": false,
"properties": {
"root": {
"title": "root",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"accounts": {
"title": "accounts",
"type": "object",
"required": [
"balance",
"nonce"
],
"additionalProperties": false,
"properties": {
"address": {
"title": "balance",
"type": "string",
"pattern": "^0x([1-9a-f]+[0-9a-f]{0,63})|0$"
},
"nonce": {
"title": "nonce",
"type": "string",
"pattern": "^0x([1-9a-f]+[0-9a-f]*|0)$"
},
"root": {
"title": "storageHash",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"codeHash": {
"title": "codeHash",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
},
"code": {
"title": "code",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
}
}
},
"next": {
"title": "next",
"type": "string",
"pattern": "^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{4}|[A-Za-z0-9+\\/]{3}=|[A-Za-z0-9+\\/]{2}={2})$"
}
}
}
}
},
{
"name": "debug_getBadBlocks",
"summary": "Returns an array of recent bad blocks that the client has seen on the network.",
Expand Down
Loading