namecoin / nmc-rpc-explorer

Database-free, self-hosted Namecoin explorer, via RPC to Namecoin Core.
https://bitcoinexplorer.org
MIT License
0 stars 1 forks source link

Identify parent chain #6

Open JeremyRand opened 2 years ago

JeremyRand commented 2 years ago

It is feasible to identify the parent chain for a sidechain block as follows:

  1. Check bits, timestamp, height, and previous hash of parent block.
  2. Look for match by querying potential parent chains (via Bitcoin Core RPC). There may not be an exact match since the parent chain might have re-orged. However, it will pretty much always be obvious which parent chain is the single close match.

We should do this in order to display the parent chain for each block.

JeremyRand commented 2 years ago

Blocked by https://github.com/namecoin/nmc-rpc-explorer/issues/3