Node

Running the Node

Running the node with docker

The easiest way to run a node is to use the Docker image.

For example, the following command will pull the Docker image, start the syncing process in the testnet (aries) environment, and expose the node's GraphQL API at http://0.0.0.0:4000/graphql:

docker run -p 4000:4000 freeverseio/livingassetsnode:v1.13.0 --network aries

On a Windows OS, the GraphQL API may be exposed at http://127.0.0.1:4000/graphql

One of the main command line options, --network, allows to select one of the two main pre-configured environments:

  • --network mainnet: (default) the production environment, running on Polygon's mainnet.

  • --network aries: the testnet environment, running on Polygon's Mumbai testnet; used for developing projects before primetime.

As usual with Docker, you may find it useful to use volumes in order to have persistent data, and avoid re-syncing from scratch after the node is restarted, e.g. by prepending docker run -v your_vol_name:/.livingassets.

Command line options

The following command line parameters may be used to override the default values:

ParameterDescription

--evm <url>

The URL of an EVM node that the Living Assets node will use to fetch the layer-1 data required to sync. By default, environments are set to use Polygon's public nodes. For increased speed and reliability, it is recommended to specify owned or hosted nodes.

--rpc

Exposes a JSON-RPC API on port :8546.

--skip_ipf_pinning

Avoids pinning the content in the ipfs node.

--storage <type>

The node's storage type, either memory or rocksdb (default).

--blocks_range <int>

The number of blocks fetched from the layer-1 node in one batch. Default value: 10000. Several Polygon node hosting services allow fetching events in larger batches; using larger values shall speed up sync, and potentially reduce costs.

--confirmations <int>

The number of blocks that must pass before a layer-1 TX is considered finalized by the Living Assets node. The default value (70 blocks) is set conservatively by considering previous Polygon re-orgs.

--datapath <path>

The local path where node's data is stored. Default value: $HOME/.livingassets.

--ipfs <url>

A URL to an ipfs node. The default (empty) value uses the embedded ipfs node.

--graphql <url>

The URL inside the docker image used to expose the node's GraphQL API. Default value: 0.0.0.0:4000. Combined with Docker's mapping command -p 4000:4000, it will expose the API at http://0.0.0.0:4000/graphql.

--la_contract_address <addr>

The Living Assets Ethereum-formatted contract address used for external JSON-RPC calls. Default values are set for each environment.

--debug

Activates debug logs.

--pprof

Activates a pprof profiling server running on :6060

--gas_fee_cap <int>

The gas fee cap (Wei) for layer-1 TXs. Default: 1200000000000 (1200 GWei).

Last updated

freeverse.io