Running a node

This document contains step-by-step instructions for running a geth node in MemeCore.

./geth account import --datadir ./nodes/node1 ./your/privateKey.txt

| Running Seed Node

A seed node is a network member that does not participate in the consensus process. This node can be used to interact with the MimNetwork, including: creating accounts, transferring funds, deploying and interacting with contracts, and querying node APIs.

Create the startSeed.sh file in the same folder of geth. You may need to change the P2P/HTTP/RPC/WS ports to avoid conflicts. Please note that the port configuration for the JSON-RPC interface should be set to httpport, not rpcport. Additionally, remember to change extip to your own IP address if you want other nodes to be able to find yours. You can refer to https://geth.ethereum.org/docs/fundamentals/command-line-options for more details about start options.

This script expects node DB directory to be ./node/node1.

Privnet:

#!/bin/bash

node="nodes/node1"

port=30301
httpport=8551
rpcport=8561
wsport=8571
extip=127.0.0.1

echo "$node and miner is $miner, rpc port $rpcport, p2p port $port"

nohup ./geth \
--networkid 2312251829 \
--nat extip:$extip \
--port $port \
--authrpc.port $rpcport \
--identity=$node \
--maxpeers=50 \
--syncmode full \
--gcmode archive \
--datadir $node \
--bootnodes "enode://83dfefac36bf84cc121462edc91c14b513488383b24a8030f57aea9b5d3318701a775a90ff9db177573a6dc87ab78cc9e84858fc570a353a21f705c5c40f5a05@127.0.0.1:30306" \
--http.api admin,eth,debug,miner,net,txpool,personal,web3 \
--http --http.addr 0.0.0.0 --http.port $httpport --http.vhosts "*" --http.corsdomain '*' \
--ws --ws.addr 0.0.0.0 --ws.port $wsport --ws.api eth,net,web3 --ws.origins '*'  \
--verbosity 3  >> $node/node.log 2>&1 &

sleep 3s;
ps -ef|grep geth|grep mine|grep -v grep;

Last updated