From a131c902605bebe5eb2d94bb5282c2ce6f29f2fd Mon Sep 17 00:00:00 2001 From: Tyera Eulberg Date: Wed, 20 Feb 2019 17:15:27 -0700 Subject: [PATCH] Add doc for api node --- book/src/SUMMARY.md | 1 + book/src/api-node.md | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 book/src/api-node.md diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index da7d3ef5d3..034c1ebe8c 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -24,6 +24,7 @@ - [The Runtime](runtime.md) - [API Reference](api-reference.md) + - [API Node](api-node.md) - [JSON RPC API](jsonrpc-api.md) - [JavaScript API](javascript-api.md) - [solana-wallet CLI](wallet.md) diff --git a/book/src/api-node.md b/book/src/api-node.md new file mode 100644 index 0000000000..c2cf0a64f5 --- /dev/null +++ b/book/src/api-node.md @@ -0,0 +1,37 @@ +# API Node + +Solana supports a fullnode type called an *api node*. This node type is intended +for applications that need to observe the data plane, without participating in +transaction validation or ledger replication. + +An api node runs without a vote signer, and can optionally stream ledger entries +out to a Unix domain socket as they are processed. The JSON-RPC service still +functions as on any other node. + +To run an api node, include the argument `no-signer` and (optional) +`entry-stream` socket location: + +```bash +$ ./multinode-demo/fullnode-x.sh --no-signer --entry-stream +``` + +The stream will output a series of JSON objects: +- An Entry event JSON object is sent when each ledger entry is processed, with +the following fields: + + * `dt`, the system datetime, as RFC3339-formatted string + * `t`, the event type, always "entry" + * `s`, the slot height, as unsigned 64-bit integer + * `h`, the tick height, as unsigned 64-bit integer + * `entry`, the entry, as JSON object + + +- A Block event JSON object is sent when a block is complete, with the +following fields: + + * `dt`, the system datetime, as RFC3339-formatted string + * `t`, the event type, always "block" + * `s`, the slot height, as unsigned 64-bit integer + * `h`, the tick height, as unsigned 64-bit integer + * `l`, the slot leader id, as base-58 encoded string + * `id`, the block id, as base-58 encoded string