Giter Club home page Giter Club logo

Comments (35)

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024 2

@St333p Just published 4th alpha version of LNP Node, which is much improved comparing to the demo last week.

In first terminal (NB: no need to use git or download the code, it's already in Rust crate repository and all is done by cargo command):

cargo install lnp_node --vers 0.1.0-alpha.4 --all-features
lnpd -vvv

In second terminal:

lnpd -vvv -d /tmp

In third terminal:

$ lnp-cli help
FLAGS:
    -h, --help       Prints help information
    -v, --verbose    Set verbosity level
    -V, --version    Prints version information

OPTIONS:
    -n, --chain <chain>              Blockchain to use [env: LNP_NODE_NETWORK=] [default: signet]
    -c, --config <config>            Path to the configuration file [env: LNP_NODE_CONFIG=]
    -x, --ctl-socket <ctl-socket>    ZMQ socket name/address for daemon control interface [env:
                                     LNP_NODE_CTL_SOCKET=] [default:
                                     lnpz:{data_dir}/ctl.rpc?api=esb]
    -d, --data-dir <data-dir>        Data directory path [env: LNP_NODE_DATA_DIR=] [default:
                                     ~/.lnp_node]
    -m, --msg-socket <msg-socket>    ZMQ socket name/address to forward all incoming lightning
                                     messages [env: LNP_NODE_MSG_SOCKET=] [default:
                                     lnpz:{data_dir}/msg.rpc?api=esb]
    -T, --tor-proxy <tor-proxy>...      Use Tor [env: LNP_NODE_TOR_PROXY=]

SUBCOMMANDS:
    channels    Lists existing channels
    connect     Connect to the remote lightning network peer
    create      Create a new channel with the remote peer, which must be already connected
    funds       Lists all funds available for channel creation for given list of assets and
                provides information about funding points (bitcoin address or UTXO for RGB
                assets)
    help        Prints this message or the help of the given subcommand(s)
    info        General information about the running node
    invoice     Create an invoice
    listen      Bind to a socket and start listening for incoming LN peer connections
    pay         Pay the invoice
    peers       Lists existing peer connections
    ping        Ping remote peer (must be already connected)
    refill      Adds RGB assets to an existing channel

$ lnp-cli info
$ lnp-cli -d /tmp info
$ lnp-cli -d /tmp listen
$ lnp-cli connect <node_id_from_info>@127.0.0.1
$ lnp-cli info
$ lnp-cli connect <node_id_from_info>@127.0.0.1 100

from lnp-node.

St333p avatar St333p commented on July 23, 2024 2

That works as a charm.

However I still have issues with the default data directory: ./~/.lnp_node is created and the node crashes because it expects something inside the home directory. I will try to look into code and see if I can find out where this problem arises.

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024 1

Everything should work, I do not see a bug here. The order is this:

  1. We parse daemon-specific options (which include internally shared daemon options and key fileoptions):
    https://github.com/LNP-BP/lnp-node/blob/master/src/bin/lnpd.rs#L40-L43
  2. The process function first calls process function of the shared options:
    https://github.com/LNP-BP/lnp-node/blob/master/src/lnpd/opts.rs#L43-L46
  3. This shared options process makes sure that the dir exists
    https://github.com/LNP-BP/lnp-node/blob/master/src/opts.rs#L145-L146
  4. Then, daemon-specific options process key file options (dir must be already there b/c of the previous step!)
    https://github.com/LNP-BP/lnp-node/blob/master/src/lnpd/opts.rs#L43-L46
  5. This makes sure that ~ is expanded:
    https://github.com/LNP-BP/lnp-node/blob/master/src/peerd/opts.rs#L119-L121

I do nos see why happens what happens (and only on debian!)

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024 1

You are right! Can you propose a PR which will fix this?

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024 1

@zoedberg I think alpha versions upgrade to the latest alpha in their dependency on LNP/BP Core Library which may break builds. Will use = instead of ~ in dependency versioning in the future

from lnp-node.

Yiidiir avatar Yiidiir commented on July 23, 2024 1

This issue still persists for me @dr-orlovsky, I'm using docker.
I'm using lnp-cli 0.1.0-beta.3

When I do lnpd -vvvv -d /tmp the daemon is launched.
but when I try to execute lnp-cli info I get

lnp-cli: command-line tool for working with LNP node
ESB error: transport-level protocol error: service is offline or not responding

If I run lnpd -vvvv without the -d flag I get

lnpd: lightning node management microservice
[2021-03-14T02:42:32Z DEBUG lnpd] MSG RPC socket ipc:///var/lib/lnp/.lnp_node/msg.rpc
[2021-03-14T02:42:32Z DEBUG lnpd] CTL RPC socket ipc:///var/lib/lnp/.lnp_node/ctl.rpc
thread 'main' panicked at 'Unable to create key file '/var/lib/lnp/.lnp_node/key.dat'; please check that the path exists: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/peerd/opts.rs:139:61
stack backtrace:
   0: rust_begin_unwind
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
   1: core::panicking::panic_fmt
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:85
   2: core::option::expect_none_failed
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/option.rs:1221
   3: lnp_node::peerd::opts::KeyOpts::local_node
   4: lnpd::main

from lnp-node.

St333p avatar St333p commented on July 23, 2024 1

If you're using docker, then I don't understand why you manually launch lnpd. Using docker actually allows you to run each instance of lnpd in its own container. You should be able to get it working if you follow the demo writeup I created a while ago.

Anyways I'll try to help for what I can in the two issues you ran into:

first problem

When I do lnpd -vvvv -d /tmp the daemon is launched.
but when I try to execute lnp-cli info I get

lnp-cli: command-line tool for working with LNP node
ESB error: transport-level protocol error: service is offline or not responding

This happens because you are not pointing your cli to the right data folder, try with lnp-cli -d /tmp <command>. You can see that in the demo description I created bash aliases to avoid typing all that stuff all the time

second problem

If I run lnpd -vvvv without the -d flag I get

lnpd: lightning node management microservice
[2021-03-14T02:42:32Z DEBUG lnpd] MSG RPC socket ipc:///var/lib/lnp/.lnp_node/msg.rpc
[2021-03-14T02:42:32Z DEBUG lnpd] CTL RPC socket ipc:///var/lib/lnp/.lnp_node/ctl.rpc
thread 'main' panicked at 'Unable to create key file '/var/lib/lnp/.lnp_node/key.dat'; please check that the path exists: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/peerd/opts.rs:139:61
stack backtrace:
[...]

This indeed looks like the same bug for which I opened this issue and that should be solved since #23. What version of lnp-node (not lnp-cli) are you on?

from lnp-node.

Yiidiir avatar Yiidiir commented on July 23, 2024 1

Ok, so instead of docker, I'm trying to get this running using cargo on a ubuntu 18.04LTS VM.
I was able to solve build errors of other dependencies by installing dependencies like cmake and doing sudo apt-get upgrade, but now I'm getting this error message :

  Compiling lnpbp_derive v0.2.0
error[E0432]: unresolved import `syn::export`
  --> /home/userx/.cargo/registry/src/github.com-1ecc6299db9ec823/lnpbp_derive-0.2.0/src/lib.rs:26:10
   |
26 | use syn::export::{Span, ToTokens, TokenStream, TokenStream2};
   |          ^^^^^^ could not find `export` in `syn`
 
error: aborting due to previous error
 
For more information about this error, try `rustc --explain E0432`.
error: could not compile `lnpbp_derive`
 
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `lnp_node v0.1.0-beta.2`, intermediate artifacts can be found at `/tmp/cargo-installcDMlHz`
 
Caused by:
  build failed
 

I tried with both 0.1.0-beta.2 and 0.1.0-beta.3 with no luck.

When I tried building from source I get the following error:

 Compiling rgb-core v0.3.1
error[E0599]: no method named `strict_encode` found for struct `secp256k1zkp::SecretKey` in the current scope
   --> /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/rgb-core-0.3.1/src/contract/value.rs:255:17
    |
255 |                 strict_encode_list!(e; EncodingTag::U64, self.value, self.blinding),
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `secp256k1zkp::SecretKey`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify-3.2.0/src/strategy.rs:86:1
    |
86  | pub struct Holder<T, S>(T, PhantomData<S>);
    | ------------------------------------------- doesn't satisfy `_: strict_encoding::StrictEncode`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/grin_secp256k1zkp-0.7.10/src/key.rs:34:1
    |
34  | pub struct SecretKey(pub [u8; constants::SECRET_KEY_SIZE]);
    | -----------------------------------------------------------
    | |
    | doesn't satisfy `_: strict_encoding::StrictEncode`
    | doesn't satisfy `secp256k1zkp::SecretKey: strict_encoding::Strategy`
    |
    = note: the method `strict_encode` exists but the following trait bounds were not satisfied:
            `secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictEncode`
            `Holder<secp256k1zkp::SecretKey, _>: strict_encoding::StrictEncode`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictEncode`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no function or associated item named `strict_decode` found for struct `secp256k1zkp::SecretKey` in the current scope
   --> /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/rgb-core-0.3.1/src/contract/value.rs:266:47
    |
266 |                     blinding: BlindingFactor::strict_decode(&mut d)?,
    |                                               ^^^^^^^^^^^^^ function or associated item not found in `secp256k1zkp::SecretKey`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify-3.2.0/src/strategy.rs:86:1
    |
86  | pub struct Holder<T, S>(T, PhantomData<S>);
    | ------------------------------------------- doesn't satisfy `_: strict_encoding::StrictDecode`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/grin_secp256k1zkp-0.7.10/src/key.rs:34:1
    |
34  | pub struct SecretKey(pub [u8; constants::SECRET_KEY_SIZE]);
    | -----------------------------------------------------------
    | |
    | doesn't satisfy `_: strict_encoding::StrictDecode`
    | doesn't satisfy `secp256k1zkp::SecretKey: strict_encoding::Strategy`
    |
    = note: the method `strict_decode` exists but the following trait bounds were not satisfied:
            `secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `&secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `&secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<&secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `&secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `&mut secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `&mut secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<&mut secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `&mut secp256k1zkp::SecretKey: strict_encoding::StrictDecode`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
error: could not compile `rgb-core`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `lnp_node v0.1.0-beta.3 (/home/yidir/lnp-node)`, intermediate artifacts can be found at `/home/yidir/lnp-node/target`

Caused by:
  build failed

@dr-orlovsky @St333p @UkolovaOlga What are you guys using to develop right now? At this stage I can't even get lnp node to work :( Is the build unstable or I'm doing something very wrong here?

from lnp-node.

Yiidiir avatar Yiidiir commented on July 23, 2024 1

Thanks @rajarshimaitra

What ended working for me was running cargo run --bin lnp-cli that pulled the correct dependencies and built them. I did same for all other binaries that I wanted to build and seemed to work!

from lnp-node.

UkolovaOlga avatar UkolovaOlga commented on July 23, 2024 1

We can add a Troubleshooting section, where we'd point out the problem itself (even if without specifying the conditions) and possible mitigation paths.

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

You have to run lnpd first. Connectiond tries to connect to it and does not find.

However with the recent commits the story will be much simplified, so probably it work waiting four days before next release and make instructions after that

from lnp-node.

St333p avatar St333p commented on July 23, 2024

I didn't see that in the video, you had it running already?

So I'll wait for that, thanks!

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

Yes, it was there on separate terminal tabs, may be was too quick to show...

simply you need to run it with lnpd -vvvv adding -d /tmp for running the second instance, and then launch connectionds

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

Can you pls provide the exact command and crash logs?

Why you are using ./~/lnp_node when the default dir is ~/.lnp_node?

from lnp-node.

St333p avatar St333p commented on July 23, 2024

I'm not using it on purpose: if I run

lnpd

It creates a directory ./~/.lnp_node and it logs:

lnpd: lightning node management microservice
thread 'main' panicked at 'Unable to create key file '/home/step/.lnp_node/key.dat'; please check that the path exists: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/step/.cargo/registry/src/github.com-1ecc6299db9ec823/lnp_node-0.1.0-alpha.4/src/peerd/opts.rs:135:61
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

As if at creation, ~ was not resolved as $HOME for some reason

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

Very, very strange. What OS do you use? I tried it on MacOS and Ubuntu Linux and hadn't an issue...

orlovsky@x0runtu:~$ lnpd -vvv
lnpd: lightning node management microservice
[2020-11-01T19:23:13Z DEBUG lnpd] MSG RPC socket ipc:///home/orlovsky/.lnp_node/msg.rpc
[2020-11-01T19:23:13Z DEBUG lnpd] CTL RPC socket ipc:///home/orlovsky/.lnp_node/ctl.rpc

UPD: Can you try to do lnpd -vvvv with all four v flags and post its output here?

from lnp-node.

St333p avatar St333p commented on July 23, 2024
lnpd: lightning node management microservice
[2020-11-02T11:34:28Z DEBUG lnpd] MSG RPC socket ipc:///home/step/.lnp_node/msg.rpc
[2020-11-02T11:34:28Z DEBUG lnpd] CTL RPC socket ipc:///home/step/.lnp_node/ctl.rpc
thread 'main' panicked at 'Unable to create key file '/home/step/.lnp_node/key.dat'; please check that the path exists: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/step/.cargo/registry/src/github.com-1ecc6299db9ec823/lnp_node-0.1.0-alpha.4/src/peerd/opts.rs:135:61
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

the directory in my home is never created.
I'm on debian buster

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

Oh ok, the release build does not provide trace-level logs... I will try to debug myself on debian buster then...

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

Confirm the problem with the directory: it must exist. However on debian I do not have the problem with ~ expansion:

parallels@debian-gnu-linux-10-vm:~$ lnpd -vvvv
lnpd: lightning node management microservice
[2020-11-02T12:33:10Z DEBUG lnpd] MSG RPC socket ipc:///home/parallels/.lnp_node/msg.rpc
[2020-11-02T12:33:10Z DEBUG lnpd] CTL RPC socket ipc:///home/parallels/.lnp_node/ctl.rpc
thread 'main' panicked at 'Unable to create key file '/home/parallels/.lnp_node/key.dat'; please check that the path exists: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/parallels/.cargo/registry/src/github.com-1ecc6299db9ec823/lnp_node-0.1.0-alpha.4/src/peerd/opts.rs:135:61
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

parallels@debian-gnu-linux-10-vm:~$ mkdir ~/.lnp_node
parallels@debian-gnu-linux-10-vm:~$ lnpd -vvvv
lnpd: lightning node management microservice
[2020-11-02T12:39:26Z DEBUG lnpd] MSG RPC socket ipc:///home/parallels/.lnp_node/msg.rpc
[2020-11-02T12:39:26Z DEBUG lnpd] CTL RPC socket ipc:///home/parallels/.lnp_node/ctl.rpc
[2020-11-02T12:39:26Z INFO  lnpd] Local node id: 03b06d308927cadba30b15ecc5de9b3d346fcf0016ef543a05b9bc8d2122657b66
[2020-11-02T12:39:26Z DEBUG lnpd] Starting runtime ...
[2020-11-02T12:39:26Z DEBUG lnpbp_services::esb::controller] Creating ESB session for service MSG located at ipc:///home/parallels/.lnp_node/msg.rpc with identity 'lnpd'
[2020-11-02T12:39:26Z DEBUG lnpbp_services::esb::controller] Creating ESB session for service CTL located at ipc:///home/parallels/.lnp_node/ctl.rpc with identity 'lnpd'
[2020-11-02T12:39:26Z INFO  lnp_node::service] lnpd started
^C

Any ideas what could be the issue with ~?

from lnp-node.

St333p avatar St333p commented on July 23, 2024

fs::create_dir_all (the one at line 145 in src/opts.rs) seems not to resolve ~ (nor $HOME) as home directory, I tried it on a separate code snippet as well.

However, the official documentation says that it "corresponds to the mkdir function on Unix", and mkdir correctly handles ~.

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

Yes, it does not, this why I have this fn doing that manually: https://github.com/LNP-BP/lnp-node/blob/master/src/opts.rs#L160-L163

And I do ensure that the dir is got created: https://github.com/LNP-BP/lnp-node/blob/master/src/opts.rs#L145-L146

So I just need to make sure that the call order is correct

from lnp-node.

St333p avatar St333p commented on July 23, 2024

Inside Opts::process in here, process_dir is called after create_dir_all. The workflow is not yet completely clear to me, but I don't see where data_dir goes through process_dir before create_dir_all.

from lnp-node.

zoedberg avatar zoedberg commented on July 23, 2024

If it can help, I tried too and my results are:

  • building from v0.1.0-alpha.3 and running lnpd -vvvv:

    • the directory in $HOME/.lnp_node gets successfully created and the files (ctl.rpc and msg.rpc) get created there ✔️
    • an empty directory named ~ gets created in the project root ❌
  • building from v0.1.0-alpha.4 and running lnpd -vvvv:

    • the directory in $HOME/.lnp_node is not created and the app crashes ❌
    • an empty directory named ~ gets created in the project root ❌

these are the logs from the crash (same of @St333p):

lnpd: lightning node management microservice
[2020-11-02T15:45:09Z DEBUG lnpd] MSG RPC socket ipc:///home/zoe/.lnp_node/msg.rpc
[2020-11-02T15:45:09Z DEBUG lnpd] CTL RPC socket ipc:///home/zoe/.lnp_node/ctl.rpc
thread 'main' panicked at 'Unable to create key file '/home/zoe/.lnp_node/key.dat'; please check that the path exists: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/peerd/opts.rs:135:61
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Moreover I would like to make you notice that I'm not able to build from the v0.1.0-alpha.3 tag anymore (for my test I used the binary I built some days ago). Have there been any force-pushes somewhere?

from lnp-node.

Yiidiir avatar Yiidiir commented on July 23, 2024

@St333p Thanks!

I'm aware that the container has lnpd endpoint, I was trying to understand why the second problem happened.

I using an image I built, lnpd 0.1.0-beta.3 from the most recent code (2days ago).

  • Before running lnpd -vvvv -d /tmp: /tmp doesn't contain any files and /var/lib/lnp contains: ctl.rpc, key.dat, msg.rpc
  • After running lnpd -vvvv -d /tmp: /tmp contains: ctl.rpc, key.dat, msg.rpc
$ whoami
lbpd

Now if I run lnp-cli

lnp-cli info
lnp-cli: command-line tool for working with LNP node
ESB error: transport-level protocol error: service is offline or not responding
$ whoami
lbpd

If I run the same command from outside docker without opening the interactive shell:

docker exec lnp-node-1 lnp-cli info
lnp-cli: command-line tool for working with LNP node
thread 'main' panicked at 'Unable to access data directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/opts.rs:172:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
docker exec lnp-node-1 whoami
lbpd

If I go on and give it root access with -u 0:

docker exec -u 0 lnp-node-1 lnp-cli info
lnp-cli: command-line tool for working with LNP node
ESB error: transport-level protocol error: service is offline or not responding

if I run lnpd -vvvv I get:

$ lnpd -vvvv
lnpd: lightning node management microservice
thread 'main' panicked at 'Unable to access data directory: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/opts.rs:172:14
stack backtrace:
   0: rust_begin_unwind
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/std/src/panicking.rs:475
   1: core::panicking::panic_fmt
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/panicking.rs:85
   2: core::option::expect_none_failed
             at /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/option.rs:1221
   3: lnp_node::opts::Opts::process
   4: lnp_node::lnpd::opts::Opts::process
   5: lnpd::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
$ whoami
lbpd

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

@Yiidiir The problem is caused by a change introduced into one of upstream crates, which we do not control, and which breaks semver compatibility. Not much can be done to the past versions aside the fact that you have to use current master or v0.3 released some time ago (either from crates.io by cargo install lnp_node --all-features or using git tag v0.3.0

from lnp-node.

Yiidiir avatar Yiidiir commented on July 23, 2024

@dr-orlovsky I tried with cargo clean, even though it solved the first error, It still fails to build rgb with

Compiling rgb-core v0.3.1
error[E0599]: no method named `strict_encode` found for struct `secp256k1zkp::SecretKey` in the current scope
   --> /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/rgb-core-0.3.1/src/contract/value.rs:255:17
    |
255 |                 strict_encode_list!(e; EncodingTag::U64, self.value, self.blinding),
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `secp256k1zkp::SecretKey`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify-3.2.0/src/strategy.rs:86:1
    |
86  | pub struct Holder<T, S>(T, PhantomData<S>);
    | ------------------------------------------- doesn't satisfy `_: strict_encoding::StrictEncode`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/grin_secp256k1zkp-0.7.10/src/key.rs:34:1
    |
34  | pub struct SecretKey(pub [u8; constants::SECRET_KEY_SIZE]);
    | -----------------------------------------------------------
    | |
    | doesn't satisfy `_: strict_encoding::StrictEncode`
    | doesn't satisfy `secp256k1zkp::SecretKey: strict_encoding::Strategy`
    |
    = note: the method `strict_encode` exists but the following trait bounds were not satisfied:
            `secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictEncode`
            `Holder<secp256k1zkp::SecretKey, _>: strict_encoding::StrictEncode`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictEncode`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no function or associated item named `strict_decode` found for struct `secp256k1zkp::SecretKey` in the current scope
   --> /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/rgb-core-0.3.1/src/contract/value.rs:266:47
    |
266 |                     blinding: BlindingFactor::strict_decode(&mut d)?,
    |                                               ^^^^^^^^^^^^^ function or associated item not found in `secp256k1zkp::SecretKey`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify-3.2.0/src/strategy.rs:86:1
    |
86  | pub struct Holder<T, S>(T, PhantomData<S>);
    | ------------------------------------------- doesn't satisfy `_: strict_encoding::StrictDecode`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/grin_secp256k1zkp-0.7.10/src/key.rs:34:1
    |
34  | pub struct SecretKey(pub [u8; constants::SECRET_KEY_SIZE]);
    | -----------------------------------------------------------
    | |
    | doesn't satisfy `_: strict_encoding::StrictDecode`
    | doesn't satisfy `secp256k1zkp::SecretKey: strict_encoding::Strategy`
    |
    = note: the method `strict_decode` exists but the following trait bounds were not satisfied:
            `secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `&secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `&secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<&secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `&secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `&mut secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `&mut secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<&mut secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `&mut secp256k1zkp::SecretKey: strict_encoding::StrictDecode`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
error: could not compile `rgb-core`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `lnp_node v0.1.0-beta.3 (/home/yidir/lnp-node)`, intermediate artifacts can be found at `/home/yidir/lnp-node/target`

Caused by:
  build failed

I tried building the newest rgb_core 0.4.3 standalone with cargo install rgb-core --all-features it successfully built. When I tried to replace that version in Cargo.toml in order to build lnp-node, it led me to use 0.3.10 of internet2 that lack the features bitcoin-ext & derive which are required p, current version config so I'm stuck with the message

lnp_node depends on internet2 with features [...] but internet2 does not have those features.

Any thoughts @dr-orlovsky ? 🙏

from lnp-node.

rajarshimaitra avatar rajarshimaitra commented on July 23, 2024

@Yiidiir the same errors occurred for me while trying to build master.

I managed to build the master by downgrading internet2 to v0.3.6. I am not sure why these errors are occurring given these are not there in rgb-core v0.3.1 build. And these errors go away by downgrading the version of internet2 (at least in my local).

Try this and see if it works. Change version of internet2 to 0.3.6 in both dependencies and build-dependencies.

@dr-orlovsky it seems the lnp-node crate features are out of sync with internet2 available features in the latest version. Specially here

https://github.com/LNP-BP/lnp-node/blob/00a57cfbc1cd7867533302cece7972313639d6a3/Cargo.toml#L135

Update: After the first successful build, doing cargo clean and changing internet2 version back to 0.3.7 (or removing repo and re-cloning it) builds the current master successfully too. I am suspecting there is some weird caching happening with cargo somewhere. And once it builds correctly then its somehow retaining the build.

from lnp-node.

Yiidiir avatar Yiidiir commented on July 23, 2024

@rajarshimaitra Downgrading internet2 version didn't help. I'll try with a fresh Ubuntu VM. I tried with Ubuntu 18.04LTS and did sudo apt-get update, what ubuntu config did you try on? That might be helpful.

Failed with following error :

 no method named `strict_encode` found for struct `secp256k1zkp::SecretKey` in the current scope
   --> /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/rgb-core-0.3.1/src/contract/value.rs:255:17
    |
255 |                 strict_encode_list!(e; EncodingTag::U64, self.value, self.blinding),
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `secp256k1zkp::SecretKey`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify-3.2.0/src/strategy.rs:86:1
    |
86  | pub struct Holder<T, S>(T, PhantomData<S>);
    | ------------------------------------------- doesn't satisfy `_: strict_encoding::StrictEncode`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/grin_secp256k1zkp-0.7.10/src/key.rs:34:1
    |
34  | pub struct SecretKey(pub [u8; constants::SECRET_KEY_SIZE]);
    | -----------------------------------------------------------
    | |
    | doesn't satisfy `_: strict_encoding::StrictEncode`
    | doesn't satisfy `secp256k1zkp::SecretKey: strict_encoding::Strategy`
    |
    = note: the method `strict_encode` exists but the following trait bounds were not satisfied:
            `secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictEncode`
            `Holder<secp256k1zkp::SecretKey, _>: strict_encoding::StrictEncode`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictEncode`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no function or associated item named `strict_decode` found for struct `secp256k1zkp::SecretKey` in the current scope
   --> /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/rgb-core-0.3.1/src/contract/value.rs:266:47
    |
266 |                     blinding: BlindingFactor::strict_decode(&mut d)?,
    |                                               ^^^^^^^^^^^^^ function or associated item not found in `secp256k1zkp::SecretKey`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify-3.2.0/src/strategy.rs:86:1
    |
86  | pub struct Holder<T, S>(T, PhantomData<S>);
    | ------------------------------------------- doesn't satisfy `_: strict_encoding::StrictDecode`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/grin_secp256k1zkp-0.7.10/src/key.rs:34:1
    |
34  | pub struct SecretKey(pub [u8; constants::SECRET_KEY_SIZE]);
    | -----------------------------------------------------------
    | |
    | doesn't satisfy `_: strict_encoding::StrictDecode`
    | doesn't satisfy `secp256k1zkp::SecretKey: strict_encoding::Strategy`
    |
    = note: the method `strict_decode` exists but the following trait bounds were not satisfied:
            `secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `&secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `&secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<&secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `&secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `&mut secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `&mut secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<&mut secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `&mut secp256k1zkp::SecretKey: strict_encoding::StrictDecode`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
error: could not compile `rgb-core`

from lnp-node.

rajarshimaitra avatar rajarshimaitra commented on July 23, 2024
(base) raj@Desktop:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal

This is the same error that occurred to me before downgrading internet2. This probably needs some redoing of the Cargo.toml and will take some time to get it done as not the priority right now. lnp-node will go through a lot of upgrades too next month.

In the meantime, I can share the compiled binary with you for your trials if that helps.

from lnp-node.

Yiidiir avatar Yiidiir commented on July 23, 2024

Alright, I'll try with Ubuntu 20.04 LTS.
@rajarshimaitra If you can share the compiled binary that would be awesome 🤟

from lnp-node.

Yiidiir avatar Yiidiir commented on July 23, 2024

@rajarshimaitra I tried several times with a fresh Ubuntu 20.04LTS VM on Hyper-V, downgrading the internet2 version, rgb-core still fails to build with the same error. Changing rgb-core from v0.3 to v0.3.1 didn't help neither.

Error message:

Compiling rgb-core v0.3.1
error[E0599]: no method named `strict_encode` found for struct `secp256k1zkp::SecretKey` in the current scope
   --> /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/rgb-core-0.3.1/src/contract/value.rs:255:17
    |
255 |                 strict_encode_list!(e; EncodingTag::U64, self.value, self.blinding),
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `secp256k1zkp::SecretKey`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify-3.2.0/src/strategy.rs:86:1
    |
86  | pub struct Holder<T, S>(T, PhantomData<S>);
    | ------------------------------------------- doesn't satisfy `_: strict_encoding::StrictEncode`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/grin_secp256k1zkp-0.7.10/src/key.rs:34:1
    |
34  | pub struct SecretKey(pub [u8; constants::SECRET_KEY_SIZE]);
    | -----------------------------------------------------------
    | |
    | doesn't satisfy `_: strict_encoding::StrictEncode`
    | doesn't satisfy `secp256k1zkp::SecretKey: strict_encoding::Strategy`
    |
    = note: the method `strict_encode` exists but the following trait bounds were not satisfied:
            `secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictEncode`
            `Holder<secp256k1zkp::SecretKey, _>: strict_encoding::StrictEncode`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictEncode`
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0599]: no function or associated item named `strict_decode` found for struct `secp256k1zkp::SecretKey` in the current scope
   --> /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/rgb-core-0.3.1/src/contract/value.rs:266:47
    |
