# On the Design and Implementation of a Blockchain-Based Data Management System for ETO Manufacturing
## 3 Blockchain network layer (BNL)
### Smart Contract Logic
10:return (all kinds of production information related to PID)
11:else
12:return (all kinds of production information related to PID)
13:else
14:return (all kinds of production information related to PID)
15:endif
```  
**Algorithm 9**Data querying algorithm  
```
1:Input:Identity information **auth**, production ID (**PID**)
2:Output:All production process related data for PID
3:Output:All production process related data for PID
4:if (auth==true)
5:ID (func==trace)
6:if (PID exists in the component ledger)
7:Obtain the product work order number through the obtained PID, which can further trace the product production process information. 8:return (all kinds of production information related to PID)
9:else
10

==WARNING: Truncated because of repetitions==
data of the semi-finished product processing department are uploaded to the blockchain as a test case. According to the execution process of the processing route in discrete workshops, the system packages the operation data of each production unit into transactions, and then uploads the transactions to the blockchain network to generate a new block. The generated transaction information and block information are shown in Figures 6 and 7, respectively. +++

### Performance Evaluation

The experiment uses the tool Tape to test the constructed Fabric network framework. The design department channel in BPDMS is taken as an example to test the network performance, including testing block generation time and transaction throughput. By

Figure 8: Data list of traceable products. Figure 7: Block information generated by channels in discrete workshops. setting 10 clients to connect to the node concurrently, and testing 24 groups of data with different transaction volumes, the number of transactions ranges from 50 to 1200, and each group is incremented by 50 transactions. It can be found that as the number of transactions increases, the transaction is completed; the time to generate blocks also gradually increases, and the transaction throughput value remains at a high level, of around 250. The test results are shown in Figure 9, and show that the BPDMS can support high query and write throughput. According to the structure of the BPDMS system, the data of a product include data of multiple departments, such as the sales department, design department, and production center. Moreover, the production center can also include semi-finished product discrete processing, product assembly, and product quality inspection. In the implementation on the Hyperledger Fabric platform, each role of the BPDMS system that generates partial data of the product corresponds to a specific channel. The performance of each channel in the BPDMS system is evaluated in an experimental way similar to the above design channel, including the accounting time and query delay of each channel. Accounting time (_Ta_) refers to the time from block generation to data synchronization of all nodes in the channel, and query delay (_Tq_) refers to the time from submitting query information to obtaining the returned result. The experimental results are shown in Table 2.

The sequential aggregate signature is used both in discrete production of semi-finished products and in the assembly of products. The execution time of the sequential aggregate signature algorithm used to verify product routing is tested. When the process route is only one node, the signature time is only 0.799 s. Then, as the complexity of the component process increases, the number of processing units that need to be processed, and the signature time, also increase. As shown in Figure 10, when the number of signed nodes exceeds one, the signature time is increased by 66 ms for each additional node. The test results show that the sequential aggregation signature algorithm has good execution efficiency and fully meets the requirements of information collection in the production process.