From 9cdc1699547221e8a8f80f844e2ae1cdb07d29c7 Mon Sep 17 00:00:00 2001 From: Jeeyong Um Date: Wed, 15 Aug 2018 12:56:48 +0000 Subject: [PATCH 01/25] fix typo --- contracts/eosiolib/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/eosiolib/types.h b/contracts/eosiolib/types.h index 32448f99141..120c896cd87 100644 --- a/contracts/eosiolib/types.h +++ b/contracts/eosiolib/types.h @@ -27,13 +27,13 @@ typedef uint64_t account_name; /** * @brief Name of a permission - * @details Name of an account + * @details Name of a permission */ typedef uint64_t permission_name; /** * @brief Name of a table - * @details Name of atable + * @details Name of a table */ typedef uint64_t table_name; From cc7aba178592d46391dc98adb812d8f42b750133 Mon Sep 17 00:00:00 2001 From: Jeeyong Um Date: Wed, 15 Aug 2018 14:34:33 +0000 Subject: [PATCH 02/25] Remove unused variable --- programs/cleos/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/programs/cleos/main.cpp b/programs/cleos/main.cpp index fd2807abd9d..7e0782332b5 100644 --- a/programs/cleos/main.cpp +++ b/programs/cleos/main.cpp @@ -2350,7 +2350,6 @@ int main( int argc, char** argv ) { add_standard_transaction_options(transfer, "sender@active"); transfer->set_callback([&] { - signed_transaction trx; if (tx_force_unique && memo.size() == 0) { // use the memo to add a nonce memo = generate_nonce_string(); From b8f88dafe9bd791883d62d31f3116caeee2d1772 Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Wed, 15 Aug 2018 12:25:24 -0400 Subject: [PATCH 03/25] Fix for nullptr deref when producers are waiting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit EOSIO/eos#4972 created a different calling path into `producer_plugin_impl::calculate_next_block_time` where there was no pending block state. As a result when the following conditions were met the code would dereference a null ptr: * the node was a producer, who _had_ produced during this processes lifetime OR replayed a block where they produced (so they have watermark data) * still in the active schedule of producers * experienced a gap in blocks of > 5 seconds (so they moved to our “waiting” mode) Credit goes to @heifner for the find --- plugins/producer_plugin/producer_plugin.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/producer_plugin/producer_plugin.cpp b/plugins/producer_plugin/producer_plugin.cpp index 64a6a5d8cd2..3997c997653 100644 --- a/plugins/producer_plugin/producer_plugin.cpp +++ b/plugins/producer_plugin/producer_plugin.cpp @@ -831,10 +831,13 @@ optional producer_plugin_impl::calculate_next_block_time(const a auto current_watermark_itr = _producer_watermarks.find(producer_name); if (current_watermark_itr != _producer_watermarks.end()) { auto watermark = current_watermark_itr->second; - const auto& pbs = chain.pending_block_state(); - if (watermark > pbs->block_num) { + auto block_num = chain.head_block_state()->block_num; + if (chain.pending_block_state()) { + ++block_num; + } + if (watermark > block_num) { // if I have a watermark then I need to wait until after that watermark - minimum_offset = watermark - pbs->block_num + 1; + minimum_offset = watermark - block_num + 1; } } From 6f2614630a447f89766fdabaa412039e4c2a92ea Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Wed, 15 Aug 2018 16:43:32 -0400 Subject: [PATCH 04/25] Return transaction_trace even if unable to serialize the action_trace action data --- plugins/chain_plugin/chain_plugin.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index 11b62273808..9fcc72928df 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -1404,11 +1404,15 @@ void read_write::push_transaction(const read_write::push_transaction_params& par auto trx_trace_ptr = result.get(); try { - fc::variant pretty_output; - pretty_output = db.to_variant_with_abi(*trx_trace_ptr, abi_serializer_max_time); - chain::transaction_id_type id = trx_trace_ptr->id; - next(read_write::push_transaction_results{id, pretty_output}); + fc::variant output; + try { + output = db.to_variant_with_abi( *trx_trace_ptr, abi_serializer_max_time ); + } catch( chain::abi_exception& ) { + output = *trx_trace_ptr; + } + + next(read_write::push_transaction_results{id, output}); } CATCH_AND_CALL(next); } }); From 913461b45879488e31483b9e8558fc7f1c287029 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 16 Aug 2018 10:19:24 -0400 Subject: [PATCH 05/25] Fix access to pending_block_state when not available. Also cleanup some logging. --- plugins/producer_plugin/producer_plugin.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/plugins/producer_plugin/producer_plugin.cpp b/plugins/producer_plugin/producer_plugin.cpp index 3997c997653..22ef9c692e5 100644 --- a/plugins/producer_plugin/producer_plugin.cpp +++ b/plugins/producer_plugin/producer_plugin.cpp @@ -931,8 +931,10 @@ producer_plugin_impl::start_block_result producer_plugin_impl::start_block(bool if (_pending_block_mode == pending_block_mode::speculating) { auto head_block_age = now - chain.head_block_time(); - if (head_block_age > fc::seconds(5)) + if (head_block_age > fc::seconds(5)) { + fc_dlog(_log, "Greater than 5 secs behind, waiting"); return start_block_result::waiting; + } } try { @@ -1166,28 +1168,37 @@ void producer_plugin_impl::schedule_production_loop() { static const boost::posix_time::ptime epoch(boost::gregorian::date(1970, 1, 1)); if (result == start_block_result::succeeded) { // ship this block off no later than its deadline - _timer.expires_at(epoch + boost::posix_time::microseconds(chain.pending_block_time().time_since_epoch().count() + (last_block ? _last_block_time_offset_us : _produce_time_offset_us))); - fc_dlog(_log, "Scheduling Block Production on Normal Block #${num} for ${time}", ("num", chain.pending_block_state()->block_num)("time",chain.pending_block_time())); + EOS_ASSERT( chain.pending_block_state(), missing_pending_block_state, "producing without pending_block_state, start_block succeeded" ); + auto deadline = chain.pending_block_time().time_since_epoch().count() + (last_block ? _last_block_time_offset_us : _produce_time_offset_us); + _timer.expires_at( epoch + boost::posix_time::microseconds( deadline )); + fc_dlog(_log, "Scheduling Block Production on Normal Block #${num} for ${time}", ("num", chain.pending_block_state()->block_num)("time",deadline)); } else { + EOS_ASSERT( chain.pending_block_state(), missing_pending_block_state, "producing without pending_block_state" ); auto expect_time = chain.pending_block_time() - fc::microseconds(config::block_interval_us); // ship this block off up to 1 block time earlier or immediately if (fc::time_point::now() >= expect_time) { _timer.expires_from_now( boost::posix_time::microseconds( 0 )); + fc_dlog(_log, "Scheduling Block Production on Exhausted Block #${num} immediately", ("num", chain.pending_block_state()->block_num)); } else { _timer.expires_at(epoch + boost::posix_time::microseconds(expect_time.time_since_epoch().count())); + fc_dlog(_log, "Scheduling Block Production on Exhausted Block #${num} at ${time}", ("num", chain.pending_block_state()->block_num)("time",expect_time)); } - fc_dlog(_log, "Scheduling Block Production on Exhausted Block #${num} immediately", ("num", chain.pending_block_state()->block_num)); } _timer.async_wait([&chain,weak_this,cid=++_timer_corelation_id](const boost::system::error_code& ec) { auto self = weak_this.lock(); if (self && ec != boost::asio::error::operation_aborted && cid == self->_timer_corelation_id) { auto res = self->maybe_produce_block(); - fc_dlog(_log, "Producing Block #${num} returned: ${res}", ("num", chain.pending_block_state()->block_num)("res", res) ); + if( chain.pending_block_state() ) { + fc_dlog( _log, "Producing Block #${num} returned: ${res}", ("num", chain.pending_block_state()->block_num)( "res", res )); + } else { + fc_dlog( _log, "Producing Block, head block #${num} returned: ${res}", ("num", chain.head_block_state()->block_num)( "res", res )); + } } }); } else if (_pending_block_mode == pending_block_mode::speculating && !_producers.empty() && !production_disabled_by_policy()){ fc_dlog(_log, "Specualtive Block Created; Scheduling Speculative/Production Change"); + EOS_ASSERT( chain.pending_block_state(), missing_pending_block_state, "speculating without pending_block_state" ); const auto& pbs = chain.pending_block_state(); schedule_delayed_production_loop(weak_this, pbs->header.timestamp); } else { From 2075acd356b278b5e9d99de8db39c6dc3a027631 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 16 Aug 2018 10:42:41 -0400 Subject: [PATCH 06/25] Remove redundant log output --- plugins/producer_plugin/producer_plugin.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/producer_plugin/producer_plugin.cpp b/plugins/producer_plugin/producer_plugin.cpp index 22ef9c692e5..02c9b16894a 100644 --- a/plugins/producer_plugin/producer_plugin.cpp +++ b/plugins/producer_plugin/producer_plugin.cpp @@ -931,10 +931,8 @@ producer_plugin_impl::start_block_result producer_plugin_impl::start_block(bool if (_pending_block_mode == pending_block_mode::speculating) { auto head_block_age = now - chain.head_block_time(); - if (head_block_age > fc::seconds(5)) { - fc_dlog(_log, "Greater than 5 secs behind, waiting"); + if (head_block_age > fc::seconds(5)) return start_block_result::waiting; - } } try { From ea784b9a8c271ae7665b337cc1153502ccc92b5f Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 16 Aug 2018 11:20:05 -0400 Subject: [PATCH 07/25] Log pending block number --- plugins/producer_plugin/producer_plugin.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/producer_plugin/producer_plugin.cpp b/plugins/producer_plugin/producer_plugin.cpp index 02c9b16894a..063558fef93 100644 --- a/plugins/producer_plugin/producer_plugin.cpp +++ b/plugins/producer_plugin/producer_plugin.cpp @@ -1186,12 +1186,10 @@ void producer_plugin_impl::schedule_production_loop() { _timer.async_wait([&chain,weak_this,cid=++_timer_corelation_id](const boost::system::error_code& ec) { auto self = weak_this.lock(); if (self && ec != boost::asio::error::operation_aborted && cid == self->_timer_corelation_id) { + // pending_block_state expected, but can't assert inside async_wait + auto block_num = chain.pending_block_state() ? chain.pending_block_state()->block_num : 0; auto res = self->maybe_produce_block(); - if( chain.pending_block_state() ) { - fc_dlog( _log, "Producing Block #${num} returned: ${res}", ("num", chain.pending_block_state()->block_num)( "res", res )); - } else { - fc_dlog( _log, "Producing Block, head block #${num} returned: ${res}", ("num", chain.head_block_state()->block_num)( "res", res )); - } + fc_dlog( _log, "Producing Block #${num} returned: ${res}", ("num", chain.pending_block_state()->block_num)( "res", res )); } }); } else if (_pending_block_mode == pending_block_mode::speculating && !_producers.empty() && !production_disabled_by_policy()){ From e55de56185796511cb4e924bc32a69dc67b171b4 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 16 Aug 2018 11:21:36 -0400 Subject: [PATCH 08/25] Log correct value --- plugins/producer_plugin/producer_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/producer_plugin/producer_plugin.cpp b/plugins/producer_plugin/producer_plugin.cpp index 063558fef93..0200eb8f8ba 100644 --- a/plugins/producer_plugin/producer_plugin.cpp +++ b/plugins/producer_plugin/producer_plugin.cpp @@ -1189,7 +1189,7 @@ void producer_plugin_impl::schedule_production_loop() { // pending_block_state expected, but can't assert inside async_wait auto block_num = chain.pending_block_state() ? chain.pending_block_state()->block_num : 0; auto res = self->maybe_produce_block(); - fc_dlog( _log, "Producing Block #${num} returned: ${res}", ("num", chain.pending_block_state()->block_num)( "res", res )); + fc_dlog(_log, "Producing Block #${num} returned: ${res}", ("num", block_num)("res", res)); } }); } else if (_pending_block_mode == pending_block_mode::speculating && !_producers.empty() && !production_disabled_by_policy()){ From 75e99bf2ccc625ffefa00e671d515f5efe9be2e4 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 16 Aug 2018 15:29:03 -0400 Subject: [PATCH 09/25] Use transaction delay_sec in get_required_keys determination --- plugins/chain_plugin/chain_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index 11b62273808..45ee6c522de 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -1664,7 +1664,7 @@ read_only::get_required_keys_result read_only::get_required_keys( const get_requ abi_serializer::from_variant(params.transaction, pretty_input, resolver, abi_serializer_max_time); } EOS_RETHROW_EXCEPTIONS(chain::transaction_type_exception, "Invalid transaction") - auto required_keys_set = db.get_authorization_manager().get_required_keys(pretty_input, params.available_keys); + auto required_keys_set = db.get_authorization_manager().get_required_keys(pretty_input, params.available_keys, pretty_input.delay_sec); get_required_keys_result result; result.required_keys = required_keys_set; return result; From aa6f4efd50a0107ed718731e851968c27e8b47a4 Mon Sep 17 00:00:00 2001 From: jjnetcn Date: Fri, 17 Aug 2018 16:00:42 +0800 Subject: [PATCH 10/25] cleos set account permission default parent error RPC /get_account use struct get_account_results { .. vector permissions; .. } struct permission { name perm_name; name parent; authority required_auth; }; i thank this mistake maybe because of struct permission_level{account_name actor, permission_name permission;} use name 'permission' try it: ./cleos set account permission ACCOUNT active PUBKEY shoud equ ./cleos set account permission ACCOUNT active owner PUBKEY --- 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 1451cc20166..bcc6e6dddca 100644 --- a/programs/cleos/main.cpp +++ b/programs/cleos/main.cpp @@ -681,8 +681,8 @@ struct set_account_permission_subcommand { const auto& existing_permissions = account_result.get_object()["permissions"].get_array(); auto permissionPredicate = [this](const auto& perm) { return perm.is_object() && - perm.get_object().contains("permission") && - boost::equals(perm.get_object()["permission"].get_string(), permissionStr); + perm.get_object().contains("perm_name") && + boost::equals(perm.get_object()["perm_name"].get_string(), permissionStr); }; auto itr = boost::find_if(existing_permissions, permissionPredicate); From 72904cc945cac8b4d973548091e5d422b27f5567 Mon Sep 17 00:00:00 2001 From: Eric Iles Date: Fri, 17 Aug 2018 11:23:22 -0400 Subject: [PATCH 11/25] Update Docker plugin to 1.4.0 - pipeline.yml --- .buildkite/pipeline.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 16163b09a3a..c4ba85ae46e 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -22,7 +22,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu" workdir: /data/job timeout: 60 @@ -37,7 +37,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu18" workdir: /data/job timeout: 60 @@ -52,7 +52,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:fedora" workdir: /data/job timeout: 60 @@ -67,7 +67,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:centos" workdir: /data/job timeout: 60 @@ -82,7 +82,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:amazonlinux" workdir: /data/job timeout: 60 @@ -128,7 +128,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu" workdir: /data/job timeout: 60 @@ -152,7 +152,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu18" workdir: /data/job timeout: 60 @@ -176,7 +176,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:fedora" workdir: /data/job timeout: 60 @@ -200,7 +200,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:centos" workdir: /data/job timeout: 60 @@ -224,7 +224,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:amazonlinux" workdir: /data/job timeout: 60 From 10d5a45c82fdc66cc3e29e44a85ff5b0aabfe351 Mon Sep 17 00:00:00 2001 From: Eric Iles Date: Fri, 17 Aug 2018 11:25:10 -0400 Subject: [PATCH 12/25] Update Docker plugin - Long Running Tests --- .buildkite/long_running_tests.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.buildkite/long_running_tests.yml b/.buildkite/long_running_tests.yml index 28a456db1ec..d4bc7244193 100644 --- a/.buildkite/long_running_tests.yml +++ b/.buildkite/long_running_tests.yml @@ -22,7 +22,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu" workdir: /data/job timeout: 60 @@ -37,7 +37,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu18" workdir: /data/job timeout: 60 @@ -52,7 +52,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:fedora" workdir: /data/job timeout: 60 @@ -67,7 +67,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:centos" workdir: /data/job timeout: 60 @@ -82,7 +82,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:amazonlinux" workdir: /data/job timeout: 60 @@ -128,7 +128,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu" workdir: /data/job timeout: 60 @@ -152,7 +152,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu18" workdir: /data/job timeout: 60 @@ -176,7 +176,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:fedora" workdir: /data/job timeout: 60 @@ -200,7 +200,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:centos" workdir: /data/job timeout: 60 @@ -224,7 +224,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:amazonlinux" workdir: /data/job timeout: 60 From 2652fc6edb8b6a729567dae9ffb75dcf660dc2be Mon Sep 17 00:00:00 2001 From: Eric Iles Date: Fri, 17 Aug 2018 11:27:04 -0400 Subject: [PATCH 13/25] Update Docker Plugin - Debug --- .buildkite/debug.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.buildkite/debug.yml b/.buildkite/debug.yml index 8d7aaa7c502..d6f95814f54 100644 --- a/.buildkite/debug.yml +++ b/.buildkite/debug.yml @@ -22,7 +22,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu" workdir: /data/job timeout: 60 @@ -37,7 +37,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu18" workdir: /data/job timeout: 60 @@ -52,7 +52,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:fedora" workdir: /data/job timeout: 60 @@ -67,7 +67,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:centos" workdir: /data/job timeout: 60 @@ -82,7 +82,7 @@ steps: - "role=linux-builder" artifact_paths: "build.tar.gz" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:amazonlinux" workdir: /data/job timeout: 60 @@ -128,7 +128,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu" workdir: /data/job timeout: 60 @@ -152,7 +152,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu18" workdir: /data/job timeout: 60 @@ -176,7 +176,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:fedora" workdir: /data/job timeout: 60 @@ -200,7 +200,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:centos" workdir: /data/job timeout: 60 @@ -224,7 +224,7 @@ steps: - "build/genesis.json" - "build/config.ini" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:amazonlinux" workdir: /data/job timeout: 60 From 25e4884e63f6a7d14676d3e028f297c2428b12dc Mon Sep 17 00:00:00 2001 From: Eric Iles Date: Fri, 17 Aug 2018 11:28:00 -0400 Subject: [PATCH 14/25] Update Docker Plugin - Coverage --- .buildkite/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/coverage.yml b/.buildkite/coverage.yml index 908d3a3bf8d..bbb8fa91387 100644 --- a/.buildkite/coverage.yml +++ b/.buildkite/coverage.yml @@ -15,7 +15,7 @@ steps: agents: - "role=linux-coverage" plugins: - docker#v1.1.1: + docker#v1.4.0: image: "eosio/ci:ubuntu18" workdir: /data/job mounts: From 5cc9a1dec300e310107043cff885fb5e6465d3e7 Mon Sep 17 00:00:00 2001 From: chengevo Date: Fri, 17 Aug 2018 19:35:27 +0800 Subject: [PATCH 15/25] MongoDB plugin filter based on action trace --- plugins/mongo_db_plugin/mongo_db_plugin.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/mongo_db_plugin/mongo_db_plugin.cpp b/plugins/mongo_db_plugin/mongo_db_plugin.cpp index cf0e4d1e9b3..c4d11e1bdee 100644 --- a/plugins/mongo_db_plugin/mongo_db_plugin.cpp +++ b/plugins/mongo_db_plugin/mongo_db_plugin.cpp @@ -104,7 +104,7 @@ class mongo_db_plugin_impl { void remove_account_control( const account_name& name, const permission_name& permission ); /// @return true if act should be added to mongodb, false to skip it - bool filter_include( const chain::action& act ) const; + bool filter_include( const chain::action_trace& action_trace ) const; void init(); void wipe_database(); @@ -200,13 +200,13 @@ const std::string mongo_db_plugin_impl::accounts_col = "accounts"; const std::string mongo_db_plugin_impl::pub_keys_col = "pub_keys"; const std::string mongo_db_plugin_impl::account_controls_col = "account_controls"; -bool mongo_db_plugin_impl::filter_include( const chain::action& act ) const { +bool mongo_db_plugin_impl::filter_include( const chain::action_trace& action_trace ) const { bool include = false; - if( filter_on_star || filter_on.find( {act.account, act.name, 0} ) != filter_on.end() ) { + if( filter_on_star || filter_on.find( {action_trace.receipt.receiver, action_trace.act.name, 0} ) != filter_on.end() ) { include = true; } else { - for( const auto& a : act.authorization ) { - if( filter_on.find( {act.account, act.name, a.actor} ) != filter_on.end() ) { + for( const auto& a : action_trace.act.authorization ) { + if( filter_on.find( {action_trace.receipt.receiver, action_trace.act.name, a.actor} ) != filter_on.end() ) { include = true; break; } @@ -215,14 +215,14 @@ bool mongo_db_plugin_impl::filter_include( const chain::action& act ) const { if( !include ) { return false; } - if( filter_out.find( {act.account, 0, 0} ) != filter_out.end() ) { + if( filter_out.find( {action_trace.receipt.receiver, 0, 0} ) != filter_out.end() ) { return false; } - if( filter_out.find( {act.account, act.name, 0} ) != filter_out.end() ) { + if( filter_out.find( {action_trace.receipt.receiver, action_trace.act.name, 0} ) != filter_out.end() ) { return false; } - for( const auto& a : act.authorization ) { - if( filter_out.find( {act.account, act.name, a.actor} ) != filter_out.end() ) { + for( const auto& a : action_trace.act.authorization ) { + if( filter_out.find( {action_trace.receipt.receiver, action_trace.act.name, a.actor} ) != filter_out.end() ) { return false; } } @@ -714,7 +714,7 @@ 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.act ) ) { + if( start_block_reached && store_action_traces && filter_include( atrace ) ) { auto action_traces_doc = bsoncxx::builder::basic::document{}; const chain::base_action_trace& base = atrace; // without inline action traces From 5dd1bc1229eca79c28667c004043777a45d68902 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 17 Aug 2018 14:48:10 -0400 Subject: [PATCH 16/25] Correct conversion to microseconds --- plugins/chain_plugin/chain_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index 45ee6c522de..37ef3aea3fd 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -1664,7 +1664,7 @@ read_only::get_required_keys_result read_only::get_required_keys( const get_requ abi_serializer::from_variant(params.transaction, pretty_input, resolver, abi_serializer_max_time); } EOS_RETHROW_EXCEPTIONS(chain::transaction_type_exception, "Invalid transaction") - auto required_keys_set = db.get_authorization_manager().get_required_keys(pretty_input, params.available_keys, pretty_input.delay_sec); + auto required_keys_set = db.get_authorization_manager().get_required_keys( pretty_input, params.available_keys, fc::seconds( pretty_input.delay_sec )); get_required_keys_result result; result.required_keys = required_keys_set; return result; From 4ff1defefdaa7d72a49eeb0a9f865507cc62785a Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 17 Aug 2018 14:49:57 -0400 Subject: [PATCH 17/25] Update to safer unsigned_int --- libraries/fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fc b/libraries/fc index a6b2756b100..62a19a75868 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit a6b2756b100098296f7548a191e6210e770b7b3a +Subproject commit 62a19a758682679e3de27d956986eaf8b016465d From 322d2cfdfdccda55f7417476463334837f04a35c Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Tue, 21 Aug 2018 14:02:54 -0400 Subject: [PATCH 18/25] Disallow returning WAST from get_code api --- plugins/chain_plugin/chain_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index 11b62273808..1abd7aa0294 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -1472,6 +1472,8 @@ read_only::get_code_results read_only::get_code( const get_code_params& params ) const auto& d = db.db(); const auto& accnt = d.get( params.account_name ); + EOS_ASSERT( params.code_as_wasm, unsupported_feature, "Returning WAST from get_code is no longer supported" ); + if( accnt.code.size() ) { if (params.code_as_wasm) { result.wasm = string(accnt.code.begin(), accnt.code.end()); From 364fcc75edb30c80a1f0dae39b1d26f5d6c93a4d Mon Sep 17 00:00:00 2001 From: Todd Fleming Date: Tue, 21 Aug 2018 15:49:19 -0400 Subject: [PATCH 19/25] Compat fixes for bios-boot-tutorial --- tutorials/bios-boot-tutorial/bios-boot-tutorial.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tutorials/bios-boot-tutorial/bios-boot-tutorial.py b/tutorials/bios-boot-tutorial/bios-boot-tutorial.py index 11aee4e34c1..88821bfe21c 100755 --- a/tutorials/bios-boot-tutorial/bios-boot-tutorial.py +++ b/tutorials/bios-boot-tutorial/bios-boot-tutorial.py @@ -74,7 +74,7 @@ def startWallet(): run('mkdir -p ' + os.path.abspath(args.wallet_dir)) background(args.keosd + ' --unlock-timeout %d --http-server-address 127.0.0.1:6666 --wallet-dir %s' % (unlockTimeout, os.path.abspath(args.wallet_dir))) sleep(.4) - run(args.cleos + 'wallet create') + run(args.cleos + 'wallet create --to-console') def importKeys(): run(args.cleos + 'wallet import --private-key ' + args.private_key) @@ -347,7 +347,7 @@ def stepLog(): parser.add_argument('--public-key', metavar='', help="EOSIO Public Key", default='EOS8Znrtgwt8TfpmbVpTKvA2oB8Nqey625CLN8bCN3TEbgx86Dsvr', dest="public_key") parser.add_argument('--private-Key', metavar='', help="EOSIO Private Key", default='5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p', dest="private_key") -parser.add_argument('--cleos', metavar='', help="Cleos command", default='../../build/programs/cleos/cleos --wallet-url http://localhost:6666 ') +parser.add_argument('--cleos', metavar='', help="Cleos command", default='../../build/programs/cleos/cleos --wallet-url http://127.0.0.1:6666 ') parser.add_argument('--nodeos', metavar='', help="Path to nodeos binary", default='../../build/programs/nodeos/nodeos') parser.add_argument('--keosd', metavar='', help="Path to keosd binary", default='../../build/programs/keosd/keosd') parser.add_argument('--contracts-dir', metavar='', help="Path to contracts directory", default='../../build/contracts/') @@ -381,7 +381,7 @@ def stepLog(): args = parser.parse_args() -args.cleos += '--url http://localhost:%d ' % args.http_port +args.cleos += '--url http://127.0.0.1:%d ' % args.http_port logFile = open(args.log_path, 'a') From 122957467ea21eb3918798cd409cc869ea592884 Mon Sep 17 00:00:00 2001 From: Jeeyong Um Date: Wed, 15 Aug 2018 12:56:48 +0000 Subject: [PATCH 20/25] fix typo --- contracts/eosiolib/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/eosiolib/types.h b/contracts/eosiolib/types.h index 32448f99141..120c896cd87 100644 --- a/contracts/eosiolib/types.h +++ b/contracts/eosiolib/types.h @@ -27,13 +27,13 @@ typedef uint64_t account_name; /** * @brief Name of a permission - * @details Name of an account + * @details Name of a permission */ typedef uint64_t permission_name; /** * @brief Name of a table - * @details Name of atable + * @details Name of a table */ typedef uint64_t table_name; From 2bfd7d20233fc4b38bd700499b5e4ed3c0f3e8b3 Mon Sep 17 00:00:00 2001 From: Jeeyong Um Date: Wed, 15 Aug 2018 14:34:33 +0000 Subject: [PATCH 21/25] Remove unused variable --- programs/cleos/main.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/programs/cleos/main.cpp b/programs/cleos/main.cpp index bcc6e6dddca..e478f42a2bd 100644 --- a/programs/cleos/main.cpp +++ b/programs/cleos/main.cpp @@ -2354,7 +2354,6 @@ int main( int argc, char** argv ) { add_standard_transaction_options(transfer, "sender@active"); transfer->set_callback([&] { - signed_transaction trx; if (tx_force_unique && memo.size() == 0) { // use the memo to add a nonce memo = generate_nonce_string(); From edb3a4a43b89642b1b71ae4f3acfd57f52f23a5c Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 16 Aug 2018 15:29:03 -0400 Subject: [PATCH 22/25] Use transaction delay_sec in get_required_keys determination --- plugins/chain_plugin/chain_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index 1abd7aa0294..ded1328ab3f 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -1666,7 +1666,7 @@ read_only::get_required_keys_result read_only::get_required_keys( const get_requ abi_serializer::from_variant(params.transaction, pretty_input, resolver, abi_serializer_max_time); } EOS_RETHROW_EXCEPTIONS(chain::transaction_type_exception, "Invalid transaction") - auto required_keys_set = db.get_authorization_manager().get_required_keys(pretty_input, params.available_keys); + auto required_keys_set = db.get_authorization_manager().get_required_keys(pretty_input, params.available_keys, pretty_input.delay_sec); get_required_keys_result result; result.required_keys = required_keys_set; return result; From 864c39782c51df600891540eb00e316be2c96c35 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 17 Aug 2018 14:48:10 -0400 Subject: [PATCH 23/25] Correct conversion to microseconds --- plugins/chain_plugin/chain_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/chain_plugin/chain_plugin.cpp b/plugins/chain_plugin/chain_plugin.cpp index ded1328ab3f..9788531e7f1 100644 --- a/plugins/chain_plugin/chain_plugin.cpp +++ b/plugins/chain_plugin/chain_plugin.cpp @@ -1666,7 +1666,7 @@ read_only::get_required_keys_result read_only::get_required_keys( const get_requ abi_serializer::from_variant(params.transaction, pretty_input, resolver, abi_serializer_max_time); } EOS_RETHROW_EXCEPTIONS(chain::transaction_type_exception, "Invalid transaction") - auto required_keys_set = db.get_authorization_manager().get_required_keys(pretty_input, params.available_keys, pretty_input.delay_sec); + auto required_keys_set = db.get_authorization_manager().get_required_keys( pretty_input, params.available_keys, fc::seconds( pretty_input.delay_sec )); get_required_keys_result result; result.required_keys = required_keys_set; return result; From f44d204fd3b0d0bdfc0c467296be914492a5fc06 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 17 Aug 2018 14:49:57 -0400 Subject: [PATCH 24/25] Update to safer unsigned_int --- libraries/fc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fc b/libraries/fc index a6b2756b100..62a19a75868 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit a6b2756b100098296f7548a191e6210e770b7b3a +Subproject commit 62a19a758682679e3de27d956986eaf8b016465d From 3644e2d1ef0b15ed8e7d3888d8288f48e4136123 Mon Sep 17 00:00:00 2001 From: Bart Wyatt Date: Wed, 22 Aug 2018 17:49:56 -0400 Subject: [PATCH 25/25] bump version to 1.2.2 --- CMakeLists.txt | 2 +- Docker/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c374afa42ef..76f7afa7a91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ set( CXX_STANDARD_REQUIRED ON) set(VERSION_MAJOR 1) set(VERSION_MINOR 2) -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 d1d38924bdb..4bd51558e36 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.2.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.2.2 tag, you could do the following: ```bash -docker build -t eosio/eos:v1.2.1 --build-arg branch=v1.2.1 . +docker build -t eosio/eos:v1.2.2 --build-arg branch=v1.2.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.