Git Product home page Git Product logo

Comments (8)

guggero avatar guggero commented on May 26, 2024 1

Thanks for the report. It looks like we indeed forgot to set the master fingerprint in some situations on newly derived addresses. Was able to reproduce and fix locally with #8630.
Can you confirm please?

from lnd.

kaloudis avatar kaloudis commented on May 26, 2024

The XFP (master fingerprint) is now being added correctly. Thanks Oli!

We have another issue now though. It seems that we're hitting a mismatch on the pubkey.

Pubkey 0303b42b33356ebae804c43c2910666d5b6a4c141e86f501d4a8d597a27a91b796 != the result of (m=C13E4B30)/84'/0'/0'/1/5

PSBT in question:

70736274ff01007102000000015f7c578981c72aebfea5cd39148a848be4b2bbe581187c39ed126f6ddd8f60fa0100000000000000000203d90000000000001600140ef9e657df381ddd8c71b3cbfa76b78d5368d48e22b6050000000000160014d0c7156f33486fc049854c1caeb446763fb67d7a00000000000100c1010000000001016b7692499078aacba6c029c5ba089404a8cb46d4df85c1a0e3de35f6500c63cd0100000000ffffffff02d7dc4400000000002251205588e6c257b89bde1bebc4e4320392a5348d1c808c11d014b22e55b48d172507b28f0600000000001600148aff8603cf6622766b1edbbea353a288fe0b1a4b01408d07be32cf8c695523d16d3bc92edde84a8fa58e6cf827cd984defdcc934a06ae5cd33df868d55ac61ca0e1e1e0dc447831afa882a0d2d8d9845186edcdf37880000000001011fb28f0600000000001600148aff8603cf6622766b1edbbea353a288fe0b1a4b010304010000002206035c870f82a14908e4576d4fa190a46190bdb22370b4d660eda8694902a7c036ba18c13e4b305400008000000080000000800000000000000000000022020303b42b33356ebae804c43c2910666d5b6a4c141e86f501d4a8d597a27a91b79618c13e4b30540000800000008000000080010000000500000000

from lnd.

kaloudis avatar kaloudis commented on May 26, 2024

It seems we also have an incorrect path for the input of 0h/0h/0/0 instead of 1h/0h/0/0 - testnet path not being taken into account here?

from lnd.

guggero avatar guggero commented on May 26, 2024

Ah, I know what this is... Unfortunately, the btcwallet doesn't use the coin type for testnet/regtest/signet at all for the default address types (BIP-44, 49, 84, 86), only for the lnd internal keys (purpose 1017').
Can you test if this works correctly when you derive the watch-only account from m/84'/0'/0' directly? Or does the cold card then complain about wanting testnet?

from lnd.

kaloudis avatar kaloudis commented on May 26, 2024

Ah, I know what this is... Unfortunately, the btcwallet doesn't use the coin type for testnet/regtest/signet at all for the default address types (BIP-44, 49, 84, 86), only for the lnd internal keys (purpose 1017'). Can you test if this works correctly when you derive the watch-only account from m/84'/0'/0' directly? Or does the cold card then complain about wanting testnet?

I think it needs to be in testnet mode, otherwise the addresses are calculated incorrectly.

Seems like we need to fix the derivation path used when importing tpubs via the ImportAccount API? Derivation path still shows as m/84'/0'/0' with a tpub

I will try to do some testing on mainnet to see if the issue persists there

from lnd.

kaloudis avatar kaloudis commented on May 26, 2024

Hitting the same issue when using a testnet seed with Seedsigner.

from lnd.

guggero avatar guggero commented on May 26, 2024

Yeah, it probably won't work with any hardware wallet, since btcwallet internally uses the wrong derivation path for testnet. Did you try on mainnet, since you gave a tACK on the PR?
I don't think we can just fix the testnet derivation calculation in btcwallet without also breaking a lot of other things on testnet...

from lnd.

kaloudis avatar kaloudis commented on May 26, 2024

No problem on mainnet! I have tested it and was able to sign with the hardware wallet.

I created a separate issue to track the testnet derivation path issue: #8645

from lnd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.