0

How does it identify the addresses and transactions on the blockchain in order to rebuild the history of that wallet?

2

If by seed you are referring to a mnemonic phrase (12 or 24 words is common) then the process goes something like this:

  1. The phrase is hashed (or some other process) to produce random or pseudorandom bytes we will call the "seed"
  2. The byte array seed is passed into BIP32 HD master key algorithm to create a BIP32 master key.
  3. Following a standard like BIP44, the wallet then derives sub-keys sequentially in order. Checking for transaction history of each key's output.
  4. If left alone, this loop would last forever, so standards like BIP44 specify a "gap limit" which means that if gap limit = 20, then "If I generate 20 addresses in a row that all have 0 transactions in their history, I will stop checking addresses" For receiving paths, 20 seems common, for change paths 1 is standard.

Continue this loop until the gap limit is reached.

This type of methodology doesn't work for merchants or large exchanges, so the gap limit logic of "how far do we keep checking" may vary.

But most HD wallets rebuild themselves in this way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.