aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2018-07-19 20:07:16 -0400
committerDeterminant <[email protected]>2018-07-19 20:07:16 -0400
commit928b2c1910bfe957a4cc31746aa395c9ed98006f (patch)
tree79429e7eebf4fe85e8aa5cfea1aaa741652fa3e2
parent3c355d7f9e7b491b9fc5af4516286ab4100238c6 (diff)
...
-rwxr-xr-xrun_replicas.sh3
m---------salticidae0
-rw-r--r--src/crypto.cpp4
-rw-r--r--src/hotstuff.cpp2
-rw-r--r--src/hotstuff_app.cpp2
-rw-r--r--src/hotstuff_client.cpp6
6 files changed, 9 insertions, 8 deletions
diff --git a/run_replicas.sh b/run_replicas.sh
index a6cc553..52f33e8 100755
--- a/run_replicas.sh
+++ b/run_replicas.sh
@@ -6,6 +6,7 @@ fi
for i in "${rep[@]}"; do
echo "starting replica $i"
#valgrind --leak-check=full ./hotstuff-app --conf hotstuff-sec${i}.conf > log${i} 2>&1 &
- ./hotstuff-app --conf hotstuff-sec${i}.conf > log${i} 2>&1 &
+ gdb -ex r -ex bt -ex q --args ./hotstuff-app --conf hotstuff-sec${i}.conf > log${i} 2>&1 &
+ #./hotstuff-app --conf hotstuff-sec${i}.conf > log${i} 2>&1 &
done
wait
diff --git a/salticidae b/salticidae
-Subproject d54981cb19f923fab8c4aa1adc369076b8a5096
+Subproject 0bd0ddd69c5f6d5f59fcf73a943491ba026b2c4
diff --git a/src/crypto.cpp b/src/crypto.cpp
index 7450229..560a8ac 100644
--- a/src/crypto.cpp
+++ b/src/crypto.cpp
@@ -17,7 +17,9 @@ bool QuorumCertSecp256k1::verify(const ReplicaConfig &config) {
if (rids.size() < config.nmajority) return false;
for (size_t i = 0; i < rids.size(); i++)
if (!sigs[i].verify(_blk_hash,
- static_cast<const PubKeySecp256k1 &>(config.get_pubkey(rids.get(i)))))
+ static_cast<const PubKeySecp256k1 &>(config.get_pubkey(rids.get(i))),
+ secp256k1_default_verify_ctx
+ ))
return false;
return true;
}
diff --git a/src/hotstuff.cpp b/src/hotstuff.cpp
index 687e21d..b247d2e 100644
--- a/src/hotstuff.cpp
+++ b/src/hotstuff.cpp
@@ -52,7 +52,7 @@ void MsgHotStuff::gen_rfetchblk(const std::vector<block_t> &blks) {
}
void MsgHotStuff::parse_rfetchblk(std::vector<block_t> &blks, HotStuffCore *hsc) const {
- DataStream s;
+ DataStream s(get_payload());
uint32_t size;
s >> size;
size = letoh(size);
diff --git a/src/hotstuff_app.cpp b/src/hotstuff_app.cpp
index c629809..eae73d1 100644
--- a/src/hotstuff_app.cpp
+++ b/src/hotstuff_app.cpp
@@ -265,6 +265,6 @@ void HotStuffApp::start() {
void HotStuffApp::print_stat_cb(evutil_socket_t, short) {
HotStuff::print_stat();
- HotStuffCore::prune(100);
+ //HotStuffCore::prune(100);
ev_stat_timer.add_with_timeout(stat_period);
}
diff --git a/src/hotstuff_client.cpp b/src/hotstuff_client.cpp
index 3931a0c..2fd36bd 100644
--- a/src/hotstuff_client.cpp
+++ b/src/hotstuff_client.cpp
@@ -37,12 +37,10 @@ struct Request {
rid(rid), cmd(cmd) { et.start(); }
};
-std::unordered_map<int, salticidae::RingBuffer> buffers;
-std::unordered_map<const uint256_t, Request> waiting;
-MsgNetwork<MsgClient> mn(eb, 10, 10, 4096);
-
std::unordered_map<ReplicaID, MsgNetwork<MsgClient>::conn_t> conns;
+std::unordered_map<const uint256_t, Request> waiting;
std::vector<NetAddr> replicas;
+MsgNetwork<MsgClient> mn(eb, 10, 10, 4096);
void set_proposer(ReplicaID rid) {
proposer = rid;