-
Notifications
You must be signed in to change notification settings - Fork 40
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
use seed-chainstate.sh get error #107
Comments
this error is specific to the API/postgres.
I'm leaning towards option 1, but i'll need to see the (truncated, because it can be a lot) output from when that script was run. for 2, i've only seen that when used with |
I try it many times and it still shows the same error. postgres.log |
right, but what i want to see is the output from from your API log:
this tells me that the DB doesn't have block height |
To save time in multiple attempts, I only commented out the delete file and download file operations |
thanks! these both look fine, but the download urls are what i need (or the versions from your .env file). the two env vars i'm curious about: |
I'm using the |
got it, thanks! i'll see if i can reproduce. both of those versions should be fine (barring an issue with archive file itself). |
i can reproduce this using the versions you've shared. essentially, the archive for the blockchain 2.1.0.0.2 was taking well after the last archive for api 7.1.2. as you can see below, the API is about 1k blocks behind the chainstate data (which produces the error you're seeing, since the blockchain is sending block 102351, and the API doesn't have 102350) $ curl -sL localhost:3999/extended/v1/status | jq -r .chain_tip.block_height
101037
$ curl -sL localhost:20443/v2/info | jq -r .stacks_tip_height
102350 In testing, these versions were working fine - but there has been a hotfix and some other updates to the API. in the meantime, i'd simply use the latest archives they have as your versions:
|
i'll leave this open as a TODO, but i'm not sure when or even if it'll be possible to solve for this outside of always using teh latest versions of an archive Hiro provides |
+1, just had the same issue. |
it'll take some thought, for now i've added in this line: https://github.com/stacks-network/stacks-blockchain-docker/blob/master/scripts/seed-chainstate.sh#L5 but it's not quite what i'm thinking is needed here, particularly when there is a new release but it hasn't been archived yet. moreover, using shell as I am here is very limiting. i may redo it soon in a language that would make switching to an older version/different epoch a bit easier. that said - it does seem that the current (as of today) archives are broken (particualrly for testnet, i have not tested mainnet recently). no matter which version of the files i use, i'm stuck at testnet block |
I clone this repo and cp the .env then run sudo ./scripts/seed-chainstate.sh.
When it finished I run ./manage.sh -n mainnet -a start
But it shows errors:
stacks-blockchain-api | {"level":"error","message":"error processing core-node /new_block: Error: DB does not contain a parent block at height 102233 with index_hash 0xae4836064f818c24f325eac661c5c13f52aae5f8f5a0d97b980f6bb727bd3c0b DB does not contain a parent block at height 102233 with index_hash 0xae4836064f818c24f325eac661c5c13f52aae5f8f5a0d97b980f6bb727bd3c0b","stack":"Error: DB does not contain a parent block at height 102233 with index_hash 0xae4836064f818c24f325eac661c5c13f52aae5f8f5a0d97b980f6bb727bd3c0b\n at PgWriteStore.handleReorg (/app/src/datastore/pg-write-store.ts:2693:15)\n at runMicrotasks (<anonymous>)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at /app/src/datastore/pg-write-store.ts:215:7\n at scope (/app/node_modules/postgres/cjs/src/index.js:222:18)\n at Function.begin (/app/node_modules/postgres/cjs/src/index.js:209:14)\n at PgWriteStore.update (/app/src/datastore/pg-write-store.ts:213:5)\n at handleBlockMessage (/app/src/event-stream/event-server.ts:320:3)\n at run (/app/node_modules/p-queue/dist/index.js:163:29)","timestamp":"2023-04-18T03:45:45.659Z"} stacks-blockchain | ERRO [1681789545.660332] [testnet/stacks-node/src/event_dispatcher.rs:142] [chains-coordinator-0.0.0.0:20443] Event dispatcher: Failed POST, url: http://stacks-blockchain-api:3700/new_block, err: Response { status: InternalServerError, headers: {"keep-alive": "timeout=5", "date": "Tue, 18 Apr 2023 03:45:45 GMT", "content-type": "application/json; charset=utf-8", "x-powered-by": "Express", "etag": "W/\"c-3Rk1bge0s6VuJbi+S2m2iU0UGdY\"", "connection": "keep-alive", "content-length": "12"}, version: None, has_trailers: false, trailers_sender: Some(Sender { .. }), trailers_receiver: Some(Receiver { .. }), upgrade_sender: Some(Sender { .. }), upgrade_receiver: Some(Receiver { .. }), has_upgrade: false, body: Body { reader: "<hidden>", length: Some(12), bytes_read: 0 }, ext: Extensions, local_addr: None, peer_addr: None } stacks-blockchain-api | {"level":"error","message":"HTTP POST /new_block","req":{"headers":{"content-length":"109225","content-type":"application/json","host":"stacks-blockchain-api:3700"},"httpVersion":"1.1","method":"POST","originalUrl":"/new_block","query":{},"url":"/new_block"},"res":{"statusCode":500},"responseTime":9,"timestamp":"2023-04-18T03:45:45.660Z"}
The text was updated successfully, but these errors were encountered: