mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 21:08:01 +00:00
6cc4495700
* Remove offline slashing logic from staking. * Initial version of reworked offence module, can report offences * Clean up staking example. * Commit SlashingOffence * Force new era on slash. * Add offenders in the SlashingOffence trait. * Introduce the ReportOffence trait. * Rename `Offence`. * Add on_before_session_ending handler. * Move offence related stuff under sr-primitives. * Fix cargo check. * Import new im-online implementation. * Adding validator count to historical session storage as it's needed for slash calculations * Add a comment about offence. * Add BabeEquivocationOffence * GrandpaEquivocationOffence * slash_fraction and fix * current_era_start_session_index * UnresponsivnessOffence * Finalise OnOffenceHandler traits, and stub impl for staking. * slash_fraction doesn't really need &self * Note that offenders count is greater than 0 * Add a test to ensure that I got the math right * Use FullIdentification in offences. * Use FullIndentification. * Hook up the offences module. * Report unresponsive validators * Make sure eras have the same length. * Slashing and rewards. * Fix compilation. * Distribute rewards. * Supply validators_count * Use identificationTuple in Unresponsivness report * Fix merge. * Make sure we don't slash if amount is zero. * We don't return an error from report_offence anymo * We actually can use vec! * Prevent division by zero if the reporters is empty * offence_forces_new_era/nominators_also_get_slashed * advance_session * Fix tests. * Update srml/staking/src/lib.rs Co-Authored-By: Robert Habermeier <rphmeier@gmail.com> * slashing_performed_according_exposure * Check that reporters receive their slice. * Small clean-up. * invulnerables_are_not_slashed * Minor clean ups. * Improve docs. * dont_slash_if_fraction_is_zero * Remove session dependency from offences. * Introduce sr-staking-primitives * Move offence under sr_staking_primitives * rename session_index * Resolves todos re using SessionIndex * Fix staking tests. * Properly scale denominator. * Fix UnresponsivnessOffence * Fix compilation. * Tests for offences. * Clean offences tests. * Fix staking doc test. * Bump spec version * Fix aura tests. * Fix node_executor * Deposit an event on offence. * Fix compilation of node-runtime * Remove aura slashing logic. * Remove HandleReport * Update docs for timeslot. * rename with_on_offence_fractions * Add should_properly_count_offences * Replace ValidatorIdByIndex with CurrentElectedSet ValidatorIdByIndex was querying the current_elected set in each call, doing loading (even though its from cache), deserializing and cloning of element. Instead of this it is more efficient to use `CurrentElectedSet`. As a small bonus, the invariant became a little bit easier: now we just rely on the fact that `keys` and `current_elected` set are of the same length rather than relying on the fact that `validator_id_by_index` would work similar to `<[T]>::get`. * Clarify babe equivocation * Fix offences. * Rename validators_count to validator_set_count * Fix squaring. * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: Gavin Wood <gavin@parity.io> * Docs for CurrentElectedSet. * Don't punish only invulnerables * Use `get/insert` instead of `mutate`. * Fix compilation * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: Gavin Wood <gavin@parity.io> * Update srml/offences/src/lib.rs Co-Authored-By: Robert Habermeier <rphmeier@gmail.com> * Update srml/im-online/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update srml/im-online/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update srml/im-online/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update srml/babe/src/lib.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Update core/sr-staking-primitives/src/offence.rs Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com> * Add aura todo. * Allow multiple reports for single offence report. * Fix slash_fraction calculation. * Fix typos. * Fix compilation and tests. * Fix staking tests. * Update srml/im-online/src/lib.rs Co-Authored-By: Logan Saether <x@logansaether.com> * Fix doc on time_slot * Allow slashing only on current era (#3411) * only slash in current era * prune journal for last era * comment own_slash * emit an event when old slashing events are discarded * Pave the way for pruning * Address issues. * Try to refactor collect_offence_reports * Other fixes. * More fixes.
114 lines
2.4 KiB
TOML
114 lines
2.4 KiB
TOML
[[bin]]
|
|
name = "substrate"
|
|
path = "node/src/main.rs"
|
|
|
|
[package]
|
|
name = "substrate"
|
|
version = "2.0.0"
|
|
authors = ["Parity Technologies <admin@parity.io>"]
|
|
build = "build.rs"
|
|
edition = "2018"
|
|
|
|
[dependencies]
|
|
cli = { package = "node-cli", path = "node/cli" }
|
|
futures = "0.1"
|
|
ctrlc = { version = "3.0", features = ["termination"] }
|
|
|
|
[build-dependencies]
|
|
vergen = "3"
|
|
|
|
[workspace]
|
|
members = [
|
|
"core/application-crypto",
|
|
"core/cli",
|
|
"core/client",
|
|
"core/client/db",
|
|
"core/consensus/aura",
|
|
"core/consensus/babe",
|
|
"core/consensus/common",
|
|
"core/consensus/rhd",
|
|
"core/consensus/slots",
|
|
"core/consensus/uncles",
|
|
"core/executor",
|
|
"core/executor/runtime-test",
|
|
"core/finality-grandpa",
|
|
"core/finality-grandpa/primitives",
|
|
"core/inherents",
|
|
"core/keyring",
|
|
"core/keystore",
|
|
"core/network",
|
|
"core/panic-handler",
|
|
"core/primitives",
|
|
"core/rpc",
|
|
"core/rpc-servers",
|
|
"core/serializer",
|
|
"core/service",
|
|
"core/service/test",
|
|
"core/session",
|
|
"core/sr-api-macros",
|
|
"core/sr-io",
|
|
"core/sr-primitives",
|
|
"core/sr-staking-primitives",
|
|
"core/sr-sandbox",
|
|
"core/sr-std",
|
|
"core/sr-version",
|
|
"core/state-machine",
|
|
"core/telemetry",
|
|
"core/test-client",
|
|
"core/test-runtime",
|
|
"core/test-runtime/client",
|
|
"core/transaction-pool",
|
|
"core/transaction-pool/graph",
|
|
"core/trie",
|
|
"core/utils/fork-tree",
|
|
"core/utils/wasm-builder",
|
|
"core/utils/wasm-builder-runner",
|
|
"srml/support",
|
|
"srml/support/procedural",
|
|
"srml/support/procedural/tools",
|
|
"srml/support/procedural/tools/derive",
|
|
"srml/support/test",
|
|
"srml/authorship",
|
|
"srml/assets",
|
|
"srml/aura",
|
|
"srml/balances",
|
|
"srml/contracts",
|
|
"srml/collective",
|
|
"srml/democracy",
|
|
"srml/elections",
|
|
"srml/example",
|
|
"srml/executive",
|
|
"srml/finality-tracker",
|
|
"srml/generic-asset",
|
|
"srml/grandpa",
|
|
"srml/im-online",
|
|
"srml/indices",
|
|
"srml/membership",
|
|
"srml/metadata",
|
|
"srml/offences",
|
|
"srml/session",
|
|
"srml/staking",
|
|
"srml/sudo",
|
|
"srml/system",
|
|
"srml/timestamp",
|
|
"srml/treasury",
|
|
"node/cli",
|
|
"node/executor",
|
|
"node/primitives",
|
|
"node/runtime",
|
|
"node/rpc-client",
|
|
"node-template",
|
|
"subkey",
|
|
"test-utils/chain-spec-builder",
|
|
]
|
|
|
|
[badges]
|
|
travis-ci = { repository = "paritytech/substrate", branch = "master" }
|
|
maintenance = { status = "actively-developed" }
|
|
is-it-maintained-issue-resolution = { repository = "paritytech/substrate" }
|
|
is-it-maintained-open-issues = { repository = "paritytech/substrate" }
|
|
|
|
[profile.release]
|
|
# Substrate runtime requires unwinding.
|
|
panic = "unwind"
|