Improving Energy Efficiency of Permissioned Blockchains Using FPGAs Nathania Santoso Haris Javaid

2025-05-08 0 0 871.28KB 8 页 10玖币
侵权投诉
Improving Energy Efficiency of Permissioned
Blockchains Using FPGAs
Nathania Santoso Haris Javaid
AMD, Singapore
{nathania.santoso, haris.javaid}@amd.com
Abstract—Permissioned blockchains like Hyperledger Fabric
have become quite popular for implementation of enterprise
applications. Recent research has mainly focused on improving
performance of permissioned blockchains without any considera-
tion of their power/energy consumption. In this paper, we conduct
a comprehensive empirical study to understand energy efficiency
(throughput/energy) of validator peer in Hyperledger Fabric (a
major bottleneck node). We pick a number of optimizations
for validator peer from literature (allocated CPUs, software
block cache and FPGA based accelerator). First, we propose
a methodology to measure power/energy consumption of the two
resulting compute platforms (CPU-only and CPU+FPGA). Then,
we use our methodology to evaluate energy efficiency of a diverse
set of validator peer configurations, and present many useful
insights. With careful selection of software optimizations and
FPGA accelerator configuration, we improved energy efficiency
of validator peer by 10×compared to vanilla validator peer (i.e.,
energy-aware provisioning of validator peer can deliver 10×more
throughput while consuming the same amount of energy). In
absolute terms, this means 23,000 tx/s with power consumption of
118W from a validator peer using software block cache running
on a 4-core server with AMD/Xilinx Alveo U250 FPGA card.
Index Terms—Energy-efficient blockchains, Hyperledger Fab-
ric, FPGA accelerators
I. INTRODUCTION
Blockchain technology is on the rise due to its capability
of executing transactions (which contain business logic in the
form of smart contracts) and storing them in a decentralized
manner (same ledger distributed among multiple nodes). The
distributed ledger contains blocks where each block has a hash
value of itself and the previous block, assuring immutability
of the ledger data. Hence, a network of nodes that implement
a blockchain essentially provides an implementation of a
distributed ledger for applications that will be developed and
deployed on top of that blockchain. There are two types
of blockchains: public (permissionless) and private (permis-
sioned) blockchains. In a public blockchain, nodes do not
require identity authorization to participate in the network. On
the other hand, the identity of a node must be authenticated
cryptographically to execute transactions in a permissioned
blockchain. Bitcoin and Ethereum are examples of public
blockchains, while Hyperledger Fabric [1] is an example of
permissioned blockchain.
Hyperledger Fabric is one of the most popular permissioned
blockchains for enterprise applications [2]. Most of the recent
research on Fabric has only focused on improving its through-
put (transactions per second, shortened as tx/s), overlooking its
power and energy consumption. Sedlmeir et al. [3] estimated
that although a Fabric network consumed 8 orders of magni-
tude less energy than a public blockchain, it still consumed
10×more energy than a centralized system. Furthermore,
Fabric nodes are often deployed in datacenters where energy
consumption has become an issue due to environmental and
climate change concerns. Therefore, there is a need to explore
energy efficiency of Fabric nodes. Previous works [4]–[6] have
shown that validator peer node (which runs the validation
of blocks and transactions before committing them to the
ledger) is one of the major bottlenecks. It is a computationally
intensive operation, and thus utilizes significant resources
which will result in high power and energy consumption in
the Fabric network.
In this paper, we propose a power/energy measurement
methodology to conduct a comprehensive evaluation of Hyper-
ledger Fabric validator peer in terms of its power/energy con-
sumption and throughput. Typically, Fabric peer is deployed
on a multicore server (i.e., CPU based system). Recently,
Fabric peer has also been shown to run on a multi-core server
with hardware accelerator on an FPGA card (i.e., CPU+FPGA
based system) for high throughput [6]. In this context, this
paper has the following contributions:
We propose a power/energy measurement methodology
for a CPU based system, where our approach handles
varying number of vCPUs allocated from the physical
cores of a multi-core server. We use this setup to evaluate
energy efficiency of vanilla validator peer and a promi-
nent software optimization (block cache from [4]).
We integrate a power measurement module inside the
hardware accelerator from [6] for power/energy measure-
ment of a CPU+FPGA based system. We use this setup
to evaluate energy efficiency of hardware accelerated
validator peer with and without the software block cache.
We finally present a comprehensive study of the interac-
tions between power, energy and throughput of validator
peer, and deduce many insights from comparison of
CPU-only and CPU+FPGA systems for energy-aware
provisioning of validator peers in a Fabric network.
Our experiments with Hyperledger Fabric v2.2 LTS running
on a multi-core server with Alveo U250 card show that FPGA
based hardware accelerator combined with software block
cache can deliver 10×more throughput than a CPU-only
system with same energy consumption (153 vs. 15 tx/s/J).
II. BACKGROUND AND PRELIMINARIES
A. Hyperledger Fabric
Hyperledger Fabric is an open-source and enterprise-grade
implementation of a permissioned blockchain. It is not as-
sociated with any cryptocurrency, and has applications in
arXiv:2210.11839v1 [cs.DC] 21 Oct 2022
commit
E
EE
O
V
V
V
block verify
tx verify & vscc
statedb read
& mvcc
1
2
3
validator peerorderersendorsing peersclient
V
idle
idle
Tthreads
tx5
e5
b1
c5
c5
b1
tx5
ledger write
statedb write
historydb write
4
Fig. 1: Transaction flow in Hyperledger Fabric. txN = transaction N, eN =
endorsement for txN, bN = block N, and cN = confirmation for txN. E =
endorsement, O = ordering, and V = validation phases.
many diverse domains such as supply chain, banking/finance,
healthcare, etc. Figure 1 depicts how a transaction flows
through various nodes of a Fabric network (e.g., endorsing
peers, validator peers, etc. shown on the top).
A client invokes a transaction by sending it to endorsing
peers. Each endorsing peer will simulate the transaction by
computing its input and output (read and write sets) against the
locally stored state database1. Afterwards, the endorsing peer
will send the simulation results along with its digital signature
back to the client. Once the client has enough endorsements,
it will send the transaction along with the endorsements to the
orderer for inclusion into a block. The orderer will create a
new block and broadcast it to all the peers for validation and
subsequent commit to the ledger. Note that each transaction
contains the digital signature of the client that invoked it, while
each block contains the digital signature of the orderer that
created it. In Fabric, all digital signatures are based on Elliptic
Curve Digital Signature Algorithm (ECDSA) scheme.
The validation and commit phase itself consists of several
operations as shown on the right hand side of Figure 1. When
a validator peer receives a block, it will first check the syntax
of the block and verify the orderer’s signature on the block
(step 1). Then, the validator peer will check the syntax of
each transaction in the block and verify the client’s signature
on each transaction (tx verify in step 2). Afterwards, for each
transaction in the block, the signatures of endorsing peers from
the transaction’s endorsements will be verified and evaluated
against an endorsement policy2(validation system chaincode,
shortened as tx vscc in step 2). If the endorsement policy is
satisfied, then the transaction is marked as valid.
In step 3, multi-version concurrency control (shortened as
mvcc) checks are applied to mark a transaction as valid/invalid.
Once the entire block has been validated in steps 1–3, in
step 4, the validator peer will commit the block to its ledger,
1The state database contains the current snapshot of the ledger. For example,
for a banking application, it would contain the current value of each account.
2An endorsement policy is associated with a smart contract/chaincode, and
governs the business logic for approval of the transaction; e.g., policy of a
money transfer chaincode between two banks may require valid endorsements
from each bank, i.e., endorsements from Bank1 AND Bank2.
SERVER
FPGA Card
System Configuration
CMAC Subsystem
User Logic Box
@322 MHz
User Logic Box
@250 MHz
Packet Adapter
QDMA Subsystem
AXI-Lite 125MHz
AXI-Stream
322 MHz
Ethernet Port
CPU
PCIe
AXI-Stream
250 MHz
Fig. 2: Overview of OpenNIC shell. The Blockchain Machine hardware is
part of User Logic Box @ 250MHz.
and update its state database (by applying write sets of valid
transactions) and history database (for book keeping). Note
that validator peers only validate and commit incoming blocks,
while endorsing peers do the same in addition to endorsing
incoming transactions.
The vanilla Fabric validator peer incorporates many soft-
ware optimizations for improved throughput. For example, it
uses multiple threads to verify and validate multiple transac-
tions of a block in parallel (taking advantage of multi-core
servers), which is depicted as T threads in Figure 1. Another
software optimization is to use block cache which caches
unmarshaled contents of a block for subsequent accesses, and
has been reported to improve throughput significantly (2.33×
in [4] and 1.67×in [5]). However, block cache is not yet part
of the official Fabric codebase, so we implemented it ourselves
in Fabric v2.2 LTS to evaluate its energy efficiency.
B. Blockchain Machine
Javaid et al. [6] proposed a hardware accelerator called
Blockchain Machine (BMac) for improving validator peer’s
throughput, instead of relying on software optimizations. The
BMac peer is designed for a multi-core server with a network-
attached FPGA card (connected to the CPU via PCIe bus),
where the CPU runs modified Fabric software while FPGA
card is programmed with the hardware accelerator. Since this is
the only hardware accelerator proposed for Hyperledger Fabric
so far, we use it as the CPU+FPGA system in this paper.
Figure 2 provides a simplified overview of the open-
sourced OpenNIC shell [7], which is the basis for BMac
hardware. The OpenNIC shell is an FPGA based NIC shell for
AMD/Xilinx FPGA cards and provides network connectivity
through CMAC/Ethernet port interfacing and CPU connectiv-
ity through QDMA/PCIe interfacing. Consequently, a user-
defined accelerator can be implemented inside the user logic
box where it can access incoming data from the network
through CMAC/Ethernet port while the CPU can access the
output of hardware accelerator through PCIe/QDMA.
The BMac hardware is implemented as user logic box @
250MHz, as shown in Figure 3. The blocks are received in
FPGA card through the CMAC interface. The first module,
protocol processor, processes the incoming Ethernet packets
and extracts relevant data, such as block id, transaction ids,
ECDSA signatures, etc. The second module, block processor,
uses this data to validate the block and its transactions,
commits all valid transactions, and then writes the validation
results in a register map (for CPU access through QDMA).
2
摘要:

ImprovingEnergyEfciencyofPermissionedBlockchainsUsingFPGAsNathaniaSantosoHarisJavaidAMD,Singaporefnathania.santoso,haris.javaidg@amd.comAbstract—PermissionedblockchainslikeHyperledgerFabrichavebecomequitepopularforimplementationofenterpriseapplications.Recentresearchhasmainlyfocusedonimprovingperfo...

展开>> 收起<<
Improving Energy Efficiency of Permissioned Blockchains Using FPGAs Nathania Santoso Haris Javaid.pdf

共8页,预览2页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!
分类:图书资源 价格:10玖币 属性:8 页 大小:871.28KB 格式:PDF 时间:2025-05-08

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 8
客服
关注