Author

Topic: Selected Wrong chaintip (Read 69 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
February 08, 2023, 05:24:19 AM
#2
But with "getchaintips" rpc I am getting two different chaintips

This is expected behavior since Bitcoin Core doesn't purge orphan/stale block, even when it only store the header. On Bitcoin testnet, Bitcoin Core even show far more chaintips.

I have a Litecoin node (0.16.3) started on Testnet.

My question is why the active chain is the chain with block 2391641 (second) instead of 2656160 (first).

This shouldn't happen since various LTC testnet explorer show 26XXXXX as latest block height[1-2]. I'm not familiar with LTC, but release note[3] on newer Litecoin Core shows there are few consensus and P2P change. You might want to update your node to latest version and see whether the problem persists.

P.S. don't forget to backup to your wallet file and optionally whole LTC testnet blockchain.

[1] https://chain.so/testnet/ltc
[2] https://blockexplorer.one/litecoin/testnet
[3] https://github.com/litecoin-project/litecoin/releases
newbie
Activity: 1
Merit: 3
February 08, 2023, 04:25:40 AM
#1
NOTE!! This Question and the results/test that are made was using litecoin node but I believe the technical part that causes "the problem" is the same as the Bitcoin Core

I have a Litecoin node (0.16.3) started on Testnet. Without any connection and addnode options started, When it got full synced as a last block its showing 2391641.
But with "getchaintips" rpc I am getting two different chaintips

Code:
[
  {
    "height": 2656160,
    "hash": "5b7ec12aa2c2e16028c0b6a85ec2b4644ab594b2d1aeaed4a2a596fae2173bc9",
    "branchlen": 395187,
    "status": "headers-only"
  },
  {
    "height": 2391641,
    "hash": "eaaf8d4d27c5ce9b282e9ff870793382e14345436fac74ea40907320e50603db",
    "branchlen": 0,
    "status": "active"
  }
]

My question is why the active chain is the chain with block 2391641 (second) instead of 2656160 (first).
My suggestions are something related to the core version and because mine version is old that is why I am connecting to this chain. Not sure about that.
With RPC "getpeerinfo" I am getting list of peers with different "startingheight" value (some of them 2656160 - and others 2391641).
The interesting is that
Code:
peers with "startingheight" - 2391641 have "version": 70015
peers with "startingheight" - 2656160 have "version" 70016

And Also what is the smartest way to make it connecting to the chain with tip 2656160 with some configurations or something else (accepting also changes in the core code) Thanks.
Jump to: