Skip to content

Commit

Permalink
rpc: accountRange method json spec (#2224)
Browse files Browse the repository at this point in the history
Co-authored-by: Bartosz Zawistowski <bartosz.zawistowski@erigon.tech>
  • Loading branch information
bzawisto and bzawisto authored Aug 13, 2024
1 parent c05cd40 commit b190fd4
Showing 1 changed file with 137 additions and 0 deletions.
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

0 comments on commit b190fd4

Please sign in to comment.