Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

btcd / neutrino regtest does diff retargeting, but bitcoind does not #2255

Closed
buck54321 opened this issue Mar 25, 2023 · 5 comments
Closed

Comments

@buck54321
Copy link
Member

Bitcoin native SPV connects by default to the simnet harness alpha node. Yesterday afternoon, I created a new wallet and had zero peers. Restarting the client did not fix it. Restarting the harness did fix it. Left client running overnight. This morning I see a notification that the wallet has no peers again.

Nothing notable logged for the client.

Alpha node logs

2023-03-25T13:54:50Z connection from 127.0.0.1:46286 accepted
2023-03-25T13:54:50Z received: version (122 bytes) peer=3655
2023-03-25T13:54:50Z sending version (102 bytes) peer=3655
2023-03-25T13:54:50Z send version message: version 70016, blocks=5251, txrelay=1, peer=3655
2023-03-25T13:54:50Z sending wtxidrelay (0 bytes) peer=3655
2023-03-25T13:54:50Z sending sendaddrv2 (0 bytes) peer=3655
2023-03-25T13:54:50Z sending verack (0 bytes) peer=3655
2023-03-25T13:54:50Z receive version message: /btcwire:0.5.0/neutrino:0.12.0-beta/: version 70016, blocks=4031, us=127.0.0.1:20575, txrelay=0, peer=3655
2023-03-25T13:54:50Z received: sendaddrv2 (0 bytes) peer=3655
2023-03-25T13:54:50Z received: verack (0 bytes) peer=3655
2023-03-25T13:54:50Z sending sendheaders (0 bytes) peer=3655
2023-03-25T13:54:50Z sending sendcmpct (9 bytes) peer=3655
2023-03-25T13:54:50Z sending sendcmpct (9 bytes) peer=3655
2023-03-25T13:54:50Z sending ping (8 bytes) peer=3655
2023-03-25T13:54:50Z sending feefilter (8 bytes) peer=3655
2023-03-25T13:54:50Z received: pong (8 bytes) peer=3655
2023-03-25T13:54:50Z received: getheaders (741 bytes) peer=3655
2023-03-25T13:54:50Z getheaders 4032 to end from peer=3655
2023-03-25T13:54:50Z sending headers (98823 bytes) peer=3655
2023-03-25T13:54:50Z socket closed for peer=3655
2023-03-25T13:54:50Z disconnecting peer=3655

Log sequence repeats periodically. Connection is clearly made, information is exchanged apparently successfully. Then the connection is inexplicably dropped.

@chappjc
Copy link
Member

chappjc commented Mar 25, 2023

Nothing notable logged for the client.

How about neutrino.log?

@buck54321
Copy link
Member Author

Nothing notable logged for the client.

How about neutrino.log?

Bingo. Thanks. Still don't know how it would get to this state.

2023-03-25 09:24:24.928 [WRN] NTRNO: Header doesn't pass sanity check: block target difficulty of 7fffff0000000000000000000000000000000000000000000000000000000000 is higher than max of 1fffff0000000000000000000000000000000000000000000000000000000000 -- disconnecting peer
2023-03-25 09:24:24.929 [DBG] NTRNO: Removed peer 127.0.0.1:20575 (outbound)

@chappjc
Copy link
Member

chappjc commented Mar 25, 2023

Still don't know how it would get to this state.

No clue.
lightningnetwork/lnd#6938 (comment)
lightninglabs/neutrino#211

@chappjc
Copy link
Member

chappjc commented Mar 30, 2023

Based on the linked issues with ln, maybe not something we're doing wrong. Can close?

Can close when we update btcd dep with the following merged: lightninglabs/neutrino#256

@chappjc chappjc changed the title simnet bitcoin native spv wallet won't stay connected to alpha node btcd / neutrino regtest does diff retargeting, but bitcoind does not Jun 12, 2023
@chappjc
Copy link
Member

chappjc commented Jul 18, 2023

Update. btcd fix is merged, in btcsuite/btcd#1985. Then the neutrino fix that uses the newly exported btcd functions is in lightninglabs/neutrino#283, which looks to be almost ready to merge.
When that goes in, we can update both btcd and neutrino's requires to get this issue resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants