-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
It looks like @afck signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
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.
looks good; have a few questions.
step: u64, | ||
/// The hash of the most recent block. |
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.
Is this the hash of the parent to the block where the authority emits the EmptyStep
message?
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.
If I understand correctly, an empty step message is created instead of a block, if a validator has no pending transactions. It cannot itself be a parent, and this hash always points to the most recent block.
E.g.:
- Validator A creates block 1.
- Validator B has no pending transaction, so it signs an empty step message mB instead whose hash points to block 1.
- Validator C also has no pending transactions, so it also signs an empty step message mC instead whose hash points to block 1.
- Validator D creates block 2. The parent is block 1, and the header includes mB and mC.
(Would be good if someone could confirm my understanding!)
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.
Oh right, makes sense now. Thank you for explaining.
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 your excellent comment here could go into the module level docs or the docs for EmptyStep
for the benefit of the next clueless code reader? :)
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.
Done.
…pstream * master: Add POSDAO transition and malice report queue. (#11245) update master/nightly version: v2.8.0 (#11419) ethcore/res: remove morden testnet (#11392) fix: export hardcoded sync format (#11416) update hardcoded headers: mainnet and ropsten (#11414) AuthorityEngine: Minor cleanups. (#11408) Update POA bootnodes (#11411) Add EtherCore support (#11402) verification: fix race same block + misc (#11400) Update ProgPoW to 0.9.3 (#11407) update classic testnet bootnodes (#11398) dependencies: bump `derive_more v0.99` (#11405) engine error: remove faulty/unused `From` (#11404) Switching to stable-track (#11377) ethcore/res: fix ethereum classic chainspec blake2_f activation block num (#11391) Update copyright notice 2020 (#11386)
This removes some repetitions, reformats very long lines and adds a few comments.