Skip to content

Commit

Permalink
Merge pull request FISCO-BCOS#1810 from cyjseagull/release-2.7.0
Browse files Browse the repository at this point in the history
sync code from release-2.7.0 into master
  • Loading branch information
cyjseagull authored Nov 23, 2020
2 parents a2c2cd3 + 2ff1c33 commit 65d8534
Show file tree
Hide file tree
Showing 167 changed files with 2,965 additions and 1,503 deletions.
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
- checkout
- restore_cache:
keys:
- deps-cache-v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
- deps-cache-v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-
- deps-cache-v1-{{ .Environment.CIRCLE_JOB }}-
- deps-cache-v3-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
- deps-cache-v3-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-
- deps-cache-v3-{{ .Environment.CIRCLE_JOB }}-
- compile:
options: "-DBUILD_STATIC=ON -DTESTS=ON -DCOVERAGE=ON -DCMAKE_BUILD_TYPE=Debug"
- save_cache:
key: deps-cache-v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
key: deps-cache-v3-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
paths:
- deps
- /ccache
Expand Down Expand Up @@ -122,9 +122,9 @@ jobs:
- checkout
- restore_cache:
keys:
- deps-v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
- deps-v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-
- deps-v1-{{ .Environment.CIRCLE_JOB }}-
- deps-v2-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
- deps-v2-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-
- deps-v2-{{ .Environment.CIRCLE_JOB }}-
- run:
name: Compile
command: |
Expand All @@ -134,7 +134,7 @@ jobs:
cmake3 -DTESTS=ON -DTOOL=ON -DDEMO=ON ..
make -j2
- save_cache:
key: deps-v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
key: deps-v2-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
paths:
- deps
- /ccache
Expand All @@ -158,12 +158,12 @@ jobs:
- checkout
- restore_cache:
keys:
- deps-cache-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
- deps-cache-v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
- compile:
options: "-DBUILD_STATIC=ON"
compiler: "CC=/usr/bin/clang CXX=/usr/bin/clang++"
- save_cache:
key: deps-cache-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
key: deps-cache-v1-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}
paths:
- deps
- /ccache
Expand Down
44 changes: 23 additions & 21 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ on:
- "Changelog.md"
- "README.md"
pull_request:
# branches:
# - '**'
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
release:
types: [published, created, edited]
env:
Expand All @@ -36,11 +38,11 @@ jobs:
id: cache
with:
path: deps/src
key: deps-v6-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
key: deps-v7-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
deps-v6-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
deps-v6-${{ runner.temp }}-${{ github.base_ref }}-
deps-v6-${{ runner.temp }}-
deps-v7-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
deps-v7-${{ runner.temp }}-${{ github.base_ref }}-
deps-v7-${{ runner.temp }}-
- uses: actions/cache@v2
id: ccache
with:
Expand Down Expand Up @@ -73,12 +75,12 @@ jobs:
id: cache
with:
path: deps/src
key: deps-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
key: deps-v4-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
deps-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
deps-v3-notest-${{ runner.temp }}-${{ github.base_ref }}-
deps-v3-notest-${{ runner.temp }}-
deps-v3-${{ runner.temp }}-
deps-v4-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
deps-v4-notest-${{ runner.temp }}-${{ github.base_ref }}-
deps-v4-notest-${{ runner.temp }}-
deps-v4-${{ runner.temp }}-
- uses: actions/cache@v2
id: ccache
with:
Expand Down Expand Up @@ -149,25 +151,25 @@ jobs:
id: cache
with:
path: deps/src
key: deps-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
key: deps-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
deps-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
deps-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-
deps-v0-notest-${{ runner.temp }}-
deps-v0-${{ runner.temp }}-
deps-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
deps-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-
deps-v1-notest-${{ runner.temp }}-
deps-v1-${{ runner.temp }}-
- uses: actions/cache@v2
id: ccache
with:
path: ccache
key: ccache-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
key: ccache-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
restore-keys: |
ccache-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
ccache-v0-notest-${{ runner.temp }}-${{ github.base_ref }}-
ccache-v0-notest-${{ runner.temp }}-
ccache-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-${{ hashFiles('.github/workflows/workflow.yml') }}
ccache-v1-notest-${{ runner.temp }}-${{ github.base_ref }}-
ccache-v1-notest-${{ runner.temp }}-
- name: install ubuntu dependencies
run: sudo apt install -y git curl build-essential clang cmake openssl libssl-dev zlib1g-dev ccache libgmp-dev flex bison
- name: configure
run: cmake . -DARCH_NATIVE=on
run: cmake .
- name: compile
run: make -j2
- name: run integration testing
Expand Down
19 changes: 10 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,17 @@ matrix:
- CACHE_NAME=ubuntu16
- ZIP_SUFFIX=ubuntu-xenial

