diff --git a/CMakeLists.txt b/CMakeLists.txt index 70e3e7e2cb2..659ed3892a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ set( CXX_STANDARD_REQUIRED ON) set(VERSION_MAJOR 1) set(VERSION_MINOR 0) -set(VERSION_PATCH 4) +set(VERSION_PATCH 6) set( CLI_CLIENT_EXECUTABLE_NAME cleos ) set( GUI_CLIENT_EXECUTABLE_NAME eosio ) diff --git a/Docker/README.md b/Docker/README.md index 5d703ab0b89..2504d8268ae 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.0.4 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.0.6 tag, you could do the following: ```bash -docker build -t eosio/eos:v1.0.4 --build-arg branch=v1.0.4 . +docker build -t eosio/eos:v1.0.6 --build-arg branch=v1.0.6 . ``` By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image. @@ -181,7 +181,7 @@ Note: if you want to use the mongo db plugin, you have to enable it in your `dat ``` # pull images -docker pull eosio/eos:v1.0.4 +docker pull eosio/eos:v1.0.6 # create volume docker volume create --name=nodeos-data-volume diff --git a/Docker/docker-compose-eosio1.0.yaml b/Docker/docker-compose-eosio1.0.yaml index 3d772b0b696..27e3aa0af45 100644 --- a/Docker/docker-compose-eosio1.0.yaml +++ b/Docker/docker-compose-eosio1.0.yaml @@ -2,7 +2,7 @@ version: "3" services: nodeosd: - image: eosio/eos:v1.0.4 + image: eosio/eos:v1.0.6 command: /opt/eosio/bin/nodeosd.sh --data-dir /opt/eosio/bin/data-dir -e hostname: nodeosd ports: @@ -14,7 +14,7 @@ services: - nodeos-data-volume:/opt/eosio/bin/data-dir keosd: - image: eosio/eos:v1.0.4 + image: eosio/eos:v1.0.6 command: /opt/eosio/bin/keosd --wallet-dir /opt/eosio/bin/data-dir --http-server-address=127.0.0.1:8900 hostname: keosd links: diff --git a/contracts/eosio.system/delegate_bandwidth.cpp b/contracts/eosio.system/delegate_bandwidth.cpp index 712a6cc9842..a0eafaf4661 100644 --- a/contracts/eosio.system/delegate_bandwidth.cpp +++ b/contracts/eosio.system/delegate_bandwidth.cpp @@ -322,7 +322,8 @@ namespace eosiosystem { eosio::transaction out; out.actions.emplace_back( permission_level{ from, N(active) }, _self, N(refund), from ); out.delay_sec = refund_delay; - out.send( from, receiver, true ); + cancel_deferred( from ); // TODO: Remove this line when replacing deferred trxs is fixed + out.send( from, from, true ); } else { cancel_deferred( from ); } diff --git a/contracts/test_api/test_transaction.cpp b/contracts/test_api/test_transaction.cpp index 76cfc7653f5..b481e9335d4 100644 --- a/contracts/test_api/test_transaction.cpp +++ b/contracts/test_api/test_transaction.cpp @@ -267,6 +267,7 @@ void test_transaction::send_deferred_tx_with_dtt_action() { auto trx = transaction(); trx.actions.emplace_back(deferred_act); trx.delay_sec = dtt_act.delay_sec; + cancel_deferred( 0xffffffffffffffff ); // TODO: Remove this line after fixing deferred trx replacement RAM bug trx.send( 0xffffffffffffffff, dtt_act.payer, true ); } diff --git a/libraries/chain/apply_context.cpp b/libraries/chain/apply_context.cpp index 59baa69fae7..a88906ed4f1 100644 --- a/libraries/chain/apply_context.cpp +++ b/libraries/chain/apply_context.cpp @@ -270,6 +270,14 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a auto& d = control.db(); if ( auto ptr = d.find(boost::make_tuple(receiver, sender_id)) ) { EOS_ASSERT( replace_existing, deferred_tx_duplicate, "deferred transaction with the same sender_id and payer already exists" ); + + // TODO: Remove the following subjective check when the deferred trx replacement RAM bug has been fixed with a hard fork. + EOS_ASSERT( !control.is_producing_block(), subjective_block_production_exception, + "Replacing a deferred transaction is temporarily disabled." ); + + // TODO: The logic of the next line needs to be incorporated into the next hard fork. + // trx_context.add_ram_usage( ptr->payer, -(config::billable_size_v + ptr->packed_trx.size()) ); + d.modify( *ptr, [&]( auto& gtx ) { gtx.sender = receiver; gtx.sender_id = sender_id; diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index 6b5a54c9855..abb57aad348 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -489,7 +489,8 @@ struct controller_impl { bool failure_is_subjective( const fc::exception& e ) { auto code = e.code(); - return (code == block_net_usage_exceeded::code_value) + return (code == subjective_block_production_exception::code_value) + || (code == block_net_usage_exceeded::code_value) || (code == block_cpu_usage_exceeded::code_value) || (code == deadline_exception::code_value) || (code == leeway_deadline_exception::code_value) diff --git a/libraries/chain/include/eosio/chain/exceptions.hpp b/libraries/chain/include/eosio/chain/exceptions.hpp index 85a44403095..900f66709ee 100644 --- a/libraries/chain/include/eosio/chain/exceptions.hpp +++ b/libraries/chain/include/eosio/chain/exceptions.hpp @@ -250,6 +250,8 @@ namespace eosio { namespace chain { 3100004, "corrupted reversible block database was fixed" ) FC_DECLARE_DERIVED_EXCEPTION( extract_genesis_state_exception, misc_exception, 3100005, "extracted genesis state from blocks.log" ) + FC_DECLARE_DERIVED_EXCEPTION( subjective_block_production_exception, misc_exception, + 3100006, "subjective exception thrown during block production" ) FC_DECLARE_DERIVED_EXCEPTION( missing_plugin_exception, chain_exception, 3110000, "missing plugin exception" ) diff --git a/unittests/api_tests.cpp b/unittests/api_tests.cpp index 9d75b5d8d7e..7bcb1ea4d62 100644 --- a/unittests/api_tests.cpp +++ b/unittests/api_tests.cpp @@ -1052,6 +1052,8 @@ BOOST_FIXTURE_TEST_CASE(deferred_transaction_tests, TESTER) { try { produce_blocks(10); +#warning re-enable deferred transaction replacement test after bug has been fixed + #if 0 //schedule twice with replace_existing flag (second deferred transaction should replace first one) { transaction_trace_ptr trace; @@ -1072,6 +1074,7 @@ BOOST_FIXTURE_TEST_CASE(deferred_transaction_tests, TESTER) { try { BOOST_CHECK_EQUAL( 1, trace->action_traces.size() ); c.disconnect(); } + #endif produce_blocks(10);