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

"Invalid address or key" when attempting to openchannel #6951

Closed
shocknet-justin opened this issue Sep 27, 2022 · 17 comments
Closed

"Invalid address or key" when attempting to openchannel #6951

shocknet-justin opened this issue Sep 27, 2022 · 17 comments

Comments

@shocknet-justin
Copy link

shocknet-justin commented Sep 27, 2022

Background

This is an upgraded 15.1 node with existing channels and chain balances, including pending force closes

Using a btcd direct backend that was upgraded to 22 as required

When attempting to open a channel, it fails with:

[lncli] rpc error: code = Unknown desc = -5: Invalid address or key: bc1p...

Same result with defaults or specifying anchors as chan type.

Addresses in error do not appear to be UTXO's in the chain wallet

Your environment

  • version of lnd: 15.1
  • which operating system (uname -a on *Nix) Ubuntu / 5.4.41-1
  • btcd22

Steps to reproduce

Production node balances on 15.1

Expected behaviour

Channel should open and show a txid

Actual behaviour

Complains about UTXO key

@shocknet-justin
Copy link
Author

Noticed that the "pending" force closes show a blocks till maturity as a negative number. Should be able to access those funds but can't... relevant?

@positiveblue
Copy link
Collaborator

lnd v0.15.1-beta needs to use a bitcoin node that supports taproot. In btcd that is v0.23.1-beta

@shocknet-justin
Copy link
Author

lnd v0.15.1-beta needs to use a bitcoin node that supports taproot. In btcd that is v0.23.1-beta

Updated to 22 which satisfied the nag, maybe it should it not have?

No binaries for 23 yet, will try building...

@positiveblue
Copy link
Collaborator

positiveblue commented Sep 27, 2022

Yes, it should have not started 👀

Did you build master or it really was v0.22.0-beta

Maybe with neutrino it skips this check 🤔

@guggero
Copy link
Collaborator

guggero commented Sep 27, 2022

I think because Neutrino only connects on the P2P layer and not through RPC the same check cannot be used. I guess we could parse the announced version in P2P but I don't think we currently do that.

@shocknet-justin
Copy link
Author

I had been running v20, but it nagged so I updated to v22 (tagged binary) and it satisfied it

Getting an updated Go to work is always an adventure, will report back if I ever manage to generate a btcd binary from master.

@shocknet-justin
Copy link
Author

Just realized I confused this node with another, it is NOT a neutrino back end... It uses btcd directly

@positiveblue
Copy link
Collaborator

positiveblue commented Sep 27, 2022

Just to clarify, v22 means btcd v0.22.0-beta, right?

Just to be sure that we are not talking about bitcoind, which went from bitcoind v0.21.1-beta to bitcoind v22.0-beta

@Roasbeef
Copy link
Member

Roasbeef commented Sep 27, 2022

You need to be using btcd v0.23.1.

@shocknet-justin
Copy link
Author

shocknet-justin commented Sep 27, 2022

Just to clarify, v22 means btcd v0.22.0-beta, right?

Just to be sure that we are not talking about bitcoind, which went from bitcoind v0.21.1-beta to bitcoind v22.0-beta

confirm btcd...

Getting to 23 is proving a challenge because it requires a newer glibc which means an OS upgrade... might be a bit to confirm.

This is the same neutrino instance powering the node with this issue, so likely related: #6938

Would be nice to have a workaround: #6922

@guggero
Copy link
Collaborator

guggero commented Sep 27, 2022

Getting to 23 is proving a challenge because it requires a newer glibc which means an OS upgrade... might be a bit to confirm.

What do you mean by "requires a newer glibc"? If you're talking about btcd, I don't think you need anything other than Golang to compile. Or are you compiling Golang from source as well?

@shocknet-justin
Copy link
Author

shocknet-justin commented Sep 27, 2022

Getting to 23 is proving a challenge because it requires a newer glibc which means an OS upgrade... might be a bit to confirm.

What do you mean by "requires a newer glibc"? If you're talking about btcd, I don't think you need anything other than Golang to compile. Or are you compiling Golang from source as well?

I got it compiled but it won't start. citing:

Sep 27 19:10:12 neutrino btcd[19214]: /root/btcd: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /root/btcd)
Sep 27 19:10:12 neutrino btcd[19214]: /root/btcd: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /root/btcd)

I actually installed the newer glibc in parallel but it doesn't detect it, might be a hard code within Go?

@guggero
Copy link
Collaborator

guggero commented Sep 27, 2022

Ah, that sounds like a cgo problem. Try disabling that with CGO_ENABLED=0 make build. See https://community.tmpdir.org/t/problem-with-go-binary-portability-lib-x86-64-linux-gnu-libc-so-6-version-glibc-2-32-not-found/123

@guggero
Copy link
Collaborator

guggero commented Sep 27, 2022

If the DNS issue mentioned in the link above becomes an issue, try adding GODEBUG="netdns=cgo" to your env as well.

@guggero
Copy link
Collaborator

guggero commented Sep 27, 2022

I created a PR to make this easier, see btcsuite/btcd#1890.
You basically want to run what's in release-install: env CGO_ENABLED=0 go install -v -trimpath -ldflags="-s -w -buildid=" github.com/btcsuite/btcd

@shocknet-justin
Copy link
Author

Awesome, got it built with CGO disabled...

Peer I was opening to is offline now of course... grabbing another...

@shocknet-justin
Copy link
Author

Was able to create a channel with 15.1 client, thank you very much @guggero for the extended support.

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

4 participants