100%

HCX Nodes

HCX Nodes

To list HCX in your exchange you can follow this link https://www.hashcashconsultants.com/developers-list-hcx-exchange. As you can call our own aurora API and build up your services to get HCX whatever we have discussed out there. You can build your own aurora api and host a HCX node. There are some benefits to running a node as listed below..

  • You can implement your own business logic and customization.
  • You have full control which data you want to keep.
  • You can create a trusted entry point to the network.

There are different types of nodes, you can host and connect our existing network. Node type defines your participation in the network.

Watcher Archiver Basic validator Full Validator
Submit Transaction Yes Yes Yes Yes
Supports Aurora Yes Yes Yes Yes
Participates in FBA No No Yes Yes
helps other nodes to catch up and join the network No Yes No Yes

First of all you need to build HcNet-core and aurora on your server. Please follow the link below to complete that.

After successfully completing the above steps, go to the HcNet-core folder and create a configuration file like HCNet-Core.cfg and use the below config file that depends on which type of node you would like to host.

After that use below commands to start up a node.

  • sudo ./HcNet-core --conf ../HCNet-Core.cfg new-db
  • sudo ./HcNet-core --conf ../HCNet-Core.cfg new-hist vs (where vs is the name of history)
  • sudo ./HcNet-core --conf ../HCNet-Core.cfg force-scp
  • sudo nohup ./HcNet-core --conf ../HCNet-Core.cfg run &
  • sudo ./HcNet-core --conf ../HCNet-Core.cfg http-command info

Note:-Do not run the 4th command if you host a watcher and archiver node. For basic validator and full validator use all five commands.

1.Watcher Node

1.Watcher Node:- Watcher nodes are configured to watch the activity from the network. Below is the configuration of Watcher Node. There is one operational requirement for a postgres database. You have to install it on your server.

  • HTTP_PORT=11627
  • PEER_PORT=11626
  • PUBLIC_HTTP_PORT=false
  • FAILURE_SAFETY=1
  • NETWORK_PASSPHRASE="HCX MainNet"
  • DATABASE="postgresql://dbname=postgres_database_name user=user_name password=db_password host=db_host"
  • NODE_NAMES=[
  • "GBGXWP54RCFB5LYLBHQC2MBFS5BYTAXMRK2ENTVAB2C7BIQ7FOQ4U6LP HcNode1",
  • "GDDF3QU7FHZSVJYKBTIWOGT7RG4LEWGD572UHGA44PAG7HXCNLTGBMVE HcNode2",
  • "GCCCWDPYOWKDWQ5PFJUKIBXUPCIWOA5EYPW5CK3IN5HR3BTJLI3PHXTS HcNode3"
  • ]
  • KNOWN_PEERS=[
  • "52.52.143.136:11627",
  • "52.52.143.136:11629",
  • "52.52.143.136:11631"
  • ]
  • [QUORUM_SET]
  • VALIDATORS=[
  • "$HcNode1", "$HcNode2", "$HcNode3"
  • ]
  • [HISTORY.vs1]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node1/{0} -o {1}"
  • [HISTORY.vs2]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node2/{0} -o {1}"
  • [HISTORY.vs3]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node3/{0} -o {1}"

2.Archiver Node

2.Archiver Node:-History Archive contains snapshots of the ledger, all transactions and their results. It is needed when you would join an existing network.

  • HTTP_PORT=11627
  • PEER_PORT=11626
  • PUBLIC_HTTP_PORT=false
  • FAILURE_SAFETY=1
  • CATCHUP_RECENT=100
  • NETWORK_PASSPHRASE="HCX MainNet"
  • DATABASE="postgresql://dbname=db_name user=db_user password=db_password host=localhost"
  • NODE_NAMES=[
  • "GBGXWP54RCFB5LYLBHQC2MBFS5BYTAXMRK2ENTVAB2C7BIQ7FOQ4U6LP HcNode1",
  • "GDDF3QU7FHZSVJYKBTIWOGT7RG4LEWGD572UHGA44PAG7HXCNLTGBMVE HcNode2",
  • "GCCCWDPYOWKDWQ5PFJUKIBXUPCIWOA5EYPW5CK3IN5HR3BTJLI3PHXTS HcNode3"
  • ]
  • KNOWN_PEERS=[
  • "52.52.143.136:11627",
  • "52.52.143.136:11629",
  • "52.52.143.136:11631"
  • ]
  • [QUORUM_SET]
  • VALIDATORS=[
  • "$HcNode1", "$HcNode2", "$HcNode3",
  • ]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node1/{0} -o {1}"
  • put="cp {0} /tmp/Node1/HcNet-core/history/vs/{1}" //It will keep the history in your local server
  • mkdir="mkdir -p /tmp/Node1/HcNet-core/history/vs/{0}" //It will create the folder
  • //If you would like to keep the history in AWS s3 bucket then you need to create one AWS s3 bucket and use the history archive as below
  • put="aws s3 cp {0} s3://your_bucket_url/{1}"
  • //Here all the history archives are going to store in your s3 bucket. It is cost effective.
  • [HISTORY.vs2]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node2/{0} -o {1}"
  • [HISTORY.vs3]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node3/{0} -o {1}"

3.Basic Validator

3.Basic Validator:-It participates in transaction validation but does not help others to join an existing network. Because it does not keep history.

  • HTTP_PORT=11627
  • PEER_PORT=11626
  • PUBLIC_HTTP_PORT=false
  • FAILURE_SAFETY=1
  • CATCHUP_RECENT=100
  • NODE_SEED="Your Secret Seed"
  • //To generate secret seed use below command
  • //Go to HcNet-core/src folder and type sudo ./HcNet-core gen-seed
  • NODE_IS_VALIDATOR=true,
  • NETWORK_PASSPHRASE="HCX MainNet"
  • DATABASE="postgresql://dbname=dbname user=dbuser password=dbpassword host=localhost"
  • NODE_NAMES=[
  • "GBGXWP54RCFB5LYLBHQC2MBFS5BYTAXMRK2ENTVAB2C7BIQ7FOQ4U6LP HcNode1",
  • "GDDF3QU7FHZSVJYKBTIWOGT7RG4LEWGD572UHGA44PAG7HXCNLTGBMVE HcNode2",
  • "GCCCWDPYOWKDWQ5PFJUKIBXUPCIWOA5EYPW5CK3IN5HR3BTJLI3PHXTS HcNode3",
  • ]
  • KNOWN_PEERS=[
  • "52.52.143.136:11627",
  • "52.52.143.136:11629",
  • "52.52.143.136:11631"
  • ]
  • [QUORUM_SET]
  • VALIDATORS=[
  • "$HcNode1", "$HcNode2", "$HcNode3"
  • ]
  • [HISTORY.vs1]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node1/{0} -o {1}"
  • [HISTORY.vs2]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node2/{0} -o {1}"
  • [HISTORY.vs3]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node3/{0} -o {1}"

4.Full Validator

4.Full Validator:-Nodes fully participating in the network..

  • HTTP_PORT=11626
  • PEER_PORT=11631
  • PUBLIC_HTTP_PORT=true
  • FAILURE_SAFETY=1
  • CATCHUP_RECENT=100
  • NODE_SEED="Your Secret Seed"
  • NODE_IS_VALIDATOR=true
  • NETWORK_PASSPHRASE="HCX MainNet"
  • DATABASE="postgresql://dbname=yourdbname user=dbuser password=dbpassword host=localhost"
  • NODE_NAMES=[
  • "GBGXWP54RCFB5LYLBHQC2MBFS5BYTAXMRK2ENTVAB2C7BIQ7FOQ4U6LP HcNode1",
  • "GDDF3QU7FHZSVJYKBTIWOGT7RG4LEWGD572UHGA44PAG7HXCNLTGBMVE HcNode2",
  • "GCCCWDPYOWKDWQ5PFJUKIBXUPCIWOA5EYPW5CK3IN5HR3BTJLI3PHXTS HcNode3"
  • ]
  • KNOWN_PEERS=[
  • "52.52.143.136:11627",
  • "52.52.143.136:11629",
  • "52.52.143.136:11631"
  • ]
  • [QUORUM_SET]
  • VALIDATORS=[
  • "$HcNode1", "$HcNode2", "$HcNode3"
  • ]
  • [HISTORY.vs1]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node1/{0} -o {1}"
  • put="cp {0} /tmp/Node1/HcNet-core/history/vs/{1}"
  • mkdir="mkdir -p /tmp/Node1/HcNet-core/history/vs/{0}" //Like this you can keep an archive for every history.(vs1,vs2,vs3)
  • archive for every history.(vs1,vs2,vs3)
  • [HISTORY.vs2]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node2/{0} -o {1}"
  • [HISTORY.vs3]
  • get="curl https://hc-netbucket.s3-us-west-1.amazonaws.com/Node3/{0} -o {1}"
+
Chat Now
Welcome to HashCash Support