Skip to content

Latest commit

 

History

History
197 lines (143 loc) · 20.1 KB

USAGE.md

File metadata and controls

197 lines (143 loc) · 20.1 KB

How this works

There are three parties in this setup: the anoma node, the anoma client, and a third party client. The Anoma client serves the purpose of taking in requests from the third party client and relaying them to an arbitrary Anoma node.

Your Client <---> Anoma Client <---> Anoma Node
                   Full API            Full API
                   + Prove
                   + RunNock

The API of the Anoma Client is the same as the one of the Anoma Node, save for the prove and runNock endpoints which allow clients to run Nock code.

Setup

Setting up the node

Start a node from the Elixir repl. These nodes are considered "ephemeral", meaning that you can create and destroy them as you please. Every time a node is started it's a clean slate.

~/Documents/Work/anoma  (testnet-01) % iex -S mix
Erlang/OTP 27 [erts-15.0] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Interactive Elixir (1.17.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> node = Anoma.Node.Examples.ENode.start_node()
%Anoma.Node.Examples.ENode{
  grpc_port: 58447,
  tcp_ports: [],
  pid: #PID<0.318.0>,
  node_id: "2615099"
}
iex(2)>

Not the grpc_port in the output. That is the GRPC port of the node.

Setting up the client

The client can be started in two different ways. Either from the Elixir repl, or via the binary.

From the REPL

An Anoma client can be started in the same repl that started the node. Note here that the client will listen for requests on port 50051.

~/Documents/Work/anoma  (testnet-01) % iex -S mix
Erlang/OTP 27 [erts-15.1.2] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]

