Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

* improve for sharding #6958

Closed
wants to merge 61 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
3fddb72
Merge pull request #6613 from EOSIO/release/1.6.x
b1bart Jan 15, 2019
a7fc838
Consolidated Security Fixes for 1.6.1
heifner Feb 5, 2019
3dd25b4
Bump version to 1.6.1
heifner Feb 6, 2019
1476688
Merge pull request #6709 from EOSIO/feature/1.6.1-test-omnibus
heifner Feb 7, 2019
5b79745
Merge pull request #6707 from EOSIO/bump-version-1.6.1
heifner Feb 7, 2019
dd79cb7
Merge remote-tracking branch 'origin/release/1.6.x' into merge-1.6.1-…
heifner Feb 7, 2019
1a14e9c
Merge pull request #6711 from EOSIO/merge-1.6.1-master
heifner Feb 7, 2019
f7ecd76
Fix boost 1.67 brew install
spoonincode Feb 11, 2019
74a143c
Set proper directory for baked in macOS LLVM_DIR
spoonincode Feb 11, 2019
0e78c1f
Merge pull request #6721 from EOSIO/local_boost167_brew_16x
jgiszczak Feb 12, 2019
bbf1a35
Merge pull request #6724 from EOSIO/fix_baked_macos_llvm_dir_16x
jgiszczak Feb 12, 2019
de26672
Add bk step to gather brew files for automatic update
Feb 13, 2019
23b06b7
Merge pull request #6729 from EOSIO/add-brew-updater
emorybarlow Feb 13, 2019
f2d4539
Update version to 1.6.2
heifner Feb 14, 2019
a8c01c8
add noninteractive option for build scripts
spoonincode Feb 17, 2019
2aa4bed
Limit assert message to 1024 chars
heifner Feb 18, 2019
77b91a1
Merge pull request #6759 from EOSIO/noninteractive_build_scripts_16x
jgiszczak Feb 18, 2019
0cbccbb
Don't unlink what we install via brew
spoonincode Feb 19, 2019
e093cfa
Merge pull request #6771 from EOSIO/fix_fresh_macos_16x
spoonincode Feb 19, 2019
56726b0
Make sure python-devel is installed for amazon linux builds
spoonincode Feb 19, 2019
250e33f
Merge pull request #6777 from EOSIO/python_devel_for_aws
spoonincode Feb 19, 2019
fd77886
Merge branch 'limit-assert-1.6.x' into org-limit-assert-1.6.x
heifner Feb 19, 2019
f97f0de
Merge pull request #6783 from EOSIO/org-limit-assert-1.6.x
heifner Feb 19, 2019
3d05285
Merge pull request #6746 from EOSIO/bump-version-1.6.2
arhag Feb 20, 2019
88a2d6a
Merge branch 'release/1.6.x' into merge-1.6.2
heifner Feb 20, 2019
c8f2607
Merge pull request #6784 from EOSIO/merge-1.6.2
heifner Feb 20, 2019
d995779
appbase: Block (queue) exit signals during shutdown
spoonincode Feb 22, 2019
22457bf
Merge pull request #6816 from EOSIO/block_signals_during_shutdown_17x
spoonincode Feb 23, 2019
3b15c4f
Wrong tag/branch name
fsword Feb 23, 2019
60dcf1a
Merge pull request #6823 from fsword/patch-1
heifner Feb 25, 2019
c699544
appbase: rework blocking (queuing) exit signals during shutdown
spoonincode Mar 1, 2019
99f7704
Merge pull request #6858 from EOSIO/appbase_sig_fix_v2_17x
spoonincode Mar 1, 2019
f5e4529
Update to appbase with FIFO pririty queue
heifner Mar 2, 2019
a234e21
Merge pull request #6859 from EOSIO/stable-priority-queue-v1.7.x
spoonincode Mar 2, 2019
7c1e14a
Call recover keys before transactions execution so trx->sig_cpu_usage…
heifner Mar 5, 2019
a8c1ced
Call recover keys before transactions execution so trx->sig_cpu_usage…
heifner Mar 5, 2019
00a29f3
appbase: ensure ctrl-c during startup handled correctly
spoonincode Mar 5, 2019
12d9961
Consolidated Security Fixes for 1.6.3
heifner Mar 5, 2019
b41c77d
Merge pull request #6868 from EOSIO/sig_fix_v3_17x
heifner Mar 5, 2019
0776c11
Consolidated Security Fixes for 1.7.0-rc2
heifner Mar 5, 2019
1d48532
Merge pull request #6870 from EOSIO/sig-cpu-usage-1.6.x
heifner Mar 6, 2019
cb95019
Merge pull request #6871 from EOSIO/sig-cpu-usage-1.7.x
heifner Mar 6, 2019
517fd2c
Merge pull request #6881 from EOSIO/feature/1.6.3-security-omnibus
heifner Mar 6, 2019
9958d83
Merge pull request #6882 from EOSIO/feature/1.7.0-rc2-security-omnibus
heifner Mar 6, 2019
bf85b4f
Bump version to 1.6.3
heifner Mar 6, 2019
a827e9d
Bump version to 1.7.0-rc2
heifner Mar 6, 2019
5e8e294
Merge pull request #6886 from EOSIO/bump-to-1.6.3
heifner Mar 6, 2019
5a9da91
Merge pull request #6887 from EOSIO/bump-to-1.7.0-rc2
heifner Mar 6, 2019
15902ac
Merge pull request #6889 from EOSIO/merge-1.6.3
heifner Mar 7, 2019
90120e2
add back integration_test contract; needed by tests/nodeos_under_min_…
arhag Mar 8, 2019
03b2320
Merge pull request #6901 from EOSIO/add-back-integration_test-contract
arhag Mar 8, 2019
e245e07
add libicu as dependency for .deb packages
spoonincode Mar 13, 2019
c83c212
Bump to 1.7.0
heifner Mar 13, 2019
a29d257
Merge pull request #6926 from EOSIO/fix_deb_libicu_dep
spoonincode Mar 13, 2019
222ef47
Add missing -1 to package names
heifner Mar 13, 2019
6845170
Merge pull request #6927 from EOSIO/bump-to-1.7.0
heifner Mar 13, 2019
ebebb90
Merge release/1.7.x at 1.7.0
heifner Mar 13, 2019
686f0de
Merge pull request #6928 from EOSIO/merge-release-1.7.0
heifner Mar 13, 2019
c33ae26
* improve for sharding
UMU618 Mar 18, 2019
4b94016
* make clearer
UMU618 Mar 21, 2019
21cfa55
* remove try-block changes
UMU618 Mar 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ set( CXX_STANDARD_REQUIRED ON)
set(VERSION_MAJOR 1)
set(VERSION_MINOR 7)
set(VERSION_PATCH 0)
set(VERSION_SUFFIX rc1)

