Closed tzarebczan closed 5 years ago
This will become relevant with the upstream merge
For the Core upstream merge, please make sure that base58Prefixes[EXT_PUBLIC_KEY] and base58Prefixes[EXT_SECRET_KEY] in chainparams.cpp remains the same as what is used in Bitcoin, and not what is currently used in lbrycrd.
Torba uses the same prefixes as Bitcoin for mainnet,testnet, and regtest. See: https://github.com/lbryio/torba/blob/master/torba/coin/bitcoinsegwit.py (and here is Bitcoin chainparam: https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L132 )
I think fixing this in the current code base (without upstream merge) is unnecessary as those variables in chainparams is never used. However, the upstream merge will pull in features that will use those variables so please close this issue once we have the upstream PR in place and the above specified change is confirmed.
It's not only the extended keys that are different, but the pubkey and script prefixes are as well: https://github.com/lbryio/torba/blob/master/torba/coin/bitcoinsegwit.py#L65 . What are the ramifications of changing those on LBRYcrd?
Nevermind, Kay had linked the wrong torba params - here they are on lbrynet: https://github.com/lbryio/lbry/blob/master/lbrynet/extras/wallet/ledger.py#L35
So the prefixes do match lbrycrd, just the extended ones don't.
We should also ensure that the BIP44 constant for LBRY is used: https://github.com/satoshilabs/slips/blob/master/slip-0044.md
Edit: Nevermind, this is only required for multicurrency wallets.
This is done correctly in the now-current master. Closing.
See original discussion in https://github.com/lbryio/torba/issues/45. Since Torba matched lbryum and most users are on lbryum wallets, and lbrycrd doesn't use hd wallets yet, it makes sense to change this on LBRYcrd to match the light wallet.
@kaykurokawa agreed via chat: