I understand what the usage is for submit block, but submit header exists in the RPC API reference. Is that a legacy function? Or can it still be used?
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
The `submitheader RPC checks the header against the candidate chain tip to check if it is valid(i.e has sufficient PoW).
Is that a legacy function? Or can it still be used?
This can still be used today. Its primary use in quickly checking if a certain header is valid without actually checking the entire block (compared to
submitblock). This is computationally much cheaper than checking the entire block which involves checking the double spends, transaction signature verification, Merkle root calculations etc.
For example, you can implement the chain sync logic using headers-first outside
bitcoind using this RPC. And according to the submitheaders PR, it was required for implementation of BetterHash protocol.