Running a Matrixchain Node
This guide will walk you through the process of setting up a Matrixchain node on the Enjin network.
There are two different ways in which you can a Node, the first one being through Docker, and the second one through a Binary (either precompiled or Built from Source).
You can use the following
docker-compose.yml
file:1
services:
2
matrixchain:
3
container_name: matrxichain
4
image: enjin/matrixchain:latest
5
ports:
6
- 9933:9933
7
- 9615:9615
8
- 30333:30333
9
- 30334:30334
10
volumes:
11
- /MY/LOCAL/DIRECTORY:/chainstate
12
command: [
13
"--name=enjin-matrix-docker",
14
"--rpc-external",
15
"--rpc-cors=all",
16
"--chain=mainnet",
17
"--base-path=/chainstate",
18
"--",
19
"--name=enjin-matrix-docker",
20
"--port=30334",
21
"--chain=enjin",
22
"--base-path=/chainstate"
23
]
Simply run the command
docker-compose up -d
to run the container.1
$ ./matrix --name "enjin-matrix-docker" --rpc-external --chain mainnet \
2
-- --name="enjin-matrix-docker" --port 30334 --chain enjin
Depending on the use case, there are a couple of ways to connect to the node:
- WebSocket Connection:
ws://localhost:9933
- HTTP Connection:
http://localhost:9933
The following changes pertain to running an Archive Node.
In order to run an archive node, the following argument needs to be passed to either the binary or added to the command section of the
docker-compose.yml
file:--state-pruning archive
--blocks-pruning archive
These two arguments should be appended after line 19 in the
docker-compose.yml
file, or just before the backslash (\
) on line 1 (end of line) of the Binary execution command.Last modified 22d ago