<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Research on Performance Optimization of Alliance Chain Based on Caching Technology</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Xianke Zhou</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ziqiang Zhou</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Junlin Zhou</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Xin Sun</string-name>
          <email>sun_xin@zj.sgcc.com.cn</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Qingyi Huang</string-name>
          <email>qyhuang@zjuici.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Shuang Hu</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>College of Electrical Engineering Zhejiang University</institution>
          ,
          <addr-line>Hangzhou, China, 310027</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Institute of Computing Innovation, Zhejiang University</institution>
          ,
          <addr-line>Hangzhou, China, 310008</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>State Grid Zhejiang Electric Power Company Electric Power Research Institute</institution>
          ,
          <addr-line>Hangzhou, China, 310014</addr-line>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Zhejiang Huayun Clean Energy Co., Ltd.</institution>
          <addr-line>Hangzhou, China, 310008</addr-line>
        </aff>
      </contrib-group>
      <fpage>142</fpage>
      <lpage>148</lpage>
      <abstract>
        <p>Due to its decentralized, tamper proof and traceable characteristics, blockchain has become a research hotspot in academia, and has been applied in government affairs, finance, supply chain, high elastic power grid and other fields. Blockchain technology realizes the safe storage of information and effectively reduces the trust cost of application systems. At the same time, blockchain also has problems such as poor performance and low efficiency, which affect the popularity of applications. In order to solve these problems, this paper proposes a cache optimization method for alliance chain based on the cache of signature information. The experimental results show that after optimization, the transaction delay is significantly shortened, and with the increase in the number of transactions, a relatively stable state can be maintained; The transaction throughput has been increased obviously to improving the performance of the blockchain system.</p>
      </abstract>
      <kwd-group>
        <kwd>1 alliance chains</kwd>
        <kwd>caching technology</kwd>
        <kwd>Fabric</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        In 2008, Satoshi Nakamoto first proposed the concept of blockchain in his paper [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and used
blockchain as the underlying technology to implement the digital currency Bitcoin. After the concept
of blockchain was proposed, it has gone through three main development stages [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ][
        <xref ref-type="bibr" rid="ref3">3</xref>
        ][
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. At present,
the development of blockchain technology is in stage 3.0, where blockchain technology starts to
combine with industry applications to provide decentralized solutions for different industries and
change the application scenarios of many industries with the help of its unique trust mechanism. The
application scenarios of blockchain have been expanded to finance, electronic depository, copyright
management and trading, product traceability, digital asset trading, supply chain, highly resilient power
grid, and many other fields. Olivares-Rojas et al [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] proposed a blockchain-based identity authentication
scheme for smart meters to ensure the integrity and validity of transaction data; Tsao Y C et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
proposed a blockchain-based energy trading mechanism to solve a sustainable microgrid design
problem.
      </p>
      <p>
        Blockchain technology has features such as decentralization, de-trust, collective maintenance,
reliable database, programmable, and privacy computing [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], and blockchain technology is increasingly
used, still facing challenges such as performance issues. Currently, the throughput rate of the system,
whether it is a public chain or a alliance chain, still has a large gap compared with traditional software
systems. For example, Bitcoin can only process seven transactions per second (TPS), while Ethereum
has a throughput rate of over 200 TPS, and Hyperledger Fabric has a throughput rate of over 1000 TPS,
which is difficult to meet the needs of industrial-grade application scenarios [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. The traditional systems
Visa and MasterCard can process 1200 to 50000 TPS. The performance issue is the biggest obstacle
and challenge for blockchain development. Both academic and corporate communities have made great
efforts to improve blockchain performance. Javaid H. et al. [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] analyzed the verification structure of
fabric in detail and optimized the structure order of verification by parallelizing verification and
database reads, and parallelizing ledger reads and writes with historical data reads and writes, through
this scheme it is possible to achieve 1.3 times in the case of LevelDB as a state database throughput and
improve the throughput up to 2x with couchDB as the state database. Pissadaki E [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] et al.'s study used
lossy compression to reduce the communication cost of sharing state between Fabric backers and
verifiers when using blockchain to store intermediate results generated from the analysis of large
datasets. Dinh et al. [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] proposed a four-layer software stack and conducted experiments for each layer.
The authors also evaluate Fabric using two different workloads and compare Fabric with Ether and
Parity.
      </p>
      <p>In this paper, a signature caching optimization approach for alliance chains is proposed to improve
the performance.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
    </sec>
    <sec id="sec-3">
      <title>2.1 Hyperledger Fabric</title>
      <p>
        Fabric, a component of the open source Hyperledger project hosted by the Linux Foundation, is one
of the most active blockchain systems [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Fabric's blockchain network uses different types of nodes,
such as peer nodes, endorser nodes, sorting nodes, bookkeeping nodes, etc. Peer nodes are the
participating subjects in the blockchain decentralized network and are responsible for the execution
process of transactions, which are mainly divided into endorser nodes and bookkeeping nodes
(Committer) according to their functions, while all peer nodes are responsible for transaction
verification and data storage. Endorser nodes are mainly responsible for the pre-execution of
transactions in the endorsement stage, and provide endorsement signatures, and endorser nodes are
bound to specific chain codes; bookkeeping nodes are responsible for maintaining the state data and
ledger, receiving blocks sent from the sorting service, firstly verifying the validity of all transactions
inside the blocks, and also verifying whether all transaction endorsements comply with the endorsement
policy, and finally writing the blocks into the ledger and updating the state database. The ordering
service node, is responsible for sorting the transactions sent from each node and packaging them to
generate blocks, thus ensuring data consistency.
      </p>
      <p>The transaction process of Fabric differs from other blockchain systems in that it uses a three-stage
execution architecture, i.e., the “endorsement-sort-verify” architecture. In this architecture, nodes are
divided into two types of nodes: sequencing nodes and peer nodes [12]. The sorting node is responsible
for sorting the transaction, and the peer node is responsible for executing the transaction and
maintaining the book data and current state data. The transaction flow is divided into three phases: the
endorsement phase, the sorting phase and the verification phase. The details of the transaction are
described as follows:</p>
      <p>Step 1. The client sends a transaction proposal to the backing node.</p>
      <p>Step 2. The endorsing node verifies the signature and simulates the execution of the transaction.
Step 3. The endorsement node sends the endorsement signature to the SDK client.</p>
      <p>Step 4. The transaction request is constructed and submitted to the sorting service.</p>
      <p>Step 5. The sorting service packs the transactions to generate blocks and distributes them to peer
nodes.</p>
      <p>Step 6. The transaction is verified and submitted by peer node.</p>
      <p>Step 7. Event notification. An event is sent to notify the client that the data has been uploaded and
the transaction is valid or invalid.</p>
    </sec>
    <sec id="sec-4">
      <title>2.2 Caching Technology</title>
      <p>
        In computer systems, caching techniques are often thought of when transferring data in hardware
and software with large differences in read and write speeds. It replaces the medium of relatively low
access speed with the medium of high access speed [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>Caching techniques can be used in the following three roles: (1) performance improvement. The
corresponding data will be stored to avoid repeated creation, processing and transmission of data, can
effectively improve performance; (2) improve system stability. Caching techniques can reduce the
number of accesses to the database, reduce the burden on the database and improve the service
capability of the database; (3) improve system availability. The use of caching techniques can improve
system availability by providing normal support to end users for a certain period of time in the event of
unexpected service stoppages.</p>
    </sec>
    <sec id="sec-5">
      <title>3. Signature information caching</title>
      <p>From the transaction flow of fabric, the endorsing node will sign the result of the simulated
transaction and pack the endorsement signature into the transaction request, which will be verified by
the peer node in the transaction verification stage. Usually the endorsing node is also a kind of peer
node, that means the endorsing node also performs the verification step of the endorsing signature. This
paper proposes a signature caching solution that can effectively improve the blockchain performance.</p>
      <p>The execution endorsement phase of the endorsement node is optimized as the following steps as
shown in Figure 1.</p>
      <p>Step 1. Verify the validity of the transaction, including the integrity of the format, whether it is a
duplicate transaction, whether the signature is valid, and whether it has the right to perform the operation.</p>
      <p>Step 2. Adding the signature information to the signature global cache of the node if the validation
passes; returning an error if the validation fails.</p>
      <p>Step 3. Invoking the chain code to simulate the execution of a transaction.</p>
      <p>Step 4. Using its own private key to sign the transaction execution result to obtain the endorsement
signature.</p>
      <p>Step 5. Add the endorsement signature information to the node's signature global cache.</p>
      <p>Step 6. Package the endorsement signature information and the transaction execution result into an
endorsement response. And then send it to the client.
Step 1. Verify whether the transaction format is correct.</p>
      <p>Step 2. query the cache table to determine whether the transaction signature is in the global cache of
the peer node, and if the transaction signature exists, enter step 4.</p>
      <p>Step 3. Verify the transaction signature.</p>
      <p>Step 4. query the cache table to determine whether the transaction is endorsed by itself, and if it is a
transaction endorsed by itself, go to step 6.</p>
      <p>Step 5. Verify the endorsement information.</p>
      <p>Step 6. Check the version number in the read/write set.</p>
      <p>Step 7. Pass the verification, delete the signature cache information, and finish the verification phase.</p>
    </sec>
    <sec id="sec-6">
      <title>4. Test Analysis</title>
      <p>First, the asset transfer contract, which is commonly used in blockchain performance testing, is
selected for testing. Then, this section tests the impact of signature cache based on the analysis above.
Finally, the performance of the system in comparison with that in the unoptimized state is analyzed and
relevant conclusions are drawn.</p>
    </sec>
    <sec id="sec-7">
      <title>4.1 Test Environment</title>
      <p>This paper chose to use the Hyperledger Caliper tool to better analyze the performance of blockchain
networks. Caliper is a blockchain benchmarking framework that allows users to measure the
performance of a specific blockchain through a set of predefined of use cases to measure the
performance of a particular blockchain. In total, three scenarios are tested, i.e., optimized signature
cache, optimized commit cache, and two types of caches. The testing process is divided into two
scenarios, namely, optimizing the signature cache, and before optimization state. Table 1 lists the
environment configuration information.</p>
    </sec>
    <sec id="sec-8">
      <title>4.2 Analysis of results</title>
      <p>In this paper, the signature caching schemes are tested and analyzed to assess its overall influence
to blockchain performance.</p>
      <p>Signature caching aims to solve the problem of repeated signature verification by caching signature
information and reducing unnecessary signature verification processes, thus improving the performance
of the blockchain.</p>
      <p>(1) Analysis of transaction response latency</p>
      <p>In this paper, we set 100 transactions per block, repeat 10 times, and take the average of 10 tests as
the experimental results. The experimental results are shown in Figure 3, where the transaction latency
is taken for different total number of transactions. The experiments show that the optimized signature
cache can effectively reduce the latency in the same situation, and the latency is also effectively curbed
as the number of transactions increases.</p>
      <p>10
s
\m8
lya 6
e
d 4
e
im2
T 0</p>
      <p>10 20 30 40</p>
      <p>Number of transactions/thousands
Before optimization</p>
      <p>10 20 30 40
Number of transactions/thousands
5. references
[12] Raman R K, Vaculin R, Hind M, et al. "Trusted multi-party computation and verifiable simulations:
A scalable blockchain approach." arXiv preprint arXiv:1809.08438 (2018).
doi:10.1109/bloc.2019.8751387.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Nakamoto</surname>
            <given-names>S.</given-names>
          </string-name>
          <article-title>"Bitcoin: A peer-to-peer electronic cash system." Decentralized Business Review (</article-title>
          <year>2008</year>
          ):
          <fpage>21260</fpage>
          . doi:
          <volume>10</volume>
          .2139/ssrn.3977007.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Wang</surname>
            <given-names>X</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            <given-names>C</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhou</surname>
            <given-names>K</given-names>
          </string-name>
          , et al.
          <article-title>"Ess: An efficient storage scheme for improving the scalability of bitcoin network." IEEE Transactions on Network and Service Management (</article-title>
          <year>2021</year>
          ). doi:
          <volume>10</volume>
          .1109/TNSM.
          <year>2021</year>
          .
          <volume>3127187</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Wood</surname>
            <given-names>G.</given-names>
          </string-name>
          <article-title>Ethereum: a secure decentralised generalised transaction ledger</article-title>
          .
          <source>Ethereum project yellow paper151</source>
          .
          <year>2014</year>
          (
          <year>2014</year>
          ):
          <fpage>1</fpage>
          -
          <lpage>32</lpage>
          . URL: http://gavwood.com/paper.pdf.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Asif</surname>
            <given-names>M</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aziz</surname>
            <given-names>Z</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bin Ahmad</surname>
            <given-names>M</given-names>
          </string-name>
          , et al.
          <article-title>"Blockchain-Based Authentication and Trust Management Mechanism for Smart Cities</article-title>
          .
          <source>" Sensors 22.7</source>
          (
          <year>2022</year>
          ):
          <fpage>2604</fpage>
          . doi:
          <volume>10</volume>
          .3390/s22072604.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Olivares-Rojas</surname>
          </string-name>
          J C,
          <string-name>
            <surname>Reyes-Archundia</surname>
            <given-names>E</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gutiérrez-Gnecchi J A</surname>
          </string-name>
          , et al.
          <article-title>"A transactive energy model for smart metering systems using blockchain."</article-title>
          <source>CSEE Journal of Power and Energy Systems 7.5</source>
          (
          <year>2021</year>
          ):
          <fpage>943</fpage>
          -
          <lpage>953</lpage>
          . doi:
          <volume>10</volume>
          .17775/CSEEJPES.
          <year>2020</year>
          .
          <volume>05670</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Tsao</surname>
            <given-names>Y C</given-names>
          </string-name>
          ,
          <article-title>VV Thanh</article-title>
          .
          <article-title>Toward sustainable microgrids with blockchain technology-based peer-topeer energy trading mechanism: A fuzzy meta-heuristic approach</article-title>
          .
          <source>" Renewable and Sustainable Energy Reviews</source>
          <volume>136</volume>
          (
          <year>2021</year>
          ):
          <fpage>110452</fpage>
          . doi:
          <volume>10</volume>
          .1016/j.rser.
          <year>2020</year>
          .
          <volume>110452</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Kokoris-Kogias</surname>
            <given-names>E</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jovanovic</surname>
            <given-names>P</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gasser</surname>
            <given-names>L</given-names>
          </string-name>
          , et al.
          <article-title>"Omniledger: A secure, scale-out, decentralized ledger via sharding</article-title>
          .
          <article-title>" 2018 IEEE Symposium on Security and Privacy (SP)</article-title>
          . IEEE,
          <year>2018</year>
          . doi:
          <volume>10</volume>
          .1109/sp.
          <year>2018</year>
          .
          <volume>000</volume>
          -
          <fpage>5</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Javaid</surname>
            <given-names>H</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hu</surname>
            <given-names>C</given-names>
          </string-name>
          , Brebner G.
          <article-title>"Optimizing validation phase of hyperledger fabric</article-title>
          .
          <source>" 2019 IEEE 27th International Symposium on Modeling, Analysis, and Simulation of Computer and Telecommunication Systems (MASCOTS)</source>
          . IEEE,
          <year>2019</year>
          . doi:
          <volume>10</volume>
          .1109 /mascots.
          <year>2019</year>
          .
          <volume>00038</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Pissadaki</surname>
            <given-names>E</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Varshney</surname>
            <given-names>K R</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Raman R K</surname>
          </string-name>
          , et al.
          <article-title>Trusted Multi-Party Computation and Verifiable Simulations: A Scalable Blockchain Approach</article-title>
          .
          <year>2018</year>
          . doi:
          <volume>10</volume>
          .48550 /arXiv.
          <year>1809</year>
          .08438
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Dinh</surname>
            <given-names>T</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            <given-names>J</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            <given-names>G</given-names>
          </string-name>
          , et al.
          <article-title>BLOCKBENCH: A Framework for Analyzing Private Blockchains</article-title>
          .
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Androulaki</surname>
            <given-names>E</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barger</surname>
            <given-names>A</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bortnikov</surname>
            <given-names>V</given-names>
          </string-name>
          , et al.
          <article-title>"Hyperledger fabric: a distributed operating system for permissioned blockchains</article-title>
          .
          <source>" Proceedings of the thirteenth EuroSys conference</source>
          .
          <year>2018</year>
          . doi:
          <volume>10</volume>
          .1145/3190508. 3190538.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>