From 25757a31a43c5c23ec2d283843ed8ea8c16fc9aa Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Oct 2018 14:57:43 -0400 Subject: [PATCH 01/16] remove llvm@4 force link --- CMakeLists.txt | 8 ++++++++ scripts/eosio_build_darwin.sh | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 191368b0ddf..d13c59211c7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,14 @@ endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libraries/fc/CMakeModules") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules") +if (UNIX) + if (APPLE) + if (LLVM_DIR STREQUAL "" OR NOT LLVM_DIR) + set(LLVM_DIR "/usr/local/Cellar/llvm@4/4.0.1/lib/cmake/llvm") + endif() + endif() +endif() + include( GNUInstallDirs ) include( VersionMacros ) include( SetupTargetMacros ) diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index c6e28fb73f6..1db4c3e5f02 100644 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -159,7 +159,9 @@ printf "\\tExiting now.\\n\\n" exit 1; fi - if ! "${BREW}" unlink {DEP} && "${BREW}" link --force ${DEP} + if [[ "$DEP" == "llvm@4" ]]; then + "${BREW}" unlink ${DEP} + elif ! "${BREW}" unlink ${DEP} && "${BREW}" link --force ${DEP} then printf "\\tHomebrew exited with the above errors.\\n" printf "\\tExiting now.\\n\\n" From 64fce6ba7590c82ddae2f7bbbac492ca2a949a2e Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Mon, 22 Oct 2018 15:21:00 -0400 Subject: [PATCH 02/16] Update eosio_build_darwin.sh --- scripts/eosio_build_darwin.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/eosio_build_darwin.sh b/scripts/eosio_build_darwin.sh index 1db4c3e5f02..a91e1611d44 100644 --- a/scripts/eosio_build_darwin.sh +++ b/scripts/eosio_build_darwin.sh @@ -159,8 +159,8 @@ printf "\\tExiting now.\\n\\n" exit 1; fi - if [[ "$DEP" == "llvm@4" ]]; then - "${BREW}" unlink ${DEP} + if [[ "$DEP" == "llvm@4" ]]; then + "${BREW}" unlink ${DEP} elif ! "${BREW}" unlink ${DEP} && "${BREW}" link --force ${DEP} then printf "\\tHomebrew exited with the above errors.\\n" From 25d5073ef38b1fb45607a91c52b603cb17c1d727 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Wed, 24 Oct 2018 09:56:55 -0500 Subject: [PATCH 03/16] transaction_traces are now stored if enabled even if action_traces are disabled. Filtering still applies. --- plugins/mongo_db_plugin/mongo_db_plugin.cpp | 34 ++++++++++++--------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/plugins/mongo_db_plugin/mongo_db_plugin.cpp b/plugins/mongo_db_plugin/mongo_db_plugin.cpp index d66cdfebf66..74644dfcece 100644 --- a/plugins/mongo_db_plugin/mongo_db_plugin.cpp +++ b/plugins/mongo_db_plugin/mongo_db_plugin.cpp @@ -98,7 +98,8 @@ class mongo_db_plugin_impl { bool add_action_trace( mongocxx::bulk_write& bulk_action_traces, const chain::action_trace& atrace, const chain::transaction_trace_ptr& t, - bool executed, const std::chrono::milliseconds& now ); + bool executed, const std::chrono::milliseconds& now, + bool& write_ttrace ); void update_account(const chain::action& act); @@ -799,7 +800,8 @@ void mongo_db_plugin_impl::_process_accepted_transaction( const chain::transacti bool mongo_db_plugin_impl::add_action_trace( mongocxx::bulk_write& bulk_action_traces, const chain::action_trace& atrace, const chain::transaction_trace_ptr& t, - bool executed, const std::chrono::milliseconds& now ) + bool executed, const std::chrono::milliseconds& now, + bool& write_ttrace ) { using namespace bsoncxx::types; using bsoncxx::builder::basic::kvp; @@ -809,8 +811,10 @@ mongo_db_plugin_impl::add_action_trace( mongocxx::bulk_write& bulk_action_traces } bool added = false; - if( start_block_reached && store_action_traces && - filter_include( atrace.receipt.receiver, atrace.act.name, atrace.act.authorization ) ) { + bool in_filter = (store_action_traces || store_transaction_traces) && start_block_reached && + filter_include( atrace.receipt.receiver, atrace.act.name, atrace.act.authorization ); + write_ttrace |= in_filter; + if( start_block_reached && store_action_traces && in_filter ) { auto action_traces_doc = bsoncxx::builder::basic::document{}; const chain::base_action_trace& base = atrace; // without inline action traces @@ -841,7 +845,7 @@ mongo_db_plugin_impl::add_action_trace( mongocxx::bulk_write& bulk_action_traces } for( const auto& iline_atrace : atrace.inline_traces ) { - added |= add_action_trace( bulk_action_traces, iline_atrace, t, executed, now ); + added |= add_action_trace( bulk_action_traces, iline_atrace, t, executed, now, write_ttrace ); } return added; @@ -861,22 +865,22 @@ void mongo_db_plugin_impl::_process_applied_transaction( const chain::transactio bulk_opts.ordered(false); mongocxx::bulk_write bulk_action_traces = _action_traces.create_bulk_write(bulk_opts); bool write_atraces = false; + bool write_ttrace = false; // filters apply to transaction_traces as well bool executed = t->receipt.valid() && t->receipt->status == chain::transaction_receipt_header::executed; for( const auto& atrace : t->action_traces ) { try { - write_atraces |= add_action_trace( bulk_action_traces, atrace, t, executed, now ); + write_atraces |= add_action_trace( bulk_action_traces, atrace, t, executed, now, write_ttrace ); } catch(...) { handle_mongo_exception("add action traces", __LINE__); } } if( !start_block_reached ) return; //< add_action_trace calls update_account which must be called always - if( !write_atraces ) return; //< do not insert transaction_trace if all action_traces filtered out // transaction trace insert - if( store_transaction_traces ) { + if( store_transaction_traces && write_ttrace ) { try { auto v = to_variant_with_abi( *t ); string json = fc::json::to_string( v ); @@ -909,13 +913,15 @@ void mongo_db_plugin_impl::_process_applied_transaction( const chain::transactio } // insert action_traces - try { - if( !bulk_action_traces.execute() ) { - EOS_ASSERT( false, chain::mongo_db_insert_fail, - "Bulk action traces insert failed for transaction trace: ${id}", ("id", t->id) ); + if( write_atraces ) { + try { + if( !bulk_action_traces.execute() ) { + EOS_ASSERT( false, chain::mongo_db_insert_fail, + "Bulk action traces insert failed for transaction trace: ${id}", ("id", t->id) ); + } + } catch( ... ) { + handle_mongo_exception( "action traces insert", __LINE__ ); } - } catch( ... ) { - handle_mongo_exception( "action traces insert", __LINE__ ); } } From dfaed93e3c8f9ce3f4ad08b5a92ab37b7d78e95e Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Wed, 24 Oct 2018 11:37:46 -0500 Subject: [PATCH 04/16] Add const, peer review fix --- plugins/mongo_db_plugin/mongo_db_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mongo_db_plugin/mongo_db_plugin.cpp b/plugins/mongo_db_plugin/mongo_db_plugin.cpp index 74644dfcece..3ef0ee252ac 100644 --- a/plugins/mongo_db_plugin/mongo_db_plugin.cpp +++ b/plugins/mongo_db_plugin/mongo_db_plugin.cpp @@ -811,7 +811,7 @@ mongo_db_plugin_impl::add_action_trace( mongocxx::bulk_write& bulk_action_traces } bool added = false; - bool in_filter = (store_action_traces || store_transaction_traces) && start_block_reached && + const bool in_filter = (store_action_traces || store_transaction_traces) && start_block_reached && filter_include( atrace.receipt.receiver, atrace.act.name, atrace.act.authorization ); write_ttrace |= in_filter; if( start_block_reached && store_action_traces && in_filter ) { From 84534384ede455f20af56c6e4c6252729e24754d Mon Sep 17 00:00:00 2001 From: Jonathan Giszczak Date: Wed, 24 Oct 2018 14:45:25 -0500 Subject: [PATCH 05/16] Correct a bad tag in wrong first block log message. --- libraries/chain/controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index 9a6c4d0f958..6fc72c1e8bc 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -244,7 +244,7 @@ struct controller_impl { bool append_to_blog = false; if (!log_head) { if (s->block) { - EOS_ASSERT(s->block_num == blog.first_block_num(), block_log_exception, "block log has no blocks and is appending the wrong first block. Expected ${expecgted}, but received: ${actual}", + EOS_ASSERT(s->block_num == blog.first_block_num(), block_log_exception, "block log has no blocks and is appending the wrong first block. Expected ${expected}, but received: ${actual}", ("expected", blog.first_block_num())("actual", s->block_num)); append_to_blog = true; } else { From fa8dc3f9f69a4dde30f882081fdb507d2cad7230 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 26 Oct 2018 08:28:18 -0500 Subject: [PATCH 06/16] Only log integrity hash with snapshot startup --- libraries/chain/controller.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index 6fc72c1e8bc..e5e8cb0aed5 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -386,7 +386,9 @@ struct controller_impl { db.undo(); } - ilog( "database initialized with hash: ${hash}", ("hash", calculate_integrity_hash())); + if( snapshot ) { + ilog( "database initialized with hash: ${hash}", ("hash", calculate_integrity_hash()) ); + } } From 9b3aaa23e31903efa86d3fea5e5f7a9acc8dfaff Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 26 Oct 2018 08:33:47 -0500 Subject: [PATCH 07/16] Calculate hash before ilog so timing of log is correct. --- libraries/chain/controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index e5e8cb0aed5..41e9d551728 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -387,7 +387,8 @@ struct controller_impl { } if( snapshot ) { - ilog( "database initialized with hash: ${hash}", ("hash", calculate_integrity_hash()) ); + const auto hash = calculate_integrity_hash(); + ilog( "database initialized with hash: ${hash}", ("hash", hash) ); } } From d72e566f2749582b0be4e2e751999934ca1ee28c Mon Sep 17 00:00:00 2001 From: Brian Johnson Date: Mon, 29 Oct 2018 11:30:23 -0500 Subject: [PATCH 08/16] Changing non-json output to go to stderr. GH #6177 --- programs/cleos/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/cleos/main.cpp b/programs/cleos/main.cpp index df57ae0bea2..4eae07e9bef 100644 --- a/programs/cleos/main.cpp +++ b/programs/cleos/main.cpp @@ -2388,7 +2388,7 @@ int main( int argc, char** argv ) { send_actions(std::move(actions), 10000, packed_transaction::zlib); } } else { - std::cout << "Skipping set code because the new code is the same as the existing code" << std::endl; + std::cerr << "Skipping set code because the new code is the same as the existing code" << std::endl; } }; @@ -2437,7 +2437,7 @@ int main( int argc, char** argv ) { send_actions(std::move(actions), 10000, packed_transaction::zlib); } } else { - std::cout << "Skipping set abi because the new abi is the same as the existing abi" << std::endl; + std::cerr << "Skipping set abi because the new abi is the same as the existing abi" << std::endl; } }; From eb8603497e6f18f2ad5fc7245bed0e7d12a1c102 Mon Sep 17 00:00:00 2001 From: Brian Johnson Date: Mon, 29 Oct 2018 13:58:22 -0500 Subject: [PATCH 09/16] Wrapped error output in localized. GH #6177 --- programs/cleos/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/cleos/main.cpp b/programs/cleos/main.cpp index 4eae07e9bef..b2a2c326353 100644 --- a/programs/cleos/main.cpp +++ b/programs/cleos/main.cpp @@ -2388,7 +2388,7 @@ int main( int argc, char** argv ) { send_actions(std::move(actions), 10000, packed_transaction::zlib); } } else { - std::cerr << "Skipping set code because the new code is the same as the existing code" << std::endl; + std::cerr << localized("Skipping set code because the new code is the same as the existing code") << std::endl; } }; @@ -2437,7 +2437,7 @@ int main( int argc, char** argv ) { send_actions(std::move(actions), 10000, packed_transaction::zlib); } } else { - std::cerr << "Skipping set abi because the new abi is the same as the existing abi" << std::endl; + std::cerr << localized("Skipping set abi because the new abi is the same as the existing abi") << std::endl; } }; From e332d0c149cd49e4b93b1401e5bf8dce4b35262a Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Mon, 29 Oct 2018 17:21:16 -0400 Subject: [PATCH 10/16] adopt fix in the fc submodule for time point conversion to string --- libraries/fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fc b/libraries/fc index 3e5ce84852f..b9defaa2820 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit 3e5ce84852f32dce576f2b8d30365326b71c91e2 +Subproject commit b9defaa28208b575e53034cbd8f23ef76880cb8c From 976e710d3f1faf9cdf041319e3aa7f38a8a6a4b7 Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Mon, 29 Oct 2018 17:29:08 -0400 Subject: [PATCH 11/16] some compilers wanted specific types --- libraries/fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fc b/libraries/fc index b9defaa2820..aa3d1d4d965 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit b9defaa28208b575e53034cbd8f23ef76880cb8c +Subproject commit aa3d1d4d965f46c2447d45d0bdbb2da116637e43 From 287439622223daae7fd0721d5f7da37b0be9ad51 Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Mon, 29 Oct 2018 17:38:38 -0400 Subject: [PATCH 12/16] more pedantic compiler fixes --- libraries/fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fc b/libraries/fc index aa3d1d4d965..cd442a188a4 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit aa3d1d4d965f46c2447d45d0bdbb2da116637e43 +Subproject commit cd442a188a48621fbb4ac76c785bb395fdc7c315 From 06ef245c31283de96e93f8fe05e4151b3b5c8b74 Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Tue, 30 Oct 2018 10:28:59 -0400 Subject: [PATCH 13/16] adopt ISO duration format --- libraries/fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fc b/libraries/fc index cd442a188a4..810e035de45 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit cd442a188a48621fbb4ac76c785bb395fdc7c315 +Subproject commit 810e035de455525dec5c140eb8c0d7e7f3c1ee5d From bb10d710b4c5aa009e54af3307e0653e56c9296a Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Tue, 30 Oct 2018 11:00:03 -0400 Subject: [PATCH 14/16] bump FC submodule to the v1.4.x release branch with this feature included --- libraries/fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fc b/libraries/fc index 810e035de45..9adee183df3 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit 810e035de455525dec5c140eb8c0d7e7f3c1ee5d +Subproject commit 9adee183df3ce4170d1f362c96d960132bd77ed9 From 73ceaa1c96d8dbf19ac538528fba33b30b6b0913 Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Tue, 30 Oct 2018 15:32:43 -0400 Subject: [PATCH 15/16] bump version to 1.4.2 --- CMakeLists.txt | 2 +- Docker/README.md | 4 ++-- README.md | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d13c59211c7..8c57c7e39e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ set( CXX_STANDARD_REQUIRED ON) set(VERSION_MAJOR 1) set(VERSION_MINOR 4) -set(VERSION_PATCH 1) +set(VERSION_PATCH 2) set( CLI_CLIENT_EXECUTABLE_NAME cleos ) set( NODE_EXECUTABLE_NAME nodeos ) diff --git a/Docker/README.md b/Docker/README.md index 34940917748..f3896149e7a 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -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.4.1 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.4.2 tag, you could do the following: ```bash -docker build -t eosio/eos:v1.4.1 --build-arg branch=v1.4.1 . +docker build -t eosio/eos:v1.4.2 --build-arg branch=v1.4.2 . ``` By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image. diff --git a/README.md b/README.md index b9dfa7b7e1f..13cb78d981c 100644 --- a/README.md +++ b/README.md @@ -38,13 +38,13 @@ $ brew remove eosio ``` #### Ubuntu 18.04 Debian Package Install ```sh -$ wget https://github.com/eosio/eos/releases/download/v1.4.1/eosio-1.4.1.ubuntu-18.04-x86_64.deb -$ sudo apt install ./eosio-1.4.1.ubuntu-18.04-x86_64.deb +$ wget https://github.com/eosio/eos/releases/download/v1.4.2/eosio-1.4.2.ubuntu-18.04-x86_64.deb +$ sudo apt install ./eosio-1.4.2.ubuntu-18.04-x86_64.deb ``` #### Ubuntu 16.04 Debian Package Install ```sh -$ wget https://github.com/eosio/eos/releases/download/v1.4.1/eosio-1.4.1.ubuntu-16.04-x86_64.deb -$ sudo apt install ./eosio-1.4.1.ubuntu-16.04-x86_64.deb +$ wget https://github.com/eosio/eos/releases/download/v1.4.2/eosio-1.4.2.ubuntu-16.04-x86_64.deb +$ sudo apt install ./eosio-1.4.2.ubuntu-16.04-x86_64.deb ``` #### Debian Package Uninstall ```sh @@ -52,8 +52,8 @@ $ sudo apt remove eosio ``` #### RPM Package Install ```sh -$ wget https://github.com/eosio/eos/releases/download/v1.4.1/eosio-1.4.1.x86_64-0.x86_64.rpm -$ sudo yum install ./eosio-1.4.1.x86_64-0.x86_64.rpm +$ wget https://github.com/eosio/eos/releases/download/v1.4.2/eosio-1.4.2.x86_64-0.x86_64.rpm +$ sudo yum install ./eosio-1.4.2.x86_64-0.x86_64.rpm ``` #### RPM Package Uninstall ```sh From 73ab348c6184229ff406fef7e15725b95e9e5c80 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Wed, 31 Oct 2018 07:41:54 -0500 Subject: [PATCH 16/16] Update fc --- libraries/fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fc b/libraries/fc index ee92179d1b9..30eb81c1d99 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit ee92179d1b96d8e3a2cd015e762b4b6bebde63ca +Subproject commit 30eb81c1d995f9cd9834701e03b83ec7e6468a0f