In order to connect to the
testnet be sure to use the following configuration:
# Start Forging
Do not reuse your delegate secret on different GNY Blockchain networks (
mainnet). Otherwise you will make yourself vulnerable to replay attacks.
In order to start forging you need to first register as delegate. Be sure to checkout our Guides on how to register as
delegate and how to create a random
In order to start forging please pass a secret or multiple secrets (comma separated) to the GNY Blockchain. This option is optional.
# one secret example export GNY_SECRET=enroll enroll enroll enroll enroll enroll enroll enroll enroll enroll enroll enroll # multiple secret example export GNY_SECRET=forum forum forum forum forum forum forum forum forum forum forum forum,enroll enroll enroll enroll enroll enroll enroll enroll enroll enroll enroll enroll
# Configure Public IP
The publicIp option is mandatory on the
testnet and on the
mainnet. If you don't set it then the node will automatically use its privateIp which which will make the p2p communication with other nodes not work.
public ip as argument:
- npm run start + npm run start -- --publicIP="184.108.40.206"
public ip as environment variable:
services: # db1 service omitted node1: # other keys omitted environment: + - GNY_PUBLIC_IP=220.127.116.11
After that the nodes own
public ip configuration should be checked with the HTTP API endpoint
/api/peers/info. This endpoint displays information about the own node!
# Configure P2P Secret
p2p secret keeps the connection between peers secure. This is option is mandatory.
p2p secret as environment variable:
export GNY_P2P_SECRET=<your p2p secret>
# Configure P2P Peers
p2p peers option says to which peer(s) (comma separated) we should connect in the network. This option is optional
p2p peers as environment variable:
# Configure DB Password
dbPassword option sets the password for the db to connect to.
dbPassword as environment variable:
# Configure DB Name
dbDatabase configures the database name to which the GNY Blockchain should connect to.
dbDatabase as environment variable:
# Configure DB User
dbUser sets the database user with which the GNY Blockchain should connect to.
dbUser as environment variable:
# Configure DB Host
dbHost sets the database host to which the GNY Blockchain should connect to.
dbHost as environment variable:
# Configure DB Port
dbPort sets the database port to which the GNY Blockchain should connect to.
dbPort as environment variable:
# All Environment Variable Options
# All available Options
Environment Variables: GNY_NETWORK=<network> Must be: localnet | testnet | mainnet GNY_PORT=<port> Listening port number GNY_LOG_LEVEL=<level> log|trace|debug|info|warn|error|fatal GNY_P2P_SECRET=<key> Private P2P Key (base64 encoded) - overrides p2p_key.json file GNY_SECRET=[secret...] comma separated secrets GNY_PUBLIC_IP=<ip> Public IP of own server, default private IP GNY_P2P_PEERS=[peers...] comma separated peers GNY_ADDRESS=<address> Listening host name or ip GNY_DB_PASSWORD=<password> db password GNY_DB_DATABASE=<database> db name GNY_DB_USER=<user> db user GNY_DB_HOST=<host> db host GNY_DB_PORT=<port> db port