FISCO-BCOS 在ARM系统架构搭建节点(国密版)

问题:

使用 fisco-bcos v2.9.1 搭建一个节点,批量上链1000条数据,在上链200条-400条数据之间节点会出现异常,导致后面数据不能上链。

系统环境

操作系统:统信

查看系统构架

ld -version

bash 复制代码
root@uos-PC:/# ld -version
GNU ld (GNU Binutils for Uos) 2.31.1
Copyright (C) 2018 Free Software Foundation, Inc.
这个程序是自由软件;您可以遵循GNU 通用公共授权版本 3 或
(您自行选择的) 稍后版本以再次散布它。
这个程序完全没有任何担保。

查看CPU

bash 复制代码
root@uos-PC:/# lscpu
Architecture:        aarch64
Byte Order:          Little Endian
CPU(s):              128
On-line CPU(s) list: 0-127
Thread(s) per core:  1
Core(s) per socket:  64
Socket(s):           2
NUMA node(s):        4
Vendor ID:           0x48
Model:               0
Model name:          HUAWEI Kunpeng 920 7261K
Stepping:            0x1
BogoMIPS:            200.00
L1d cache:           64K
L1i cache:           64K
L2 cache:            512K
L3 cache:            32768K
NUMA node0 CPU(s):   0-31
NUMA node1 CPU(s):   32-63
NUMA node2 CPU(s):   64-95
NUMA node3 CPU(s):   96-127
Flags:               half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt lpae evtstrm

查看硬件架构

uname -a

bash 复制代码
root@uos-PC:/# uname -a
Linux uos-PC 4.19.0-arm64-server #3017 SMP Thu Nov 12 19:54:04 CST 2020 aarch64 GNU/Linux

原因

tbb在国产机器上卡住了 (tbb是fisco依赖的一个并行库)

解决方案

fisco工程师基于v2.9.1个性没有用tbb的版本,通过下面的下载的版本可获取

下载源码

git clone https://github.com/FISCO-BCOS/FISCO-BCOS -b without_tbb

注:此版本基于v2.9.1调整

安装依赖

复制代码
sudo apt install -y g++ libssl-dev openssl cmake git build-essential autoconf texinfo flex patch bison libgmp-dev zlib1g-dev automake libtoolg

编译源码

cd FISCO-BCOS

mkdir -p build && cd build

cmake -DARCH_NATIVE=on ..

bash 复制代码
root@blockchan-test:/data/blockchain/fisco_without_tbb# cd FISCO-BCOS
root@blockchan-test:/data/blockchain/fisco_without_tbb/FISCO-BCOS# mkdir -p build && cd build/
root@blockchan-test:/data/blockchain/fisco_without_tbb/FISCO-BCOS/build# cmake -DARCH_NATIVE=on ..
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done

------------------------------------------------------------------------
-- Configuring FISCO-BCOS 2.9.1
------------------------------------------------------------------------
-- CMake              Cmake version and location   3.13.4 (/usr/bin/cmake)
-- Compiler           C++ compiler version         GNU 8.3.0
-- CMAKE_BUILD_TYPE   Build type                   RelWithDebInfo
-- TARGET_PLATFORM    Target platform              Linux aarch64
-- BUILD_STATIC       Build static                 OFF
-- USE_HSM_SDF        Build SDF HSM                OFF
-- DEMO               Build demos                  OFF
-- TOOL               Build tools                  OFF
-- COVERAGE           Build code coverage          OFF
-- TESTS              Build tests                  OFF
-- APPLE              Apple Machine                
-- ARCH_NATIVE        Enable native code           ON
-- DEBUG                                           OFF
-- PROF                                            OFF
------------------------------------------------------------------------

-- libssl include  : /data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/tassl/include
-- libssl libraries: /data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/tassl/libssl.a;/data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/tassl/libcrypto.a;dl
-- Configuring done
-- Generating done
-- Build files have been written to: /data/blockchain/fisco_without_tbb/FISCO-BCOS/build
root@blockchan-test:/data/blockchain/fisco_without_tbb/FISCO-BCOS/build# 

若不设置,则编译时中间会报错

bash 复制代码
root@blockchan-test:/home/blockchain/src/FISCO-BCOS/build# make -j2[  3%] Performing configure step for 'cryptopp'
[  3%] Built target jsoncpp
Scanning dependencies of target evmc
[  3%] Creating directories for 'evmc'
[  3%] Performing download step (download, verify and extract) for 'evmc'
-- Downloading...
   dst='/home/blockchain/src/FISCO-BCOS/deps/src/evmc-4ce1c3b3.tar.gz'
   timeout='none'
