# Toward Blockchain-Enabled Supply Chain Anti-Counterfeiting and Traceability
## 3 Decentralizing with the Blockchain Technology
### Blockchain at the Core  
The decentralized architecture could bring more advantages to the existing centralized product anti-counterfeiting system, and an example could be decentralizing NAS utilizing blockchain technology. As described in the first Blockchain use case [18], Blockchain is a distributed ledger technology recording and sharing all the transactions that occur within a dedicated peer-to-peer network. It is essentially a decentralized timestamp service with a virtual machine to execute signed scripts that operates on signed data. It utilizes a distributed ledger to store scripts and data with mutual consensus reached among participating nodes running on the same blockchain network.  
The blockchain network consists of multiple nodes that maintain a set of shared states and perform transactions updating the states which could be divided into ledger state, block state, and transaction state as depicted in Figure 1. Blockchain transactions, as described in [19], need to go through the mining process. The transactions must be validated by the majority or agreed fraction among the participating network nodes, depending on which consensus protocol is adopted, before being ordered and packaged into a timestamped block which is also known as _block signing_.  
The blockchain network can be generally categorized either as permissionless (public network) or permissioned network. The former is an open distributed ledger network, such as in [18; 20], where any node can join the network and where any two peers can conduct transactions without any authentication performed by any central authority. The latter is a controlled distributed ledger (like in [21]) where the decision-making and validation process are kept to one organization or few organizations forming a consortium with or without the staking concept. In permissioned networks, the consortium administrator or certificate authority determines who can join the network as a validator node or listener node, if there is no logic of on-chain governance available. All nodes are authenticated in advance, and their identities are known to other nodes running on the same network and in the same consortium, at least to the administrator.  
The general blockchain data structure is demonstrated in Figure 2. The first block is always referred as the _genesis block_, and a block consists of a header and a body. The block body contains the list of transactions. The number of transactions that can fit into a block is dependent on the block size (block gas limit) and the transaction size (gas spent per transaction). The block header, as discussed in [22], contains a wide variety of fields,  
Figure 1: Block state with transactions flow.  
including timestamp, Merkle root hash representing the hash value of every transaction in the block, and the hash pointer of the previous block header for which different blocks are \"_chained_\" to each other by putting this field of hash for every next block. There are more fields, such as the nonce which is the 32-bit field incremented until the equation is solved and difficulty which is needed for the _Proof-of-Work (PoW)_ protocol. PoW is heavily linked with computation process known as _mining_, for which miners are the nodes to calculate the block header hash termed as \"_solving the puzzle_\". The differences between blockchains and databases are also explained in [23].  
Based on the Proof-of-Work consensus protocol, the block is said to be mined if a miner finds its nonce such that the hash of block header is less than the difficulty target, based on the work in [18]. Modern blockchain is also characterized into four main aspects, apart from being utilized merely as the distributed ledger: the self-executing smart contract, immutability, cryptography, and consensus.