if(VERSION_SUFFIX)
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_SUFFIX}")
Expand Down
44 changes: 3 additions & 41 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ cd eos/Docker
docker build . -t eosio/eos
```

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 v1.7.0-rc1 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 v1.7.0 tag, you could do the following:

```bash
docker build -t eosio/eos:v1.7.0-rc1 --build-arg branch=v1.7.0-rc1 .
docker build -t eosio/eos:v1.7.0 --build-arg branch=v1.7.0 .
```

By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image.
Expand Down Expand Up @@ -133,45 +133,7 @@ docker volume rm keosd-data-volume

### Docker Hub

Docker Hub image available from [docker hub](https://hub.docker.com/r/eosio/eos/).
Create a new `docker-compose.yaml` file with the content below

```bash
version: "3"

services:
nodeosd:
image: eosio/eos:latest
command: /opt/eosio/bin/nodeosd.sh --data-dir /opt/eosio/bin/data-dir -e --http-alias=nodeosd:8888 --http-alias=127.0.0.1:8888 --http-alias=localhost:8888
hostname: nodeosd
ports:
- 8888:8888
- 9876:9876
expose:
- "8888"
volumes:
- nodeos-data-volume:/opt/eosio/bin/data-dir

keosd:
image: eosio/eos:latest
command: /opt/eosio/bin/keosd --wallet-dir /opt/eosio/bin/data-dir --http-server-address=127.0.0.1:8900 --http-alias=localhost:8900 --http-alias=keosd:8900
hostname: keosd
links:
- nodeosd
volumes:
- keosd-data-volume:/opt/eosio/bin/data-dir

