Getting Started - zoobc/zoobc-core GitHub Wiki
Running A Node
The core node can be run by anyone that want to join the network, to run the core-node application the machine will need the following files configured:
core/
  zoobc [binary file]
  resource/
    config.toml
    node_keys.json
Configurations:
- 
resource/config.tomlConfiguration for the running node, the full description of the config file can be seen here
- 
resource/node_keys.jsonKey pair for the smithing node. (see smithing: here)
Node Created Files:
- 
resource/zoobc.db(default)On running the node, will be created containing the genesis block of mainchainand thespinechain.
- 
resource/snapshots/(default)This directory will be created if we are to join already long-running network to store the snapshotfiles.
Internal (wip: need better naming)
The core node application consists of two main components, the services and the jobs.
- 
ServicesThe core services are API that are open to the user, they are consists of: - 
Client APIThese are grpc endpoints that can be consumed by both wallet, explorer, or other client that want to post or get data to/from core node. Note: to accomodate the browser-based client, we open a separate proxy service usinggrpcwebproxy. ref:
- 
Node APIThese are grpc endpoints that are opened to other running nodeas a gateway to broadcast / receive data. ref:
 In total the core node opened 3 client consumeable ports, the grpc-client-api,proxy-client-apiand thenode-api.
- 
- 
JobsJobs are periodically running operations in the core node. - 
Block Creation [ Smithing ]The periodic operation ran to check if current node is elligible to generate block yet. - 
Mainchainrun-period = 500 ms content = Transaction, ReceiptThe main chain of the core node, block on this chain store transactionsposted by users andreceiptto accomodate Proof Of Participation- 
TransactionsTransactions are action that can be taken on the zoobc core node. They are separated into different kind of actions by Transaction Type. ref: Transaction Type
- 
ReceiptsReceipts are special object that can proof two nodes have communicated with each other (in form of block broadcast or transaction broadcast). ref: Receipt 
 When node is selected to generate block, it does the following things: - 
Fetch Transaction From MempoolNode will select few transactions that it wants to includeto the next block if exists from the Mempool, or generate Empty Block otherwise.
- 
Fetch Receipt From NodeReceiptNode will select sets of node receipts to be published to the network. The published receipt will later help the node to gain more Participation Score. 
 
- 
- 
Spinechainrun-period = 500 ms content = SpinePublicKeysA second chain run by zoobc core node. This chain act as a checkpointfor the mainchain, containingSpinePublicKeys- 
Spine Public KeysList of public keys from the node registry at spine block height. (todo: need @iltoga fill this) 
 
- 
 After blocks are persisted to the chain, it'll be broadcasted to its peer via Peer to Peer layer. ref: 
- 
- 
Blockchain SynchronizationBlockchain synchronization process consists of several operations: - 
Initial Block SynchronizationIt's a job that's run when the node initially started. It tries to synchronize the blockchain state of the network with it's peers so that the node can start smithing for blocks. More Info 
- 
Blockchain DownloadIt's a cron job that is performed every a sometime defined in the constant GetMoreBlocksDelay. It will request the state of blockchain of the node's peers and compare it with the node's blockchain state. If the node finds its state is lower it will apply the peer's blockchain state into his blockchain. More Info
- 
Process ForkThis process is a companion process to the Blockchain Download process. If the blocks downloaded conflicts with the current node's blockchain state, this process will try to resolve the blockchain state the node should have. More Info 
 
- 
- 
Data Prunedescrition 
 
-