c0gent
697ba6f0a8
Add common supertraits and rename related type parameters.
...
* Add the `Contribution`, `NodeUidT`, and `Message` supertraits.
* Rename type parameters:
* `Tx` -> `T` or `C`
* `NodeUid` -> `N`
2018-08-02 14:52:12 -07:00
Nick Sanders
b1aa82b1c9
Merge pull request #186 from c0gent/c0gent-mod-reorg
...
Reorganize `dynamic_honey_badger` and `agreement` modules slightly.
Redux.
2018-08-02 13:28:00 -07:00
c0gent
f66dbdf3a1
Reorganize `dynamic_honey_badger` and `agreement` modules slightly.
...
* Move `CoinState` and `Agreement` definitions from `agreement/mod.rs`
to `.../agreement.rs`.
* Move `DynamicHoneyBadger` definition from `dynamic_honey_badger/mod.rs`
to `.../dynamic_honey_badger.rs`.
2018-08-02 13:01:57 -07:00
Nick Sanders
5b3522b48b
Merge pull request #185 from poanetwork/revert-184-c0gent-mod-reorg
...
Revert "Reorganize `dynamic_honey_badger` and `agreement` modules slightly."
2018-08-02 12:59:41 -07:00
Nick Sanders
c5977d1ab8
Revert "Reorganize `dynamic_honey_badger` and `agreement` modules slightly."
2018-08-02 12:24:25 -07:00
Nick Sanders
d74530004f
Merge pull request #184 from c0gent/c0gent-mod-reorg
...
Reorganize `dynamic_honey_badger` and `agreement` modules slightly.
* Some additional rustfmt-ing crept in due to me accidentally using a newer version.
2018-08-02 12:13:47 -07:00
c0gent
7824b7a0ea
Reorganize `dynamic_honey_badger` and `agreement` modules slightly.
...
* Move `CoinState` and `Agreement` definitions from `agreement/mod.rs`
to `.../agreement.rs`.
* Move `DynamicHoneyBadger` definition from `dynamic_honey_badger/mod.rs`
to `.../dynamic_honey_badger.rs`.
2018-08-02 11:24:15 -07:00
Andreas Fackler
4b854568f6
Merge pull request #182 from poanetwork/afck-agreement
...
Extract SBV broadcast from agreement.
2018-08-02 19:06:40 +02:00
Andreas Fackler
dd31758bdf
Extract SBV broadcast from agreement.
2018-08-02 12:55:17 +02:00
Andreas Fackler
572fa7b028
Merge pull request #180 from c0gent/c0gent-crypto-pub
...
Re-export `crypto`.
2018-08-01 19:18:48 +02:00
Andreas Fackler
071bfed00b
Merge pull request #179 from poanetwork/afck-qhb-single
...
Change the QHB criterion for moving on to the next epoch.
2018-08-01 19:18:31 +02:00
c0gent
affa0eee37
Re-export `crypto`.
2018-08-01 09:56:36 -07:00
Andreas Fackler
eeb519862f
Simplify Honey Badger tests and example.
2018-08-01 18:52:32 +02:00
Andreas Fackler
d19afc2634
Change the QHB criterion for moving on to the next epoch.
...
`QueueingHoneyBadger` now waits after an output, and only makes its
proposal for the next epoch when:
* there are pending transactions in the queue,
* there are pending key generation or vote messages, or
* _f + 1_ other validators have already made their proposal.
This rule should work well for small networks: With 1 - 3 nodes, it will
produce a new batch whenever at least one of them has transactions to
contribute. In larger networks, it prevents an adversary controlling _f_
nodes from producing lots of empty epochs.
An exception is made for a currently joining validator: We will commit
up to _(N + 1)² + 1_ key generation messages for them, which is the
maximum number a correct node will send.
2018-08-01 18:52:32 +02:00
Andreas Fackler
b3e1452a3a
Merge pull request #178 from poanetwork/afck-hb-split
...
Split honey_badger into submodules.
2018-08-01 18:50:42 +02:00
Andreas Fackler
5591f5ebd0
Split honey_badger into submodules.
2018-08-01 09:56:18 +02:00
Andreas Fackler
7c66ef06ee
Merge pull request #172 from poanetwork/vk-crypto-crate
...
crypto module moved into its own crate
2018-07-31 22:26:19 +02:00
Vladimir Komendantskiy
062b7150e1
Merge pull request #173 from poanetwork/afck-hb-clear-cs
...
Fix removal of terminated CS instances in HB.
2018-07-31 15:15:54 +01:00
Vladimir Komendantskiy
6753c12b7c
formatting
2018-07-31 12:15:05 +01:00
Vladimir Komendantskiy
77ed1d50d4
separated crypto module into its own crate
2018-07-31 12:15:05 +01:00
Vladimir Komendantskiy
0e7055f8eb
Merge pull request #177 from poanetwork/afck-no-protobuf
...
Remove protobuf support.
2018-07-31 12:12:26 +01:00
Andreas Fackler
47c00016be
Remove protobuf support.
2018-07-31 11:58:44 +02:00
Vladimir Komendantskiy
47ab6eb7df
Merge pull request #174 from poanetwork/afck-bin-values
...
Represent BinValues as a u8; rename to BoolSet.
2018-07-31 09:06:27 +01:00
Andreas Fackler
c448e057f8
Rename BinValues to BoolSet.
2018-07-31 09:42:30 +02:00
Andreas Fackler
4159acf8cd
Represent BinValues as a u8.
2018-07-31 09:39:51 +02:00
Andreas Fackler
fa45b1fc39
Merge pull request #166 from c0gent/c0gent-error-fail
...
Replace `chain_error` with `failure`
2018-07-31 09:29:24 +02:00
c0gent
847a79793e
Replace `chain_error` with `failure`
...
Changes:
* Remove `error_chain` and convert errors to `failure` types.
* Add variants for each possible error generation point.
2018-07-30 15:14:19 -07:00
Andreas Fackler
8346085fb9
Fix removal of terminated CS instances in HB.
2018-07-30 15:02:20 +02:00
Vladimir Komendantskiy
649353b999
Merge pull request #171 from poanetwork/afck-agreement
...
Fix agreement bugs, and refactor a few fields.
2018-07-30 12:35:47 +01:00
Andreas Fackler
78ab9742a9
Avoid heap allocation in BinValues::into_iter.
2018-07-30 13:08:17 +02:00
Andreas Fackler
8beab3d2b4
Log duplicate agreement messages as faults.
2018-07-30 12:04:28 +02:00
Andreas Fackler
3b65f0cead
Fix agreement bugs, and refactor a few fields.
...
* Don't drop `Term` messages from previous epochs. They are still
relevant for all future epochs.
* Restructure some fields to avoid unnecessary iteration and counting.
* Simplify the fields related to the common coin.
* Reorder the methods, so that the message handlers are all in one
place.
* Handle the case where the coin value arrives before the required
number of `Conf` messages.
2018-07-30 11:44:55 +02:00
Vladimir Komendantskiy
6f530e89f9
Merge pull request #168 from poanetwork/afck-term
...
Make sure Term messages are handled as BVal, Aux, Conf.
2018-07-27 20:16:03 +01:00
Andreas Fackler
ae252028bc
Merge pull request #169 from poanetwork/vk-term
...
Avoids cloning of Agreement::received_term
2018-07-27 10:19:40 +02:00
Vladimir Komendantskiy
6efe6037f2
removed duplicated insertion
2018-07-27 08:24:19 +01:00
Vladimir Komendantskiy
638cde3d71
avoid cloning of Agreement::received_term
2018-07-26 17:55:21 +01:00
Andreas Fackler
08d6abf6b4
Make sure Term messages are handled as BVal, Aux, Conf.
2018-07-26 14:19:01 +02:00
Vladimir Komendantskiy
35edde9007
Merge pull request #167 from poanetwork/afck-queue-fields
...
Fix bin_values change handling in agreement.
2018-07-26 09:30:03 +01:00
Andreas Fackler
cc28f8ecfe
Merge pull request #162 from poanetwork/vk-broadcast-example
...
Updated the Broadcast doc example to the latest API
2018-07-26 10:17:56 +02:00
Andreas Fackler
4bff2849f9
Fix bin_values change handling in agreement.
...
* Call `on_bin_values_changed` even if there is only one value.
* Handle the case _f = 0_ correctly: `count_bval` can be equal to both
_f + 1_ and _2 f + 1_.
2018-07-26 09:34:34 +02:00
Andreas Fackler
27898168e2
Merge pull request #163 from poanetwork/afck-queue-fields
...
Remove queue fields from Agreement, CommonCoin, Broadcast and CommonSubset.
2018-07-26 08:43:07 +02:00
Andreas Fackler
8d449eceb5
Merge pull request #159 from poanetwork/afck-into-fr
...
Accept more types in threshold crypto API.
2018-07-26 08:31:54 +02:00
Vladimir Komendantskiy
fc074d50e5
removed expect and unnecessary message cloning, added comments
2018-07-25 16:53:15 +01:00
Andreas Fackler
72ff36f2b9
Fix data shard count in Broadcast.
2018-07-25 10:46:39 +02:00
Andreas Fackler
2b904e3490
Make sure QHB always inputs a new batch after output.
2018-07-24 14:46:48 +02:00
Andreas Fackler
9d0f1b3d15
Remove output and message queue from CommonSubset.
2018-07-24 13:12:06 +02:00
Andreas Fackler
990899327e
Remove output and message queue from Broadcast.
2018-07-24 12:18:09 +02:00
Vladimir Komendantskiy
883201a9b9
checking the output immediately rather than at the end
2018-07-24 11:09:15 +01:00
Andreas Fackler
30c5805446
Remove output and message queue from CommonCoin.
2018-07-24 11:57:50 +02:00
Andreas Fackler
102fa0e01d
Remove output and message queue from Agreement.
2018-07-24 11:43:35 +02:00