diff --git a/.github/workflows/custom_build.yml b/.github/workflows/custom_build.yml index 9204b1752..aca1fac06 100644 --- a/.github/workflows/custom_build.yml +++ b/.github/workflows/custom_build.yml @@ -95,18 +95,18 @@ jobs: export CC=gcc-9 export CXX=g++-9 export TARGET=all - export CMAKE_BUILD_TYPE=Release + export CMAKE_BUILD_TYPE=Debug cd deps ./clean.sh rm -f ./libwebsockets-from-git.tar.gz - ./build.sh PARALLEL_COUNT=$(nproc) + ./build.sh PARALLEL_COUNT=$(nproc) DEBUG=1 cd .. - name: Configure all run: | export CC=gcc-9 export CXX=g++-9 export TARGET=all - export CMAKE_BUILD_TYPE=Release + export CMAKE_BUILD_TYPE=Debug mkdir -p build cd build cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE ${{ github.event.inputs.cmake_options }} .. @@ -116,7 +116,7 @@ jobs: export CC=gcc-9 export CXX=g++-9 export TARGET=all - export CMAKE_BUILD_TYPE=Release + export CMAKE_BUILD_TYPE=Debug cd build make skaled -j$(nproc) #echo "Ensure release mode skaled does not have any debug markers" diff --git a/libethereum/Block.cpp b/libethereum/Block.cpp index b7e9232c0..a7af7b676 100644 --- a/libethereum/Block.cpp +++ b/libethereum/Block.cpp @@ -454,8 +454,6 @@ tuple< TransactionReceipts, unsigned > Block::syncEveryone( // NB! Not commit! Commit will be after 1st transaction! m_state.clearPartialTransactionReceipts(); - boost::chrono::duration< long, boost::ratio< 1, 1000 > >::rep totalExecuteTime = 0; - unsigned count_bad = 0; for ( unsigned i = 0; i < _transactions.size(); ++i ) { Transaction const& tr = _transactions[i]; @@ -503,15 +501,8 @@ tuple< TransactionReceipts, unsigned > Block::syncEveryone( continue; } - boost::chrono::high_resolution_clock::time_point timeStart = - boost::chrono::high_resolution_clock::now(); ExecutionResult res = execute( _bc.lastBlockHashes(), tr, Permanence::Committed, OnOpFunc() ); - boost::chrono::high_resolution_clock::time_point timeFinish = - boost::chrono::high_resolution_clock::now(); - totalExecuteTime += boost::chrono::duration_cast< boost::chrono::milliseconds >( - timeFinish - timeStart ) - .count(); receipts.push_back( m_receipts.back() ); if ( res.excepted == TransactionException::WouldNotBeInBlock ) @@ -536,12 +527,6 @@ tuple< TransactionReceipts, unsigned > Block::syncEveryone( clog( VerbosityError, "block" ) << "FAILED transaction after consensus! " << ex.what(); } } - clog( Verbosity::VerbosityInfo, "execute" ) << "EWT:" << executeTime; - clog( Verbosity::VerbosityInfo, "execute" ) << "COMWT:" << commitTime; - clog( Verbosity::VerbosityInfo, "execute" ) << "TEWT:" << totalExecuteTime; - - executeTime = 0; - commitTime = 0; #ifdef HISTORIC_STATE m_state.mutableHistoricState().saveRootForBlock( m_currentBlock.number() ); @@ -853,9 +838,6 @@ ExecutionResult Block::execute( throw -1; // will catch below resultReceipt = stateSnapshot.execute( envInfo, *m_sealEngine, _t, _p, _onOp ); - commitTime += stateSnapshot.getCommitTime(); - executeTime += stateSnapshot.getExecuteTime(); - // use fake receipt created above if execution throws!! } catch ( const TransactionException& ex ) { // shoul not happen as exception in execute() means that tx should not be in block diff --git a/libethereum/Block.h b/libethereum/Block.h index dff5701ee..3dff5b034 100644 --- a/libethereum/Block.h +++ b/libethereum/Block.h @@ -343,9 +343,6 @@ class Block { Logger m_logger{ createLogger( VerbosityDebug, "block" ) }; Logger m_loggerDetailed{ createLogger( VerbosityTrace, "block" ) }; - boost::chrono::duration< long, boost::ratio< 1, 1000 > >::rep commitTime = 0; - boost::chrono::duration< long, boost::ratio< 1, 1000 > >::rep executeTime = 0; - Counter< Block > c; ; diff --git a/libethereum/Client.cpp b/libethereum/Client.cpp index 8790411f9..dcd422880 100644 --- a/libethereum/Client.cpp +++ b/libethereum/Client.cpp @@ -583,17 +583,8 @@ size_t Client::importTransactionsAsBlock( // end, detect partially executed block // size_t cntSucceeded = 0; - boost::chrono::high_resolution_clock::time_point timeStart = - boost::chrono::high_resolution_clock::now(); cntSucceeded = syncTransactions( _transactions, _gasPrice, _timestamp, bIsPartial ? &vecMissing : nullptr ); - boost::chrono::high_resolution_clock::time_point timeFinish = - boost::chrono::high_resolution_clock::now(); - clog( Verbosity::VerbosityInfo, "client" ) - << "SYWT:" - << boost::chrono::duration_cast< boost::chrono::milliseconds >( timeFinish - timeStart ) - .count(); - sealUnconditionally( false ); importWorkingBlock(); diff --git a/libskale/State.cpp b/libskale/State.cpp index 71eaa800e..70f32d45f 100644 --- a/libskale/State.cpp +++ b/libskale/State.cpp @@ -271,8 +271,6 @@ State::State( const State& _s ) m_initial_funds = _s.m_initial_funds; contractStorageLimit_ = _s.contractStorageLimit_; totalStorageUsed_ = _s.storageUsedTotal(); - commitTime = _s.commitTime; - executeTime = _s.executeTime; } State& State::operator=( const State& _s ) { @@ -295,8 +293,6 @@ State& State::operator=( const State& _s ) { m_initial_funds = _s.m_initial_funds; contractStorageLimit_ = _s.contractStorageLimit_; totalStorageUsed_ = _s.storageUsedTotal(); - commitTime = _s.commitTime; - executeTime = _s.executeTime; #ifdef HISTORIC_STATE m_historicState = _s.m_historicState; #endif @@ -1019,14 +1015,7 @@ std::pair< ExecutionResult, TransactionReceipt > State::execute( EnvInfo const& onOp = e.simpleTrace(); #endif u256 const startGasUsed = _envInfo.gasUsed(); - boost::chrono::high_resolution_clock::time_point executeTimeStart = - boost::chrono::high_resolution_clock::now(); bool const statusCode = executeTransaction( e, _t, onOp ); - boost::chrono::high_resolution_clock::time_point executeTimeFinish = - boost::chrono::high_resolution_clock::now(); - executeTime = boost::chrono::duration_cast< boost::chrono::milliseconds >( - executeTimeFinish - executeTimeStart ) - .count(); std::string strRevertReason; if ( res.excepted == dev::eth::TransactionException::RevertInstruction ) { @@ -1067,15 +1056,8 @@ std::pair< ExecutionResult, TransactionReceipt > State::execute( EnvInfo const& m_fs_ptr->commit(); removeEmptyAccounts = _envInfo.number() >= _sealEngine.chainParams().EIP158ForkBlock; - boost::chrono::high_resolution_clock::time_point commitTimeStart = - boost::chrono::high_resolution_clock::now(); commit( removeEmptyAccounts ? dev::eth::CommitBehaviour::RemoveEmptyAccounts : dev::eth::CommitBehaviour::KeepEmptyAccounts ); - boost::chrono::high_resolution_clock::time_point commitTimeFinish = - boost::chrono::high_resolution_clock::now(); - commitTime = boost::chrono::duration_cast< boost::chrono::milliseconds >( - commitTimeFinish - commitTimeStart ) - .count(); break; } diff --git a/libskale/State.h b/libskale/State.h index dd8bcae85..6bb7afe95 100644 --- a/libskale/State.h +++ b/libskale/State.h @@ -400,19 +400,6 @@ class State { contractStorageLimit_ = _contractStorageLimit; }; // only for tests - auto getExecuteTime() { - auto val = executeTime; - executeTime = 0; - return val; - } - - auto getCommitTime() { - auto val = commitTime; - commitTime = 0; - return val; - } - - private: void updateToLatestVersion(); @@ -509,9 +496,6 @@ class State { dev::s256 totalStorageUsed_ = 0; dev::s256 currentStorageUsed_ = 0; - boost::chrono::duration< long, boost::ratio< 1, 1000 > >::rep commitTime = 0; - boost::chrono::duration< long, boost::ratio< 1, 1000 > >::rep executeTime = 0; - #ifdef HISTORIC_STATE dev::eth::HistoricState m_historicState;