dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

Broken transition from 0.17 container to new one #4947

Open yshurik opened 2 years ago

yshurik commented 2 years ago

I had a problem to update the container to latest version. I used dashpay/dashd:0.17.0.0-rc3-hotfix1 (installed while ago) Now it does not sync anymore - I guess it happened hardfork or something, i did not figure out. I wanted to upgrade to new container (is it to use 0.18 or latest tag?) but looks like it is not possible to run 0.17 anymore but the new container also is not more compatible.

I used next docker-compose:

  TDASH:
    image: dashpay/dashd:0.17.0.0-rc3-hotfix1
    restart: unless-stopped
    command: -testnet -printtoconsole -rpcbind=0.0.0.0 -rpcallowip=0.0.0.0/0 -rpcauth='xxx:34....34'
    entrypoint: dash_oneshot
    volumes:
      - /mnt/crypto/coins/TDASH:/dash/.dashcore
    ports:
      - "127.0.0.1:12004:19998"

New containers do not have dash_oneshot binary anymore looks like. If I switch to use docker-entrypoint.sh then it complains about cmd options:

/docker-entrypoint.sh: line 21: exec: -t: invalid option

How can I upgrade to new container and have same setup? (testnet, rpcbind, rpcauth etc) ?

thephez commented 2 years ago

There was a recent hard fork on testnet related to v18 release preparations. At this point the 18.0.0-rc12 tag would be the recommended version to use. I can't speak to the questions regarding image compatibility, but brought your question to the attention of others that may be able to.

PastaPastaPasta commented 2 years ago

Yes, for testnet I would recommend trying the 18.0.0-rc12 tag. Please let us know if that solves it?

strophy commented 2 years ago

Hi @yshurik yes, it seems dash_oneshot is no longer included in the docker image. You can see an example compose file that works with the current docker images here: https://github.com/dashevo/platform/blob/v0.23-dev/packages/dashmate/docker-compose.yml

You can basically remove entrypoint: dash_oneshot and add -dashd as the first argument to the command key. The volume mountpoints have not changed, so you should be fine with your current volume settings, or adjust them as necessary. Let me know if you have any further problems!

yshurik commented 2 years ago

