Skip to content

Add error when accessing pruned chain data #636

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
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions src/debug/getters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
required: true
schema:
$ref: '#/components/schemas/BlockNumberOrTag'
errors:
- code: 4444
message: Pruned history unavailable
result:
name: Header RLP
schema:
Expand All @@ -24,6 +27,9 @@
required: true
schema:
$ref: '#/components/schemas/BlockNumberOrTag'
errors:
- code: 4444
message: Pruned history unavailable
result:
name: Block RLP
schema:
Expand All @@ -43,6 +49,9 @@
required: true
schema:
$ref: '#/components/schemas/hash32'
errors:
- code: 4444
message: Pruned history unavailable
result:
name: EIP-2718 binary-encoded transaction
schema:
Expand All @@ -62,6 +71,9 @@
required: true
schema:
$ref: '#/components/schemas/BlockNumberOrTag'
errors:
- code: 4444
message: Pruned history unavailable
result:
name: Receipts
schema:
Expand Down
21 changes: 21 additions & 0 deletions src/eth/block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
oneOf:
- $ref: '#/components/schemas/notFound'
- $ref: '#/components/schemas/Block'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_getBlockByHash example
params:
Expand Down Expand Up @@ -76,6 +79,9 @@
oneOf:
- $ref: '#/components/schemas/notFound'
- $ref: '#/components/schemas/Block'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_getBlockByNumber example
params:
Expand Down Expand Up @@ -131,6 +137,9 @@
- $ref: '#/components/schemas/notFound'
- title: Transaction count
$ref: '#/components/schemas/uint'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_getBlockTransactionCountByHash example
params:
Expand All @@ -152,6 +161,9 @@
- $ref: '#/components/schemas/notFound'
- title: Transaction count
$ref: '#/components/schemas/uint'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_getBlockTransactionCountByNumber example
params:
Expand All @@ -173,6 +185,9 @@
- $ref: '#/components/schemas/notFound'
- title: Uncle count
$ref: '#/components/schemas/uint'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_getUncleCountByBlockHash example
params:
Expand All @@ -194,6 +209,9 @@
- $ref: '#/components/schemas/notFound'
- title: Uncle count
$ref: '#/components/schemas/uint'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_getUncleCountByBlockNumber example
params:
Expand All @@ -218,6 +236,9 @@
type: array
items:
$ref: '#/components/schemas/ReceiptInfo'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_getBlockReceipts example
params:
Expand Down
3 changes: 3 additions & 0 deletions src/eth/filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@
- name: Filter
schema:
$ref: '#/components/schemas/Filter'
errors:
- code: 4444
message: Pruned history unavailable
result:
name: Log objects
schema:
Expand Down
9 changes: 9 additions & 0 deletions src/eth/transaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
oneOf:
- $ref: '#/components/schemas/notFound'
- $ref: '#/components/schemas/TransactionInfo'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_getTransactionByBlockHashAndIndex example
params:
Expand Down Expand Up @@ -93,6 +96,9 @@
oneOf:
- $ref: '#/components/schemas/notFound'
- $ref: '#/components/schemas/TransactionInfo'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_getTransactionByBlockNumberAndIndex example
params:
Expand Down Expand Up @@ -131,6 +137,9 @@
oneOf:
- $ref: '#/components/schemas/notFound'
- $ref: '#/components/schemas/ReceiptInfo'
errors:
- code: 4444
message: Pruned history unavailable
examples:
- name: eth_getTransactionReceipt example
params:
Expand Down