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

Installation instructions needs to mention protobuf as a requirement #198

Open
zealsham opened this issue Aug 22, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@zealsham
Copy link

Describe the bug
when trying to build sim-cli , i ran into an issue where the build process panicked because i did not have the protoc binary installed on my device

failed to run custom build command for cln-grpc v0.1.6

Caused by:
  process didn't exit successfully: /Users/shammah/sim-ln/target/release/build/cln-grpc-a808399b7e9d80ba/build-script-build (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=proto/node.proto
  cargo:rerun-if-changed=proto

  --- stderr
  thread 'main' panicked at /Users/shammah/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prost-build-0.11.9/src/lib.rs:1457:10:
  Could not find protoc installation and this build crate cannot proceed without
      this knowledge. If protoc is installed and this crate had trouble finding
      it, you can set the PROTOC environment variable with the specific path to your
      installed protoc binary.You could try running brew install protobuf or downloading it from https://github.com/protocolbuffers/protobuf/releases

  For more information: https://docs.rs/prost-build/#sourcing-protoc

  note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile sim-cli v0.1.0 (/Users/shammah/sim-ln/sim-cli), intermediate artifacts can be found at /Users/shammah/sim-ln/target.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

it would ease the installation process if the installation instructions mentions something like , "make sure protobuf is installed on your device "

i can push a Pr if you sim-ln devs agree with this suggestion

@zealsham zealsham added the bug Something isn't working label Aug 22, 2024
@carlaKC
Copy link
Contributor

carlaKC commented Aug 22, 2024

A PR with instructions would be great, thank you!

@zealsham
Copy link
Author

so i went on a mission to install sim-ln on linux , windows and macos for this task . However on m1 mac i'm running into an issue that i spent a couple of days trying to resolve and i could not .

After starting a local network with Polar and running sim-cli with a test configuration , i get the following error

[hyper::client::client] Connection is HTTP/1, but request requires HTTP/2
Error: Get info error: status: Unknown, message: "request has unsupported HTTP version", details: [], metadata: MetadataMap { headers: {} }

which implies i am sending a HTTP/1 connection instead of HTTP/2 which LND supports over it's REST interface . what could be the cause of this . is there a way to force only HTTP/2 connection from sim-cli ?

@zealsham
Copy link
Author

i also want to add that i am able to query LND rest interface using curl with no problem

curl -k --header "Grpc-Metadata-macaroon: $(xxd -ps -u -c 1000 /Ulnd/alice/data/chain/bitcoin/regtest/admin.macaroon)" \
--cacert /networks/1/volumes/lnd/alice/tls.cert \
https://127.0.0.1:8081/v1/getinfo

which i proxied via burp suite and confirmed that even though i'm using htpp/1.1 , the request goes through as expected

@carlaKC
Copy link
Contributor

carlaKC commented Aug 29, 2024

which implies i am sending a HTTP/1 connection instead of HTTP/2 which LND supports over it's REST interface . what could be the cause of this . is there a way to force only HTTP/2 connection from sim-cli ?

Sim-ln uses grpc to connect to LND, so you'll need to point it to ther rpcserver port not the rest one 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants