From 16142f38ecc3d5affe80fa61c39e7b391c3cb729 Mon Sep 17 00:00:00 2001 From: wenlinli <1574249665@qq.com> Date: Fri, 19 Apr 2024 10:03:13 +0800 Subject: [PATCH] delete some unnecessary error logs and fix release.yml bug (#4387) --- .github/workflows/release.yml | 2 +- bcos-boostssl/test/exec/echo_client_sample.cpp | 4 ++-- .../bcos-crypto/signature/ed25519/Ed25519Crypto.cpp | 2 +- .../bcos-crypto/signature/hsmSM2/HsmSM2Crypto.cpp | 8 ++++---- bcos-crypto/bcos-crypto/signature/sm2/SM2Crypto.cpp | 2 +- .../src/precompiled/ShardingPrecompiled.cpp | 2 +- bcos-gateway/bcos-gateway/libnetwork/Session.cpp | 4 ++-- bcos-gateway/bcos-gateway/libp2p/Service.cpp | 4 ++-- bcos-scheduler/src/SchedulerImpl.cpp | 4 ++-- bcos-sdk/sample/tx/deploy_hello.cpp | 6 +++--- bcos-sdk/sample/tx/hello_perf.cpp | 12 ++++++------ tools/BcosAirBuilder/build_chain.sh | 4 ++-- tools/BcosBuilder/src/common/utilities.py | 2 +- 13 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 155fb9e6d9..71349bdd1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ concurrency: jobs: compile_macOS_release: name: upload standard binary of macOS - runs-on: macos-12 + runs-on: macos-13 # runs-on: self-hosted-mac # if: startsWith(github.ref,'v2') steps: diff --git a/bcos-boostssl/test/exec/echo_client_sample.cpp b/bcos-boostssl/test/exec/echo_client_sample.cpp index f1245b35be..c62459d0b7 100644 --- a/bcos-boostssl/test/exec/echo_client_sample.cpp +++ b/bcos-boostssl/test/exec/echo_client_sample.cpp @@ -64,8 +64,8 @@ void sendMessage(std::shared_ptr _msg, std::shared_ptr _ { TEST_LOG(WARNING, "TEST_CLIENT_MODULE") << LOG_BADGE(" [Main] ===>>>> ") << LOG_DESC("callback response error") - << LOG_KV("errorCode", _error->errorCode()) - << LOG_KV("errorMessage", _error->errorMessage()); + << LOG_KV("code", _error->errorCode()) + << LOG_KV("message", _error->errorMessage()); return; } BCOS_LOG(INFO) << LOG_DESC("receiveResponse, timecost:") << (utcTime() - startT) diff --git a/bcos-crypto/bcos-crypto/signature/ed25519/Ed25519Crypto.cpp b/bcos-crypto/bcos-crypto/signature/ed25519/Ed25519Crypto.cpp index 8836490254..425c992054 100644 --- a/bcos-crypto/bcos-crypto/signature/ed25519/Ed25519Crypto.cpp +++ b/bcos-crypto/bcos-crypto/signature/ed25519/Ed25519Crypto.cpp @@ -120,7 +120,7 @@ std::pair bcos::crypto::ed25519Recover(Hash::Ptr _hashImpl, bytesCo catch (const std::exception& e) { CRYPTO_LOG(WARNING) << LOG_DESC("ed25519Recover failed") - << LOG_KV("error", boost::diagnostic_information(e)); + << LOG_KV("message", boost::diagnostic_information(e)); } return {false, {}}; } diff --git a/bcos-crypto/bcos-crypto/signature/hsmSM2/HsmSM2Crypto.cpp b/bcos-crypto/bcos-crypto/signature/hsmSM2/HsmSM2Crypto.cpp index 1cca773cdf..a75e17033e 100644 --- a/bcos-crypto/bcos-crypto/signature/hsmSM2/HsmSM2Crypto.cpp +++ b/bcos-crypto/bcos-crypto/signature/hsmSM2/HsmSM2Crypto.cpp @@ -89,7 +89,7 @@ std::shared_ptr HsmSM2Crypto::sign( if (code != SDR_OK) { CRYPTO_LOG(ERROR) << "[HSMSignature::sign] ERROR of Sign" - << LOG_KV("error", provider.GetErrorMessage(code)); + << LOG_KV("message", provider.GetErrorMessage(code)); return nullptr; } @@ -130,7 +130,7 @@ bool HsmSM2Crypto::verify( if (code != SDR_OK) { CRYPTO_LOG(ERROR) << "[HSMSignature::verify] ERROR of Hash" - << LOG_KV("error", provider.GetErrorMessage(code)); + << LOG_KV("message", provider.GetErrorMessage(code)); return false; } @@ -139,7 +139,7 @@ bool HsmSM2Crypto::verify( if (code != SDR_OK) { CRYPTO_LOG(ERROR) << "[HSMSignature::verify] ERROR of Verify" - << LOG_KV("error", provider.GetErrorMessage(code)); + << LOG_KV("message", provider.GetErrorMessage(code)); return false; } return true; @@ -184,7 +184,7 @@ std::pair HsmSM2Crypto::recoverAddress(Hash::Ptr _hashImpl, bytesCo catch (const std::exception& e) { CRYPTO_LOG(WARNING) << LOG_DESC("Hsm SM2 recoverAddress failed") - << LOG_KV("error", boost::diagnostic_information(e)); + << LOG_KV("message", boost::diagnostic_information(e)); } return {false, {}}; } diff --git a/bcos-crypto/bcos-crypto/signature/sm2/SM2Crypto.cpp b/bcos-crypto/bcos-crypto/signature/sm2/SM2Crypto.cpp index 5968a5030b..4efddb1412 100644 --- a/bcos-crypto/bcos-crypto/signature/sm2/SM2Crypto.cpp +++ b/bcos-crypto/bcos-crypto/signature/sm2/SM2Crypto.cpp @@ -114,7 +114,7 @@ std::pair SM2Crypto::recoverAddress(Hash::Ptr _hashImpl, bytesConst catch (const std::exception& e) { CRYPTO_LOG(WARNING) << LOG_DESC("sm2Recover failed") - << LOG_KV("error", boost::diagnostic_information(e)); + << LOG_KV("message", boost::diagnostic_information(e)); } return {false, {}}; } diff --git a/bcos-executor/src/precompiled/ShardingPrecompiled.cpp b/bcos-executor/src/precompiled/ShardingPrecompiled.cpp index 6d5c5db4c2..d24978bd23 100644 --- a/bcos-executor/src/precompiled/ShardingPrecompiled.cpp +++ b/bcos-executor/src/precompiled/ShardingPrecompiled.cpp @@ -209,7 +209,7 @@ void ShardingPrecompiled::makeShard( { int32_t code; codec.decode(ref(_callParameters->execResult()), code); - message = "errorCode: " + std::to_string(code); + message = "code: " + std::to_string(code); } PRECOMPILED_LOG(WARNING) << LOG_BADGE("ShardPrecompiled") << LOG_DESC("BFS makeDir error: ") diff --git a/bcos-gateway/bcos-gateway/libnetwork/Session.cpp b/bcos-gateway/bcos-gateway/libnetwork/Session.cpp index 89040202d8..c19269a66f 100644 --- a/bcos-gateway/bcos-gateway/libnetwork/Session.cpp +++ b/bcos-gateway/bcos-gateway/libnetwork/Session.cpp @@ -447,7 +447,7 @@ void Session::drop(DisconnectReason _reason) if (error && error != boost::asio::error::operation_aborted) { SESSION_LOG(WARNING) - << "[drop] shutdown timer error" << LOG_KV("errorValue", error.value()) + << "[drop] shutdown timer failed" << LOG_KV("failedValue", error.value()) << LOG_KV("message", error.message()); } /// force to shutdown when timeout @@ -466,7 +466,7 @@ void Session::drop(DisconnectReason _reason) if (error) { SESSION_LOG(INFO) - << "[drop] shutdown failed " << LOG_KV("errorValue", error.value()) + << "[drop] shutdown failed " << LOG_KV("failedValue", error.value()) << LOG_KV("message", error.message()); } /// force to close the socket diff --git a/bcos-gateway/bcos-gateway/libp2p/Service.cpp b/bcos-gateway/bcos-gateway/libp2p/Service.cpp index abdaa3ab4a..7a60d9a591 100644 --- a/bcos-gateway/bcos-gateway/libp2p/Service.cpp +++ b/bcos-gateway/bcos-gateway/libp2p/Service.cpp @@ -153,7 +153,7 @@ void Service::heartBeat() m_timer->async_wait([self](const boost::system::error_code& error) { if (error) { - SERVICE_LOG(WARNING) << "timer canceled" << LOG_KV("errorCode", error); + SERVICE_LOG(WARNING) << "timer canceled" << LOG_KV("code", error); return; } auto service = self.lock(); @@ -271,7 +271,7 @@ void Service::onDisconnect(NetworkException e, P2PSession::Ptr p2pSession) if (e.errorCode() == P2PExceptionType::DuplicateSession) return; - SERVICE_LOG(INFO) << LOG_DESC("onDisconnect") << LOG_KV("errorCode", e.errorCode()) + SERVICE_LOG(INFO) << LOG_DESC("onDisconnect") << LOG_KV("code", e.errorCode()) << LOG_KV("what", boost::diagnostic_information(e)); RecursiveGuard l(x_nodes); for (auto& it : m_staticNodes) diff --git a/bcos-scheduler/src/SchedulerImpl.cpp b/bcos-scheduler/src/SchedulerImpl.cpp index 3200d44414..6be1063847 100644 --- a/bcos-scheduler/src/SchedulerImpl.cpp +++ b/bcos-scheduler/src/SchedulerImpl.cpp @@ -258,7 +258,7 @@ void SchedulerImpl::executeBlockInternal(bcos::protocol::Block::Ptr block, bool SCHEDULER_LOG(DEBUG) << METRIC << BLOCK_NUMBER(requestBlockNumber) << "ExecuteBlock response" - << LOG_KV(error ? "error" : "ok", error ? error->what() : "ok"); + << LOG_KV(error ? "failed" : "ok", error ? error->what() : "ok"); _callback(error == nullptr ? nullptr : std::move(error), std::move(blockHeader), _sysBlock); }; @@ -477,7 +477,7 @@ void SchedulerImpl::commitBlock(bcos::protocol::BlockHeader::Ptr header, bcos::Error::Ptr&& error, bcos::ledger::LedgerConfig::Ptr&& config) { __itt_frame_end_v3(ITT_DOMAIN_SCHEDULER_COMMIT, nullptr); SCHEDULER_LOG(DEBUG) << METRIC << BLOCK_NUMBER(requestBlockNumber) << "CommitBlock response" - << LOG_KV(error ? "error" : "ok", error ? error->what() : "ok"); + << LOG_KV(error ? "failed" : "ok", error ? error->what() : "ok"); _callback(error == nullptr ? nullptr : std::move(error), std::move(config)); }; diff --git a/bcos-sdk/sample/tx/deploy_hello.cpp b/bcos-sdk/sample/tx/deploy_hello.cpp index 49785063fe..dad6d0706e 100644 --- a/bcos-sdk/sample/tx/deploy_hello.cpp +++ b/bcos-sdk/sample/tx/deploy_hello.cpp @@ -198,9 +198,9 @@ int main(int argc, char** argv) [&p](bcos::Error::Ptr _error, std::shared_ptr _resp) { if (_error && _error->errorCode() != 0) { - std::cout << LOG_DESC(" [DeployHello] send transaction response error") - << LOG_KV("errorCode", _error->errorCode()) - << LOG_KV("errorMessage", _error->errorMessage()) << std::endl; + std::cout << LOG_DESC(" [DeployHello] send transaction response failed") + << LOG_KV("code", _error->errorCode()) + << LOG_KV("message", _error->errorMessage()) << std::endl; } else { diff --git a/bcos-sdk/sample/tx/hello_perf.cpp b/bcos-sdk/sample/tx/hello_perf.cpp index b8ec33f2b8..bc3d461c20 100644 --- a/bcos-sdk/sample/tx/hello_perf.cpp +++ b/bcos-sdk/sample/tx/hello_perf.cpp @@ -205,9 +205,9 @@ int main(int argc, char** argv) [&contractAddress, &p](bcos::Error::Ptr _error, std::shared_ptr _resp) { if (_error && _error->errorCode() != 0) { - std::cout << LOG_DESC(" [DeployHello] send transaction response error") - << LOG_KV("errorCode", _error->errorCode()) - << LOG_KV("errorMessage", _error->errorMessage()) << std::endl; + std::cout << LOG_DESC(" [DeployHello] send transaction response failed") + << LOG_KV("code", _error->errorCode()) + << LOG_KV("message", _error->errorMessage()) << std::endl; exit(0); } else @@ -257,9 +257,9 @@ int main(int argc, char** argv) recvRateReporter->update(1, true); if (_error && _error->errorCode() != 0) { - std::cout << LOG_DESC(" [DeployHello] send transaction response error") - << LOG_KV("errorCode", _error->errorCode()) - << LOG_KV("errorMessage", _error->errorMessage()) << std::endl; + std::cout << LOG_DESC(" [DeployHello] send transaction response failed") + << LOG_KV("code", _error->errorCode()) + << LOG_KV("message", _error->errorMessage()) << std::endl; } }); } diff --git a/tools/BcosAirBuilder/build_chain.sh b/tools/BcosAirBuilder/build_chain.sh index 7afc032299..17a43d5599 100755 --- a/tools/BcosAirBuilder/build_chain.sh +++ b/tools/BcosAirBuilder/build_chain.sh @@ -69,11 +69,11 @@ supported_consensus=(pbft rpbft) # for pro or max default setting bcos_builder_package=BcosBuilder.tgz -bcos_builder_version=v3.7.1 +bcos_builder_version=v3.7.2 use_exist_binary="false" download_specific_binary_flag="false" download_service_binary_type="cdn" -service_binary_version="v3.7.1" +service_binary_version="v3.7.2" download_service_binary_path="binary" download_service_binary_path_flag="false" service_type="all" diff --git a/tools/BcosBuilder/src/common/utilities.py b/tools/BcosBuilder/src/common/utilities.py index c2ffa81ed6..7f21c6dd78 100644 --- a/tools/BcosBuilder/src/common/utilities.py +++ b/tools/BcosBuilder/src/common/utilities.py @@ -99,7 +99,7 @@ class CommandInfo: network_add_vxlan = "add-vxlan" download_binary = "download_binary" download_type = ["cdn", "git"] - default_binary_version = "v3.6.0" + default_binary_version = "v3.7.2" command_list = [gen_config, upload, deploy, upgrade, undeploy, expand, start, stop] service_command_list_str = ', '.join(command_list)