# - language: cpp
# os: osx
# osx_image: xcode11.4
# env:
# - CACHE_NAME=osx
# - PROJECT_USERNAME=FISCO-BCOS
# - PROJECT_REPONAME=FISCO-BCOS
- language: cpp
arch: arm64
os: linux
dist: bionic
sudo: required
env:
- CACHE_NAME=ubuntu18
- ZIP_SUFFIX=ubuntu-bionic

git:
depth: 1
compiler: clang
cache:
directories:
- $TRAVIS_BUILD_DIR/deps
Expand Down Expand Up @@ -86,7 +87,7 @@ install: |
#fi
script: |
if [[ $TRAVIS_OS_NAME == linux ]]; then
cmake . && make -j2 && cd tools && bash ci/ci_check.sh
cmake -DARCH_NATIVE=ON . && make -j2 && cd tools && bash ci/ci_check.sh
else
CC=/usr/bin/clang CXX=/usr/bin/clang++ cmake . && \
make -j2 && cd tools && bash ci/ci_check.sh
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
# (c) 2016-2018 fisco-dev contributors.
#------------------------------------------------------------------------------

cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.10)
set(FISCO_BCOS_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/cmake" CACHE PATH "The path to the cmake directory")
list(APPEND CMAKE_MODULE_PATH ${FISCO_BCOS_CMAKE_DIR})
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version")

project(FISCO-BCOS VERSION "2.6.0")
project(FISCO-BCOS VERSION "2.7.0")
# Suffix like "-rc1" e.t.c. to append to versions wherever needed.
set(VERSION_SUFFIX "")

Expand All @@ -37,9 +37,9 @@ set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY ON)

# basic setting
include(Options)
configure_project()
include(CompilerSettings)
include(Dependencies)
configure_project()

# install dependencies
include(ProjectTBB)
Expand Down
45 changes: 45 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
### 2.7.0
(2020-11-20)

**新增**

- 合约生命周期管理提供revokeManager功能
- 新增委员权限投票的查询接口
- 支持取消事件订阅
- 添加批量返回回执的方法getBatchReceiptsByBlockNumberAndRange和getBatchReceiptsByBlockHashAndRange
- 添加getNodeInfo接口,返回节点订阅的topics信息
- Table合约增加address类型的EQ condition查询


**更改**

- MySQL存储模式支持MySQL 8.0
- 重构交易和区块相关的RPC接口,返回交易和区块的所有字段内容
- 交易推送的回执中带有交易执行结果的报错信息
- P2P模块添加读写idle检查的逻辑

**修复**

- 解决gcc9和clang12编译报错的问题
- Precompiled合约报错信息写入到回执中,给出更明确的报错提示
- 优化落盘加密,解决落盘加密模式下,存储空间占用大的问题
- 修复MacOS系统下CachedStorage清理缓存导致节点宕机的问题
- 修复MySQL存储模式下,CNS合约名过长导致区块提交异常的问题

**兼容性**

**向前兼容**,旧版本可以直接替换程序升级

| | 推荐版本 | 最低版本 | 说明 |
| ---------- | ----------------------- | --------- | ---------------------- |
| 控制台 | 2.7.0 | 1.0.4 | |
| Java SDK | 2.7.0 | 2.6.1 | |
| WebSDK | 2.6.0 | 2.0.4 | |
| generator | 1.7.0 | 1.1.0 | 搭建新链需要使用该版本 |
| 浏览器 | 2.0.2 | 2.0.0-rc2 | |
| Solidity | 最高支持 solidity 0.6.10 | 0.4.11 | |
| amdb-proxy | 2.3.0 | 2.0.2 | |

更多,请参考[版本与兼容性描述](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/change_log/index.html)


### 2.6.0
(2020-08-10)

