Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Slash Authorities for irrefutable misbehavior #84

Merged
merged 21 commits into from
Mar 13, 2018
Merged

Slash Authorities for irrefutable misbehavior #84

merged 21 commits into from
Mar 13, 2018

Conversation

rphmeier
Copy link
Contributor

@rphmeier rphmeier commented Mar 2, 2018

Authorities automatically generate and sign misbehavior report transactions for any misbehavior they've witnessed during the BFT agreement process.

Slashing right now just cuts the corresponding validator's bond down to zero and gives a portion of it to the reporter. Purging the offending authority will be more difficult.

@rphmeier rphmeier added the A3-in_progress Pull request is in progress. No review needed at this stage. label Mar 2, 2018
@rphmeier
Copy link
Contributor Author

rphmeier commented Mar 4, 2018

(holding off on any more runtime changes for now since we'll probably merge in the governance model from #79)

@rphmeier rphmeier added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Mar 4, 2018
target,
misbehavior: match misbehavior {
GenericMisbehavior::ProposeOutOfTurn(_, _, _) => continue,
GenericMisbehavior::DoublePropose(_, _, _) => continue,
Copy link
Contributor Author

@rphmeier rphmeier Mar 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are blocked on paritytech/polkadot#85 -- right now the round proposer can't be evaluated on-chain.

@arkpar arkpar self-requested a review March 7, 2018 16:46
@arkpar
Copy link
Member

arkpar commented Mar 7, 2018

LGTM

use runtime::{system, session, governance};

/// The balance of an account.
pub type Balance = u64;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Balance and Bonding are types specific to staking and not polkadot.

@rphmeier
Copy link
Contributor Author

@gavofyork restored the types. the thing I worry about is having duplicate type definitions (as we'll need one for transaction construction as well) and accidentally not changing one when we change the other.

@rphmeier rphmeier merged commit ec7a440 into master Mar 13, 2018
@rphmeier rphmeier deleted the rh-slashing branch March 13, 2018 15:39
tomaka pushed a commit to tomaka/polkadot that referenced this pull request Feb 6, 2019
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
* refactor for multisig

remove doublemap for multisig

* Feature/linked node (paritytech#79)

provide linked node data struct for runtime module storage
this linked node support option data or no option data

* provide linkednode struct in cxsupport
* refactor linked node
* add option for LinkedNode
* refactor linkednode
      remove template mode, use associate type to replace it

* Fix static net address (paritytech#80)

* Feature/linked_node provide multinodexindex (paritytech#82)

provide multinodexindex

* fix bug for linked_node

when add same index node, do nothing for this node

* refactor financialrecords to support withdraw cache

refactor financialrecords to support withdraw cache and remove deposit fee

* btc bridge

* rename num/hash relationship data (NumberForHash/HashsForNumber)
* let HashsForNumber map to a vec to get all forked block
* add blocknumber in BlockHeaderFor

* tokenbalances

refactor tokenbalances to support issue token in genesis

* reject issue chainx token and provide u32, usize as for tokenbalance

* Perfect deposit  (paritytech#83)

* Add deposit cache

* Perfect deposit

* Perfect withdraw (paritytech#84)

* Perfect withdraw

* add network check in btc bridge

* when meet testnet, jump header bit check
* check the bit change block in genesis

* Fix test build

* Feature/refactor match (paritytech#86)

*  matchorder and pendingorders

* Fix op_return account id parse

* tokenbalances: provide reserved type for reservedtoken

* Fix merge error

* update genesis_config

* Update genesis_config

* x-btc

* provide  codec for btreemap

due to orphan for mod, use local struct named `CodecBTreeMap`

* Update latest bitcoin-rust dependeces

* Implement initial vote weight via coin age (paritytech#87)

* Use struct instead of map as much as possible

* Unchecked initial version

* All intentions except these validators are candidates

* Add harsh test

* Put candidates into stats

* Rename unstake to deactive

* Revert StakeWeight

* Remove useless code

* Remove MAX_INTENTIONS

* Refactor with btreemap (paritytech#88)

* Refactor NominationRecordsOf to NominationRecords using BTreeMap

* Remove candidate_count

* Rename deactive to deactivate

* optimization match (paritytech#89)

* remove ensureaccountliquid in tokenbalances and support

for ensureaccountliquied has changed in staking module

* Hotfix/fix stakeweight type (paritytech#90)

* Revert StakeWeight type

* Change Balance to u64

* Fix total_minted and remove valid_cands_weight

* Fix insert registration information failure (paritytech#91)

* Change receive_address type

* Update exterbn

* update secp256k1 dependency (paritytech#94)

* Fix receive_address bug

* Support new substrate in cxrml

* update rust-secp256k1 dependeces

* Runtime build ok

* Build ok

* New runtime interface

* Update all runtime module

* Runtime build ok

* All build ok

* Add node runtime to support chainx runtime

* Update new runtime
liuchengxu pushed a commit to autonomys/substrate that referenced this pull request Jun 3, 2022
Remove unnecessary check in rustdoc workflow
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants