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

Commit

Permalink
Merge pull request #6199 from EOSIO/merge-v1.4.2
Browse files Browse the repository at this point in the history
Merge v1.4.2 into develop
  • Loading branch information
b1bart authored Oct 31, 2018
2 parents 69dee07 + 73ab348 commit 463f109
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 29 deletions.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand All @@ -27,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 )
Expand Down
4 changes: 2 additions & 2 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.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.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ $ 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
$ 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
Expand Down
7 changes: 5 additions & 2 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,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 {
Expand Down Expand Up @@ -399,7 +399,10 @@ struct controller_impl {
db.undo();
}

ilog( "database initialized with hash: ${hash}", ("hash", calculate_integrity_hash()));
if( snapshot ) {
const auto hash = calculate_integrity_hash();
ilog( "database initialized with hash: ${hash}", ("hash", hash) );
}

}

Expand Down
2 changes: 1 addition & 1 deletion libraries/fc
Submodule fc updated 1 files
+16 −6 src/time.cpp
34 changes: 20 additions & 14 deletions plugins/mongo_db_plugin/mongo_db_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand All @@ -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 ) ) {
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 ) {
auto action_traces_doc = bsoncxx::builder::basic::document{};
const chain::base_action_trace& base = atrace; // without inline action traces

Expand Down Expand Up @@ -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;
Expand All @@ -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 );
Expand Down Expand Up @@ -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__ );
}

}
Expand Down
4 changes: 2 additions & 2 deletions programs/cleos/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2490,7 +2490,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 << localized("Skipping set code because the new code is the same as the existing code") << std::endl;
}
};

Expand Down Expand Up @@ -2539,7 +2539,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 << localized("Skipping set abi because the new abi is the same as the existing abi") << std::endl;
}
};

Expand Down
4 changes: 3 additions & 1 deletion scripts/eosio_build_darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 463f109

Please sign in to comment.