The rodeos_plugin provides a high performance storage engine and interface to run concurrent read-only queries against the blockchain state. The plugin incorporates all the functionality formerly provided by the rodeos binary and obviates the need for running a separate state_history_plugin to source the requisite data.
At startup the plugin resyncs with the latest copy of state from nodeos chainbase. The rodeos_plugin makes use of in-memory transfer of blockchain state from nodeos to the plugin at the end of production or relay of every block. Hence, the plugin itself does not need to maintain a durable copy of the latest state on disk between restarts.
The plugin provides a series of RPC endpoints to query data concurrently, enabling high performance queries of the blockchain state from micro services.
# config.ini
plugin = b1::rodeos_plugin
[options]
# command-line
nodeos ... --plugin b1::rodeos_plugin [options]
These end points can be used in a manner similar to the equivalent nodeos end points
/v1/chain/get_info
/v1/chain/get_block
/v1/chain/get_account
/v1/chain/get_abi
/v1/chain/get_raw_abi
/v1/chain/get_required_keys
/v1/chain/send_transaction
/v1/rodeos/create_checkpoint
These can be specified from the config.ini
file:
Config Options for b1::rodeos_plugin:
wql-threads (8)
Number of threads to process requests
wql-listen (=127.0.0.1:8880)
Endpoint to listen on
wql-unix-listen
Unix socket path to listen on
wql-retries (0xffff'ffff)
Number of times to retry binding to
wql-listen. Each retry is approx 1 second
apart. Set to 0 to prevent retries
wql-allow-origin
Access-Control-Allow-Origin header.
Use "*" to allow any
wql-contract-dir
Directory to fetch contracts from. These
override contracts on the chain.
(default: disabled)
wql-static-dir
Directory to serve static files from
(default: disabled)
wql-query-mem (33)
Maximum size of wasm memory (MiB)
wql-console-size (0)
Maximum size of console data
wql-wasm-cache-size (100)
Maximum number of compiled wasms to cache
wql-max-request-size (10000)
HTTP maximum request body size (bytes)
wql-idle-timeout
HTTP idle connection timeout (ms)
wql-exec-time (200)
Max query execution time (ms)
wql-checkpoint-dir
Directory to place checkpoints. Caution:
this allows anyone to create a checkpoint
using RPC (default: disabled)
wql-max-action-return-value
Max action return value size (bytes)