266 |                     blinding: BlindingFactor::strict_decode(&mut d)?,
    |                                               ^^^^^^^^^^^^^ function or associated item not found in `secp256k1zkp::SecretKey`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/amplify-3.2.0/src/strategy.rs:86:1
    |
86  | pub struct Holder<T, S>(T, PhantomData<S>);
    | ------------------------------------------- doesn't satisfy `_: strict_encoding::StrictDecode`
    | 
   ::: /home/yidir/.cargo/registry/src/github.com-1ecc6299db9ec823/grin_secp256k1zkp-0.7.10/src/key.rs:34:1
    |
34  | pub struct SecretKey(pub [u8; constants::SECRET_KEY_SIZE]);
    | -----------------------------------------------------------
    | |
    | doesn't satisfy `_: strict_encoding::StrictDecode`
    | doesn't satisfy `secp256k1zkp::SecretKey: strict_encoding::Strategy`
    |
    = note: the method `strict_decode` exists but the following trait bounds were not satisfied:
            `secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `&secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `&secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<&secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `&secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `&mut secp256k1zkp::SecretKey: strict_encoding::Strategy`
            which is required by `&mut secp256k1zkp::SecretKey: strict_encoding::StrictDecode`
            `Holder<&mut secp256k1zkp::SecretKey, _>: strict_encoding::StrictDecode`
            which is required by `&mut secp256k1zkp::SecretKey: strict_encoding::StrictDecode`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0599`.
error: could not compile `rgb-core`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `lnp_node v0.1.0-beta.3 (/home/yidir/lnp-node)`, intermediate artifacts can be found at `/home/yidir/lnp-node/target`

Caused by:
  build failed

from lnp-node.

rajarshimaitra avatar rajarshimaitra commented on July 23, 2024

@rajarshimaitra If you can share the compiled binary that would be awesome love_you_gesture

Cant attach them here as github doesn't support sharing binaries. If you are in the Telegram group, please ping me, I will share it over there. If you aren't then comment your mail id here.

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

This is absolutely crazy how unstable and non-derministic cargo dependency management is...

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

I assume since the reasons of the problem are unknown there is nothing we can put into README to prevent people from witnessing reporting the same issue over and over again?

from lnp-node.

dr-orlovsky avatar dr-orlovsky commented on July 23, 2024

We have new releases since the opening of this issue, so closing it in favor of new demo descriptions (which will be completely different since we've got internal wallet etc)

from lnp-node.

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.