Interactive Elixir (1.17.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> node = ENode.start_node(grpc_port: 0)
%Anoma.Node.Examples.ENode{
  grpc_port: 63796,
  tcp_ports: [],
  pid: #PID<0.345.0>,
  node_id: "62831092"
}
iex(3)> {:ok, client} = Anoma.Client.connect("localhost", node.grpc_port, 50051, node.node_id)
{:ok, %Anoma.Client{grpc_port: 50051, supervisor: #PID<0.396.0>, type: :grpc}}

Using a binary

You build the binary from within the root directory of the Anoma project.

~/Documents/Work/anoma  (testnet-01) % mix do --app anoma_client escript.build
==> anoma_client
Generated escript anoma_client with MIX_ENV=dev

The binary can be started if you know the hostname and port of the Anoma node (see above). Assuming the client has to listen for request on port 50051, it can be started with the following command from the root of the Anoma project.

~/Documents/Work/anoma  (testnet-01) % ./apps/anoma_client/anoma_client --listen-port 50051 --node-host localhost --node-port 63796 --node-id 62831092
Connected to node. Listening on port 50051

Note here that the --node-port is the value obtained from starting a node.

The tools for using GRPC

The client exposes a GRPC endpoint. There are multiple ways to make GRPC requests, and depending on how motivated you are, you can do one of the following.

A very quick explanation of GRPC

GRPC works around a single file called a protobuf. The proto file (apps/anoma_protobuf/priv/protobuf/anoma.proto) defines the structure and data types of messages to be sent and received by a client and GRPC endpoint. The contents of messages are serialized and deserialized for performance reasons. More info here: https://grpc.io/docs/what-is-grpc/introduction/

Postman

The author's favourite tool for this job is called Postman (https://www.postman.com/). To get started with Postman, look here: https://learning.postman.com/docs/sending-requests/grpc/first-grpc-request/

  • Create a new GRPC request.
  • Import the protobuf file from the Anoma repository.
  • Set the URL to localhost:50051
  • Pick any request from the list
  • Fill out the message (tip: click on "example message" to get scaffolding for a message)

GRPCurl

For those so inclined, grpcurl is a command-line tool to make GRPC requests. Instalation instructions can be found here: https://github.com/fullstorydev/grpcurl?tab=readme-ov-file#installation

Listing the root services

grpcurl -plaintext localhost:50051 list

results in the output below.

Anoma.Protobuf.IndexerService
Anoma.Protobuf.IntentsService
Anoma.Protobuf.NockService

Listing individual services

grpcurl -plaintext localhost:50051 list Anoma.Protobuf.IndexerService

results in the output below.

Anoma.Protobuf.IndexerService.ListNullifiers
Anoma.Protobuf.IndexerService.ListUnrevealedCommits
Anoma.Protobuf.IndexerService.ListUnspentResources

Making requests

List intents

grpcurl -plaintext localhost:50051 Anoma.Protobuf.IntentsService.ListIntents

results in the output below.

{}

Prove

A prove request contains a program, private inputs, and public inputs.

Each of these can be either a jammed Nock noun, or a plain-text representation of the Nock noun.

An example request with a jammed program, and a single jammed input looks as follows. The program below is squares its input.

{
  "jamm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DjYBsmQQbSwG4w5ouE31LCDkUl0qIGHJ3AOgzwINgjE78VBsGGoFwfBwm7IeWwwcHkORgHBodQfBvkwyCv8gmDDI8GLg2DDUA+CxWE3/CWy4VAYJEMG0YLyQbDB2GgZJEMG0cIenkM51MBBtLCDYEEyGB1+ODkYrDiHQT48gXMY5EG2hvZp44DXVsceWrIdBnmFXxBsmNfFYTcYBDsb9p8GyZBBtLALggXJwFgdisehHA5z2H86DPJhkAfZGtqnjQNeGBl5aMl2GOQVfkGwYV4Xh93wncWGoR52QbAgGZirQ/E4dLo+/EdyGORBtob2aeOAx0ZXHlqyHQZ54RcEGx4JXhx2Q0f9DXM6CDYM9SBYHHZBsCAZmKvDDyeDZMggWtgNz6EcflY51MANh8IgGTKIFpQPggXJoO/ww8nBCHY6vFp+eALnMMiDbA3t08YBjyzNPrRkOwzywi8INgz14rAbhGX5hjkdBBuGehAsDrtwG14RPfxgvuFQGCRDDq+WH57AOQzyIFtD+7RxwCMrGw8t2Q6DPPyCYMO8Lg67sBu+szjcNAu7IFgcdoNhPbRhqIdd2IVduA1DfTjYDjfNwi5IhgyiBfGCYEEyMFaHnMAgGTKIFvbwtsihBg6CDQYK1cHw3zgM8uE/ksNVc/iP5PAEzuE/ksNVcxjkQbaG9mnjgMdGhx5ash0GefgFwYZ5XRx2QbAgGZw6FI9Dp+vDTXMY5EG2hvZp44B3RoceWrIdBnnhFwQb5nVx2A0GLtPhpjkM8iBbQ/u0ccA7oysPLdkOg7zwC4INjwQvDruho/6GOR0EG4wjnkEyZBAt7IbqOfyGGjYINnxfMEiGDKKF3XCwDb+hhg2CBclAqA7F49Dp+lADDzXwMMiDbA3t08YBr+2NPLRkOwzy8AuCDfO6OOyGjvobjphBMmQQLewGY2NpEGwwVJYOF9hhkA+DPMjW0D5tHPDm6sRDS7bDIG+oYUE1Lg==",
  "private_inputs": [
    {
      "jammed": "aA=="
    }
  ],
  "public_inputs": []
}

This request invokes the Juvix program "Squared" with private input 3 and no public inputs. The request returns 9 as its result. Both values are base64 encoded jammed Nock nouns.

Proving with GRPCurl

Store the request from above into a file on disk, such as /tmp/my_input.

grpcurl -plaintext -d @ localhost:50051 Anoma.Protobuf.NockService/Prove < /tmp/my_input

results in the output below.

{
  "proof": "kAQ="
}