Update hbbft.

This commit is contained in:
c0gent 2018-07-28 11:47:55 -07:00
parent 2fe37f399b
commit 15a42e7817
No known key found for this signature in database
GPG Key ID: 9CC25E71A743E892
4 changed files with 52 additions and 6 deletions

View File

@ -49,6 +49,6 @@ version = "*"
# git = "https://github.com/c0gent/hbbft"
git = "https://github.com/poanetwork/hbbft"
# branch = "master"
branch = "afck-queue-fields"
branch = "afck-agreement"
# path = "../hbbft"
# features = ["serialization-protobuf"]

42
gdb-node Normal file
View File

@ -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
"

View File

@ -16,9 +16,13 @@
#
#
let HOST_PORT=300$1
let PEER_0_PORT=$HOST_PORT-1
let PEER_1_PORT=$HOST_PORT+1
let HOST_ID=$1
let PEER_0_ID=$HOST_ID-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

View File

@ -40,12 +40,12 @@ use super::{Error, State, StateDsct, Handler};
const EXTRA_DELAY_MS: u64 = 0;
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 TXN_BYTES: usize = 8;
// 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;