Expand Down
17 changes: 2 additions & 15 deletions cmake/CompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@
#
# (c) 2016-2018 fisco-dev contributors.
#------------------------------------------------------------------------------

# common settings
set(ETH_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
set(ETH_SCRIPTS_DIR ${ETH_CMAKE_DIR}/scripts)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
message(FATAL "The ${PROJECT_NAME} does not support compiling on 32-bit systems")
endif()

if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
Expand Down Expand Up @@ -102,10 +91,8 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
if (NOT (GCC_VERSION VERSION_GREATER 5.4 OR GCC_VERSION VERSION_EQUAL 5.4))
message(FATAL_ERROR "${PROJECT_NAME} requires g++ 5.4 or greater. Current is ${GCC_VERSION}")
endif ()
if(NOT ARCH_NATIVE)
add_compile_options(-Wa,-march=generic64)
endif()
set(CMAKE_C_FLAGS "-std=c99")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MARCH_TYPE}")
set(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS} ${MARCH_TYPE}")

# Strong stack protection was only added in GCC 4.9.
# Use it if we have the option to do so.
Expand Down
12 changes: 11 additions & 1 deletion cmake/Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@ macro(eth_default_option O DEF)
endif()
endmacro()

# common settings
set(MARCH_TYPE "-march=x86-64 -mtune=generic -fvisibility=hidden -fvisibility-inlines-hidden")
set(ETH_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
set(ETH_SCRIPTS_DIR ${ETH_CMAKE_DIR}/scripts)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
message(FATAL "The ${PROJECT_NAME} does not support compiling on 32-bit systems")
endif()

EXECUTE_PROCESS(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE)

macro(configure_project)
set(NAME ${PROJECT_NAME})
Expand All @@ -56,6 +65,7 @@ macro(configure_project)
if(ARCH_NATIVE)
set(MARCH_TYPE "-march=native -mtune=native -fvisibility=hidden -fvisibility-inlines-hidden")
endif()

# unit tests
eth_default_option(TESTS OFF)
# mini demos
Expand Down Expand Up @@ -110,7 +120,7 @@ macro(print_config NAME)
message("-- CMake Cmake version and location ${CMAKE_VERSION} (${CMAKE_COMMAND})")
message("-- Compiler C++ compiler version ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
message("-- CMAKE_BUILD_TYPE Build type ${CMAKE_BUILD_TYPE}")
message("-- TARGET_PLATFORM Target platform ${CMAKE_SYSTEM_NAME}")
message("-- TARGET_PLATFORM Target platform ${CMAKE_SYSTEM_NAME} ${ARCHITECTURE}")
message("-- BUILD_STATIC Build static ${BUILD_STATIC}")
message("-- DEMO Build demos ${DEMO}")
message("-- TOOL Build tools ${TOOL}")
Expand Down
7 changes: 7 additions & 0 deletions cmake/ProjectBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ ExternalProject_Add(boost
--with-serialization
--with-program_options
--with-log
--with-iostreams
-s NO_BZIP2=1 -s NO_LZMA=1 -s NO_ZSTD=1
-j${CORES}
LOG_CONFIGURE 1
LOG_BUILD 1
Expand Down Expand Up @@ -146,4 +148,9 @@ set_property(TARGET Boost::Serialization PROPERTY IMPORTED_LOCATION ${BOOST_LIB_
set_property(TARGET Boost::Serialization PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${BOOST_INCLUDE_DIR})
add_dependencies(Boost::Serialization boost)

# for boost compress/base64encode
add_library(Boost::iostreams STATIC IMPORTED GLOBAL)
set_property(TARGET Boost::iostreams PROPERTY IMPORTED_LOCATION ${BOOST_LIB_DIR}/libboost_iostreams${BOOST_LIBRARY_SUFFIX})
set_property(TARGET Boost::iostreams PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${BOOST_INCLUDE_DIR})
add_dependencies(Boost::iostreams boost)
unset(SOURCE_DIR)
2 changes: 1 addition & 1 deletion cmake/ProjectEVMC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ExternalProject_Add(evmc
PREFIX ${CMAKE_SOURCE_DIR}/deps
DOWNLOAD_NO_PROGRESS 1
DOWNLOAD_NAME evmc-e0bd9d5d.tar.gz
URL https://github.com/FISCO-BCOS/evmc/archive/e0bd9d5dc68ec3a00fe9a3c5e81c98946449a20d.tar.gz
URL https://github.com/FISCO-BCOS/evmc/archive/e0bd9d5dc68ec3a00fe9a3c5e81c98946449a20d.tar.gz
URL_HASH SHA256=a9983643415c8473cd696ff4aa93e014308f0292057bce740bc0b4ca84a40462
# GIT_REPOSITORY https://github.com/FISCO-BCOS/evmc.git
# GIT_TAG e0bd9d5dc68ec3a00fe9a3c5e81c98946449a20d
Expand Down
4 changes: 3 additions & 1 deletion cmake/ProjectEVMONE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ExternalProject_Add(evmone
-DBUILD_SHARED_LIBS=off
-DEVMC_ROOT=<INSTALL_DIR>
-DHUNTER_ROOT=${CMAKE_SOURCE_DIR}/deps/src/.hunter
-DHUNTER_STATUS_DEBUG=ON
# BUILD_COMMAND cmake --build . -- -j
BUILD_IN_SOURCE 1
LOG_DOWNLOAD 1
Expand All @@ -27,4 +28,5 @@ set(EVMONE_LIBRARIES ${INSTALL_DIR}/lib/libevmone.a ${INSTALL_DIR}/lib/libintx.a
add_library(EVMONE INTERFACE IMPORTED)
set_property(TARGET EVMONE PROPERTY INTERFACE_LINK_LIBRARIES ${EVMONE_LIBRARIES})
set_property(TARGET EVMONE PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${EVMONE_INCLUDE_DIRS})
add_dependencies(EVMONE evmone EVMC)
add_dependencies(evmone EVMC)
add_dependencies(EVMONE evmone)
6 changes: 3 additions & 3 deletions cmake/ProjectGroupSig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ include(GNUInstallDirs)

ExternalProject_Add(GroupSigLib
PREFIX ${CMAKE_SOURCE_DIR}/deps
DOWNLOAD_NAME group_sig_lib-bbc7429e.tar.gz
DOWNLOAD_NAME group_sig_lib-868ec9ba.tar.gz
DOWNLOAD_NO_PROGRESS 1
URL https://github.com/FISCO-BCOS/group-signature-lib/archive/bbc7429ea36305c297867edb47e8c80af850c7ef.tar.gz
URL_HASH SHA256=963b9bcc7cad541dec70c124c22a40671c01872bea897927be99e402e9fb3d0b
URL https://github.com/FISCO-BCOS/group-signature-lib/archive/868ec9bad9facc8bb6059216e913194c08a62cfb.tar.gz
URL_HASH SHA256=a038561bd3f956e38fa4a49114a7386f47950c03d81ddb0ac9fb479889aa13f4
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DCRYPTOPP_ROOT=<INSTALL_DIR>
Expand Down
12 changes: 5 additions & 7 deletions cmake/ProjectTBB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@ include(ExternalProject)

set(TBB_LIB_SUFFIX a)
if (APPLE)
set(ENABLE_STD_LIB cpp0x=1 stdlib=libc++)
else()
set(ENABLE_STD_LIB cpp0x=1)
set(ENABLE_STD_LIB stdlib=libc++)
endif()

ExternalProject_Add(tbb
PREFIX ${CMAKE_SOURCE_DIR}/deps
DOWNLOAD_NO_PROGRESS 1
DOWNLOAD_NAME oneTBB-2020.1.tar.gz
URL https://codeload.github.com/oneapi-src/oneTBB/tar.gz/v2020.1
https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/oneTBB-2020.1.tar.gz
URL_HASH SHA256=7c96a150ed22bc3c6628bc3fef9ed475c00887b26d37bca61518d76a56510971
DOWNLOAD_NAME oneTBB-2020.3.tar.gz
URL https://codeload.github.com/oneapi-src/oneTBB/tar.gz/v2020.3
https://raw.githubusercontent.com/FISCO-BCOS/LargeFiles/master/libs/oneTBB-2020.3.tar.gz
URL_HASH SHA256=ebc4f6aa47972daed1f7bf71d100ae5bf6931c2e3144cf299c8cc7d041dca2f3
BUILD_IN_SOURCE 1
LOG_CONFIGURE 1
LOG_BUILD 1
Expand Down
Loading

0 comments on commit 65d8534

Please sign in to comment.