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

2024-12-18 04:14:13 error: 4003: Client error: Api called for an unknown Block: State already discarded for 0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c #1562

Open
aobalv123 opened this issue Dec 18, 2024 · 3 comments
Assignees

Comments

@aobalv123
Copy link

aobalv123 commented Dec 18, 2024

I have a problem

2024-12-18 02:48:27 error: 4003: Client error: Api called for an unknown Block: State already discarded for 0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c
RpcError: 4003: Client error: Api called for an unknown Block: State already discarded for 0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c
at checkError (/usr/src/app/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:23:15)
at RpcCoder.decodeResponse (/usr/src/app/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:39:9)
at WsProvider.__internal__onSocketMessageResult (/usr/src/app/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:418:51)
at WebSocket.__internal__onSocketMessage (/usr/src/app/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:407:20)
at callListener (/usr/src/app/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onMessage (/usr/src/app/node_modules/ws/lib/event-target.js:209:9)
at WebSocket.emit (node:events:513:28)
at Receiver.receiverOnMessage (/usr/src/app/node_modules/ws/lib/websocket.js:1220:20)
at Receiver.emit (node:events:513:28)
at Receiver.dataMessage (/usr/src/app/node_modules/ws/lib/receiver.js:596:14)
2024-12-18 02:48:27 error: GET /blocks/head 500 3ms
2024-12-18 04:14:13 error: RPC-CORE: getRuntimeVersion(at?: BlockHash): RuntimeVersion:: 4003: Client error: Api called for an unknown Block: State already discarded for 0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c
2024-12-18 04:14:13 error: 4003: Client error: Api called for an unknown Block: State already discarded for 0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c
RpcError: 4003: Client error: Api called for an unknown Block: State already discarded for 0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c
at checkError (/usr/src/app/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:23:15)
at RpcCoder.decodeResponse (/usr/src/app/node_modules/@polkadot/rpc-provider/cjs/coder/index.js:39:9)
at WsProvider.__internal__onSocketMessageResult (/usr/src/app/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:418:51)
at WebSocket.__internal__onSocketMessage (/usr/src/app/node_modules/@polkadot/rpc-provider/cjs/ws/index.js:407:20)
at callListener (/usr/src/app/node_modules/ws/lib/event-target.js:290:14)
at WebSocket.onMessage (/usr/src/app/node_modules/ws/lib/event-target.js:209:9)
at WebSocket.emit (node:events:513:28)
at Receiver.receiverOnMessage (/usr/src/app/node_modules/ws/lib/websocket.js:1220:20)
at Receiver.emit (node:events:513:28)
at Receiver.dataMessage (/usr/src/app/node_modules/ws/lib/receiver.js:596:14)
2024-12-18 04:14:13 error: GET /blocks/head 500 3ms
^Ccontext canceled

Tasks

Preview Give feedback
No tasks being tracked yet.
@Imod7
Copy link
Contributor

Imod7 commented Dec 18, 2024

Thank you @aobalv123 for this issue. Could you please provide the following information:

  • Which version of Sidecar are you using?
  • Which endpoint is Sidecar connected to? If it is a local node, could you share the chain you connect to and the node's polkadot-sdk (polkadot binary) version?
  • From the error message, I am assuming you are receiving this error as soon as you query /blocks/head correct?
  • Was there any change in your Sidecar instance, network connection, or the connected node prior to this error that might be related?

Have you tried restarting Sidecar or your node to see if the error resolves?

@Imod7 Imod7 self-assigned this Dec 18, 2024
@aobalv123
Copy link
Author

version: "3"
services:
acala:
container_name: acala
user: root
image: acala/acala-node:2.25.0
volumes:
- /data/blockdata/aca/data:/data
- /data/blockdata/aca/wasm:/wasm
command: '--chain acala --rpc-external --pruning 1000 --rpc-max-connections 10000 --execution wasm --wasm-runtime-overrides /wasm --wasm-execution compiled --unsafe-rpc-external --rpc-cors=all --base-path /data --database=paritydb'
ports:
- "9887:9944"
- "9861:9933"
sidecar:
image: parity/substrate-api-sidecar:v19.3.0
ports:
- "9886:8080"
environment:
SAS_SUBSTRATE_URL: ws://acala:9944
@Imod7

@Imod7
Copy link
Contributor

Imod7 commented Dec 19, 2024

I just checked Sidecar connected to the Acala chain and blocks/head works as expected.

Did you request block height 0 at any point? Because the error message refers to the 0xfc41b9bd8ef8fe53d58c7ea67c794c7ec9a73daf05e6d54b14ff6342c99ba64c hash which corresponds to block #0 on Acala chain. If so, then this error message is expected since your node is running with the --pruning 1000 flag so block 0 is no longer available on your node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants