frequencychain/standalone-node

By frequencychain

Updated 13 days ago

Image
0

10K+

frequencychain/standalone-node repository overview

Frequency Collator Node in Local Only Sealing Mode

Runs just one collator node that will not connect to any other nodes. Defaults to running in instant sealing mode where a block will be triggered when a transaction enters the validated transaction pool. A "collator node" is a Frequency parachain node that is actively collating (aka forming blocks to submit to the relay chain, although in this case without a relay chain).

Quick Run
docker run --rm -p 9944:9944 frequencychain/standalone-node:<version.tag>

Trigger Block Manually

If running in manual sealing mode or to form empty blocks in instant sealing mode, the engine_createBlock RPC can be used:

curl http://localhost:9944 -H "Content-Type:application/json;charset=utf-8" -d   '{ \
    "jsonrpc":"2.0", \
    "id":1, \
    "method":"engine_createBlock", \
    "params": [true, true] \
    }'

Default Arguments

ArgumentDescription
--devSpecify the development chain. This flag sets --chain=dev, --force-authoring, --rpc-cors=all, --alice, and --tmp flags, unless explicitly overridden
-lruntime=debugSets a the custom logging filter for the 'runtime' target to 'debug'. Syntax is <target>=<level>, e.g. -lsync=debug. Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log info. The global log level can be set with -l<level>
--no-telemetryDisable connecting to the Substrate telemetry server. Telemetry is on by default on global chains
--no-prometheusDo not expose a Prometheus exporter endpoint. Prometheus metric endpoint is enabled by default
--rpc-port=9944Specify JSON-RPC server TCP port
--rpc-externalListen to all RPC interfaces. Default is local. Note: not all RPC methods are safe to be exposed publicly. Use an RPC proxy server to filter out dangerous methods. More details: https://docs.substrate.io/main-docs/build/custom-rpc/#public-rpcs. Use --unsafe-rpc-external to suppress the warning if you understand the risks
--rpc-cors=allSpecify browser Origins allowed to access the HTTP & WS RPC servers. A comma-separated list of origins (protocol://domain or special null value). Value of all will disable origin validation. Default is to allow localhost and https://polkadot.js.org origins. When running in --dev mode the default is to allow all origins
--rpc-methods=UnsafeRPC methods to expose
--base-path=/dataSpecify custom base path
--sealing=instantManual sealing + automatically form a block each time a transaction enters the validated transaction pool
Run

Note: Docker --rm removes the volume when stopped.

docker run --rm -p 9944:9944 frequencychain/standalone-node:<version.tag>

Environment Variables

The following environment variables are supported by this image. The same behavior may be requested by overriding the command line arguments in the CMD of the container; however, certain use cases (GitHub Actions) do not support overriding CMD when instantiating a container-based service in a workflow. In such a case, injecting these environment variables is a viable workaround.

Environmnet VariablePossible ValuesDescription
SEALING_MODEinstant, interval, manualOverrides --sealing=SEALING_MODE
SEALING_INTERVALinteger > 0Adds --sealing-interval=SEALING_INTERVAL. The sealing interval in seconds (in interval sealing mode)
CREATE_EMPTY_BLOCKStrueAdd --sealing-create-empty-blocks. Create empty blocks in interval sealing modes

Overriding Arguments

ArgumentDescription
--sealing=manualOnly form a block when engine_createBlock RPC is called
--helpSee all the options possible
Run
docker run --rm -p 9944:9944 frequencychain/standalone-node:<version.tag> -- --manual-seal
NodePortsExplorer URL
Frequency Local-Only Nodews and rpc :9944127.0.0.1:9944

Tag summary

Content type

Image

Digest

sha256:27f7b3ded

Size

124.7 MB

Last updated

13 days ago

Requires Docker Desktop 4.37.1 or later.