Networking in Libra Core

The network component in Libra Core provides peer-to-peer communication primitives to Consensus and Mempool. The network API has two interfaces:

  1. RPC, for remote procedure calls, and
  2. DirectSend, for fire-and-forget style message delivery.

These APIs are used for the dissemination of enqueued transactions, blocks, votes, etc.

Since Libra is currently a permissioned network, only authorized nodes are allowed to join the inter-validator network. Clients interact with the Libra blockchain through Admission Control.

Please see our full documentation and share your feedback.

12 Likes

Will there be any RESTFUL api that can be used to read or call the smart contract in the browser like the ones used by MetaMask to ETH or Scatter to EOS?

5 Likes

Hi, guys. Nice to see your project going public.
I tried to build it locally but got errors from Rust compiler:
error: failed to run custom build command for network v0.1.0 (/rust/libra/network)
Do you have any FAQ/resources on build process?

2 Likes

@strapione: Can you share a screenshot of your build error, please?

1 Like

1 Like

Hey, looks like you need the protobuf compiler in your $PATH. Did you run ./scripts/dev_setup.sh first? That should install protoc for you.

4 Likes

Thanks, Philip. You’re correct, lack of protobuf caused the problem.

2 Likes

Hey there,
Would it be not better to include the check of the dependencies before building the project ?
Thanks

JM

1 Like

Hi all. Looking at the source code, it seems that currently the Libra Core client doesn’t have a JSON RPC mode like bitcoind or geth. E.g., I cannot run it and then use curl to send HTTP GET/POST request to localhost instead of typing console commands. Am I correct?

1 Like

In my case i already ran the ./scripts/dev_setup.sh but it still gave the same error just as @strapione

1 Like

HI, Please could you help me on you got to fix it. Thanks.

1 Like

Do you have protobuf compiler installed?

protoc --version

1 Like

Had the same problem. My protobuf compiler version is 3.0.0
Untitled

1 Like

Screenshot%20from%202019-06-19%2023-06-33

1 Like

~/libra$ protoc --version
libprotoc 3.6.1

1 Like

@donpaul120, @wangchauyan: You can now use Docker to run the client. Check it out here.

1 Like

look at github.com issues.
there’s several cases.

  1. protoc install
    https://github.com/libra/libra/issues/105#issuecomment-503515422
  2. cargo tool chain install.
    https://github.com/libra/libra/issues/103#issuecomment-503834395
1 Like

Hey @abhay,

After upgrading protobuf to 3.7.1, I can successfully build the CLI.
Thank you.

3 Likes

Okay, fixed it after upgrading my protobuf… will however advice to use the docker version

1 Like