Update hbbft.
This commit is contained in:
parent
2fe37f399b
commit
15a42e7817
|
@ -49,6 +49,6 @@ version = "*"
|
||||||
# git = "https://github.com/c0gent/hbbft"
|
# git = "https://github.com/c0gent/hbbft"
|
||||||
git = "https://github.com/poanetwork/hbbft"
|
git = "https://github.com/poanetwork/hbbft"
|
||||||
# branch = "master"
|
# branch = "master"
|
||||||
branch = "afck-queue-fields"
|
branch = "afck-agreement"
|
||||||
# path = "../hbbft"
|
# path = "../hbbft"
|
||||||
# features = ["serialization-protobuf"]
|
# features = ["serialization-protobuf"]
|
|
@ -0,0 +1,42 @@
|
||||||
|
#/bin/bash
|
||||||
|
|
||||||
|
# Starts a Hydrabadger node
|
||||||
|
# =========================
|
||||||
|
#
|
||||||
|
# Optional environment variables:
|
||||||
|
#
|
||||||
|
# * HYDRABADGER_LOG_ADDTL:
|
||||||
|
#
|
||||||
|
# Appends additional logging args (debug, trace, filters, etc.).
|
||||||
|
#
|
||||||
|
# * HYDRABADGER_RELEASE:
|
||||||
|
#
|
||||||
|
# Builds in debug mode if `HYDRABADGER_RELEASE` == `0` or `false`.
|
||||||
|
# Slows down output and makes reading log easier.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
let HOST_PORT=300$1
|
||||||
|
let PEER_0_PORT=$HOST_PORT-1
|
||||||
|
let PEER_1_PORT=$HOST_PORT+1
|
||||||
|
|
||||||
|
HYDRABADGER_LOG=peer_node::hydrabadger=error,warn,info,$HYDRABADGER_LOG_ADDTL
|
||||||
|
|
||||||
|
if [[ $HYDRABADGER_RELEASE ]]
|
||||||
|
then
|
||||||
|
case "$HYDRABADGER_RELEASE" in
|
||||||
|
0) RELEASE="" ;;
|
||||||
|
false) RELEASE="" ;;
|
||||||
|
*) RELEASE="--release" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
RELEASE="--release"
|
||||||
|
fi
|
||||||
|
|
||||||
|
bash -c "\
|
||||||
|
HYDRABADGER_LOG=$HYDRABADGER_LOG gdb -ex=r --args target/release/peer_node \
|
||||||
|
-b localhost:$HOST_PORT \
|
||||||
|
-r localhost:$PEER_0_PORT \
|
||||||
|
-r localhost:$PEER_1_PORT\
|
||||||
|
$2 $3 $4 $5 $6 $7 $8
|
||||||
|
"
|
10
run-node
10
run-node
|
@ -16,9 +16,13 @@
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
let HOST_PORT=300$1
|
let HOST_ID=$1
|
||||||
let PEER_0_PORT=$HOST_PORT-1
|
let PEER_0_ID=$HOST_ID-1
|
||||||
let PEER_1_PORT=$HOST_PORT+1
|
let PEER_1_ID=$HOST_ID+1
|
||||||
|
|
||||||
|
printf -v HOST_PORT "3%03d" $HOST_ID
|
||||||
|
printf -v PEER_0_PORT "3%03d" $PEER_0_ID
|
||||||
|
printf -v PEER_1_PORT "3%03d" $PEER_1_ID
|
||||||
|
|
||||||
HYDRABADGER_LOG=peer_node::hydrabadger=error,warn,info,$HYDRABADGER_LOG_ADDTL
|
HYDRABADGER_LOG=peer_node::hydrabadger=error,warn,info,$HYDRABADGER_LOG_ADDTL
|
||||||
|
|
||||||
|
|
|
@ -40,12 +40,12 @@ use super::{Error, State, StateDsct, Handler};
|
||||||
const EXTRA_DELAY_MS: u64 = 0;
|
const EXTRA_DELAY_MS: u64 = 0;
|
||||||
|
|
||||||
const BATCH_SIZE: usize = 200;
|
const BATCH_SIZE: usize = 200;
|
||||||
const NEW_TXNS_PER_INTERVAL: usize = 20;
|
const NEW_TXNS_PER_INTERVAL: usize = 10;
|
||||||
const NEW_TXN_INTERVAL_MS: u64 = 2000;
|
const NEW_TXN_INTERVAL_MS: u64 = 2000;
|
||||||
const TXN_BYTES: usize = 8;
|
const TXN_BYTES: usize = 8;
|
||||||
|
|
||||||
// The minimum number of peers needed to spawn a HB instance.
|
// The minimum number of peers needed to spawn a HB instance.
|
||||||
const HB_PEER_MINIMUM_COUNT: usize = 3;
|
const HB_PEER_MINIMUM_COUNT: usize = 9;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue