Skip to content

Commit

Permalink
Fix: conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank-AFN committed Mar 6, 2020
2 parents 87822e4 + 7f0218c commit 77d087c
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 26 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
10 changes: 5 additions & 5 deletions CMakeModules/package.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
6 changes: 3 additions & 3 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" \
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 .

```

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -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主网上面运行,其交易量和流通市值远超以太坊,可发展的空间愈来愈广阔。
Expand Down
21 changes: 19 additions & 2 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ struct controller_impl {
template<typename Signal, typename Arg>
void emit( const Signal& s, Arg&& a ) {
try {
s(std::forward<Arg>(a));
s( std::forward<Arg>( a ));
} catch (std::bad_alloc& e) {
wlog( "std::bad_alloc" );
throw e;
} catch (boost::interprocess::bad_alloc& e) {
wlog( "bad alloc" );
throw e;
Expand Down Expand Up @@ -764,7 +767,6 @@ struct controller_impl {
return enc.result();
}


/**
* Sets fork database head to the genesis state.
*/
Expand Down Expand Up @@ -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<block_state_ptr>{};
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) {
Expand Down
1 change: 1 addition & 0 deletions libraries/chain/include/eosio/chain/controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ namespace eosio { namespace chain {
signal<void(const block_state_ptr&)> accepted_block_header;
signal<void(const block_state_ptr&)> accepted_block;
signal<void(const block_state_ptr&)> irreversible_block;
signal<void(const block_state_ptr&)> new_irreversible_block;
signal<void(const transaction_metadata_ptr&)> accepted_transaction;
signal<void(const transaction_trace_ptr&)> applied_transaction;
signal<void(const header_confirmation&)> accepted_confirmation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace eosio { namespace chain { namespace plugin_interface {
using accepted_block_header = channel_decl<struct accepted_block_header_tag, block_state_ptr>;
using accepted_block = channel_decl<struct accepted_block_tag, block_state_ptr>;
using irreversible_block = channel_decl<struct irreversible_block_tag, block_state_ptr>;
using new_irreversible_block = channel_decl<struct new_irreversible_block_tag,block_state_ptr>;
using accepted_transaction = channel_decl<struct accepted_transaction_tag, transaction_metadata_ptr>;
using applied_transaction = channel_decl<struct applied_transaction_tag, transaction_trace_ptr>;
using accepted_confirmation = channel_decl<struct accepted_confirmation_tag, header_confirmation>;
Expand Down
10 changes: 9 additions & 1 deletion plugins/chain_plugin/chain_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ class chain_plugin_impl {
,accepted_block_header_channel(app().get_channel<channels::accepted_block_header>())
,accepted_block_channel(app().get_channel<channels::accepted_block>())
,irreversible_block_channel(app().get_channel<channels::irreversible_block>())
,new_irreversible_block_channel(app().get_channel<channels::new_irreversible_block>())
,accepted_transaction_channel(app().get_channel<channels::accepted_transaction>())
,applied_transaction_channel(app().get_channel<channels::applied_transaction>())
,accepted_confirmation_channel(app().get_channel<channels::accepted_confirmation>())
Expand Down Expand Up @@ -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;
Expand All @@ -209,6 +211,7 @@ class chain_plugin_impl {
fc::optional<scoped_connection> accepted_block_header_connection;
fc::optional<scoped_connection> accepted_block_connection;
fc::optional<scoped_connection> irreversible_block_connection;
fc::optional<scoped_connection> new_irreversible_block_connection;
fc::optional<scoped_connection> accepted_transaction_connection;
fc::optional<scoped_connection> applied_transaction_connection;
fc::optional<scoped_connection> accepted_confirmation_connection;
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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();
Expand Down
16 changes: 10 additions & 6 deletions plugins/http_plugin/http_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t>()->default_value(1024*1024), "The maximum body size in bytes allowed for incoming RPC requests")
("http-max-bytes-in-flight-mb", bpo::value<uint32_t>()->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<bool>()->default_value(true), "If set to false, then any incoming \"Host\" header is considered valid")
("http-alias", bpo::value<std::vector<string>>()->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<uint32_t>()->default_value(1024*1024),
"The maximum body size in bytes allowed for incoming RPC requests")
("http-max-bytes-in-flight-mb", bpo::value<uint32_t>()->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<bool>()->default_value(true),
"If set to false, then any incoming \"Host\" header is considered valid")
("http-alias", bpo::value<std::vector<string>>()->composing(),
"Additionaly acceptable values for the \"Host\" header of incoming HTTP requests, can be specified multiple times. Includes http/s_server_address by default.")
;
}

Expand Down

0 comments on commit 77d087c

Please sign in to comment.