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

Runnig relay from 0 causes BatchError #2825

Closed
ksemaev opened this issue Jul 17, 2019 · 3 comments
Closed

Runnig relay from 0 causes BatchError #2825

ksemaev opened this issue Jul 17, 2019 · 3 comments

Comments

@ksemaev
Copy link

ksemaev commented Jul 17, 2019

When I start docker from 0, I got this error:

[2019-07-17 07:23:50.410] INFO : Downloaded 10000 new blocks accounting for a total of 2544 transactions
[2019-07-17 07:23:50.456] INFO : Starting Round 2
[2019-07-17 07:23:50.461] INFO : Saving round 2
[2019-07-17 07:23:50.463] INFO : Blockchain download paused
[2019-07-17 07:23:50.468] WARN : Refused new block {"version":0,"timestamp":10952,"height":51,"previousBlockHex":"1691448073d4b2f2","previousBlock":"1626156258947281650","numberOfTransactions":0,"totalAmount":"0","totalFee":"0","reward":"0","payloadLength":0,"payloadHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","generatorPublicKey":"0384e505b25eaac812f8acbaa1ecd09e2ca4b5d973210189a39dc48d2a8f908780","blockSignature":"3045022100e5b712418e91695e97827342391b465f5bc6ce630733cbd8b6f76bbebcc99f24022045a64eb2fe2ca1a6c8a83794a5fbe0473d694e0cbc892ee419a27114c0e6d9ea","idHex":"eef61855c18d918c","id":"17218976981896237452"}
[2019-07-17 07:23:50.476] ERROR: duplicate key value violates unique constraint "blocks_pkey"
[2019-07-17 07:23:50.476] ERROR: Could not save 49 blocks to database : BatchError: duplicate key value violates unique constraint "blocks_pkey"
at check (/home/node/.config/yarn/global/node_modules/spex/lib/ext/batch.js:136:32)
at step (/home/node/.config/yarn/global/node_modules/spex/lib/ext/batch.js:110:17)
at /home/node/.config/yarn/global/node_modules/spex/lib/ext/batch.js:85:17
at /home/node/.config/yarn/global/node_modules/spex/lib/utils/index.js:64:25
[2019-07-17 07:23:50.478] INFO : Reverting 49 blocks back to last height: 1602
(node:23) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

assert_1.default(block.data.height - 1 <= this.lastBlocks.last().data.height)

at StateStore.setLastBlock (/home/node/.config/yarn/global/node_modules/@arkecosystem/core-state/dist/stores/state.js:89:29)
at Blockchain.processBlocks (/home/node/.config/yarn/global/node_modules/@arkecosystem/core-blockchain/dist/blockchain.js:321:28)

(node:23) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:23) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Can you please suggest what may cause it?

@ghost
Copy link

ghost commented Jul 17, 2019

Thanks for opening this issue! A maintainer will review this in the next few days and explicitly select labels so you know what's going on.

If no reviewer appears after a week, a reminder will be sent out.

@ksemaev
Copy link
Author

ksemaev commented Jul 17, 2019

NM, it was several nodes pointing to 1 PG db, my mistake

@ksemaev ksemaev closed this as completed Jul 17, 2019
@ghost
Copy link

ghost commented Jul 17, 2019

This issue has been closed. If you wish to re-open it please provide additional information.

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

1 participant