1. Apr 26, 2024
  2. Mar 26, 2024
    • Dcompoze's avatar
      Fix spelling mistakes across the whole repository (#3808) · 002d9260
      Dcompoze authored
      **Update:** Pushed additional changes based on the review comments.
      
      **This pull request fixes various spelling mistakes in this
      repository.**
      
      Most of the changes are contained in the first **3** commits:
      
      - `Fix spelling mistakes in comments and docs`
      
      - `Fix spelling mistakes in test names`
      
      - `Fix spelling mistakes in error messages, panic messages, logs and
      tracing`
      
      Other source code spelling mistakes are separated into individual
      commits for easier reviewing:
      
      - `Fix the spelling of 'authority'`
      
      - `Fix the spelling of 'REASONABLE_HEADERS_IN_JUSTIFICATION_ANCESTRY'`
      
      - `Fix the spelling of 'prev_enqueud_messages'`
      
      - `Fix the spelling of 'endpoint'`
      
      - `Fix the spelling of 'children'`
      
      - `Fix the spelling of 'PenpalSiblingSovereignAccount'`
      
      - `Fix the spelling of 'PenpalSudoAccount'`
      
      - `Fix the spelling of 'insufficient'`
      
      - `Fix the spelling of 'PalletXcmExtrinsicsBenchmark'`
      
      - `Fix the spelling of 'subtracted'`
      
      - `Fix the spelling of 'CandidatePendingAvailability'`
      
      - `Fix the spelling of 'exclusive'`
      
      - `Fix the spelling of 'until'`
      
      - `Fix the spelling of 'discriminator'`
      
      - `Fix the spelling of 'nonexistent'`
      
      - `Fix the spelling of 'subsystem'`
      
      - `Fix the spelling of 'indices'`
      
      - `Fix the spelling of 'committed'`
      
      - `Fix the spelling of 'topology'`
      
      - `Fix the spelling of 'response'`
      
      - `Fix the spelling of 'beneficiary'`
      
      - `Fix the spelling of 'formatted'`
      
      - `Fix the spelling of 'UNKNOWN_PROOF_REQUEST'`
      
      - `Fix the spelling of 'succeeded'`
      
      - `Fix the spelling of 'reopened'`
      
      - `Fix the spelling of 'proposer'`
      
      - `Fix the spelling of 'InstantiationNonce'`
      
      - `Fix the spelling of 'depositor'`
      
      - `Fix the spelling of 'expiration'`
      
      - `Fix the spelling of 'phantom'`
      
      - `Fix the spelling of 'AggregatedKeyValue'`
      
      - `Fix the spelling of 'randomness'`
      
      - `Fix the spelling of 'defendant'`
      
      - `Fix the spelling of 'AquaticMammal'`
      
      - `Fix the spelling of 'transactions'`
      
      - `Fix the spelling of 'PassingTracingSubscriber'`
      
      - `Fix the spelling of 'TxSignaturePayload'`
      
      - `Fix the spelling of 'versioning'`
      
      - `Fix the spelling of 'descendant'`
      
      - `Fix the spelling of 'overridden'`
      
      - `Fix the spelling of 'network'`
      
      Let me know if this structure is adequate.
      
      **Note:** The usage of the words `Merkle`, `Merkelize`, `Merklization`,
      `Merkelization`, `Merkleization`, is somewhat inconsistent but I left it
      as it is.
      
      ~~**Note:** In some places the term `Receival` is used to refer to
      message reception, IMO `Reception` is the correct word here, but I left
      it as it is.~~
      
      ~~**Note:** In some places the term `Overlayed` is used instead of the
      more acceptable version `Overlaid` but I also left it as it is.~~
      
      ~~**Note:** In some places the term `Applyable` is used instead of the
      correct version `Applicable` but I also left it as it is.~~
      
      **Note:** Some usage of British vs American english e.g. `judgement` vs
      `judgment`, `initialise` vs `initialize`, `optimise` vs `optimize` etc.
      are both present in different places, but I suppose that's
      understandable given the number of contributors.
      
      ~~**Note:** There is a spelling mistake in `.github/CODEOWNERS` but it
      triggers errors in CI when I make changes to it, so I left it as it
      is.~~
      002d9260
  3. Mar 18, 2024
    • Squirrel's avatar
      sp-std removal from substrate/primitives (#3274) · 1b5f4243
      Squirrel authored
      
      
      This PR removes sp-std crate from substrate/primitives sub-directories.
      
      For now crates that have `pub use` of sp-std or export macros that would
      necessitate users of the macros to `extern crate alloc` have been
      excluded from this PR.
      
      There should be no breaking changes in this PR.
      
      ---------
      
      Co-authored-by: default avatarKoute <[email protected]>
      1b5f4243
  4. Jun 29, 2023
  5. Mar 07, 2023
    • Davide Galassi's avatar
      Offences report system rework (#13425) · 9dd10d13
      Davide Galassi authored
      * Experiments with common equivocation trait
      
      * Improved equivocation trait
      
      * Fix grandpa equivocation implementation
      
      * Remove some cruft
      
      * Remove some more cruft
      
      * More generic naming
      
      * Simplification of offences manipilation
      
      * More refactory
      
      * Some prograss with the encapsulation of offence report system
      
      * Finally unit type works as a universal null report system
      
      * Align substrate node code
      
      * Further simplification
      
      * Fix test utils
      
      * Remove not required associated type
      
      * Fix benches
      
      * Rollback to prev field name
      
      * Box big params
      
      * Fix typo
      
      * Remove new tag computation
      
      * Remove default implementations
      
      * Better docs
      
      * Return 'Result' instead of bool
      
      * Change offence report system return types
      
      * Some renaming and documentation
      
      * Improve documentation
      
      * More abstract offence report system
      
      * Rename 'consume_evidence' to 'process_evidence'
      
      * Further docs refinements
      
      * Doc for dummy offence report
      
      * Fix rustdoc
      
      * Fix after master merge
      
      * Apply code review suggestions
      
      * Improve docs
      9dd10d13
  6. Feb 21, 2023
    • Vivek Pandya's avatar
      Remove years from copyright notes. (#13415) · bc53b9a0
      Vivek Pandya authored
      * Change copyright year to 2023 from 2022
      
      * Fix incorrect update of copyright year
      
      * Remove years from copy right header
      
      * Fix remaining files
      
      * Fix typo in a header and remove update-copyright.sh
      bc53b9a0
  7. Aug 02, 2022
  8. Jan 03, 2022
  9. Nov 17, 2021
  10. Sep 15, 2021
    • Andrew Jones's avatar
      Enrich metadata with type information (#8615) · 49b6dfd2
      Andrew Jones authored
      
      
      * Cargo.lock after merge
      
      * Restore scale-info feature
      
      * Fully qualify TypeInfo derive
      
      * Skip PendingSwap T
      
      * Add missing skip_type_params attr
      
      * metadata docs features
      
      * Reduce pallet event attribute to struct
      
      * Cargo.lock
      
      * Update frame/balances/src/tests_composite.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Line widths check
      
      * Cargo.lock
      
      * Add scale-info/std
      
      * Update frame/system/src/lib.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Use `skip_type_params` to remove `TypeInfo` requirements on checks
      
      * Revert "Remove unused Call metadata stuff"
      
      This reverts commit 41311f85
      
      * Skip BalanceSwapAction type parameter
      
      * Remove unused event metadata macro
      
      * Update frame-metadata
      
      * Update primitives/npos-elections/compact/src/codec.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Manual TypeInfo for Header
      
      * Remove TypeInfo requirement for consts in BoundedVec etc.
      
      * Another TypeInfo bound removed
      
      * review: fix indentation
      
      * TypeInfo impls for Identity types
      
      * Add some todos to add custom TypeInfo impls
      
      * Update frame/support/procedural/src/pallet/expand/pallet_struct.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Add some todos to add custom TypeInfo impls
      
      * Add a test for manual Data TypeInfo impl
      
      * Add custom TypeInfo impl for Vote
      
      * Era custom TypeInfo crimes
      
      * Revert finality-grandpa version to 0.14.z
      
      * review: renamed module to pallet_constants_metadata
      
      * New line at end of file
      
      * Add missing scale-info/std
      
      * Update frame/support/src/storage/types/mod.rs
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      
      * Remove StorageEntryType::Map unused flag
      
      * Add missing scale-info dependency after merge
      
      * SignedExtension::AdditionalSigned metadata
      
      * Update frame-metadata, use abbreviated docs and args fields
      
      * Update frame/example/Cargo.toml
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Add scale_info/std and remove unused scale-info dependency
      
      * Remove scale-info dependency
      
      * Remove treasury pallet::metadata
      
      * Remove redundant Event test
      
      * Add back scale-info as dev dependency
      
      * fix error metadata when no error defined in decl_module
      
      * Add Module3 to tests
      
      * Fix metadata test
      
      * Add docs feature to frame-support test
      
      * WIP fixing pallet metadata test
      
      * Remove redundant FunctionMetadata, FunctionArgumentMetadata as per https://github.com/paritytech/frame-metadata/pull/20
      
      * Use main branch of frame-metadata
      
      * Use patch of scale-info for latest changes
      
      * Use latest patched scale-info
      
      * Manual TypeInfo for DigestItem
      
      * Manual TypeInfo for DigestItem
      
      * Update scale-info
      
      * Skip __Ignore variants for Error, depends on https://github.com/paritytech/scale-info/pull/117
      
      
      
      * Named fields for FRAME v2 pallet Call variants
      
      * Named fields for FRAME v1 pallet Call variants
      
      * Add missing scale-info dependency
      
      * WIP expand benchmark call variant
      
      * fix benchmark with new function
      
      create a new function for each variant of a pallet call.
      This function is called by benchmarking macro in order not to break call
      creation with unnamed argument
      
      * fix tests
      
      * more fix
      
      * Fix staking tests
      
      * Fix offchain workers calls
      
      * Cherry pick rustfmt.toml from master
      
      * cargo +nightly-2021-06-22 fmt --all
      
      * Update to new call variant structs
      
      * More call variant struct updates
      
      * Remove unused import
      
      * More call variant structs
      
      * More call variant structs
      
      * Even more call variant structs
      
      * Mooar variant structs
      
      * Evermore variant structs
      
      * Call variant structs ad infinitum
      
      * Fmt
      
      * More call variants
      
      * Last call variant
      
      * Call variants all done?
      
      * Fix SS58Prefix type
      
      * Potential workaround for BitFlags<IdentityFields> TypeInfo
      
      * Enable docs capturing for Call, Event, and Error types
      
      * Fix IdentityFields TypeInfo
      
      * Remove metadata-docs feature
      
      * Add capture_docs = true for legacy Call, Event and Error types
      
      * Fmt
      
      * Fix metadata test type
      
      * Update benchmarks with call struct variants
      
      * Fmt
      
      * More test fixes
      
      * Fmt
      
      * Fix benches
      
      * Use latest capture_docs attr
      
      * Latest scale_info
      
      * Fmt
      
      * review: change &Vec to &[]
      
      * Remove pallet metadata attr
      
      * review: remove commented out test code
      
      * review: skip_type_params trailing comma suggestion
      
      * Update to scale-info 0.10.0
      
      * Update construct_runtime ui tests, different because of metadata TypeInfo impls
      
      * Add some TypeInfo derives for UI tests
      
      * Update storage ensure span ui stderrs
      
      * Update call argument bound ui tests
      
      Possibly changed because change from tuple to struct variants?
      
      * Add scale-info dev dependency
      
      * Update to latest finality-grandpa release
      
      * review: missing newline
      
      * review: missing scale-info/std
      
      * review: remove duplicate scale-info/std
      
      * review: remove fully qualified TypeInfo
      
      * review: add missing scale-info/std
      
      * review: remove unnecessary imports.
      
      * Fmt
      
      * Use crates.io RC version of frame-metadata
      
      * Remove scale-info/std because it is a dev dependency
      
      * Add missing scale_info dev-dependency for test
      
      * Delete empty metadata folder
      
      * Fix sp_std import
      
      * review: improve manual UncheckedExtrinsic TypeInfo impl
      
      * review: use full scale-info for dev-dependency
      
      * Remove DefaultByteGetter impl
      
      * review: derive TypeInfo for generic header
      
      * Fmt
      
      * Update primitives/runtime/src/generic/unchecked_extrinsic.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update primitives/runtime/src/generic/unchecked_extrinsic.rs
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Update bin/node/executor/Cargo.toml
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update frame/identity/src/types.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update frame/support/src/dispatch.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Remove redundant derive
      
      * Simplify scale-info dependency
      
      * Strip underscore prefix from call variant struct names
      
      * Another underscore field
      
      * More underscore fields
      
      * Another underscore field
      
      * Update to frame-metadata 14.0.0-rc.2 with combined StorageEntryType::Map
      
      * Fmt
      
      * Revert weights formatting
      
      * Fix up some tests
      
      * Fix up some tests for StorageEntryTypeMetadata
      
      * scale-info dev dependency
      
      * Fix test error
      
      * Add missing TypeInfo derives
      
      * Add back missing scale-info dependency
      
      * Add back missing scale-info dependency
      
      * Fix npos compact impls
      
      * Cargo.lock
      
      * Fmt
      
      * Fix errors
      
      * Fmt
      
      * Fix renamed raw_solution field
      
      * Fix error
      
      * Fmt
      
      * Fix some benchmarks
      
      * Fmt
      
      * Stray R
      
      * Fix
      
      * Add missing TypeInfos
      
      * ui test fix
      
      * Fix line widths
      
      * Revert "ui test fix"
      
      This reverts commit 2d15ec058a216e3f92d713f1174603a2bb1eac65.
      
      * Upgrade to scale-info 0.11.0
      
      * Revert "Upgrade to scale-info 0.11.0"
      
      This reverts commit 047bb179085a0059c36cd20ab405f55cf0867e28.
      
      * Add Runtime type
      
      * Update to scale-info 0.12
      
      * Update to scale-info 1.0
      
      * Update frame-metadata to version 14.0.0
      
      * Patch finality-grandpa until release available
      
      * Fix metadata tests
      
      * Fix metadata tests
      
      * Fmt
      
      * Remove patched finality-grandpa
      
      * Fix tests, use scale_info imports
      
      * Fix pallet tests
      
      * Add BlockNumber TypeInfo bound
      
      * ui test fix
      
      * Cargo.lock
      
      * Remove pallet metadata
      
      * Cargo.lock
      
      * Add missing scale-info dependency
      
      * Remove pallet event metadata
      
      * Fix error
      
      * Fix collective errors
      
      * Semicolol
      
      * Fmt
      
      * Remove another metadata attribute
      
      * Add new variant to custom digest TypeInfo
      
      * Fmt
      
      * Cargo.lock from master
      
      * Remove comma lol
      
      * Fix example call error
      
      * Fix example call error properly
      
      Co-authored-by: default avatarGuillaume Thiolliere <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      49b6dfd2
  11. Jul 21, 2021
    • Bastian Köcher's avatar
      Run cargo fmt on the whole code base (#9394) · 7b56ab15
      Bastian Köcher authored
      * Run cargo fmt on the whole code base
      
      * Second run
      
      * Add CI check
      
      * Fix compilation
      
      * More unnecessary braces
      
      * Handle weights
      
      * Use --all
      
      * Use correct attributes...
      
      * Fix UI tests
      
      * AHHHHHHHHH
      
      * 🤦
      
      * Docs
      
      * Fix compilation
      
      * 🤷
      
      * Please stop
      
      * 🤦
      
       x 2
      
      * More
      
      * make rustfmt.toml consistent with polkadot
      
      Co-authored-by: default avatarAndré Silva <[email protected]>
      7b56ab15
  12. May 03, 2021
    • Lohann Paterno Coutinho Ferreira's avatar
      Remove Offence delay (#8414) · ffca28ba
      Lohann Paterno Coutinho Ferreira authored
      
      
      * Removed can_report api from OnOffenceHandler
      
      * Removed DeferredOffences and create a storage migration
      
      * Removed missing comments
      
      * Mock set_deferred_offences and deferred_offences methods
      
      * OnOffenceHandler::on_offence always succeed
      
      * Fix benchmark tests
      
      * Fix runtime-benchmark cfg methods
      
      * Removed 'applied' attribute from Offence event
      
      * refactor deprecated deferred offences getter
      
      * Validate if offences are submited after on_runtime_upgrade
      
      * update changelog
      
      * Remove empty lines
      
      * Fix remove_deferred_storage weights
      
      * Remove Offence::on_runtime_upgrade benchmark
      
      * Revert CHANGELOG.md update
      
      * Deprecate DeferredOffenceOf type
      
      * Update copyright
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Add migration logs
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * Fix migration log
      
      * Remove unused import
      
      * Add migration tests
      
      * rustfmt
      
      * use generate_storage_alias! macro
      
      * Refactor should_resubmit_deferred_offences test
      
      * Replace spaces by tabs
      
      * Refactor should_resubmit_deferred_offences test
      
      * Removed WeightSoftLimit
      
      * Removed WeightSoftLimit from tests and mocks
      
      * Remove unused imports
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      ffca28ba
  13. Jan 04, 2021
    • Bastian Köcher's avatar
      Happy new year (#7814) · e3e651f7
      Bastian Köcher authored
      * Happy new year
      
      Updates the copyright years and fixes wrong license headers.
      
      * Fix the template
      
      * Split HEADER into HEADER-APACHE & HEADER-GPL
      e3e651f7
  14. Jul 04, 2020
    • André Silva's avatar
      babe: report equivocations (#6362) · a9c21b8b
      André Silva authored
      * slots: create primitives crate for consensus slots
      
      * offences: add method to check if an offence is unknown
      
      * babe: initial equivocation reporting implementation
      
      * babe: organize imports
      
      * babe: working equivocation reporting
      
      * babe: add slot number to equivocation proof
      
      * session: move duplicate traits to session primitives
      
      * babe: move equivocation stuff to its own file
      
      * offences: fix test
      
      * session: don't have primitives depend on frame_support
      
      * babe: use opaque type for key owner proof
      
      * babe: cleanup client equivocation reporting
      
      * babe: cleanup equivocation code in pallet
      
      * babe: allow sending signed equivocation reports
      
      * node: fix compilation
      
      * fix test compilation
      
      * babe: return bool on check_equivocation_proof
      
      * babe: add test for equivocation reporting
      
      * babe: add more tests
      
      * babe: add test for validate unsigned
      
      * babe: take slot number in generate_key_ownership_proof API
      
      * babe: add benchmark for equivocation proof checking
      
      * session: add benchmark for membership proof checking
      
      * offences: fix babe benchmark
      
      * babe: add weights based on benchmark results
      
      * babe: adjust weights after benchmarking on reference hardware
      
      * babe: reorder checks in check_and_report_equivocation
      a9c21b8b
  15. May 21, 2020
  16. May 15, 2020
  17. May 06, 2020
    • Tomasz Drwięga's avatar
      Benchmarks for offences pallet. (#5851) · 66c02fe6
      Tomasz Drwięga authored
      
      
      * really rough mock runtime
      
      * start to work on offences
      
      * Make sure to start the session.
      
      * Update to latest master.
      
      * Add verify.
      
      * Fix on_initialize benchmark.
      
      * Add grandpa offence.
      
      * Add Babe offence benchmarking.
      
      * Enable babe test.
      
      * Address review grumbles.
      
      * Address review grumbles.
      
      * Address review grumbles part 1/2
      
      * use currency trait
      
      * features
      
      * Check events explicitly.
      
      * Auto-impl tuple converter.
      
      * Removed dead code.
      
      * add test feature flag
      
      * dont use std
      
      Co-authored-by: default avatarShawn Tabrizi <[email protected]>
      66c02fe6
  18. Mar 26, 2020
    • Kian Paimani's avatar
      Offchain Phragmén BREAKING. (#4517) · 970c5f94
      Kian Paimani authored
      * Initial skeleton for offchain phragmen
      
      * Basic compact encoding decoding for results
      
      * add compact files
      
      * Bring back Self::ensure_storage_upgraded();
      
      * Make staking use compact stuff.
      
      * First seemingly working version of reduce, full of todos
      
      * Everything phragmen related works again.
      
      * Signing made easier, still issues.
      
      * Signing from offchain compile fine 😎
      
      * make compact work with staked asssignment
      
      * Evaluation basics are in place.
      
      * Move reduce into crate. Document stuff
      
      * move reduce into no_std
      
      * Add files
      
      * Remove other std deps. Runtime compiles
      
      * Seemingly it is al stable; cycle implemented but not integrated.
      
      * Add fuzzing code.
      
      * Cleanup reduce a bit more.
      
      * a metric ton of tests for staking; wip 🔨
      
      * Implement a lot more of the tests.
      
      * wip getting the unsigned stuff to work
      
      * A bit gleanup for unsigned debug
      
      * Clean and finalize compact code.
      
      * Document reduce.
      
      * Still problems with signing
      
      * We officaly duct taped the transaction submission stuff. 🤓
      
      * Deadlock with keys again
      
      * Runtime builds
      
      * Unsigned test works 🙌
      
      * Some cleanups
      
      * Make all the tests compile and stuff
      
      * Minor cleanup
      
      * fix more merge stuff
      
      * Most tests work again.
      
      * a very nasty bug in reduce
      
      * Fix all integrations
      
      * Fix more todos
      
      * Revamp everything and everything
      
      * Remove bogus test
      
      * Some review grumbles.
      
      * Some fixes
      
      * Fix doc test
      
      * loop for submission
      
      * Fix cli, keyring etc.
      
      * some cleanup
      
      * Fix staking tests again
      
      * fix per-things; bring patches from benchmarking
      
      * better score prediction
      
      * Add fuzzer, more patches.
      
      * Some fixes
      
      * More docs
      
      * Remove unused generics
      
      * Remove max-nominator footgun
      
      * Better fuzzer
      
      * Disable it 
      
      
      
      * Bump.
      
      * Another round of self-review
      
      * Refactor a lot
      
      * More major fixes in perThing
      
      * Add new fuzz file
      
      * Update lock
      
      * fix fuzzing code.
      
      * Fix nominator retain test
      
      * Add slashing check
      
      * Update frame/staking/src/tests.rs
      
      Co-Authored-By: default avatarJoshy Orndorff <[email protected]>
      
      * Some formatting nits
      
      * Review comments.
      
      * Fix cargo file
      
      * Almost all tests work again
      
      * Update frame/staking/src/tests.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Fix review comments
      
      * More review stuff
      
      * Some nits
      
      * Fix new staking / session / babe relation
      
      * Update primitives/phragmen/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Update primitives/phragmen/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Update primitives/phragmen/compact/src/lib.rs
      
      Co-Authored-By: default avatarthiolliere <[email protected]>
      
      * Some doc updates to slashing
      
      * Fix derive
      
      * Remove imports
      
      * Remove unimplemented tests
      
      * nits
      
      * Remove dbg
      
      * Better fuzzing params
      
      * Remove unused pref map
      
      * Deferred Slashing/Offence for offchain Phragmen  (#5151)
      
      * Some boilerplate
      
      * Add test
      
      * One more test
      
      * Review comments
      
      * Fix build
      
      * review comments
      
      * fix more
      
      * fix build
      
      * Some cleanups and self-reviews
      
      * More minor self reviews
      
      * Final nits
      
      * Some merge fixes.
      
      * opt comment
      
      * Fix build
      
      * Fix build again.
      
      * Update frame/staking/fuzz/fuzz_targets/submit_solution.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update frame/staking/src/slashing.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Update frame/staking/src/offchain_election.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * Fix review comments
      
      * fix test
      
      * === 🔑
      
       Revamp without staking key.
      
      * final round of changes.
      
      * Fix cargo-deny
      
      * Update frame/staking/src/lib.rs
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      Co-authored-by: default avatarJoshy Orndorff <[email protected]>
      Co-authored-by: default avatarthiolliere <[email protected]>
      Co-authored-by: default avatarGavin Wood <[email protected]>
      970c5f94
  19. Mar 02, 2020
  20. Jan 05, 2020
  21. Dec 11, 2019
    • Benjamin Kampmann's avatar
      Fix folder names in primitives (#4358) · df133d6b
      Benjamin Kampmann authored
      * sr-arithmetic -> arithmetic
      
      * sr-sandbox -> sandbox
      
      * primitives/sr-staking-primitives -> primitives/staking
      
      * primitives/sr-version -> primitives/version
      
      * primitives/block-builder/runtime-api -> primitives/block-builder
      df133d6b
  22. Dec 10, 2019
  23. Dec 02, 2019
    • Benjamin Kampmann's avatar
      The crate rename (#4223) · 927e13c1
      Benjamin Kampmann authored
      * Adding script for rename, could be applicable for nodes on top of it, too
      
      * add stderr and gitlab ci features
      
      * apply script
      
      * fix now minor details in expected stderr
      
      * Update the Cargo.lock
      
      * fix name: sc-transaction -> sc-tracing
      
      * fix rename in script, too
      927e13c1
  24. Nov 27, 2019
    • asynchronous rob's avatar
      safe multi-era slashing for NPoS (#3846) · 4598e130
      asynchronous rob authored
      
      
      * define slashing spans
      
      * tests and pruning for slashing-spans record
      
      * validators get slashed before nominators
      
      * apply slash to nominators as well
      
      * chill and end slashing spans
      
      * actually perform slashes
      
      * integration (tests failing)
      
      * prune metadata
      
      * fix compilation
      
      * some tests for slashing and metadata garbage collection
      
      * correctly pass session index to slash handler
      
      * test span-max property for nominators and validators
      
      * test that slashes are summed correctly
      
      * reward value computation
      
      * implement rewarding
      
      * add comment about rewards
      
      * do not adjust slash fraction in offences module
      
      * fix offences tests
      
      * remove unused new_offenders field
      
      * update runtime version
      
      * fix up some docs
      
      * fix some CI failures
      
      * remove no-std incompatible vec! invocation
      
      * try to fix span-max rounding error
      
      * Update srml/staking/src/slashing.rs
      
      Fix type: winow -> window
      
      Co-Authored-By: default avatarTomasz Drwięga <[email protected]>
      
      * slashes from prior spans don't kick validator again
      
      * more information for nominators, suppression
      
      * ensure ledger is consistent with itself post-slash
      
      * implement slash out of unlocking funds also
      
      * slashing: create records to be applied after-the-fact
      
      * queue slashes for a few eras later
      
      * method for canceling deferred slashes
      
      * attempt to fix test in CI
      
      * storage migration for `Nominators`
      
      * update node-runtime to use SlashDeferDuration
      
      * adjust migration entry-points somewhat
      
      * fix migration compilation
      
      * add manual Vec import to migration
      
      * enable migrations feature in node-runtime
      
      * bump runtime version
      
      * update to latest master crate renames
      
      * update to use ensure-origin
      
      * Apply suggestions from code review
      
      use `ensure!`
      
      Co-Authored-By: default avatarGavin Wood <[email protected]>
      
      * fix multi-slash removal
      
      * initialize storage version to current in genesis
      
      * add test for version initialization
      4598e130
  25. Nov 14, 2019
    • Benjamin Kampmann's avatar
      Reorganising the repository - external renames and moves (#4074) · 60e5011c
      Benjamin Kampmann authored
      * Adding first rough ouline of the repository structure
      
      * Remove old CI stuff
      
      * add title
      
      * formatting fixes
      
      * move node-exits job's script to scripts dir
      
      * Move docs into subdir
      
      * move to bin
      
      * move maintainence scripts, configs and helpers into its own dir
      
      * add .local to ignore
      
      * move core->client
      
      * start up 'test' area
      
      * move test client
      
      * move test runtime
      
      * make test move compile
      
      * Add dependencies rule enforcement.
      
      * Fix indexing.
      
      * Update docs to reflect latest changes
      
      * Moving /srml->/paint
      
      * update docs
      
      * move client/sr-* -> primitives/
      
      * clean old readme
      
      * remove old broken code in rhd
      
      * update lock
      
      * Step 1.
      
      * starting to untangle client
      
      * Fix after merge.
      
      * start splitting out client interfaces
      
      * move children and blockchain interfaces
      
      * Move trie and state-machine to primitives.
      
      * Fix WASM builds.
      
      * fixing broken imports
      
      * more interface moves
      
      * move backend and light to interfaces
      
      * move CallExecutor
      
      * move cli off client
      
      * moving around more interfaces
      
      * re-add consensus crates into the mix
      
      * fix subkey path
      
      * relieve client from executor
      
      * starting to pull out client from grandpa
      
      * move is_decendent_of out of client
      
      * grandpa still depends on client directly
      
      * lemme tests pass
      
      * rename srml->paint
      
      * Make it compile.
      
      * rename interfaces->client-api
      
      * Move keyring to primitives.
      
      * fixup libp2p dep
      
      * fix broken use
      
      * allow dependency enforcement to fail
      
      * move fork-tree
      
      * Moving wasm-builder
      
      * make env
      
      * move build-script-utils
      
      * fixup broken crate depdencies and names
      
      * fix imports for authority discovery
      
      * fix typo
      
      * update cargo.lock
      
      * fixing imports
      
      * Fix paths and add missing crates
      
      * re-add missing crates
      60e5011c
  26. Oct 22, 2019
    • Tomasz Drwięga's avatar
      Runtime logging. (#3821) · 20a39897
      Tomasz Drwięga authored
      * Implement Printable for tuples.
      
      * Add debugging function.
      
      * Add debug 1.
      
      * Implement  for everything.
      
      * RuntimeDebug derive.
      
      * Introduce RuntimeDebug.
      
      * Add some dummy logging.
      
      * Replace RuntimeDebug with Debug.
      
      * Revert "Replace RuntimeDebug with Debug."
      
      This reverts commit bc47070a8cb30241b2b590b2fa29fd195088162f.
      
      * Working on Debug for all.
      
      * Fix bounds.
      
      * Add debug utils.
      
      * Implement runtime logging.
      
      * Add some docs and clean up.
      
      * Clean up derives.
      
      * Fix custom derive impl.
      
      * Bump runtime.
      
      * Fix long lines.
      
      * Fix doc test.
      
      * Use CARGO_CFG_STD.
      
      * Revert "Use CARGO_CFG_STD."
      
      This reverts commit ea429566de18ed0fa052571b359eb9826a64a9f4.
      
      * Use parse_macro_input
      
      * Update lockfile.
      
      * Apply review suggestions.
      
      * Remove stray re-export.
      
      * Add no-std impl.
      
      * Update lockfile.
      20a39897
  27. Aug 16, 2019
    • Tomasz Drwięga's avatar
      Offences reporting and slashing (#3322) · 6cc44957
      Tomasz Drwięga authored
      
      
      * 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: default avatarRobert Habermeier <[email protected]>
      
      * 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: default avatarGavin Wood <[email protected]>
      
      * 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: default avatarGavin Wood <[email protected]>
      
      * Update srml/offences/src/lib.rs
      
      Co-Authored-By: default avatarRobert Habermeier <[email protected]>
      
      * Update srml/im-online/src/lib.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update srml/im-online/src/lib.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update srml/im-online/src/lib.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update srml/babe/src/lib.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * Update core/sr-staking-primitives/src/offence.rs
      
      Co-Authored-By: default avatarjoe petrowski <[email protected]>
      
      * 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: default avatarLogan Saether <[email protected]>
      
      * 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.
      6cc44957