You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To query for a Chain ID to represent or checksum a BIP122 reference, make a JSON-RPC request to the blockchain node with method getblockhash, for example:
[...]
The response will return as a result value the hash for the block with height 0 that should be sliced to its first 16 bytes (32 characters for base 16) to be compatible with the reference syntax defined above.
The chain ID of a chain is the block hash of the corresponding genesis block. For forked chains, it's the block hash of the first block after fork.
So querying the hash will typically give the height of the fork, not height 0. Also, this method typically will not return any height if the chain has block hashes that are not expressed as 32 hex digits (or its nodes do not have a getblockhash JSON-RPC method).
The text was updated successfully, but these errors were encountered:
https://namespaces.chainagnostic.org/bip122/caip2#resolution-method :
This is inconsistent with BIP 122 for forked chains:
So querying the hash will typically give the height of the fork, not height 0. Also, this method typically will not return any height if the chain has block hashes that are not expressed as 32 hex digits (or its nodes do not have a
getblockhash
JSON-RPC method).The text was updated successfully, but these errors were encountered: