Skip to main content

Set up RPC Nodes


Setup a RPC Node with Doric MainNet Simple Steps

Requirements

  • Docker Easy install using
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

Envoirments

  • NETWORKIDMAINET 1717
  • NODEPORT 30303
  • HTTPPORT 8546
  • WSPORT 8346

Using Docker

docker pull doricnetwork/doric-public-node-mainnet
docker run -e NETWORKIDMAINET 1717 -e NODEPORT 30303 -e HTTPPORT 8546 -e WSPORT 8346

That way you can access your browser and access the http://127.0.0.1:8546

Using Docker compose

version: "3.9"
services:
doric:
image: doricnetwork/doric-public-node-mainnet
ports:
- "30303:30303"
- "8546:8546"
- "8346:8346"
environment:
NETWORKIDMAINET: "1717"
NODEPORT: "30303"
HTTPPORT: "8546"
WSPORT: "8346"

Using Geth on linux

mkdir /start
cd /start && git clone https://github.com/ethereum/go-ethereum.git
cd /start/go-ethereum && make all && cd /start/go-ethereum/build/bin
cp -rf /start/go-ethereum/build/bin/* /start/utils

Create a file named {yourHome}/.ethereum/config.toml with this content

[Eth]
SyncMode = "full"
NetworkId = 1717

[Node]
DataDir = "/home"
IPCPath = "geth.ipc"

[Node.P2P]
NoDiscovery = false
StaticNodes = [
"enode://3fe170e9fe50f66ff3a53017398cbf43bf8e1529db4f9b97c9375142863296e5084543e3212a74e54d36a5784d6e14911ad6d8b179b5f34da7f39e9443e1d172@34.75.25.91:30303"
]

Create a file named {yourHome}/.ethereum/genesis.json with this content

{
"config": {
"chainId": 1717,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"clique": {
"period": 15,
"epoch": 30000
}
},
"nonce": "0x0",
"timestamp": "0x63403570",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000295e218feeae35d2e965d384486807108339b3bd4219fcdbee487b334b60a1001cd7439518c571f278bd5726ccffe0ad12be3014b7948f19a901a0cd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x47b760",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"6dc963b44db90411acf0a4ff2dfc0ce5d84a4b01": {
"balance": "0x000000000000000000000000000000000000000023AC12EF364587BF2000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"baseFeePerGas": null
}

Replace the envs with yours

/start/utils/geth init /root/.ethereum/genesis.json
/start/utils/geth --datadir=/root/.ethereum --config /root/.ethereum/config.toml --syncmode 'full' --networkid 1717 --nat extip:"$NODEIP" --port "$NODEPORT" \
--http --http.addr 0.0.0.0 --http.vhosts "*" --http.port "$HTTPPORT" --http.api debug,eth,net,txpool,personal,web3 \
--ws --ws.port "$WSPORT" --ws.addr 0.0.0.0 --ws.origins "*" --ws.api "web3, eth"