diff --git a/CMakeLists.txt b/CMakeLists.txt index 52f2d262bed..f92cce262d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ set( CXX_STANDARD_REQUIRED ON) set(VERSION_MAJOR 3) set(VERSION_MINOR 0) -set(VERSION_PATCH 3) +set(VERSION_PATCH 5) if(VERSION_SUFFIX) set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_SUFFIX}") diff --git a/CMakeModules/package.cmake b/CMakeModules/package.cmake index 895ce5459f3..6a22c87b668 100644 --- a/CMakeModules/package.cmake +++ b/CMakeModules/package.cmake @@ -1,8 +1,8 @@ -set(VENDOR "block.one") -set(PROJECT_NAME "eosio") -set(DESC "Software for the EOS.IO network") -set(URL "https://github.com/eosio/eos") -set(EMAIL "support@block.one") +set(VENDOR "BOS Core") +set(PROJECT_NAME "bos") +set(DESC "Software for the BOS network") +set(URL "https://github.com/boscore/bos") +set(EMAIL "support@boscore.io") configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_package.sh.in ${CMAKE_BINARY_DIR}/packages/generate_package.sh @ONLY) configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_bottle.sh ${CMAKE_BINARY_DIR}/packages/generate_bottle.sh COPYONLY) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index fd2ece5e91a..e04324406d8 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -1,11 +1,11 @@ -FROM boscore/builder as builder +FROM boscore/builder:v2.0.4 as builder ARG branch=master ARG symbol=EOS ENV OPENSSL_ROOT_DIR /usr/include/openssl RUN git clone -b $branch https://github.com/boscore/bos.git --recursive \ - && cd bos && echo "$branch:$(git rev-parse HEAD)" > /etc/eosio-version \ + && cd bos && echo "$branch:$(git rev-parse HEAD)" > /etc/boscore-version \ && cmake -H. -B"/tmp/build" -GNinja -DCMAKE_BUILD_TYPE=Release -DWASM_ROOT=/opt/wasm -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_C_COMPILER=clang -DCMAKE_INSTALL_PREFIX=/tmp/build -DBUILD_MONGO_DB_PLUGIN=true -DCORE_SYMBOL_NAME=$symbol \ -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" -DCMAKE_CXX_STANDARD_LIBRARIES="-lpthread" \ @@ -17,7 +17,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl COPY --from=builder /usr/local/lib/* /usr/local/lib/ COPY --from=builder /tmp/build/bin /opt/eosio/bin COPY --from=builder /bos/Docker/config.ini / -COPY --from=builder /etc/eosio-version /etc +COPY --from=builder /etc/boscore-version /etc COPY --from=builder /bos/Docker/nodeosd.sh /opt/eosio/bin/nodeosd.sh ENV EOSIO_ROOT=/opt/eosio RUN chmod +x /opt/eosio/bin/nodeosd.sh diff --git a/Docker/README.md b/Docker/README.md index 087105fed7b..2f23146cb33 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -20,10 +20,10 @@ cd bos/Docker docker build . -t boscore/bos -s BOS ``` -The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v3.0.3 tag, you could do the following: +The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v3.0.5 tag, you could do the following: ```bash -docker build -t boscore/bos:v3.0.3 --build-arg branch=v3.0.3 . +docker build -t boscore/bos:v3.0.5 --build-arg branch=v3.0.5 . ``` diff --git a/README.md b/README.md index cab40f08390..c8f6380148b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# BOSCore - Born for DApps. Born for Usability. +# BOSCore - Using technology to create a trusted business ecosystem -## BOSCore Version: v3.0.3 -### Basic EOSIO Version: v1.6.6 (support REX) +## BOSCore Version: v3.0.5 +### Basic EOSIO Version: v1.6.6 (support REX, part 2.0.x) # Background The emergence of EOS has brought new imagination to the blockchain. In just a few months since the main network was launched, the version has undergone dozens of upgrades, not only the stability has been greatly improved, but also the new functions have been gradually realized. The node team is also actively involved in building the EOSIO ecosystem. What is even more exciting is that EOS has attracted more and more development teams. There are already hundreds of DApp running on the EOS main network. The transaction volume and circulation market value far exceed Ethereum, and the space for development is growing broader. diff --git a/README_CN.md b/README_CN.md index 5603854c913..ce47f8b538d 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,7 +1,7 @@ -# BOSCore - 更可用的链,为DApp而生。 +# BOSCore - 用技术打造可信商业生态 -## BOSCore Version: v3.0.3 -### Basic EOSIO Version: v1.6.6 (support REX) +## BOSCore Version: v3.0.5 +### Basic EOSIO Version: v1.6.6 (support REX, part 2.0.x) # 背景 EOS的出现给区块链带来了新的想象力,主网启动短短几个月以来,版本经历了几十次升级,不仅稳定性得到了很大提高,并且新功能也逐步实现,各个节点团队也积极参与建设EOSIO生态。让人更加兴奋的是,EOS已经吸引了越来越多的开发团队,当前已经有数百个DApp在EOS主网上面运行,其交易量和流通市值远超以太坊,可发展的空间愈来愈广阔。 diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index 0e48c80db86..50b3dd50deb 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -244,7 +244,10 @@ struct controller_impl { template void emit( const Signal& s, Arg&& a ) { try { - s(std::forward(a)); + s( std::forward( a )); + } catch (std::bad_alloc& e) { + wlog( "std::bad_alloc" ); + throw e; } catch (boost::interprocess::bad_alloc& e) { wlog( "bad alloc" ); throw e; @@ -764,7 +767,6 @@ struct controller_impl { return enc.result(); } - /** * Sets fork database head to the genesis state. */ @@ -1754,7 +1756,22 @@ struct controller_impl { if (!pbft_enabled) return; if ( pending_pbft_lib ) { + //this is a temp solution for getting current lib, should not use anywhere else; + auto current_lib = fork_db.get_block_in_current_chain_by_num(head->bft_irreversible_blocknum)->id; fork_db.set_bft_irreversible(*pending_pbft_lib); + if (!replaying) { + auto libs_to_be_emitted = vector{}; + auto b = fork_db.get_block(*pending_pbft_lib); + while (b->id != current_lib) { + libs_to_be_emitted.emplace_back(b); + b = fork_db.get_block(b->prev()); + } + while (!libs_to_be_emitted.empty()) { + emit( self.new_irreversible_block, libs_to_be_emitted.back() ); + libs_to_be_emitted.pop_back(); + } + } + pending_pbft_lib.reset(); if (!pending && read_mode != db_read_mode::IRREVERSIBLE) { diff --git a/libraries/chain/include/eosio/chain/controller.hpp b/libraries/chain/include/eosio/chain/controller.hpp index d9eb15c79fb..cee256a5c09 100644 --- a/libraries/chain/include/eosio/chain/controller.hpp +++ b/libraries/chain/include/eosio/chain/controller.hpp @@ -301,6 +301,7 @@ namespace eosio { namespace chain { signal accepted_block_header; signal accepted_block; signal irreversible_block; + signal new_irreversible_block; signal accepted_transaction; signal applied_transaction; signal accepted_confirmation; diff --git a/plugins/chain_interface/include/eosio/chain/plugin_interface.hpp b/plugins/chain_interface/include/eosio/chain/plugin_interface.hpp index 9a3212a56fd..cb99e7130f4 100644 --- a/plugins/chain_interface/include/eosio/chain/plugin_interface.hpp +++ b/plugins/chain_interface/include/eosio/chain/plugin_interface.hpp @@ -28,6 +28,7 @@ namespace eosio { namespace chain { namespace plugin_interface { using accepted_block_header = channel_decl; using accepted_block = channel_decl; using irreversible_block = channel_decl; + using new_irreversible_block = channel_decl; using accepted_transaction = channel_decl; using applied_transaction = channel_decl; using accepted_confirmation = channel_decl; diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index e4e2a4ea44a..c882a9631ca 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -144,6 +144,7 @@ class chain_plugin_impl { ,accepted_block_header_channel(app().get_channel()) ,accepted_block_channel(app().get_channel()) ,irreversible_block_channel(app().get_channel()) + ,new_irreversible_block_channel(app().get_channel()) ,accepted_transaction_channel(app().get_channel()) ,applied_transaction_channel(app().get_channel()) ,accepted_confirmation_channel(app().get_channel()) @@ -189,10 +190,11 @@ class chain_plugin_impl { channels::accepted_block_header::channel_type& accepted_block_header_channel; channels::accepted_block::channel_type& accepted_block_channel; channels::irreversible_block::channel_type& irreversible_block_channel; + channels::new_irreversible_block::channel_type& new_irreversible_block_channel; channels::accepted_transaction::channel_type& accepted_transaction_channel; channels::applied_transaction::channel_type& applied_transaction_channel; channels::accepted_confirmation::channel_type& accepted_confirmation_channel; - incoming::channels::block::channel_type& incoming_block_channel; + incoming::channels::block::channel_type& incoming_block_channel; // retained references to methods for easy calling incoming::methods::block_sync::method_type& incoming_block_sync_method; @@ -209,6 +211,7 @@ class chain_plugin_impl { fc::optional accepted_block_header_connection; fc::optional accepted_block_connection; fc::optional irreversible_block_connection; + fc::optional new_irreversible_block_connection; fc::optional accepted_transaction_connection; fc::optional applied_transaction_connection; fc::optional accepted_confirmation_connection; @@ -786,6 +789,10 @@ void chain_plugin::plugin_initialize(const variables_map& options) { my->irreversible_block_channel.publish( blk ); } ); + my->new_irreversible_block_connection = my->chain->new_irreversible_block.connect( [this]( const block_state_ptr& blk ) { + my->new_irreversible_block_channel.publish( blk ); + } ); + my->accepted_transaction_connection = my->chain->accepted_transaction.connect( [this]( const transaction_metadata_ptr& meta ) { my->accepted_transaction_channel.publish( meta ); @@ -910,6 +917,7 @@ void chain_plugin::plugin_shutdown() { my->accepted_block_header_connection.reset(); my->accepted_block_connection.reset(); my->irreversible_block_connection.reset(); + my->new_irreversible_block_connection.reset(); my->accepted_transaction_connection.reset(); my->applied_transaction_connection.reset(); my->accepted_confirmation_connection.reset(); diff --git a/plugins/http_plugin/http_plugin.cpp b/plugins/http_plugin/http_plugin.cpp index f6672720ec8..94d749deb34 100644 --- a/plugins/http_plugin/http_plugin.cpp +++ b/plugins/http_plugin/http_plugin.cpp @@ -401,12 +401,16 @@ namespace eosio { if (v) ilog("configured http with Access-Control-Allow-Credentials: true"); })->default_value(false), "Specify if Access-Control-Allow-Credentials: true should be returned on each request.") - ("max-body-size", bpo::value()->default_value(1024*1024), "The maximum body size in bytes allowed for incoming RPC requests") - ("http-max-bytes-in-flight-mb", bpo::value()->default_value(500), - "Maximum size in megabytes http_plugin should use for processing http requests. 503 error response when exceeded." ) - ("verbose-http-errors", bpo::bool_switch()->default_value(false), "Append the error log to HTTP responses") - ("http-validate-host", boost::program_options::value()->default_value(true), "If set to false, then any incoming \"Host\" header is considered valid") - ("http-alias", bpo::value>()->composing(), "Additionaly acceptable values for the \"Host\" header of incoming HTTP requests, can be specified multiple times. Includes http/s_server_address by default.") + ("max-body-size", bpo::value()->default_value(1024*1024), + "The maximum body size in bytes allowed for incoming RPC requests") + ("http-max-bytes-in-flight-mb", bpo::value()->default_value(500), + "Maximum size in megabytes http_plugin should use for processing http requests. 503 error response when exceeded." ) + ("verbose-http-errors", bpo::bool_switch()->default_value(false), + "Append the error log to HTTP responses") + ("http-validate-host", boost::program_options::value()->default_value(true), + "If set to false, then any incoming \"Host\" header is considered valid") + ("http-alias", bpo::value>()->composing(), + "Additionaly acceptable values for the \"Host\" header of incoming HTTP requests, can be specified multiple times. Includes http/s_server_address by default.") ; }