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

[bug]: Unable to run lnd 0.18.3rc2 with bitcoin core v28.0rc1 #9053

Closed
bufo24 opened this issue Sep 1, 2024 · 10 comments · Fixed by #9154
Closed

[bug]: Unable to run lnd 0.18.3rc2 with bitcoin core v28.0rc1 #9053

bufo24 opened this issue Sep 1, 2024 · 10 comments · Fixed by #9154
Labels
bug Unintended code behaviour regression
Milestone

Comments

@bufo24
Copy link
Contributor

bufo24 commented Sep 1, 2024

Background

I am getting an error after unlocking lnd:

Sep 01 16:32:46 bitcoin-mainnet lnd[423674]: 2024-09-01 16:32:46.792 [ERR] LTND: unable to create partial chain control: unable to determine if bitcoind is pruned: unable to detect bitcoind version: json: cannot unmarshal array into Go struct field GetNetworkInfoResult.warnings of type string
Sep 01 16:32:46 bitcoin-mainnet lnd[423674]: 2024-09-01 16:32:46.792 [ERR] LTND: Shutting down because error in main method: error creating wallet config: unable to create partial chain control: unable to determine if bitcoind is pruned: unable to detect bitcoind version: json: cannot unmarshal array into Go struct field GetNetworkInfoResult.warnings of type string

Your environment

  • lnd v0.18.3-beta.rc2
  • Linux 6.1.0-21-amd64 Debian 6.1.90-1 (2024-05-03) x86_64
  • Bitcoin v28.0rc1

Steps to reproduce

I upgraded bitcoin core from v27.0 to v28.0rc1, while lnd was still on v0.18.0, got the error as describe above. Then I upgraded lnd to v0.18.3rc2 and still got the same error.

Expected behaviour

LND should run with bitcoin core v28.0

Actual behaviour

LND cannot start using bitcoin core v28.0 as backend

@bufo24 bufo24 added bug Unintended code behaviour needs triage labels Sep 1, 2024
guggero added a commit to guggero/btcd that referenced this issue Sep 2, 2024
Fixes btcsuite#2224 and lightningnetwork/lnd#9053.

Depending on the version of Bitcoin Core, the "warnings" field in the
response to getnetworkinfo is either a single string value or an array
of strings.
We can easily parse those two variants with a custom type that
implements an UnmarshalJSON method.
@guggero
Copy link
Collaborator

guggero commented Sep 2, 2024

Thanks a lot for testing with the RC! This was broken by bitcoin/bitcoin#29845. I've created a fix here: btcsuite/btcd#2245.

guggero added a commit to guggero/btcd that referenced this issue Sep 2, 2024
Fixes btcsuite#2224 and lightningnetwork/lnd#9053.

Depending on the version of Bitcoin Core, the "warnings" field in the
response to getnetworkinfo is either a single string value or an array
of strings.
We can easily parse those two variants with a custom type that
implements an UnmarshalJSON method.
PaulKorepanow pushed a commit to midl-xyz/btcd that referenced this issue Sep 12, 2024
Fixes btcsuite#2224 and lightningnetwork/lnd#9053.

Depending on the version of Bitcoin Core, the "warnings" field in the
response to getnetworkinfo is either a single string value or an array
of strings.
We can easily parse those two variants with a custom type that
implements an UnmarshalJSON method.
btcfind pushed a commit to btcfind/btcd that referenced this issue Sep 26, 2024
Fixes btcsuite#2224 and lightningnetwork/lnd#9053.

Depending on the version of Bitcoin Core, the "warnings" field in the
response to getnetworkinfo is either a single string value or an array
of strings.
We can easily parse those two variants with a custom type that
implements an UnmarshalJSON method.
octobocto pushed a commit to barebitcoin/btcd that referenced this issue Sep 27, 2024
Fixes btcsuite#2224 and lightningnetwork/lnd#9053.

Depending on the version of Bitcoin Core, the "warnings" field in the
response to getnetworkinfo is either a single string value or an array
of strings.
We can easily parse those two variants with a custom type that
implements an UnmarshalJSON method.
@Sjors
Copy link

Sjors commented Oct 3, 2024

Please also open an issue on the Bitcoin Core when something like this happens... :-)

@Sjors
Copy link

Sjors commented Oct 3, 2024

I would be useful to know if the current Lnd master branch works now that barebitcoin/btcd#4 was merged (I don't see a new Lnd tag).

@ziggie1984
Copy link
Collaborator

We still need to bump the version of the btcd package so current master won't work.

@Sjors
Copy link

Sjors commented Oct 3, 2024

Bitcoin Core v28.0 will be released very soon(tm).

@twofaktor
Copy link
Contributor

Hello, will this fix be applied with LND v18.4 before Bitcoin Core v28 is released?

I still don't see any precompiled binaries for LND v18.4, but I do see precompiled binaries for Bitcoin Core v28....

@bufo24
Copy link
Contributor Author

bufo24 commented Oct 5, 2024

@twofaktor LND v0.18.4 isn't released yet.

@twofaktor
Copy link
Contributor

twofaktor commented Oct 5, 2024

@twofaktor LND v0.18.4 isn't released yet.

I know, and that worries me since it seems that Bitcoin Core v28 will be released earlier than LND v0.18.4, and LND v018.3 is not compatible with Bitcoin Core v28...

@orangeshyguy21
Copy link

+1 to this issue
Trying to run lnd v 0.18.3-beta with btc core v28.0 and getting the original thread error
chain set to testnet3

Have any temporary measures been found to overcome the fault?

@bufo24
Copy link
Contributor Author

bufo24 commented Oct 12, 2024

You have to enable the deprecated warnings rpc on bitcoin core using: -deprecatedrpc=warnings

kcalvinalvin pushed a commit to kcalvinalvin/btcd that referenced this issue Nov 29, 2024
Fixes btcsuite#2224 and lightningnetwork/lnd#9053.

Depending on the version of Bitcoin Core, the "warnings" field in the
response to getnetworkinfo is either a single string value or an array
of strings.
We can easily parse those two variants with a custom type that
implements an UnmarshalJSON method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended code behaviour regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants