-
Notifications
You must be signed in to change notification settings - Fork 0
basics publisher and peer nodes
HOME » CX » CX CHAINS » PUBLISHER AND PEER NODES
A CX chain works by using the Skycoin platform. In order to start broadcasting transactions and storing them on a blockchain, you need to have a publisher and a peer node. The publisher node is in charge of signing the blocks that are being created on the blockchain, while the peer node has the purpose of receiving the transactions and running them against the current program state of a CX chain.
In order to start a publisher node, the --publisher
flag needs to be given to the cx
command. For example:
cx --publisher --genesis-address $GENESIS_ADDRESS \
--genesis-signature $GENESIS_SIGNATURE \
--secret-key $SECRET_KEY \
--public-key $PUBLIC_KEY
In the case of a peer node, the --peer
flag is given to the cx
command. For example:
cx --peer --genesis-address $GENESIS_ADDRESS \
--port 6001 \
--genesis-signature $GENESIS_SIGNATURE \
--public-key $PUBLIC_KEY
The data directory for the publisher node is stored at $HOME/.cxcoin
, while the data directory for the peer node is stored at tmp/6001
. This will be changed in the future, as the peer node's data will be deleted every time the server storing the data directory is rebooted.
Note that if a new CX chain (a different blockchain code) needs to be created, the data directory of the peer node is required to be manually deleted (for example, by running the command rm -r /tmp/6001
).
Roadmap
Changelog
Get Started
Intro
Windows 10
macOS
*nix
Examples
Basics
Intro
Blockchain Code (BC)
Transaction code (TC)
Merging BC and TC
Coin Templates
Genesis Address and Genesis Private and Public Keys
fiber.toml Configuration File
Initializing a CX Chain
Publisher and Peer Nodes
Wallet
Testing and Injecting Transactions
Tutorials
Open Source Projects
Apps
Games
Others