Merge branch 'master' of github.com:simple-rules/harmony-benchmark

pull/18/head
alok 7 years ago
commit e9d9db66c8
  1. 4
      .gitignore
  2. 0
      benchmark.go
  3. 2
      blockchain/utxopool.go
  4. 0
      client/txgen/main.go
  5. 2
      consensus/consensus_leader.go
  6. 8
      deploy.sh
  7. 2
      deploy_linux.sh
  8. 2
      deploy_one_instance.sh
  9. 2
      node/node_handler.go

4
.gitignore vendored

@ -11,9 +11,7 @@
*.i*86
*.x86_64
*.hex
benchmark
txgen
!txgen/ # unignore txgen folder
bin/
# Mac
.DS_Store

@ -248,8 +248,6 @@ func (utxoPool *UTXOPool) UpdateOneTransaction(tx *Transaction) {
}
}
} // If it's a cross shard locking Tx, then don't update so the input UTXOs are locked (removed), and the money is not spendable until unlock-to-commit or unlock-to-abort
// TODO: unlock-to-commit and unlock-to-abort
}
}

@ -167,7 +167,6 @@ func (consensus *Consensus) processCommitMessage(payload []byte) {
return
}
if len(consensus.commits) >= (2*len(consensus.validators))/3+1 && consensus.state < CHALLENGE_DONE {
if len(consensus.commits) >= (2*len(consensus.validators))/3+1 && consensus.state < CHALLENGE_DONE {
consensus.Log.Debug("Enough commits received with signatures", "numOfSignatures", len(consensus.commits))
@ -178,7 +177,6 @@ func (consensus *Consensus) processCommitMessage(payload []byte) {
// Set state to CHALLENGE_DONE
consensus.state = CHALLENGE_DONE
}
}
}
// Construct the challenge message to send to validators

@ -6,8 +6,8 @@
# and you won't be able to turn it off. With `go build` generating one
# exe, the dialog will only pop up once at the very first time.
# Also it's recommended to use `go build` for testing the whole exe.
go build -o benchmark # Build the harmony-benchmark.exe
go build -o txgen client/txgenerator/main.go
go build -o bin/benchmark
go build -o bin/txgen client/txgen/main.go
# Create a tmp folder for logs
t=`date +"%Y%m%d-%H%M%S"`
@ -21,9 +21,9 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
IFS=' ' read ip port mode shardId <<< $line
#echo $ip $port $mode
if [ "$mode" != "client" ]; then
./benchmark -ip $ip -port $port -config_file $config -log_folder $log_folder&
./bin/benchmark -ip $ip -port $port -config_file $config -log_folder $log_folder&
fi
done < $config
# Generate transactions
./txgen -config_file $config -log_folder $log_folder
./bin/txgen -config_file $config -log_folder $log_folder

@ -17,6 +17,6 @@ echo "Inside deploy linux line 2"
config=$1
while read ip port mode; do
#echo $ip $port $mode $config
go run ./benchmark_main.go -ip $ip -port $port -config_file $config&
go run ./benchmark.go -ip $ip -port $port -config_file $config&
done < $config
go run ./client/txgen/main.go -config_file $config

@ -34,5 +34,5 @@ fi
if [ -f $FILE ]; then
go run ./client/txgen/main.go -config_file $config -log_folder $log_folder&
else
go run ./benchmark_main.go -ip $current_ip -config_file $config -log_folder $log_folder&
go run ./benchmark.go -ip $current_ip -config_file $config -log_folder $log_folder&
fi

@ -244,7 +244,7 @@ func (node *Node) SendBackProofOfAcceptOrReject() {
}
// This is called by consensus leader to sync new blocks with other clients/nodes.
// For now, just send to the client.
// NOTE: For now, just send to the client (basically not broadcasting)
func (node *Node) BroadcastNewBlock(newBlock *blockchain.Block) {
if node.ClientPeer != nil {
node.log.Debug("SENDING NEW BLOCK TO CLIENT")

Loading…
Cancel
Save