Skip to content

Commit

Permalink
Merge branch 'release-3.7.1' of github.com:FISCO-BCOS/FISCO-BCOS into…
Browse files Browse the repository at this point in the history
… release-3.7.2-0415
  • Loading branch information
JimmyShi22 committed Apr 15, 2024
2 parents 16e585e + 57b7a00 commit ad969a3
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 2 deletions.
80 changes: 80 additions & 0 deletions .github/workflows/workflow-self-hosted-centos-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Centos CI Upload
on:
push:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
release:
types: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build_centos:
name: centos ci upload
runs-on: self-hosted-centos
strategy:
fail-fast: false
env:
VCPKG_ROOT: ~/cache/vcpkg
DEPS_ROOT: ~/cache/deps
steps:
- uses: actions/checkout@v3
with:
clean: false

- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "8.0.382"

- name: Set up Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: "16.x"

- name: yum install
run: |
sudo yum install -y -q epel-release centos-release-scl flex bison patch gmp-static glibc-static glibc-devel libzstd-devel
sudo yum install -y -q devtoolset-11 llvm-toolset-7.0 rh-perl530-perl cmake3 zlib-devel ccache python-devel python3-devel python3-pip automake openssl
sudo yum reinstall -y -q https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
sudo yum install -y -q git
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-01-10
override: true

- name: Reuse build cache
run: |
mkdir -p ./build
rm -rf deps
ln -s ${{ env.DEPS_ROOT }} deps
- name: Remove cache if correspond dir change
run: ./tools/.ci/clear_build_cache.sh

- name: update vcpkg
run: |
cd ${{ env.VCPKG_ROOT }} && git fetch --all && git checkout master && git pull
cd -
- name: Build for linux
run: |
. /opt/rh/devtoolset-11/enable
. /opt/rh/rh-perl530/enable
export LIBCLANG_PATH=/opt/rh/llvm-toolset-7.0/root/lib64/
. /opt/rh/llvm-toolset-7.0/enable
cd build && cmake -DALLOCATOR=jemalloc -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DTESTS=ON -DWITH_LIGHTNODE=ON -DWITH_CPPSDK=ON -DWITH_TIKV=OFF -DWITH_TARS_SERVICES=ON .. || cat *.log
make -j8
chmod +x ./fisco-bcos-air/fisco-bcos
./fisco-bcos-air/fisco-bcos -v
- name: Test
run: cd build && CTEST_OUTPUT_ON_FAILURE=TRUE make test
- uses: actions/upload-artifact@v2
with:
name: fisco-bcos.zip
path: build/fisco-bcos-air/fisco-bcos
12 changes: 12 additions & 0 deletions bcos-boostssl/bcos-boostssl/websocket/WsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @date 2021-07-28
*/
#include "bcos-boostssl/websocket/WsStream.h"
#include "bcos-framework/gateway/GatewayTypeDef.h"
#include <bcos-boostssl/websocket/Common.h>
#include <bcos-boostssl/websocket/WsError.h>
#include <bcos-boostssl/websocket/WsService.h>
Expand Down Expand Up @@ -557,6 +558,17 @@ void WsService::onRecvMessage(
}
else
{
if (message->packetType() == gateway::AMOPMessageType)
{
// AMOP May be disable by config.ini
WEBSOCKET_SERVICE(DEBUG)
<< LOG_BADGE("onRecvMessage") << LOG_DESC("AMOP is disabled!")
<< LOG_KV("type", message->packetType()) << LOG_KV("endpoint", session->endPoint())
<< LOG_KV("seq", seq) << LOG_KV("data size", message->payload()->size())
<< LOG_KV("use_count", session.use_count());
return;
}

WEBSOCKET_SERVICE(WARNING)
<< LOG_BADGE("onRecvMessage") << LOG_DESC("unrecognized message type")
<< LOG_KV("type", message->packetType()) << LOG_KV("endpoint", session->endPoint())
Expand Down
4 changes: 2 additions & 2 deletions bcos-gateway/bcos-gateway/Gateway.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ void Gateway::onReceiveBroadcastMessage(
// Readonly filter
if (m_readonlyFilter && !filter(*m_readonlyFilter, groupID, moduleID, bytesConstRef{}))
{
GATEWAY_LOG(WARNING) << "BroadcastMessage moduleID: " << moduleID
<< " filter by readOnlyFilter";
GATEWAY_LOG(INFO) << "BroadcastMessage moduleID: " << moduleID
<< " filter by readOnlyFilter";
return;
}

Expand Down
10 changes: 10 additions & 0 deletions bcos-gateway/bcos-gateway/libp2p/Service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,16 @@ void Service::onMessage(NetworkException e, SessionFace::Ptr session, Message::P
return;
}

if (message->packetType() == gateway::AMOPMessageType)
{
// AMOP May be disable by config.ini
SERVICE_LOG(DEBUG) << LOG_DESC("Unrecognized message type")
<< LOG_DESC(": AMOP is disabled!") << LOG_KV("seq", message->seq())
<< LOG_KV("packetType", packetType) << LOG_KV("ext", ext)
<< LOG_KV("version", version)
<< LOG_KV("dst p2p", p2pMessage->dstP2PNodeID());
return;
}
SERVICE_LOG(ERROR) << LOG_DESC("Unrecognized message type") << LOG_KV("seq", message->seq())
<< LOG_KV("packetType", packetType) << LOG_KV("ext", ext)
<< LOG_KV("version", version)
Expand Down

0 comments on commit ad969a3

Please sign in to comment.