Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork39
The official (self-hosted) server for RGB
License
RGB-WG/rgb-node
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This repository contains the following crates:
rgb-node
: main indexing daemon, which can be used as an embedded multi-thread service,or compiled into a standalone binary (rgbd
);rgb-client
: client to work with the daemon and a command-line utilityrgb-cli
;rgb-rpc
: a shared crate betweenrgb-node
andrgb-client
.
The node operates as a set of threads, communicating through Crossbeam channels.It leveragesmicroservices.rs
andnetservices.rs
crates,which serves as the node non-blocking reactor-based (seeio-reactor
) microservice frameworks.
The node daemon has the following components:
- Broker, integrating all services and managing their communications;
- Dispatcher: reactor-based thread managing incoming client RPC connections;
- Contracts reader, performing read-only ultra-fast access to the contracts and their state;
- Contracts writer, performing operations on contracts which require persistence;
- Watcher, connecting BP Node and monitoring on-chain and mempool events;
- Validator: a worker thread pool, doing consignment validation in background;
- AsyncDispatcher, used in embedded mode (see below).
All read operations can be performed in parallel;the write operation does not block read operationsbut requires exclusive access to the contract (meaning that all writes to the same contract areperformed serially).
RGB Node can be run in two modes:as a standalone server and as a multithreaded service embedded into some other process.
The mode is turned on usingserver
feature flag and leads to production ofrgbd
executable.The binary can be run as a daemon and accessed via binary RGB RPC interface.The use of the RPC API can be simplified throughrgb-client
crate, providing high-level API.
By default, the node exposes a binary RPC API over TCP, which can be exposed as more high-level APIs(HTTP REST, Websocket-based, or JSON-RPC) using special adaptor services.
The mode is turned on usingembedded
feature flag and leads to production ofrgbnode
library.To run RGB Node inside any app in this mode please callBroker::start_embedded
,giving in the method arguments a configuration and instantiated persistence provider.The method returnsBroker
instance; callBroker::client
to receive anAsyncClient
which canbe used to process all calls to the node.
NB: Do not forget to join theBroker
thread from the main app by callingBroker::run
method.
The project currently supports Linux, macOS, and UNIX.Windows support is a work-in-progress, requiring downstreamio-reactor
framework changes.
About
The official (self-hosted) server for RGB
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.