volumes:
nodeos-data-volume:
keosd-data-volume:

```

*NOTE:* the default version is the latest, you can change it to what you want

run `docker pull eosio/eos:latest`

run `docker-compose up`
Docker Hub images are now deprecated. New build images were discontinued on January 1st, 2019. The existing old images will be removed on June 1st, 2019.

### EOSIO Testnet

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,31 @@ $ brew remove eosio
```
#### Ubuntu 18.04 Debian Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.0/eosio_1.7.0-rc1-ubuntu-18.04_amd64.deb
$ sudo apt install ./eosio_1.7.0-rc1-ubuntu-18.04_amd64.deb
$ wget https://github.com/eosio/eos/releases/download/v1.7.0/eosio_1.7.0-1-ubuntu-18.04_amd64.deb
$ sudo apt install ./eosio_1.7.0-1-ubuntu-18.04_amd64.deb
```
#### Ubuntu 16.04 Debian Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.0/eosio_1.7.0-rc1-ubuntu-16.04_amd64.deb
$ sudo apt install ./eosio_1.7.0-rc1-ubuntu-16.04_amd64.deb
$ wget https://github.com/eosio/eos/releases/download/v1.7.0/eosio_1.7.0-1-ubuntu-16.04_amd64.deb
$ sudo apt install ./eosio_1.7.0-1-ubuntu-16.04_amd64.deb
```
#### Debian Package Uninstall
```sh
$ sudo apt remove eosio
```
#### Centos RPM Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.0/eosio-1.7.0-rc1.el7.x86_64.rpm
$ sudo yum install ./eosio-1.7.0-rc1.el7.x86_64.rpm
$ wget https://github.com/eosio/eos/releases/download/v1.7.0/eosio-1.7.0-1.el7.x86_64.rpm
$ sudo yum install ./eosio-1.7.0-1.el7.x86_64.rpm
```
#### Centos RPM Package Uninstall
```sh
$ sudo yum remove eosio.cdt
```
#### Fedora RPM Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.6.0/eosio-1.7.0-rc1.fc27.x86_64.rpm
$ sudo yum install ./eosio-1.7.0-rc1.fc27.x86_64.rpm
$ wget https://github.com/eosio/eos/releases/download/v1.7.0/eosio-1.7.0-1.fc27.x86_64.rpm
$ sudo yum install ./eosio-1.7.0-1.fc27.x86_64.rpm
```
#### Fedora RPM Package Uninstall
```sh
Expand Down
11 changes: 6 additions & 5 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,9 @@ struct controller_impl {
transaction_trace_ptr trace;
try {
auto start = fc::time_point::now();
const bool check_auth = !self.skip_auth_check() && !trx->implicit;
// call recover keys so that trx->sig_cpu_usage is set correctly
const flat_set<public_key_type>& recovered_keys = check_auth ? trx->recover_keys( chain_id ) : flat_set<public_key_type>();
if( !explicit_billed_cpu_time ) {
fc::microseconds already_consumed_time( EOS_PERCENT(trx->sig_cpu_usage.count(), conf.sig_cpu_bill_pct) );

Expand Down Expand Up @@ -1029,15 +1032,13 @@ struct controller_impl {

trx_context.delay = fc::seconds(trn.delay_sec);

if( !self.skip_auth_check() && !trx->implicit ) {
if( check_auth ) {
authorization.check_authorization(
trn.actions,
trx->recover_keys( chain_id ),
recovered_keys,
{},
trx_context.delay,
[](){}
/*std::bind(&transaction_context::add_cpu_usage_and_check_time, &trx_context,
std::placeholders::_1)*/,
[&trx_context](){ trx_context.checktime(); },
false
);
}
Expand Down
29 changes: 17 additions & 12 deletions plugins/mongo_db_plugin/mongo_db_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1427,39 +1427,44 @@ void mongo_db_plugin_impl::init() {
}

try {
// Due to the vast amounts of data, we suggest MongoDB administrators:
// 1. enableSharding database (default to EOS)
// 2. shardCollection: blocks, action_traces, transaction_traces, especially action_traces
// 3. Use compound index with shard key (default to _id), to improve query performance.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you saying you would like something added to the mongo_db_plugin for 1 and 2 OR that you merely suggest users should enableSharding on there database and collections?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest users should do 1 and 2 on production environment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the comment to make that clearer.

// blocks indexes
auto blocks = mongo_conn[db_name][blocks_col];
blocks.create_index( bsoncxx::from_json( R"xxx({ "block_num" : 1 })xxx" ));
blocks.create_index( bsoncxx::from_json( R"xxx({ "block_id" : 1 })xxx" ));
blocks.create_index( bsoncxx::from_json( R"xxx({ "block_num" : 1, "_id" : 1 })xxx" ));
blocks.create_index( bsoncxx::from_json( R"xxx({ "block_id" : 1, "_id" : 1 })xxx" ));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any feel for how much larger the indexes are when _id is added?

Copy link
Contributor Author

@UMU618 UMU618 Mar 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use EOS
db.action_traces.stats()

shows:

"indexSizes" : {
				"_id_" : 18581565440,
				"trx_id_1" : 16938258432,
				"block_num_1" : 4512980992,
				"block_num_1__id_1" : 21147549696

block_num_1__id_1 is 16,634,568,704 bytes larger than block_num_1, close to "_id_" : 18,581,565,440.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the plugin should even create any indexes and let that be left to the user. However, I'm inclined to accept this PR if you rebase to develop, remove the try-catch changes (or provide some article/test/proof it makes a difference), and update the comment.

Thanks.


auto block_states = mongo_conn[db_name][block_states_col];
block_states.create_index( bsoncxx::from_json( R"xxx({ "block_num" : 1 })xxx" ));
block_states.create_index( bsoncxx::from_json( R"xxx({ "block_id" : 1 })xxx" ));
block_states.create_index( bsoncxx::from_json( R"xxx({ "block_num" : 1, "_id" : 1 })xxx" ));
block_states.create_index( bsoncxx::from_json( R"xxx({ "block_id" : 1, "_id" : 1 })xxx" ));

// accounts indexes
accounts.create_index( bsoncxx::from_json( R"xxx({ "name" : 1 })xxx" ));
accounts.create_index( bsoncxx::from_json( R"xxx({ "name" : 1, "_id" : 1 })xxx" ));

// transactions indexes
auto trans = mongo_conn[db_name][trans_col];
trans.create_index( bsoncxx::from_json( R"xxx({ "trx_id" : 1 })xxx" ));
trans.create_index( bsoncxx::from_json( R"xxx({ "trx_id" : 1, "_id" : 1 })xxx" ));

auto trans_trace = mongo_conn[db_name][trans_traces_col];
trans_trace.create_index( bsoncxx::from_json( R"xxx({ "id" : 1 })xxx" ));
trans_trace.create_index( bsoncxx::from_json( R"xxx({ "id" : 1, "_id" : 1 })xxx" ));

// action traces indexes
auto action_traces = mongo_conn[db_name][action_traces_col];
action_traces.create_index( bsoncxx::from_json( R"xxx({ "block_num" : 1 })xxx" ));
action_traces.create_index( bsoncxx::from_json( R"xxx({ "block_num" : 1, "_id" : 1 })xxx" ));

// pub_keys indexes
auto pub_keys = mongo_conn[db_name][pub_keys_col];
pub_keys.create_index( bsoncxx::from_json( R"xxx({ "account" : 1, "permission" : 1 })xxx" ));
pub_keys.create_index( bsoncxx::from_json( R"xxx({ "public_key" : 1 })xxx" ));
pub_keys.create_index( bsoncxx::from_json( R"xxx({ "account" : 1, "permission" : 1, "_id" : 1 })xxx" ));
pub_keys.create_index( bsoncxx::from_json( R"xxx({ "public_key" : 1, "_id" : 1 })xxx" ));

// account_controls indexes
auto account_controls = mongo_conn[db_name][account_controls_col];
account_controls.create_index(
bsoncxx::from_json( R"xxx({ "controlled_account" : 1, "controlled_permission" : 1 })xxx" ));
account_controls.create_index( bsoncxx::from_json( R"xxx({ "controlling_account" : 1 })xxx" ));
bsoncxx::from_json( R"xxx({ "controlled_account" : 1, "controlled_permission" : 1, "_id" : 1 })xxx" ));
account_controls.create_index( bsoncxx::from_json( R"xxx({ "controlling_account" : 1, "_id" : 1 })xxx" ));

} catch (...) {
handle_mongo_exception( "create indexes", __LINE__ );
Expand Down
17 changes: 16 additions & 1 deletion plugins/net_plugin/net_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ namespace eosio {
void rejected_block(const block_id_type& id);

void recv_block(const connection_ptr& conn, const block_id_type& msg, uint32_t bnum);
void expire_blocks( uint32_t bnum );
void recv_transaction(const connection_ptr& conn, const transaction_id_type& id);
void recv_notice(const connection_ptr& conn, const notice_message& msg, bool generated);

Expand Down Expand Up @@ -1646,11 +1647,23 @@ namespace eosio {
}

void dispatch_manager::rejected_block(const block_id_type& id) {
fc_dlog(logger,"not sending rejected transaction ${tid}",("tid",id));
fc_dlog( logger, "rejected block ${id}", ("id", id) );
auto range = received_blocks.equal_range(id);
received_blocks.erase(range.first, range.second);
}

void dispatch_manager::expire_blocks( uint32_t lib_num ) {
for( auto i = received_blocks.begin(); i != received_blocks.end(); ) {
const block_id_type& blk_id = i->first;
uint32_t blk_num = block_header::num_from_id( blk_id );
if( blk_num <= lib_num ) {
i = received_blocks.erase( i );
} else {
++i;
}
}
}

void dispatch_manager::bcast_transaction(const transaction_metadata_ptr& ptrx) {
std::set<connection_ptr> skips;
const auto& id = ptrx->id;
Expand Down Expand Up @@ -2582,6 +2595,7 @@ namespace eosio {
}
else {
sync_master->rejected_block(c, blk_num);
dispatcher->rejected_block( blk_id );
}
}

Expand Down Expand Up @@ -2649,6 +2663,7 @@ namespace eosio {

controller& cc = chain_plug->chain();
uint32_t lib = cc.last_irreversible_block_num();
dispatcher->expire_blocks( lib );
for ( auto &c : connections ) {
auto &stale_txn = c->trx_state.get<by_block_num>();
stale_txn.erase( stale_txn.lower_bound(1), stale_txn.upper_bound(lib) );
Expand Down
131 changes: 131 additions & 0 deletions scripts/boost.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
class Boost < Formula
desc "Collection of portable C++ source libraries"
homepage "https://www.boost.org/"
revision 1
head "https://github.com/boostorg/boost.git"

stable do
url "https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2"
sha256 "2684c972994ee57fc5632e03bf044746f6eb45d4920c343937a465fd67a5adba"

# Remove for > 1.67.0
# Fix "error: no member named 'next' in namespace 'boost'"
# Upstream commit from 1 Dec 2017 "Add #include <boost/next_prior.hpp>; no
# longer in utility.hpp"
patch :p2 do
url "https://github.com/boostorg/lockfree/commit/12726cd.patch?full_index=1"
sha256 "f165823d961a588b622b20520668b08819eb5fdc08be7894c06edce78026ce0a"
end
end

bottle do
cellar :any
sha256 "265ab8beaa6fa26a7c305ef2e6aec8bd26ca1db105aca0aaca028f32c5245a90" => :high_sierra
sha256 "567f3e9a294413c1701b698d666a521cfdeec846e256c6e66576d5b70eb26f08" => :sierra
sha256 "3f3f687a620f656fe2ac54f01306e00e6bbc0e9797db284a8d272648d427e640" => :el_capitan
end

option "with-icu4c", "Build regexp engine with icu support"
option "without-single", "Disable building single-threading variant"
option "without-static", "Disable building static library variant"

deprecated_option "with-icu" => "with-icu4c"

depends_on "icu4c" => :optional

def install
# Force boost to compile with the desired compiler
open("user-config.jam", "a") do |file|
file.write "using darwin : : #{ENV.cxx} ;\n"
end

# libdir should be set by --prefix but isn't
bootstrap_args = ["--prefix=#{prefix}", "--libdir=#{lib}"]

if build.with? "icu4c"
icu4c_prefix = Formula["icu4c"].opt_prefix
bootstrap_args << "--with-icu=#{icu4c_prefix}"
else
bootstrap_args << "--without-icu"
end

# Handle libraries that will not be built.
without_libraries = ["python", "mpi"]

# Boost.Log cannot be built using Apple GCC at the moment. Disabled
# on such systems.
without_libraries << "log" if ENV.compiler == :gcc

bootstrap_args << "--without-libraries=#{without_libraries.join(",")}"

# layout should be synchronized with boost-python and boost-mpi
args = ["--prefix=#{prefix}",
"--libdir=#{lib}",
"-d2",
"-j#{ENV.make_jobs}",
"--layout=tagged",
"--user-config=user-config.jam",
"-sNO_LZMA=1",
"install"]

if build.with? "single"
args << "threading=multi,single"
else
args << "threading=multi"
end

if build.with? "static"
args << "link=shared,static"
else
args << "link=shared"
end

# Trunk starts using "clang++ -x c" to select C compiler which breaks C++11
# handling using ENV.cxx11. Using "cxxflags" and "linkflags" still works.
args << "cxxflags=-std=c++11"
if ENV.compiler == :clang
args << "cxxflags=-stdlib=libc++" << "linkflags=-stdlib=libc++"
end

system "./bootstrap.sh", *bootstrap_args
system "./b2", "headers"
system "./b2", *args
end

def caveats
s = ""
# ENV.compiler doesn't exist in caveats. Check library availability
# instead.
if Dir["#{lib}/libboost_log*"].empty?
s += <<~EOS
Building of Boost.Log is disabled because it requires newer GCC or Clang.
EOS
end

s
end

test do
(testpath/"test.cpp").write <<~EOS
#include <boost/algorithm/string.hpp>
#include <string>
#include <vector>
#include <assert.h>
using namespace boost::algorithm;
using namespace std;

int main()
{
string str("a,b");
vector<string> strVec;
split(strVec, str, is_any_of(","));
assert(strVec.size()==2);
assert(strVec[0]=="a");
assert(strVec[1]=="b");
return 0;
}
EOS
system ENV.cxx, "test.cpp", "-std=c++1y", "-L#{lib}", "-lboost_system", "-o", "test"
system "./test"
end
end
6 changes: 3 additions & 3 deletions scripts/generate_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ else
fi

if [ ${DISTRIB_RELEASE} = "16.04" ]; then
LIBSSL="libssl1.0.0"
RELEASE_SPECIFIC_DEPS="libssl1.0.0, libicu55"
elif [ ${DISTRIB_RELEASE} = "18.04" ]; then
LIBSSL="libssl1.1"
RELEASE_SPECIFIC_DEPS="libssl1.1, libicu60"
else
echo "Unrecognized Ubuntu version. Update generate_deb.sh. Not generating .deb file."
exit 1
Expand All @@ -37,7 +37,7 @@ echo "Package: ${PROJECT}
Version: ${VERSION_NO_SUFFIX}-${RELEASE}
Section: devel
Priority: optional
Depends: libc6, libgcc1, ${LIBSSL}, libstdc++6, libtinfo5, zlib1g, libusb-1.0-0, libcurl3-gnutls
Depends: libc6, libgcc1, ${RELEASE_SPECIFIC_DEPS}, libstdc++6, libtinfo5, zlib1g, libusb-1.0-0, libcurl3-gnutls
Architecture: amd64
Homepage: ${URL}
Maintainer: ${EMAIL}
Expand Down
Loading