-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
Including metropolis updates
ethcore/res/ethereum/kovan.json
Outdated
@@ -5,6 +5,7 @@ | |||
"authorityRound": { | |||
"params": { | |||
"stepDuration": "4", | |||
"blockReward": "0x4563918244F40000", |
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.
Indentation
machine/src/lib.rs
Outdated
fn hash(&self) -> H256; | ||
|
||
/// Get a reference to the seal fields. | ||
fn seal(&self) -> &[Vec<u8>]; |
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.
Spaces are used instead of tabs on a few lines in this file
fn builtins(&self) -> &BTreeMap<Address, Builtin> { | ||
&self.builtins | ||
} | ||
fn on_close_block(&self, block: &mut M::LiveBlock) -> Result<(), M::Error> { |
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.
why not use ::engines::common::bestow_block_reward
here?
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.
since it handles uncle reward as well and there is a test that depends on that behavior
Looks good in general, mostly just code moved around. |
Could use a doc describing migration of existing spec files though. From 1.6 and 1.7 |
@rphmeier ^^^ |
Are there any docs yet? |
No but I can help drafting something if anyone asks. |
Move |
This introduces the parity-machine crate, which defines traits for blockchain headers and live blocks.
Consensus engines are intended to be generic over different kinds of state machines which fit the requirements they need. For example, ethash could potentially be run over any block chain type with a difficulty and balances (for block and uncle reward).
Verification and block population logic which was fragmented among engines has now been unified in two places:
ethcore/machine.rs
andethcore/verification/verification.rs
. This eliminates a common source of bugs stemming from protocol upgrades being implemented for some engines but not others.state
,executive
, andexternalities
are now fully decoupled from consensus logic.ValidatorSet
based engines haven't been generalized yet, and currently are implemented only for theEthereumMachine
. In a future PR, theValidatorSet
framework will be generalized to anything which supports a generalized notion of smart contracts and "signals" (implemented via ethabi and log events in Ethereum).The snapshot module can is also a prime candidate for refactor. Currently there are two kinds of chunks: "block chunks" and "corroboration chunks". Corroboration chunks vary from engine to engine, and now we can make "block chunks" vary from machine to machine. This will give us secure warp sync with minimal effort for any new blockchains we create.