Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Bad block pruning? #13186

Closed
xlc opened this issue Jan 19, 2023 · 11 comments · Fixed by #13323
Closed

Bad block pruning? #13186

xlc opened this issue Jan 19, 2023 · 11 comments · Fixed by #13323

Comments

@xlc
Copy link
Contributor

xlc commented Jan 19, 2023

One of our RPC node is missing data for a block and only that block (AFAIK)
Endpoint: wss://karura-rpc-0.aca-api.network
Block number: 3467086
Block hash: 0xd13a656c8c4cd7a6f7d03db8209eee9c597edffba1b7ee2dc40844089e10b21a
Screenshot 2023-01-20 at 12 16 49 PM

I tried query +- 5 blocks and they all good.

The RPC node is running acala/karura-node:2.12.0 which uses 0.9.33 Substrate

This is the CLI args

    "--base-path=/acala/data", \
    "--chain=karura", \
    "--pruning=archive", \
    "--ws-external", \
    "--rpc-external", \
    "--rpc-cors=all", \
    "--ws-port=9944", \
    "--rpc-port=9933", \
    "--ws-max-connections=1200", \
    "--in-peers=100", \
    "--listen-addr=/ip4/0.0.0.0/tcp/30333", \
    "--listen-addr=/ip4/0.0.0.0/tcp/30334/ws", \
    "--state-cache-size=0", \
    "--db-cache=2048", \
    "--max-runtime-instances=16", \
    "--", \
    "--chain=kusama", \
    "--listen-addr=/ip4/0.0.0.0/tcp/30335", \
    "--listen-addr=/ip4/0.0.0.0/tcp/30336/ws" \
@xlc
Copy link
Contributor Author

xlc commented Jan 19, 2023

Also in our Mandala testnet, without --keep-blocks=archive, only the block body of the last block is preserved. Not 100% sure if it is related bug that could indicate a bug somewhere. We don't have this issue for Karura & Acala so we didn't report it before as it could just be our setup wasn't exactly right.

@shunjizhan
Copy link

shunjizhan commented Jan 20, 2023

Just wanna add that for this particular node, it's block 3467086 that has the issue. However, it might not be deterministic, we have seen similar issues at different blocks for other karura nodes.

@bkchr
Copy link
Member

bkchr commented Jan 20, 2023

Also in our Mandala testnet, without --keep-blocks=archive, only the block body of the last block is preserved.

How do you verify this? Also just calling getBlock?

@bkchr
Copy link
Member

bkchr commented Jan 20, 2023

One of our RPC node is missing data for a block and only that block (AFAIK)

This block is finalized?

@xlc
Copy link
Contributor Author

xlc commented Jan 20, 2023

How do you verify this? Also just calling getBlock?

Yes get block gives empty data

This block is finalized?

Yes

@bkchr
Copy link
Member

bkchr commented Jan 21, 2023

Have you seen this on multiple nodes? If not, anything special that happened with this node? Did you changed the block pruning settings at some point?

@xlc
Copy link
Contributor Author

xlc commented Jan 22, 2023

This is happening on multiple nodes on different block height including our own node and community nodes. We did not change the block pruning settings.

@bkchr
Copy link
Member

bkchr commented Feb 7, 2023

@arkpar do you have any idea?

@arkpar
Copy link
Member

arkpar commented Feb 7, 2023

Does it get exported with export-blocks command?

@xlc
Copy link
Contributor Author

xlc commented Feb 7, 2023

acala export-blocks --base-path /acala/data --chain=karura --from 3467086 --to 3467089
/acala/data --chain=karura --from 3467086 --to 3467089
2023-02-07 09:09:09 DB path: /acala/data/chains/karura/db/full
2023-02-07 09:09:09 Exporting blocks from #3467086 to #3467089
2023-02-07 09:09:09 Essential task `basic-block-import-worker` failed. Shutting down service.
2023-02-07 09:09:09 Essential task `transaction-pool-task-0` failed. Shutting down service.
2023-02-07 09:09:09 Essential task `transaction-pool-task-1` failed. Shutting down service.
2023-02-07 09:09:09 Essential task `txpool-background` failed. Shutting down service.

Tried other block range and able to export the blocks.

@xlc
Copy link
Contributor Author

xlc commented Feb 7, 2023

I will guess the only way to restore those missing blocks is resync?

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

Successfully merging a pull request may close this issue.

4 participants