-- Using src='https://github.com/FISCO-BCOS/evmc/archive/4ce1c3b35346db162443a6975ac8801910533138.tar.gz'
CMake Error at /home/blockchain/src/FISCO-BCOS/deps/src/cryptopp-stamp/cryptopp-configure-RelWithDebInfo.cmake:16 (message):
  Command failed: 1

   '/usr/bin/cmake' '-DCMAKE_INSTALL_PREFIX=/home/blockchain/src/FISCO-BCOS/deps' '-DCMAKE_BUILD_TYPE=Release' '-DCMAKE_INSTALL_LIBDIR=lib' '-DCMAKE_POSITION_INDEPENDENT_CODE=OFF' '-DBUILD_SHARED=OFF' '-DBUILD_TESTING=OFF' '-DCMAKE_C_FLAGS='-march=x86-64 -mtune=generic -fvisibility=hidden -fvisibility-inlines-hidden'' '-DCMAKE_CXX_FLAGS='-march=x86-64 -mtune=generic -fvisibility=hidden -fvisibility-inlines-hidden'' '-DCMAKE_C_COMPILER=/usr/bin/cc' '-DCMAKE_CXX_COMPILER=/usr/bin/c++' '-GUnix Makefiles' '/home/blockchain/src/FISCO-BCOS/deps/src/cryptopp'

编译

make -j4

bash 复制代码
root@blockchan-test:/data/blockchain/fisco_without_tbb/FISCO-BCOS/build# make -j4
Scanning dependencies of target evmc
Scanning dependencies of target jsoncpp
Scanning dependencies of target cryptopp
Scanning dependencies of target libvrf
[  0%] Performing download step (download, verify and extract) for 'libvrf'
[  0%] Completed 'jsoncpp'
[  0%] Completed 'evmc'
[  0%] Completed 'cryptopp'
-- verifying file...
       file='/data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/libvrf-rust1.47_0303.tar.gz'
-- SHA256 hash of
    /data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/libvrf-rust1.47_0303.tar.gz
  does not match expected value
    expected: 'afcd18e52b57516f92f7a7901c0bdedcc488e43dd8401d0e06cf0963db15bd07'
      actual: '9775d47d980ad08de8f481c5c5879ef11af8e301481aaf042db1d800f1088383'
-- File already exists but hash mismatch. Removing...
-- Downloading...
   dst='/data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/libvrf-rust1.47_0303.tar.gz'
   timeout='none'
