ValidatorSet reporting (#4208)

* remove register_account_provider

* build rpc module

* new dummy client

* common EngineSigner struct

* from -> into

* initial report via call

* separate safe from regular contract

* transact_contract

* fix build

* return Signature, docs

* add sign method to some engines

* add safeContract spec

* update specs to new contracts

* use AuthorityRound for contract spec

* add more reporting

* add reporting test

* use gas floor

* shorter
This commit is contained in:
keorn
2017-01-24 10:03:58 +01:00
committed by Nikolay Volf
parent b6575cb230
commit ba0209678b
16 changed files with 466 additions and 137 deletions

View File

@@ -25,6 +25,9 @@ pub enum ValidatorSet {
#[serde(rename="list")]
List(Vec<Address>),
/// Address of a contract that indicates the list of authorities.
#[serde(rename="safeContract")]
SafeContract(Address),
/// Address of a contract that indicates the list of authorities and enables reporting of theor misbehaviour using transactions.
#[serde(rename="contract")]
Contract(Address),
}
@@ -38,6 +41,8 @@ mod tests {
fn validator_set_deserialization() {
let s = r#"[{
"list" : ["0xc6d9d2cd449a754c494264e1809c50e34d64562b"]
}, {
"safeContract" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b"
}, {
"contract" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b"
}]"#;