Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
189 commits
Select commit Hold shift + click to select a range
05fb1fa
add option to identify node category
ouyun Mar 3, 2020
dae0a23
alter name of option to adapt for naming rule of generator
ouyun Mar 3, 2020
fb48e29
add paho mqtt c++ library
ouyun Mar 4, 2020
24ee1d9
update cmake file to integrate mqtt to bigbang
ouyun Mar 4, 2020
a467775
make mqtt functions in bigbangcore available
ouyun Mar 5, 2020
b7a146f
correct some typos
ouyun Mar 6, 2020
19b2f8f
remove unused source code head file
ouyun Mar 6, 2020
8d97057
add identifying of node category to module
ouyun Mar 6, 2020
27a9932
add storage function for enrolling fork nodes
ouyun Mar 9, 2020
fc14c54
add new RPC command: enrollforknode
ouyun Mar 9, 2020
688cd6e
add interface for mq storage
ouyun Mar 10, 2020
d4d99a3
update mq component:
ouyun Mar 10, 2020
d1d6ff8
update mq framework to enable pub/sub simultaniously and establish ch…
ouyun Mar 11, 2020
3bd9965
add message loop procedure for fork node sending main chain block req…
ouyun Mar 11, 2020
4dfeef9
resolve a tricky issue of publishing message pointed to smart pointer…
ouyun Mar 12, 2020
fb7734b
clean up code
ouyun Mar 12, 2020
83051b0
add procedures of receiving message from broker for both dpos node an…
ouyun Mar 12, 2020
8d4be7d
correct local variable shadow
ouyun Mar 12, 2020
2f91442
reduce payload size by removing block context
ouyun Mar 13, 2020
07f85bb
update rollback function for mq component
ouyun Mar 13, 2020
3a1f4ce
refactor code
ouyun Mar 16, 2020
c5c9442
resolve build issue for install script
ouyun Mar 17, 2020
67fc8a9
optimise startup process of mq component
ouyun Mar 17, 2020
7a25592
rename enrolling rpc command and update its descriptions
ouyun Mar 17, 2020
bff2a41
refactor name as supernode
ouyun Mar 17, 2020
92f6d47
restrict non-super nodes to enroll fork info for mq communication
ouyun Mar 18, 2020
5f74966
add trigger to active mq communication when RPC enrollment is called
ouyun Mar 18, 2020
0c34d7e
fix issue of being not triggered when new enrollment entered
ouyun Mar 18, 2020
1931de2
bugfix of sending request error on enrollment super node
ouyun Mar 18, 2020
73b8dc1
adjust log output
ouyun Mar 18, 2020
decce22
bugfix of receiving block validate failed
ouyun Mar 19, 2020
39b4469
resolve sync issue when generating main chain block on dpos node
ouyun Mar 19, 2020
849d7ba
resolve sync issue when occurs jitter of generating main chain block …
ouyun Mar 19, 2020
43f06ce
Merge branch 'supernode' of github.com:bigbangcore/BigBang into super…
ouyun Mar 19, 2020
d4c00a6
modify strategy of add fork node type enrollment
ouyun Mar 20, 2020
c6ccf53
add returned enrollment list when issueing RPC command successfully
ouyun Mar 20, 2020
7a30869
fix adjudgement of invalid fork hash
ouyun Mar 20, 2020
b626dc3
fix updating issue for fork node
ouyun Mar 20, 2020
f6de865
bugfix of null topic issue
ouyun Mar 24, 2020
191710f
bugfix of order issue for rollback short chain at dispatcher module
ouyun Mar 25, 2020
4507499
add facilities to correctly deal with request for long chain
ouyun Mar 25, 2020
e38d892
typo correction
ouyun Mar 26, 2020
bc9770c
restrict getwork/submitwork from/to fork nodes
ouyun Mar 26, 2020
d136746
update rpc template
ouyun Mar 26, 2020
97f9abc
disable POW mining on fork nodes
ouyun Mar 26, 2020
e6083f5
modification for fork
ouyun Mar 27, 2020
1bed360
add ip info to supernode storage for global purpose and update enroll…
ouyun Mar 31, 2020
a57c1fe
update fork node ip address related facilities
ouyun Apr 1, 2020
fe93c62
add notification to set fork filter as finishing enrolling a fork nod…
ouyun Apr 1, 2020
4db6982
update RPC enrollsupernode to add output of fork node ip address
ouyun Apr 1, 2020
83175c1
add interface to storage component for supernode and update some rela…
ouyun Apr 1, 2020
3fd53ee
fix issue involved at storage
ouyun Apr 1, 2020
3cb7a48
fix defect of incorrect startup to connect mq broker while no corresp…
ouyun Apr 1, 2020
15088e4
bugfix of mqdb storage functions
ouyun Apr 2, 2020
4bb8401
add supernode db interface and optimize code
ouyun Apr 2, 2020
0e906a8
fix the following defects:
ouyun Apr 6, 2020
c4f53f9
restrict dpos node to subscribe biz forks and/or get blocks on them
ouyun Apr 7, 2020
943cbf0
update previous commit for when invoking enroll supernode RPC
ouyun Apr 7, 2020
af45bb2
restrict fork nodes to subscrib main chain and/or send getblocks for …
ouyun Apr 8, 2020
90a7327
add allowed fork list for fork nodes when launching
ouyun Apr 8, 2020
c003a10
set filters in netchannel for super nodes
ouyun Apr 8, 2020
07cff81
hybrid nodes interaction: built infrastructure
ouyun Apr 9, 2020
bca1a99
code optimize: const value to enum
ouyun Apr 10, 2020
baee898
add new handler to deal with biz forks
ouyun Apr 10, 2020
4b6d08c
- add restriction to RPC enrollsupernode
ouyun Apr 10, 2020
e8cfa8c
add condition for enrollsupernode RPC and update relative rpc json te…
ouyun Apr 10, 2020
c92a66d
refactor the following modules:
ouyun Apr 10, 2020
f23b773
update log info to debug for convenience
ouyun Apr 12, 2020
0160471
connect mqcluster to netchannel
ouyun Apr 13, 2020
cdbaffd
adjust connector netchn to mq and add new nodes to p2p connection poo…
ouyun Apr 13, 2020
c6a85f6
bugfix of incorrect node type
ouyun Apr 13, 2020
ff432d7
set constraint of only bbc nodes put new peers to p2p connection pool…
ouyun Apr 13, 2020
62b2f3a
bugfix of incorrect operation when enrollment has not occured yet at …
ouyun Apr 14, 2020
5d45b4f
add constraint for dpos nodes
ouyun Apr 14, 2020
668a6ef
update
ouyun Apr 14, 2020
b16ac42
remove dead code
ouyun Apr 14, 2020
ae62bcd
add a mq protocol of assign biz fork: dpos node -> fork node
ouyun Apr 14, 2020
54bb0e8
reuse existed code
ouyun Apr 15, 2020
0c31e51
add one topic for biz fork and refactor topics
ouyun Apr 16, 2020
179a5ac
add handling of biz fork assignment by dpos node through mq broker
ouyun Apr 16, 2020
dd0b4e6
transfer routine of adding biz fork nodes from netchannel to service …
ouyun Apr 16, 2020
fe3dacf
abstract a common function to share with two callers
ouyun Apr 16, 2020
4cd82d6
- add two options;
ouyun Apr 16, 2020
c4cffd7
- convert line separators;
ouyun Apr 16, 2020
f91aa6c
add entry point of getting biz forks to trigger at the time of launch…
ouyun Apr 17, 2020
f0fbccf
fix defect of incorrect assignment when enrolling by rpc
ouyun Apr 17, 2020
b42bbd9
substitute emptiness ajuadgement
ouyun Apr 17, 2020
e9c0f01
modify container for topics
ouyun Apr 17, 2020
3353747
update log and array assignment
ouyun Apr 17, 2020
0f11354
fix add new node only for fork nodes
ouyun Apr 20, 2020
7049865
fix defect of retained message
ouyun Apr 20, 2020
980ef95
bugfix: mq do not launch after enrollsupernode
ouyun Apr 20, 2020
7680d1d
fix defect of topic being unable to subscribe after enrollment
ouyun Apr 20, 2020
580aab5
revise rpcmod to fix bug of enrollsupernode
ouyun Apr 20, 2020
3447eae
defect fix of sync issue for fork nodes
ouyun Apr 20, 2020
7928832
bugfix: connection reset after sending getbizfork caused by incorrect…
ouyun Apr 21, 2020
9de43e1
add log and remove duplicate
ouyun Apr 22, 2020
997e8e0
update: filter out request for main chain at getting biz forks
ouyun Apr 22, 2020
f73afa7
update: make some revisions
ouyun Apr 22, 2020
59c36cc
reduce communication transfer by sending no request or responding no …
ouyun Apr 22, 2020
daf62f1
apply addnode for fork node to get bizforks by p2p
ouyun Apr 22, 2020
ea7a2eb
- fix of sort before unique;
ouyun Apr 22, 2020
6a76eb8
add a RPC command called listenrollment
ouyun Apr 23, 2020
350e2bd
add mutex mechanism to protect two data structures
ouyun Apr 23, 2020
0743f27
logger add information to identify which fork node has reached the be…
ouyun Apr 23, 2020
fbf045b
update example for RPC command listenrollment
ouyun Apr 24, 2020
0a36896
fix incorrect initialization of lastheight for super nodes
ouyun Apr 24, 2020
9f50833
add event name to log info in eventhandlers for the convenience of de…
ouyun Apr 24, 2020
68ad6c6
refactor enrollsupernode/listenrollment RPC commands:
ouyun Apr 24, 2020
80942cb
filter out nodes reflected by outer peers through p2p
ouyun Apr 26, 2020
6bc3c94
remove duplicate to self come from mq
ouyun Apr 27, 2020
573ee81
update putting pending nodes to pool
ouyun Apr 27, 2020
61349c5
debug failing to send resp msg for requested main chain block to fork…
ouyun Apr 28, 2020
adaedbc
bugfix for deadlock
ouyun Apr 29, 2020
6813a52
fix topic refresh issue when enrollsupernode in different ways
ouyun Apr 29, 2020
71c9018
place posting the first main chain request after subscribing its resp…
ouyun Apr 29, 2020
6322343
resolve deadlock issue when mass message recv/send simultaneously
ouyun Apr 30, 2020
61e2e71
mqtt publish without lock to avoid weird deadlock
ouyun May 6, 2020
d0fe85f
add one option for identifying super node MQ cluster
ouyun May 6, 2020
8b288cf
add ajudgement as invoking for fork node
ouyun May 7, 2020
f5a6f43
adjust error handling in enrollment
ouyun May 8, 2020
14a2cfc
clean up
ouyun May 12, 2020
3967bf0
adjust log in terms of the result of feature test 2
ouyun May 13, 2020
4f313bc
rpc-msg-del
shangqd May 13, 2020
dfb54e1
v2.1 test
cchanm May 13, 2020
6c0d21c
Merge pull request #534 from bigbangcore/rpc_msg_del
cchanm May 14, 2020
daeef37
fix of dpos node being unable to enroll fork node
ouyun May 18, 2020
5cffbbf
Merge branch 'v2.1' into v2.1-testnet
shangqd May 18, 2020
b7674e2
Merge branch 'master' into v2.1-testnet
cchanm May 18, 2020
bf40325
1, supply 3 exceptional cases to deal with timely requesting for bloc…
ouyun May 18, 2020
f3a30b9
optimize mq thread
ouyun May 19, 2020
dd4ff6b
adjust log level
ouyun May 19, 2020
4ec7b1b
integrate supernode feature into main branch of double consensus of C…
ouyun May 19, 2020
f7aec5e
use constant instead of literal value
ouyun May 20, 2020
dee7212
add a few rpc commands related with offline signature for tx
ouyun May 22, 2020
99ca0b8
finish functionality of signofflinetransaction/sendofflinesignedtrans…
ouyun May 25, 2020
6a69417
fix defect of signofflinetransaction
ouyun May 26, 2020
c6886fa
remove historical hard fork judgement
ouyun May 26, 2020
92e985d
remove duplicated feature: wallet offline signature pubkey-based
ouyun May 26, 2020
ea9cec6
update usages of signofflinetransaction/sendofflinesignedtransaction …
ouyun May 26, 2020
602c92f
revise invoking
ouyun May 27, 2020
84d5d43
integrate offline signing to main branch
ouyun May 27, 2020
1f4749b
merge new code with offline-signtx branch
ouyun May 27, 2020
5b01483
typo and test
ouyun Jun 5, 2020
5b0605c
fix still publish msg although connection to broker does not establis…
ouyun Jun 10, 2020
925c8d0
wait for reconnecting rather than existing thread
ouyun Jun 16, 2020
8f12439
remove redundance
ouyun Jun 16, 2020
b0b7666
seperate generating primary/subsidiary dpos block
ouyun Jun 16, 2020
2713fa1
speed up synchronizing main chain blocks to keep with dpos generating…
ouyun Jun 21, 2020
0ea3f05
fix filter condition against reply threshold
ouyun Jun 23, 2020
9474254
fix issue of dismatching reported by dpos node when rollback happens …
ouyun Jun 23, 2020
c6edac4
update log
ouyun Jun 28, 2020
3f895f9
mint on biz forks using beacons rather than chain evolution
ouyun Jun 29, 2020
d50f815
log for debug
ouyun Jul 2, 2020
9bad3ea
fix alignment issue
ouyun Jul 6, 2020
9c78d04
bugfix of lacking of argument results in crash
ouyun Jul 7, 2020
7259d04
bugfix of synchronizing biz fork blocks among bbc/fork nodes is not i…
ouyun Jul 9, 2020
8c8879f
update modification
ouyun Jul 11, 2020
d87c864
fix issue of setting fork filter delay to be unable to subscribe for …
ouyun Jul 17, 2020
08a612e
add handler for exception of failing to sync when missing rollback me…
ouyun Jul 20, 2020
41e1033
adjust sync strategy: not frequently request while not reaching the b…
ouyun Jul 20, 2020
dc8a5bd
let bbcnode be able to launch request for bizforks while configured a…
ouyun Jul 29, 2020
5ddfe9d
add trigger: fork enrollment to notify relative nodes
ouyun Jul 30, 2020
edd8f94
fix dead lock
ouyun Jul 31, 2020
47203cd
refine updating biz fork list during flooding
ouyun Jul 31, 2020
ca85017
bugfix forknode dead loop fetch main chain blocks from dposnode
ouyun Aug 6, 2020
b96dacb
fix issue of forknode abnormally exiting biz fork blockmaker thread o…
ouyun Aug 6, 2020
01be0e6
1, fix sub agent about empty judgement
ouyun Aug 10, 2020
288b9a7
bugfix of flow control
ouyun Aug 11, 2020
8ffdfb3
fix issue
ouyun Aug 11, 2020
7f309e8
update event handler
ouyun Aug 14, 2020
4743bfa
super node
ouyun Aug 18, 2020
f24bbbc
clean
ouyun Aug 21, 2020
fe0fd10
Merge branch 'master' into supernode-dpos-nilextend with conflicts re…
ouyun Aug 21, 2020
1df0629
fix error during build
ouyun Aug 21, 2020
bb29e64
fix merge issue
ouyun Aug 21, 2020
7610696
add judgement for latest fork block
ouyun Aug 28, 2020
1bedcc9
update CI
ouyun Sep 4, 2020
92c07e7
add dependency lib of supernode feature to CI
ouyun Sep 4, 2020
3da6f37
append semicolon at the end of newly lines
ouyun Sep 4, 2020
ce1fc24
correct current working directory
ouyun Sep 4, 2020
0fe5d09
add initialization for data member agaist CI
ouyun Sep 4, 2020
f96ab99
exclude dependency lib code for cppcheck
ouyun Sep 4, 2020
805d944
correction according to output of cppcheck
ouyun Sep 4, 2020
89e62d5
refine code in the light of performance suggestion given by cppcheck
ouyun Sep 4, 2020
0708806
optimize cppcheck execution
ouyun Sep 4, 2020
53a76f5
Try Travis deploy to Github release for MacOS
ouyun Sep 7, 2020
a8b8822
update lauching folder for script to run
ouyun Sep 7, 2020
ee4b4a0
suppress warnings specialized under MacOS
ouyun Sep 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ sudo: required