-- Using src='https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/libvrf-rust1.47_0303.tar.gz'
[  2%] Built target jsoncpp
[  4%] Built target evmc
[  6%] Built target cryptopp
Scanning dependencies of target snappy
Scanning dependencies of target leveldb
Scanning dependencies of target BuildInfo.h
[  6%] Completed 'snappy'
[  6%] Completed 'leveldb'
[  8%] Built target snappy
[ 10%] Built target leveldb
Scanning dependencies of target tassl
Scanning dependencies of target mhd
[ 10%] Completed 'tassl'
[ 11%] Completed 'mhd'
[ 13%] Built target tassl
[ 14%] Built target mhd
Scanning dependencies of target tbb
Scanning dependencies of target paillier
[ 15%] Completed 'tbb'
[ 15%] Completed 'paillier'
[ 17%] Built target paillier
[ 18%] Built target tbb
Scanning dependencies of target mpir
Scanning dependencies of target secp256k1
[ 18%] Creating directories for 'mpir'
[ 18%] Completed 'secp256k1'
[ 20%] Built target secp256k1
Scanning dependencies of target mysqlclient
[ 20%] Completed 'mysqlclient'
[ 21%] Performing download step (download, verify and extract) for 'mpir'
[ 21%] Built target BuildInfo.h
[ 23%] Built target mysqlclient
Scanning dependencies of target jsonrpccpp
Scanning dependencies of target gperftools
[ 23%] Completed 'jsonrpccpp'
[ 23%] Completed 'gperftools'
[ 25%] Built target jsonrpccpp
[ 27%] Built target gperftools
Scanning dependencies of target GroupSigLib
Scanning dependencies of target evmone
[ 27%] Completed 'GroupSigLib'
[ 28%] Completed 'evmone'
[ 30%] Built target GroupSigLib
[ 32%] Built target evmone
Scanning dependencies of target rocksdb
Scanning dependencies of target boost
[ 32%] Completed 'rocksdb'
[ 32%] Completed 'boost'
[ 34%] Built target rocksdb
[ 36%] Built target boost
Scanning dependencies of target libzdb
Scanning dependencies of target devcore
[ 36%] Performing configure step for 'libzdb'
[ 36%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Address.cpp.o
-- mpir download command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/build/deps/src/mpir-stamp/mpir-download-*.log
[ 36%] No patch step for 'mpir'
[ 36%] No update step for 'mpir'
[ 36%] Performing configure step for 'mpir'
-- libzdb configure command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/libzdb-stamp/libzdb-configure-*.log
[ 36%] Performing build step for 'libzdb'
-- libzdb build command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/libzdb-stamp/libzdb-build-*.log
[ 37%] No install step for 'libzdb'
[ 37%] Completed 'libzdb'
[ 38%] Built target libzdb
[ 38%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Base64.cpp.o
[ 39%] Building CXX object libdevcore/CMakeFiles/devcore.dir/BasicLevelDB.cpp.o
-- mpir configure command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/build/deps/src/mpir-stamp/mpir-configure-*.log
[ 40%] Performing build step for 'mpir'
[ 40%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Common.cpp.o
[ 40%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonData.cpp.o
[ 40%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonIO.cpp.o
[ 41%] Building CXX object libdevcore/CMakeFiles/devcore.dir/CommonJS.cpp.o
[ 41%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FileSystem.cpp.o
[ 41%] Building CXX object libdevcore/CMakeFiles/devcore.dir/FixedHash.cpp.o
[ 42%] Building CXX object libdevcore/CMakeFiles/devcore.dir/LevelDB.cpp.o
[ 42%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Log.cpp.o
[ 42%] Building CXX object libdevcore/CMakeFiles/devcore.dir/RLP.cpp.o
[ 42%] Building CXX object libdevcore/CMakeFiles/devcore.dir/SnappyCompress.cpp.o
[ 43%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Timer.cpp.o
[ 43%] Building CXX object libdevcore/CMakeFiles/devcore.dir/TreeTopology.cpp.o
[ 43%] Building CXX object libdevcore/CMakeFiles/devcore.dir/TrieCommon.cpp.o
[ 43%] Building CXX object libdevcore/CMakeFiles/devcore.dir/TrieHash.cpp.o
[ 44%] Building CXX object libdevcore/CMakeFiles/devcore.dir/TrieHash2.cpp.o
-- mpir build command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/build/deps/src/mpir-stamp/mpir-build-*.log
[ 44%] Performing install step for 'mpir'
-- mpir install command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/build/deps/src/mpir-stamp/mpir-install-*.log
[ 45%] Completed 'mpir'
[ 45%] Built target mpir
[ 45%] Building CXX object libdevcore/CMakeFiles/devcore.dir/Worker.cpp.o
Scanning dependencies of target libff
[ 46%] Creating directories for 'libff'
[ 46%] Performing download step (download, verify and extract) for 'libff'
-- libff download command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/build/deps/src/libff-stamp/libff-download-*.log
[ 46%] No patch step for 'libff'
[ 46%] No update step for 'libff'
[ 47%] Performing configure step for 'libff'
-- libff configure command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/build/deps/src/libff-stamp/libff-configure-*.log
[ 47%] Performing build step for 'libff'
[ 47%] Linking CXX static library libdevcore.a
[ 47%] Built target devcore
Scanning dependencies of target flowlimit
Scanning dependencies of target stat
[ 47%] Building CXX object libflowlimit/CMakeFiles/flowlimit.dir/RPCQPSLimiter.cpp.o
[ 48%] Building CXX object libstat/CMakeFiles/stat.dir/ChannelNetworkStatHandler.cpp.o
[ 48%] Building CXX object libflowlimit/CMakeFiles/flowlimit.dir/RateLimiter.cpp.o
[ 48%] Building CXX object libstat/CMakeFiles/stat.dir/NetworkStatHandler.cpp.o
[ 49%] Linking CXX static library libflowlimit.a
[ 49%] Built target flowlimit
[ 49%] Linking CXX static library libstat.a
[ 49%] Built target stat
-- libff build command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/build/deps/src/libff-stamp/libff-build-*.log
[ 49%] Performing install step for 'libff'
-- libff install command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/build/deps/src/libff-stamp/libff-install-*.log
[ 49%] Completed 'libff'
[ 49%] Built target libff
Scanning dependencies of target devcrypto
[ 50%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/Blake2.cpp.o
[ 50%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/AES.cpp.o
[ 50%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/Common.cpp.o
[ 50%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/CryptoInterface.cpp.o
[ 51%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/ECDSASignature.cpp.o
[ 51%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/Hash.cpp.o
[ 51%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/LibFF.cpp.o
[ 51%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/SM2Signature.cpp.o
[ 52%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/SM3Hash.cpp.o
[ 52%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/SM4Crypto.cpp.o
[ 52%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/sm2/sm2.cpp.o
[ 53%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/sm3/sm3.cpp.o
[ 53%] Building CXX object libdevcrypto/CMakeFiles/devcrypto.dir/sm4/sm4.cpp.o
[ 53%] Linking CXX static library libdevcrypto.a
[ 53%] Built target devcrypto
Scanning dependencies of target network
Scanning dependencies of target ethcore
[ 54%] Building CXX object libethcore/CMakeFiles/ethcore.dir/ABI.cpp.o
[ 54%] Building CXX object libethcore/CMakeFiles/ethcore.dir/ABIParser.cpp.o
[ 54%] Building CXX object libnetwork/CMakeFiles/network.dir/ASIOInterface.cpp.o
[ 54%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Block.cpp.o
[ 54%] Building CXX object libethcore/CMakeFiles/ethcore.dir/BlockHeader.cpp.o
[ 55%] Building CXX object libnetwork/CMakeFiles/network.dir/Common.cpp.o
[ 55%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Common.cpp.o
[ 56%] Building CXX object libethcore/CMakeFiles/ethcore.dir/EVMFlags.cpp.o
[ 56%] Building CXX object libethcore/CMakeFiles/ethcore.dir/LogEntry.cpp.o
[ 56%] Building CXX object libnetwork/CMakeFiles/network.dir/Host.cpp.o
[ 56%] Building CXX object libethcore/CMakeFiles/ethcore.dir/PartiallyBlock.cpp.o
[ 56%] Building CXX object libnetwork/CMakeFiles/network.dir/PeerWhitelist.cpp.o
[ 57%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Precompiled.cpp.o
[ 57%] Building CXX object libnetwork/CMakeFiles/network.dir/Session.cpp.o
[ 57%] Building CXX object libethcore/CMakeFiles/ethcore.dir/PrecompiledContract.cpp.o
[ 57%] Building CXX object libethcore/CMakeFiles/ethcore.dir/Transaction.cpp.o
[ 57%] Building CXX object libethcore/CMakeFiles/ethcore.dir/TransactionException.cpp.o
[ 58%] Building CXX object libethcore/CMakeFiles/ethcore.dir/TransactionReceipt.cpp.o
[ 58%] Building CXX object libethcore/CMakeFiles/ethcore.dir/TxsParallelParser.cpp.o
[ 59%] Linking CXX static library libnetwork.a
[ 59%] Built target network
Scanning dependencies of target p2p
[ 59%] Building CXX object libp2p/CMakeFiles/p2p.dir/P2PMessage.cpp.o
[ 59%] Building CXX object libp2p/CMakeFiles/p2p.dir/P2PMessageRC2.cpp.o
[ 59%] Linking CXX static library libethcore.a
[ 59%] Built target ethcore
[ 59%] Building CXX object libp2p/CMakeFiles/p2p.dir/P2PSession.cpp.o
[ 60%] Building CXX object libp2p/CMakeFiles/p2p.dir/Service.cpp.o
Scanning dependencies of target eventfilter
[ 60%] Building CXX object libeventfilter/CMakeFiles/eventfilter.dir/EventLogFilter.cpp.o
[ 61%] Building CXX object libeventfilter/CMakeFiles/eventfilter.dir/EventLogFilterManager.cpp.o
Scanning dependencies of target txpool
[ 62%] Building CXX object libtxpool/CMakeFiles/txpool.dir/CommonTransactionNonceCheck.cpp.o
[ 62%] Building CXX object libeventfilter/CMakeFiles/eventfilter.dir/EventLogFilterParams.cpp.o
[ 62%] Building CXX object libtxpool/CMakeFiles/txpool.dir/TransactionNonceCheck.cpp.o
[ 62%] Linking CXX static library libp2p.a
[ 62%] Built target p2p
[ 62%] Building CXX object libtxpool/CMakeFiles/txpool.dir/TxPool.cpp.o
[ 62%] Linking CXX static library libeventfilter.a
[ 62%] Built target eventfilter
[ 63%] Linking CXX static library libtxpool.a
[ 63%] Built target txpool
-- verifying file...
       file='/data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/libvrf-rust1.47_0303.tar.gz'
-- Downloading... done
-- extracting...
     src='/data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/libvrf-rust1.47_0303.tar.gz'
     dst='/data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/libvrf'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 64%] No update step for 'libvrf'
[ 64%] No patch step for 'libvrf'
[ 64%] No configure step for 'libvrf'
[ 64%] No build step for 'libvrf'
[ 65%] Performing install step for 'libvrf'
-- libvrf install command succeeded.  See also /data/blockchain/fisco_without_tbb/FISCO-BCOS/deps/src/libvrf-stamp/libvrf-install-*.log
[ 65%] Completed 'libvrf'
[ 65%] Built target libvrf
Scanning dependencies of target blockverifier
[ 65%] Building CXX object libblockverifier/CMakeFiles/blockverifier.dir/BlockVerifier.cpp.o
[ 66%] Building CXX object libblockverifier/CMakeFiles/blockverifier.dir/DAG.cpp.o
[ 66%] Building CXX object libblockverifier/CMakeFiles/blockverifier.dir/ExecutiveContext.cpp.o
[ 66%] Building CXX object libblockverifier/CMakeFiles/blockverifier.dir/ExecutiveContextFactory.cpp.o
[ 67%] Building CXX object libblockverifier/CMakeFiles/blockverifier.dir/TxDAG.cpp.o
[ 67%] Linking CXX static library libblockverifier.a
[ 67%] Built target blockverifier
Scanning dependencies of target executivecontext
[ 67%] Building CXX object libexecutive/CMakeFiles/executivecontext.dir/EVMHostContext.cpp.o
[ 67%] Building CXX object libexecutive/CMakeFiles/executivecontext.dir/EVMHostInterface.cpp.o
[ 67%] Building CXX object libexecutive/CMakeFiles/executivecontext.dir/EVMInstance.cpp.o
[ 68%] Building CXX object libexecutive/CMakeFiles/executivecontext.dir/Executive.cpp.o
[ 68%] Building CXX object libexecutive/CMakeFiles/executivecontext.dir/VMFactory.cpp.o
[ 68%] Linking CXX static library libexecutivecontext.a
[ 68%] Built target executivecontext
Scanning dependencies of target precompiled
[ 68%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/AccountInfoUtility.cpp.o
[ 69%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/CNSPrecompiled.cpp.o
[ 69%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/CRUDPrecompiled.cpp.o
[ 69%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/ChainGovernancePrecompiled.cpp.o
[ 70%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/Common.cpp.o
[ 70%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/ConditionPrecompiled.cpp.o
[ 70%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/ConsensusPrecompiled.cpp.o
[ 70%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/ContractLifeCyclePrecompiled.cpp.o
[ 71%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/EntriesPrecompiled.cpp.o
[ 71%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/EntryPrecompiled.cpp.o
[ 71%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/GasChargeManagePrecompiled.cpp.o
[ 71%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/KVTableFactoryPrecompiled.cpp.o
[ 72%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/KVTablePrecompiled.cpp.o
[ 72%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/ParallelConfigPrecompiled.cpp.o
[ 72%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/PermissionPrecompiled.cpp.o
[ 73%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/Precompiled.cpp.o
[ 73%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/PrecompiledGas.cpp.o
[ 73%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/SystemConfigPrecompiled.cpp.o
[ 73%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/TableFactoryPrecompiled.cpp.o
[ 74%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/TablePrecompiled.cpp.o
[ 74%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/WorkingSealerManagerImpl.cpp.o
[ 74%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/WorkingSealerManagerPrecompiled.cpp.o
[ 74%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/extension/CryptoPrecompiled.cpp.o
[ 75%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/extension/DagTransferPrecompiled.cpp.o
[ 75%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/extension/GroupSigPrecompiled.cpp.o
[ 75%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/extension/HelloWorldPrecompiled.cpp.o
[ 76%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/extension/PaillierPrecompiled.cpp.o
[ 76%] Building CXX object libprecompiled/CMakeFiles/precompiled.dir/extension/RingSigPrecompiled.cpp.o
[ 76%] Linking CXX static library libprecompiled.a
[ 76%] Built target precompiled
Scanning dependencies of target storage
[ 76%] Building CXX object libstorage/CMakeFiles/storage.dir/BasicRocksDB.cpp.o
[ 77%] Building CXX object libstorage/CMakeFiles/storage.dir/BinaryLogStorage.cpp.o
[ 77%] Building CXX object libstorage/CMakeFiles/storage.dir/BinLogHandler.cpp.o
[ 77%] Building CXX object libstorage/CMakeFiles/storage.dir/CachedStorage.cpp.o
[ 77%] Building CXX object libstorage/CMakeFiles/storage.dir/Common.cpp.o
[ 78%] Building CXX object libstorage/CMakeFiles/storage.dir/LevelDBStorage.cpp.o
[ 78%] Building CXX object libstorage/CMakeFiles/storage.dir/MemoryTable2.cpp.o
[ 78%] Building CXX object libstorage/CMakeFiles/storage.dir/MemoryTableFactory.cpp.o
/data/blockchain/fisco_without_tbb/FISCO-BCOS/libstorage/MemoryTable2.cpp: In member function 'dev::storage::TableData::Ptr dev::storage::MemoryTable2::dumpWithoutOptimize()':
/data/blockchain/fisco_without_tbb/FISCO-BCOS/libstorage/MemoryTable2.cpp:374:44: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
                         for (auto i = 0; i < _p.second->size(); ++i)
                                          ~~^~~~~~~~~~~~~~~~~~~
/data/blockchain/fisco_without_tbb/FISCO-BCOS/libstorage/MemoryTable2.cpp: In member function 'virtual dev::storage::TableData::Ptr dev::storage::MemoryTable2::dump()':
/data/blockchain/fisco_without_tbb/FISCO-BCOS/libstorage/MemoryTable2.cpp:502:44: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]
                         for (auto i = 0; i < _p.second->size(); ++i)
                                          ~~^~~~~~~~~~~~~~~~~~~
[ 79%] Building CXX object libstorage/CMakeFiles/storage.dir/MemoryTableFactory2.cpp.o
[ 79%] Building CXX object libstorage/CMakeFiles/storage.dir/RocksDBStorage.cpp.o
[ 79%] Building CXX object libstorage/CMakeFiles/storage.dir/RocksDBStorageFactory.cpp.o
[ 79%] Building CXX object libstorage/CMakeFiles/storage.dir/SQLBasicAccess.cpp.o
[ 80%] Building CXX object libstorage/CMakeFiles/storage.dir/SQLConnectionPool.cpp.o
[ 80%] Building CXX object libstorage/CMakeFiles/storage.dir/SQLStorage.cpp.o
[ 80%] Building CXX object libstorage/CMakeFiles/storage.dir/ScalableStorage.cpp.o
[ 80%] Building CXX object libstorage/CMakeFiles/storage.dir/Table.cpp.o
[ 81%] Building CXX object libstorage/CMakeFiles/storage.dir/ZdbStorage.cpp.o
[ 81%] Linking CXX static library libstorage.a
[ 81%] Built target storage
Scanning dependencies of target blockchain
Scanning dependencies of target security
Scanning dependencies of target storagestate
[ 81%] Building CXX object libstoragestate/CMakeFiles/storagestate.dir/StorageState.cpp.o
[ 82%] Building CXX object libstoragestate/CMakeFiles/storagestate.dir/StorageStateFactory.cpp.o
[ 82%] Building CXX object libblockchain/CMakeFiles/blockchain.dir/BlockChainImp.cpp.o
[ 82%] Building CXX object libsecurity/CMakeFiles/security.dir/EncryptedFile.cpp.o
[ 83%] Building CXX object libsecurity/CMakeFiles/security.dir/EncryptedLevelDB.cpp.o
[ 83%] Building CXX object libsecurity/CMakeFiles/security.dir/KeyCenter.cpp.o
[ 83%] Linking CXX static library libstoragestate.a
[ 83%] Built target storagestate
[ 83%] Linking CXX static library libblockchain.a
[ 83%] Built target blockchain
Scanning dependencies of target sync
[ 83%] Building CXX object libsync/CMakeFiles/sync.dir/DownloadingBlockQueue.cpp.o
[ 83%] Building CXX object libsync/CMakeFiles/sync.dir/DownloadingTxsQueue.cpp.o
[ 84%] Building CXX object libsync/CMakeFiles/sync.dir/GossipBlockStatus.cpp.o
[ 84%] Linking CXX static library libsecurity.a
[ 84%] Built target security
Scanning dependencies of target mptstate
[ 84%] Building CXX object libmptstate/CMakeFiles/mptstate.dir/Account.cpp.o
[ 84%] Building CXX object libmptstate/CMakeFiles/mptstate.dir/Defaults.cpp.o
[ 84%] Building CXX object libsync/CMakeFiles/sync.dir/NodeTimeMaintenance.cpp.o
[ 84%] Building CXX object libmptstate/CMakeFiles/mptstate.dir/MPTState.cpp.o
[ 84%] Building CXX object libsync/CMakeFiles/sync.dir/RspBlockReq.cpp.o
[ 84%] Building CXX object libsync/CMakeFiles/sync.dir/SyncMaster.cpp.o
[ 85%] Building CXX object libmptstate/CMakeFiles/mptstate.dir/MPTStateFactory.cpp.o
[ 86%] Building CXX object libsync/CMakeFiles/sync.dir/SyncMsgEngine.cpp.o
[ 86%] Building CXX object libsync/CMakeFiles/sync.dir/SyncMsgPacket.cpp.o
[ 86%] Building CXX object libmptstate/CMakeFiles/mptstate.dir/MemoryDB.cpp.o
[ 86%] Building CXX object libmptstate/CMakeFiles/mptstate.dir/OverlayDB.cpp.o
[ 86%] Building CXX object libsync/CMakeFiles/sync.dir/SyncStatus.cpp.o
[ 87%] Building CXX object libsync/CMakeFiles/sync.dir/SyncTransaction.cpp.o
[ 88%] Building CXX object libmptstate/CMakeFiles/mptstate.dir/State.cpp.o
[ 88%] Building CXX object libsync/CMakeFiles/sync.dir/SyncTreeTopology.cpp.o
[ 88%] Linking CXX static library libsync.a
[ 88%] Built target sync
Scanning dependencies of target consensus
[ 88%] Linking CXX static library libmptstate.a
[ 88%] Built target mptstate
[ 88%] Building CXX object libconsensus/CMakeFiles/consensus.dir/ConsensusEngineBase.cpp.o
[ 89%] Building CXX object libconsensus/CMakeFiles/consensus.dir/Sealer.cpp.o
[ 89%] Building CXX object libconsensus/CMakeFiles/consensus.dir/pbft/PBFTEngine.cpp.o
[ 89%] Building CXX object libconsensus/CMakeFiles/consensus.dir/pbft/PBFTReqCache.cpp.o
[ 89%] Building CXX object libconsensus/CMakeFiles/consensus.dir/pbft/PBFTSealer.cpp.o
[ 90%] Building CXX object libconsensus/CMakeFiles/consensus.dir/pbft/PartiallyPBFTReqCache.cpp.o
[ 90%] Building CXX object libconsensus/CMakeFiles/consensus.dir/raft/RaftEngine.cpp.o
[ 90%] Building CXX object libconsensus/CMakeFiles/consensus.dir/raft/RaftSealer.cpp.o
[ 91%] Building CXX object libconsensus/CMakeFiles/consensus.dir/rotating_pbft/RPBFTReqCache.cpp.o
[ 91%] Building CXX object libconsensus/CMakeFiles/consensus.dir/rotating_pbft/RotatingPBFTEngine.cpp.o
[ 91%] Building CXX object libconsensus/CMakeFiles/consensus.dir/rotating_pbft/vrf_rpbft/VRFBasedrPBFTEngine.cpp.o
[ 91%] Building CXX object libconsensus/CMakeFiles/consensus.dir/rotating_pbft/vrf_rpbft/VRFBasedrPBFTSealer.cpp.o
[ 92%] Linking CXX static library libconsensus.a
[ 92%] Built target consensus
Scanning dependencies of target ledger
[ 93%] Building CXX object libledger/CMakeFiles/ledger.dir/DBInitializer.cpp.o
[ 93%] Building CXX object libledger/CMakeFiles/ledger.dir/Ledger.cpp.o
[ 93%] Building CXX object libledger/CMakeFiles/ledger.dir/LedgerManager.cpp.o
[ 93%] Building CXX object libledger/CMakeFiles/ledger.dir/LedgerParam.cpp.o
[ 94%] Linking CXX static library libledger.a
[ 94%] Built target ledger
Scanning dependencies of target initializer
[ 94%] Building CXX object libinitializer/CMakeFiles/initializer.dir/BoostLogInitializer.cpp.o
[ 94%] Building CXX object libinitializer/CMakeFiles/initializer.dir/GlobalConfigureInitializer.cpp.o
[ 95%] Building CXX object libinitializer/CMakeFiles/initializer.dir/Initializer.cpp.o
[ 95%] Building CXX object libinitializer/CMakeFiles/initializer.dir/LedgerInitializer.cpp.o
[ 95%] Building CXX object libinitializer/CMakeFiles/initializer.dir/P2PInitializer.cpp.o
[ 95%] Building CXX object libinitializer/CMakeFiles/initializer.dir/RPCInitializer.cpp.o
[ 96%] Building CXX object libinitializer/CMakeFiles/initializer.dir/SecureInitializer.cpp.o
[ 96%] Linking CXX static library libinitializer.a
[ 96%] Built target initializer
Scanning dependencies of target rpc
[ 96%] Building CXX object librpc/CMakeFiles/rpc.dir/Common.cpp.o
[ 97%] Building CXX object librpc/CMakeFiles/rpc.dir/JsonHelper.cpp.o
[ 97%] Building CXX object librpc/CMakeFiles/rpc.dir/Rpc.cpp.o
[ 97%] Building CXX object librpc/CMakeFiles/rpc.dir/SafeHttpServer.cpp.o
[ 98%] Building CXX object librpc/CMakeFiles/rpc.dir/StatisticProtocolServer.cpp.o
[ 98%] Linking CXX static library librpc.a
[ 98%] Built target rpc
Scanning dependencies of target channelserver
[ 98%] Building CXX object libchannelserver/CMakeFiles/channelserver.dir/ChannelRPCServer.cpp.o
[ 99%] Building CXX object libchannelserver/CMakeFiles/channelserver.dir/ChannelServer.cpp.o
[ 99%] Building CXX object libchannelserver/CMakeFiles/channelserver.dir/ChannelSession.cpp.o
[ 99%] Linking CXX static library libchannelserver.a
[ 99%] Built target channelserver
Scanning dependencies of target fisco-bcos
[ 99%] Building CXX object fisco-bcos/main/CMakeFiles/fisco-bcos.dir/main.cpp.o
[100%] Linking CXX executable ../../bin/fisco-bcos
[100%] Built target fisco-bcos

查看编译后的版本信息

编译后,文件在bin目录中

cd bin

./fisco-bcos -v

bash 复制代码
root@blockchan-test:/data/blockchain/fisco_without_tbb/FISCO-BCOS/build# cd bin/
root@blockchan-test:/data/blockchain/fisco_without_tbb/FISCO-BCOS/build/bin# ./fisco-bcos -v
FISCO-BCOS Version : 2.9.1
Build Time         : 20231202 15:58:39
Build Type         : Linux/g++/RelWithDebInfo
Git Branch         : without-tbb
Git Commit Hash    : e7da1fc6867fcbdbeaedd5e71e49bc7e15fd9282

下载安装脚本

复制代码
cd .. && cd ..
curl -#LO https://github.com/FISCO-BCOS/FISCO-BCOS/releases/download/v2.9.1/build_chain.sh && chmod u+x build_chain.sh 
bash 复制代码
root@blockchan-test:/data/blockchain/fisco_without_tbb# curl -#LO https://github.com/FISCO-BCOS/FISCO-BCOS/releases/download/v2.9.1/build_chain.sh && chmod u+x build_chain.sh
################################################################################################################################ 100.0%

生成节点

生成一个国密版节点

bash build_chain.sh -l 127.0.0.1:1 -p 30300,20200,8545 -e FISCO-BCOS/build/bin/fisco-bcos -g -G

bash 复制代码
root@blockchan-test:/data/blockchain/fisco_without_tbb# bash build_chain.sh -l 127.0.0.1:1 -p 30300,20200,8545 -e FISCO-BCOS/build/bin/fisco-bcos -g -G 
Checking fisco-bcos binary...
Binary check passed.
==============================================================
Generating CA key...
Generating Guomi CA key...
==============================================================
Generating keys and certificates ...
Processing IP=127.0.0.1 Total=1 Agency=agency Groups=1
==============================================================
Generating configuration files ...
Processing IP=127.0.0.1 Total=1 Agency=agency Groups=1
==============================================================
[INFO] FISCO-BCOS Path : FISCO-BCOS/build/bin/fisco-bcos
[INFO] Start Port      : 30300 20200 8545
[INFO] Server IP       : 127.0.0.1:1
[INFO] Output Dir      : /data/blockchain/fisco_without_tbb/nodes
[INFO] CA Path         : /data/blockchain/fisco_without_tbb/nodes/cert/
[INFO] Guomi CA Path   : /data/blockchain/fisco_without_tbb/nodes/gmcert/
[INFO] Guomi mode      : true
[INFO] SM channel      : true
==============================================================
[INFO] Execute the download_console.sh script in directory named by IP to get FISCO-BCOS console.
e.g.  bash /data/blockchain/fisco_without_tbb/nodes/127.0.0.1/download_console.sh -f
==============================================================
[INFO] All completed. Files in /data/blockchain/fisco_without_tbb/nodes

查看生成文件

bash 复制代码
root@blockchan-test:/data/blockchain/fisco_without_tbb# ls
build_chain.sh  FISCO-BCOS  gmcert.cnf  gmsm2.param  nodes
root@blockchan-test:/data/blockchain/fisco_without_tbb# tree nodes/
nodes/
├── 127.0.0.1
│   ├── download_bin.sh
│   ├── download_console.sh
│   ├── fisco-bcos
│   ├── node0
│   │   ├── conf
│   │   │   ├── channel_cert
│   │   │   │   ├── ca.crt
│   │   │   │   ├── node.crt
│   │   │   │   └── node.key
│   │   │   ├── gmca.crt
│   │   │   ├── gmennode.crt
│   │   │   ├── gmennode.key
│   │   │   ├── gmnode.crt
│   │   │   ├── gmnode.key
│   │   │   ├── gmnode.nodeid
│   │   │   ├── gmnode.serial
│   │   │   ├── group.1.genesis
│   │   │   ├── group.1.ini
│   │   │   └── origin_cert
│   │   │       ├── ca.crt
│   │   │       ├── node.crt
│   │   │       └── node.key
│   │   ├── config.ini
│   │   ├── scripts
│   │   │   ├── load_new_groups.sh
│   │   │   ├── monitor.sh
│   │   │   ├── reload_sdk_allowlist.sh
│   │   │   └── reload_whitelist.sh
│   │   ├── start.sh
│   │   └── stop.sh
│   ├── sdk
│   │   ├── ca.crt
│   │   ├── gm
│   │   │   ├── gmca.crt
│   │   │   ├── gmensdk.crt
│   │   │   ├── gmensdk.key
│   │   │   ├── gmsdk.crt
│   │   │   ├── gmsdk.key
│   │   │   └── gmsdk.publickey
│   │   ├── sdk.crt
│   │   └── sdk.key
│   ├── start_all.sh
│   └── stop_all.sh
├── cert
│   ├── agency
│   │   ├── agency.crt
│   │   ├── agency.key
│   │   ├── agency.srl
│   │   ├── ca.crt
│   │   ├── cert.cnf
│   │   └── channel
│   │       ├── ca.crt
│   │       ├── ca.key
│   │       └── ca.srl
│   ├── ca.crt
│   ├── ca.key
│   ├── ca.srl
│   └── cert.cnf
├── cert.cnf
└── gmcert
    ├── agency-gm
    │   ├── gmagency.crt
    │   ├── gmagency.key
    │   ├── gmagency.srl
    │   ├── gmca.crt
    │   ├── gmcert.cnf
    │   └── gmsm2.param
    ├── gmca.crt
    ├── gmca.key
    ├── gmca.srl
    ├── gmcert.cnf
    └── gmsm2.param

13 directories, 60 files

参考文档

FISCO BCOS 源码编译 --- FISCO BCOS 2.0 v2.9.0 文档

搭建第一个区块链网络 --- FISCO BCOS 2.0 v2.9.0 文档

相关推荐
最后一个bug7 小时前
rt-linux中使用mlockall与free的差异
linux·c语言·arm开发·单片机·嵌入式硬件·算法
李先静8 小时前
用 gdbserver 调试 arm-linux 上的 AWTK 应用程序
linux·arm开发·awtk
MrJson-架构师11 小时前
4.银河麒麟V10(ARM) 离线安装 MySQL
arm开发·mysql
qq_4597300321 小时前
4-3 MCU中ARM存储器的作用
arm开发·单片机·嵌入式硬件
轩辰~1 天前
网络协议入门
linux·服务器·开发语言·网络·arm开发·c++·网络协议
ARM&开发(Haidong)1 天前
ARM 获取cpu个数
arm开发
憧憬一下2 天前
PCIe_Host驱动分析_设备枚举
arm开发·嵌入式硬件·嵌入式·pcie·linux驱动开发
7yewh2 天前
嵌入式Linux QT+OpenCV基于人脸识别的考勤系统 项目
linux·开发语言·arm开发·驱动开发·qt·opencv·嵌入式linux
憧憬一下4 天前
PCIe_Host驱动分析_地址映射
arm开发·嵌入式硬件·嵌入式·linux驱动开发·pci/pcie
楼兰公子4 天前
相机主要调试参数
arm开发·驱动·camera·v4l2