-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add a 2/3 quorum option to Authority Round. #10909
Add a 2/3 quorum option to Authority Round. #10909
Conversation
It looks like @afck signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
|
36b7be6
to
eb39ac3
Compare
I can't reproduce that test failure locally: |
That's a known issue: #9636, it fails spuriously. The job is restarted. |
match self.sign_count.entry(*signer) { | ||
Entry::Occupied(mut entry) => { | ||
// decrement count for this signer and purge on zero. | ||
*entry.get_mut() -= 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm paranoid but if we ever call remove_signers()
with an Occupied
entry that is 0
, then this will underflow and the signer will not be removed. Maybe you can do if *entry.get() == 1
before this and remove it if it is (and decrement if it isn't)?
I addressed both comments, but I'm not sure about them: |
@afck the diff is looking a bit odd here, not sure what might have happened but it seems like a bunch of unrelated commits got added. Makes it a bit hard to review atm, can you take a look at that please? |
96b01a2
to
f9948ee
Compare
Sorry! Fixed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just minor grumbles.
f9948ee
to
9fc0a70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module docs for Aura are a bit… scarce! :)
I think that we should document our preference for running with 2/3 quorum somewhere. Maybe this PR is a good opportunity for that?
This lgtm; let's wait for @andresilva to give it a once-over and then merge it. |
9fc0a70
to
275d086
Compare
I rebased, and added a few lines to the module documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks for the PR and sorry for taking so long to review. It was an easy review at this point though. :) |
…m-ethcore * dp/chore/extract-clique: Configuration map of block reward contract addresses (#10875) Update ethcore/src/snapshot/consensus/mod.rs Add a 2/3 quorum option to Authority Round. (#10909) Missing import Rename supports_warp to snapshot_mode Introduce Snapshotting enum to distinguish the type of snapshots a chain uses Add an EngineType enum to tighten up Engine.name() signers is already a ref Update ethcore/engines/clique/src/lib.rs Update ethcore/engines/ethash/Cargo.toml Update ethcore/engines/basic-authority/Cargo.toml Update ethcore/block-reward/Cargo.toml
…out-ClientIoMessage * dp/chore/extract-spec-from-ethcore: double semi Extract engines to own crates (#10966) Fix import missing import Configuration map of block reward contract addresses (#10875) Update ethcore/src/snapshot/consensus/mod.rs Add a 2/3 quorum option to Authority Round. (#10909) Missing import Rename supports_warp to snapshot_mode Introduce Snapshotting enum to distinguish the type of snapshots a chain uses Add an EngineType enum to tighten up Engine.name() signers is already a ref Update ethcore/engines/clique/src/lib.rs Update ethcore/engines/ethash/Cargo.toml Update ethcore/engines/basic-authority/Cargo.toml Update ethcore/block-reward/Cargo.toml
…1344-add-ChainID-opcode * dp/chore/sort-out-ClientIoMessage: Extract spec to own crate (#10978) EIP 2028: transaction gas lowered from 68 to 16 (#10987) Fix merge problem double semi Extract engines to own crates (#10966) Fix import missing import Configuration map of block reward contract addresses (#10875) Update ethcore/src/snapshot/consensus/mod.rs Add a 2/3 quorum option to Authority Round. (#10909) Missing import Rename supports_warp to snapshot_mode Introduce Snapshotting enum to distinguish the type of snapshots a chain uses Add an EngineType enum to tighten up Engine.name() signers is already a ref Update ethcore/engines/clique/src/lib.rs Update ethcore/engines/ethash/Cargo.toml Update ethcore/engines/basic-authority/Cargo.toml Update ethcore/block-reward/Cargo.toml
This prevents the "Attack of the Clones": https://arxiv.org/pdf/1902.10244.pdf
PR for POA's
aura-pos
branch: poanetwork#132Original issue: poanetwork#108