dist: bionic # ubuntu 18.04

#os:
# - linux

compiler:
- gcc
- clang
Expand Down Expand Up @@ -48,6 +45,17 @@ install:
brew update;
brew install cmake pkg-config openssl boost libsodium readline protobuf ncurses;
export OPENSSL_ROOT_DIR=`brew --prefix openssl`;
git clone https://github.com/eclipse/paho.mqtt.c.git;
cd paho.mqtt.c;
git checkout v1.3.1;
mkdir build && cd build;
cmake -DPAHO_BUILD_STATIC=TRUE -DPAHO_WITH_SSL=TRUE ..;
sudo make install;
sudo mkdir /usr/local/include/mqtt/;
sudo chmod 755 /usr/local/include/mqtt/;
sudo cp ${TRAVIS_BUILD_DIR}/src/mqtt/src/mqtt/* /usr/local/include/mqtt/;
sudo chmod 644 /usr/local/include/mqtt/*;
cd ${TRAVIS_BUILD_DIR};
else
sudo apt-get update -qq;
sudo apt install -y g++ cmake libboost-all-dev openssl libssl1.0-dev libreadline-dev pkg-config libprotobuf-dev protobuf-compiler libncurses5-dev autoconf;
Expand All @@ -60,15 +68,27 @@ install:
make -j2;
sudo make install;
cd ../;
git clone https://github.com/eclipse/paho.mqtt.c.git;
cd paho.mqtt.c;
git checkout v1.3.1;
mkdir build && cd build;
cmake -DPAHO_BUILD_STATIC=TRUE -DPAHO_WITH_SSL=TRUE ..;
sudo make install;
sudo cp -r ${TRAVIS_BUILD_DIR}/src/mqtt/src/mqtt/ /usr/local/include/;
sudo chmod 755 /usr/local/include/mqtt;
cd /usr/local/include/mqtt;
sudo chmod 644 *;
cd -;
cd ../..;
fi

before_script:
- ulimit -c unlimited -S # enable core dumps

script:
- ./INSTALL.sh
- ./INSTALL.sh
- ./build/test/test_big
- ./build/test/test_ctsdb
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
cppcheck --error-exitcode=1 --std=c++11 --enable=warning,performance,portability -i libsodium-1.0.18 -i src/leveldb -i build -i src/snappy -i src/crypto -i src/jsonrpc/json -i src/xengine/docker -i script -i test . ;
cppcheck -j2 --error-exitcode=1 --std=c++11 --enable=warning,performance,portability -i libsodium-1.0.18 -i src/leveldb -i build -i src/snappy -i src/crypto -i src/jsonrpc/json -i src/xengine/docker -i script -i test -i paho.mqtt.c -i src/mqtt . ;
fi
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ elseif(UNIX)
set(CMAKE_CXX_EXTENSIONS OFF)

else()
message(FATAL_ERROR "Unsupported plantform")
message(FATAL_ERROR "Unsupported platform")
endif()

# build type
Expand All @@ -57,7 +57,7 @@ endif()
if(UNIX AND NOT CYGWIN)
string(APPEND CMAKE_CXX_FLAGS " -Wall -Wextra -Werror -Wno-char-subscripts -Wno-unused-parameter -Wno-sign-compare -Wno-reorder -Wno-unused-local-typedefs -Wno-implicit-fallthrough -Wno-overloaded-virtual -Wno-strict-aliasing")
if (APPLE)
string(APPEND CMAKE_CXX_FLAGS " -fvisibility-inlines-hidden -fvisibility=hidden")
string(APPEND CMAKE_CXX_FLAGS " -Wno-missing-field-initializers -fvisibility-inlines-hidden -fvisibility=hidden")
endif()
endif()

Expand Down
17 changes: 9 additions & 8 deletions INSTALL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ fi
cd build

# cmake
flagdebug=""
flag=""
if [[ "$1" = "debug" || "$2" = "debug" ]]
then
flagdebug="-DCMAKE_BUILD_TYPE=Debug"
flag="-DCMAKE_BUILD_TYPE=Debug"
else
flagdebug="-DCMAKE_BUILD_TYPE=Release"
flag="-DCMAKE_BUILD_TYPE=Release"
fi

flagtestnet=""
if [[ "$1" = "testnet" || "$2" = "testnet" ]]
then
flagtestnet="-DTESTNET=on"
flag+=" -DTESTNET=on"
else
flagtestnet="-DTESTNET=off"
flag+=" -DTESTNET=off"
fi

cmake .. $flagdebug $flagtestnet
if [ $? -ne 0 ]; then
flag+=" -DPAHO_BUILD_STATIC=TRUE -DPAHO_BUILD_SHARED=FALSE"

cmake .. $flag
if [ $? -ne 0 ]; then
cd $origin_path
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions doc/auto_rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ CBasicConfig* CreateConfig(const std::string& cmd)
{
if (cmd == "help")
{
return new mode_impl::CCombinConfig<CHelpConfig, T...>;
return new mode_impl::CCombineConfig<CHelpConfig, T...>;
}
else if (cmd == "stop")
{
return new mode_impl::CCombinConfig<CStopConfig, T...>;
return new mode_impl::CCombineConfig<CStopConfig, T...>;
}
...
}
Expand Down
Loading