I was able to transfer to new 18.0.0-rc12 tag and run the container. It started syncing from previous point but it stopped again at block 770729 (Jul 29) and not going further :(

2022-08-04T08:16:33Z ERROR: AcceptBlockHeader: block 0000003c43b3ae7fffe61278ca5537a0e256ebf4d709d45f0ab040271074d51e is marked invalid
strophy commented 2 years ago

@PastaPastaPasta why do new nodes still have this syncing problem?

PastaPastaPasta commented 2 years ago

Hmm, interesting. @UdjinM6 ?

BTW @yshurik you can use reconsiderblock 0000003c43b3ae7fffe61278ca5537a0e256ebf4d709d45f0ab040271074d51e rpc command to get unstuck

thephez commented 2 years ago

@PastaPastaPasta why do new nodes still have this syncing problem?

Could be connected to old peers that have forked off and aren't on the current chain?

yshurik commented 2 years ago

resync from scratch helped, but should not it reorg if code is new?

yshurik commented 2 years ago

Just had a look again, it is still very unstable, looks like it got forked again (so i caught it third time) or so now stuck on block 774459:

2022-08-04T21:42:11Z [ProcessBlock] h[774480] numCommitmentsRequired[0] numCommitmentsInNewBlock[0]

2022-08-04T21:42:11Z ERROR: ConnectBlock(DASH): coinbase pays too much at height 774480 (actual=5801475949 vs limit=1801475949), exceeded block reward, no triggered superblock detected

2022-08-04T21:42:11Z InvalidChainFound: invalid block=000000ef69dcc01acb88d3d2d15db97db929c9bb9b2d2565edf0da6238ec5e49  height=774480  log2_work=57.31213626  date=2022-08-04T18:58:50Z

2022-08-04T21:42:11Z InvalidChainFound:  current best=000000a7fd08856e8310d8e64e37a4eeb305003db475c282a89a6f1b8bd47faa  height=774479  log2_work=57.31213626  date=2022-08-04T18:57:49Z

2022-08-04T21:42:11Z ERROR: ConnectTip: ConnectBlock 000000ef69dcc01acb88d3d2d15db97db929c9bb9b2d2565edf0da6238ec5e49 failed, bad-cb-amount (code 16)

2022-08-04T21:42:11Z InvalidChainFound: invalid block=000000ef69dcc01acb88d3d2d15db97db929c9bb9b2d2565edf0da6238ec5e49  height=774480  log2_work=57.31213626  date=2022-08-04T18:58:50Z

2022-08-04T21:42:11Z InvalidChainFound:  current best=000000a7fd08856e8310d8e64e37a4eeb305003db475c282a89a6f1b8bd47faa  height=774479  log2_work=57.31213626  date=2022-08-04T18:57:49Z

2022-08-04T21:42:11Z Disconnecting outbound peer 698 for old chain, best known block = 0000001acc25de06893220ed663f35ef8b8e82ec951963c4092c1e9ee103af6f

2022-08-04T21:42:11Z ThreadSocketHandler -- removing node: peer=698 nRefCount=1 fInbound=0 m_masternode_connection=0 m_masternode_iqr_connection=0

2022-08-04T21:42:11Z New outbound peer connected: version: 70223, blocks=774535, peer=779

2022-08-04T21:42:11Z ERROR: AcceptBlockHeader: block 000000ef69dcc01acb88d3d2d15db97db929c9bb9b2d2565edf0da6238ec5e49 is marked invalid

2022-08-04T21:42:11Z ThreadSocketHandler -- removing node: peer=779 nRefCount=1 fInbound=0 m_masternode_connection=0 m_masternode_iqr_connection=0

2022-08-04T21:42:11Z New outbound peer connected: version: 70223, blocks=774535, peer=780

2022-08-04T21:42:12Z ERROR: AcceptBlockHeader: block 000000ef69dcc01acb88d3d2d15db97db929c9bb9b2d2565edf0da6238ec5e49 is marked invalid

2022-08-04T21:42:12Z ThreadSocketHandler -- removing node: peer=780 nRefCount=1 fInbound=0 m_masternode_connection=0 m_masternode_iqr_connection=0

2022-08-04T21:42:16Z [ProcessBlock] h[774480] numCommitmentsRequired[0] numCommitmentsInNewBlock[0]

2022-08-04T21:42:16Z ERROR: ConnectBlock(DASH): coinbase pays too much at height 774480 (actual=5801475949 vs limit=1801475949), exceeded block reward, no triggered superblock detected

2022-08-04T21:42:16Z InvalidChainFound: invalid block=000000ef69dcc01acb88d3d2d15db97db929c9bb9b2d2565edf0da6238ec5e49  height=774480  log2_work=57.31213626  date=2022-08-04T18:58:50Z

2022-08-04T21:42:16Z InvalidChainFound:  current best=000000a7fd08856e8310d8e64e37a4eeb305003db475c282a89a6f1b8bd47faa  height=774479  log2_work=57.31213626  date=2022-08-04T18:57:49Z

2022-08-04T21:42:16Z ERROR: ConnectTip: ConnectBlock 000000ef69dcc01acb88d3d2d15db97db929c9bb9b2d2565edf0da6238ec5e49 failed, bad-cb-amount (code 16)

2022-08-04T21:42:16Z InvalidChainFound: invalid block=000000ef69dcc01acb88d3d2d15db97db929c9bb9b2d2565edf0da6238ec5e49  height=774480  log2_work=57.31213626  date=2022-08-04T18:58:50Z

2022-08-04T21:42:16Z InvalidChainFound:  current best=000000a7fd08856e8310d8e64e37a4eeb305003db475c282a89a6f1b8bd47faa  height=774479  log2_work=57.31213626  date=2022-08-04T18:57:49Z