Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/EOSIO/eos
Browse files Browse the repository at this point in the history
  • Loading branch information
nsjames committed Jun 23, 2018
2 parents c67af69 + 7965119 commit 94aff61
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
6 changes: 3 additions & 3 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.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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Docker/docker-compose-eosio1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion contracts/eosio.system/delegate_bandwidth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down
1 change: 1 addition & 0 deletions contracts/test_api/test_transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand Down
8 changes: 8 additions & 0 deletions libraries/chain/apply_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<generated_transaction_object,by_sender_id>(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<generated_transaction_object> + ptr->packed_trx.size()) );

d.modify<generated_transaction_object>( *ptr, [&]( auto& gtx ) {
gtx.sender = receiver;
gtx.sender_id = sender_id;
Expand Down
3 changes: 2 additions & 1 deletion libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions libraries/chain/include/eosio/chain/exceptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand Down
3 changes: 3 additions & 0 deletions unittests/api_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down

0 comments on commit 94aff61

Please sign in to comment.