1. Apr 26, 2024
  2. Apr 10, 2024
  3. 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
  4. Sep 27, 2023
  5. Jul 13, 2023
    • gupnik's avatar
      Moves `Block` to `frame_system` instead of `construct_runtime` and removes... · 28024144
      gupnik authored
      
      Moves `Block` to `frame_system` instead of `construct_runtime` and removes `Header` and `BlockNumber` (#7431)
      
      * Companion for substrate
      
      * Minor update
      
      * Formatting
      
      * Fixes for cumulus
      
      * Fixes tests in polkadot-runtime-parachains
      
      * Minor update
      
      * Removes unused import
      
      * Fixes tests in polkadot-runtime-common
      
      * Minor fix
      
      * Update roadmap/implementers-guide/src/runtime/configuration.md
      
      Co-authored-by: default avatarordian <[email protected]>
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * update lockfile for {"substrate"}
      
      ---------
      
      Co-authored-by: default avatarordian <[email protected]>
      Co-authored-by: command-bot <>
      28024144
  6. Jun 05, 2023
    • ordian's avatar
      dispute-coordinator: past session dispute slashing (#6811) · 01a19b45
      ordian authored
      
      
      * runtime/vstaging: unapplied_slashes runtime API
      
      * runtime/vstaging: key_ownership_proof runtime API
      
      * runtime/ParachainHost: submit_report_dispute_lost
      
      * fix key_ownership_proof API
      
      * runtime: submit_report_dispute_lost runtime API
      
      * nits
      
      * Update node/subsystem-types/src/messages.rs
      
      Co-authored-by: default avatarMarcin S. <[email protected]>
      
      * revert unrelated fmt changes
      
      * dispute-coordinator: past session dispute slashing
      
      * encapsule runtime api call for submitting report
      
      * prettify: extract into a function
      
      * do not exit on runtime api error
      
      * fix tests
      
      * try initial zombienet test
      
      * try something
      
      * fix a typo
      
      * try cumulus-based collator
      
      * fix clippy
      
      * build polkadot-debug images with fast-runtime enabled
      
      * wip
      
      * runtime/inclusion: fix availability_threshold
      
      * fix wip
      
      * fix wip II
      
      * revert native provider
      
      * propagate tx submission error
      
      * DEBUG: sync=trace
      
      * print key ownership proof len
      
      * panic repro
      
      * log validator index in panic message
      
      * post merge fixes
      
      * replace debug assertion with a log
      
      * fix compilation
      
      * Let's log the dispatch info in validate block.
      
      * fix double encoding
      
      * Revert "Let's log the dispatch info in validate block."
      
      This reverts commit a70fbc51b464d7f4355dbada5e16cd83cf71eab4.
      
      * Revert "Let's log the dispatch info in validate block."
      
      This reverts commit a70fbc51b464d7f4355dbada5e16cd83cf71eab4.
      
      * fix compilation
      
      * update to latest zombienet and fix test
      
      * lower finality lag to 11
      
      * bump zombienet again
      
      * add a workaround, but still does not work
      
      * Update .gitlab-ci.yml
      
      bump zombienet.
      
      * add a comment and search logs on all nodes
      
      ---------
      
      Co-authored-by: default avatarMarcin S. <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarJavier Viola <[email protected]>
      01a19b45
  7. May 26, 2023
    • ordian's avatar
      runtime: past session slashing runtime API (#6667) · 9bc4f62e
      ordian authored
      
      
      * runtime/vstaging: unapplied_slashes runtime API
      
      * runtime/vstaging: key_ownership_proof runtime API
      
      * runtime/ParachainHost: submit_report_dispute_lost
      
      * fix key_ownership_proof API
      
      * runtime: submit_report_dispute_lost runtime API
      
      * nits
      
      * Update node/subsystem-types/src/messages.rs
      
      Co-authored-by: default avatarMarcin S. <[email protected]>
      
      * revert unrelated fmt changes
      
      * post merge fixes
      
      * fix compilation
      
      ---------
      
      Co-authored-by: default avatarMarcin S. <[email protected]>
      9bc4f62e
  8. May 23, 2023
  9. Apr 08, 2023
  10. Feb 01, 2023
    • ordian's avatar
      Some late short-term fixes for dispute slashing (#6249) · 2fa8565f
      ordian authored
      
      
      * disputes/slashing: slash only backers for ForInvalid
      
      * add an assertion in mock impl
      
      * fix tests
      
      * do not slash backers on onconcluded disputes
      
      * slash an intersection of backers and losers
      
      * zombienet/disputes: check for offence only for invalid disputes
      
      * add backing votes to disputes bench builder
      
      * Update runtime/parachains/src/builder.rs
      
      * Brad implementers guide revisions 2 (#6239)
      
      * Add disputes subsystems fix
      
      * Updated dispute approval vote import reasoning
      
      * Improved wording of my changes
      
      * Resolving issues brought up in comments
      
      * Update disputes prioritisation in `dispute-coordinator` (#6130)
      
      * Scraper processes CandidateBacked events
      
      * Change definition of best-effort
      
      * Fix `dispute-coordinator` tests
      
      * Unit test for dispute filtering
      
      * Clarification comment
      
      * Add tests
      
      * Fix logic
      
      If a dispute is not backed, not included and not confirmed we
      don't participate but we do import votes.
      
      * Add metrics for refrained participations
      
      * Revert "Add tests"
      
      This reverts commit 7b8391a087922ced942cde9cd2b50ff3f633efc0.
      
      * Revert "Unit test for dispute filtering"
      
      This reverts commit 92ba5fe678214ab360306313a33c781338e600a0.
      
      * fix dispute-coordinator tests
      
      * Fix scraping
      
      * new tests
      
      * Small fixes in guide
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarAndrei Sandu <[email protected]>
      
      * Fix some comments and remove a pointless test
      
      * Code review feedback
      
      * Clarification comment in tests
      
      * Some tests
      
      * Reference counted `CandidateHash` in scraper
      
      * Proper handling for Backed and Included candidates in scraper
      
      Backed candidates which are not included should be kept for a
      predetermined window of finalized blocks. E.g. if a candidate is backed
      but not included in block 2, and the window size is 2, the same
      candidate should be cleaned after block 4 is finalized.
      
      Add reference counting for candidates in scraper. A candidate can be
      added on multiple block heights so we have to make sure we don't clean
      it prematurely from the scraper.
      
      Add tests.
      
      * Update comments in tests
      
      * Guide update
      
      * Fix cleanup logic for `backed_candidates_by_block_number`
      
      * Simplify cleanup
      
      * Make spellcheck happy
      
      * Update tests
      
      * Extract candidate backing logic in separate struct
      
      * Code review feedback
      
      * Treat  backed and included candidates in the same fashion
      
      * Update some comments
      
      * Small improvements in test
      
      * spell check
      
      * Fix some more comments
      
      * clean -> prune
      
      * Code review feedback
      
      * Reword comment
      
      * spelling
      
      Co-authored-by: default avatarAndrei Sandu <[email protected]>
      
      * approval-voting: remove redundant validation check (#6266)
      
      * approval-voting: remove a redundant check
      
      * candidate-validation: remove unreachable check
      
      * remove fill_block (#6200)
      
      Co-authored-by: parity-processbot <>
      
      * fix a compilation warning (#6279)
      
      Fixes #6277.
      
      * Only report concluded if there is an actual dispute. (#6270)
      
      * Only report concluded if there is an actual dispute.
      
      Hence no "non"-disputes will be added to disputes anymore.
      
      * Fix redundant check.
      
      * Test for no onesided disputes.
      
      Co-authored-by: default avatareskimor <[email protected]>
      
      * [ci] fix buildah image (#6281)
      
      * Revert special casing of Kusama for grandpa rounds. (#6217)
      
      Co-authored-by: default avatareskimor <[email protected]>
      
      * Fixes "for loop over an `Option`" warnings (#6291)
      
      Was seeing these warnings when running `cargo check --all`:
      
      ```
      warning: for loop over an `Option`. This is more readably written as an `if let` statement
          --> node/core/approval-voting/src/lib.rs:1147:21
           |
      1147 |             for activated in update.activated {
           |                              ^^^^^^^^^^^^^^^^
           |
           = note: `#[warn(for_loops_over_fallibles)]` on by default
      help: to check pattern in a loop use `while let`
           |
      1147 |             while let Some(activated) = update.activated {
           |             ~~~~~~~~~~~~~~~         ~~~
      help: consider using `if let` to clear intent
           |
      1147 |             if let Some(activated) = update.activated {
           |             ~~~~~~~~~~~~         ~~~
      ```
      
      My guess is that `activated` used to be a SmallVec or similar, as is
      `deactivated`. It was changed to an `Option`, the `for` still compiled (it's
      technically correct, just weird), and the compiler didn't catch it until now.
      
      * companion for #12599 (#6290)
      
      * companion for #12599
      
      * update Cargo.lock
      
      * use cargo path instead of diener
      
      * update lockfile for {"substrate"}
      
      Co-authored-by: parity-processbot <>
      
      * remove the runtime check and test
      
      * append keys on past-session slashing
      
      * runtime/disputes: allow importing backing votes after explicit for
      
      * explicit MaliciousBacker error and a test
      
      * update an outdated comment
      
      * Revert "update an outdated comment"
      
      This reverts commit 7c4c3f5a848f16e2b61435e981d814f00333ed41.
      
      * Revert "remove the runtime check and test"
      
      This reverts commit a5bff0c75e77effb5b7d3a1691de1b14bcdbd648.
      
      * incremental punishment post conclusion + test
      
      * punish backers post FOR vote
      
      * remove unnecessary lifetime annotation
      
      * add a comment to zombinet test
      
      * typo
      
      * fmt
      
      * post merge test fixes
      
      * fix test after changes in master
      
      * address review nits
      
      ---------
      
      Co-authored-by: default avatarBradley Olson <[email protected]>
      Co-authored-by: default avatarTsvetomir Dimitrov <[email protected]>
      Co-authored-by: default avatarAndrei Sandu <[email protected]>
      Co-authored-by: default avatarSergej Sakac <[email protected]>
      Co-authored-by: default avatareskimor <[email protected]>
      Co-authored-by: default avatareskimor <[email protected]>
      Co-authored-by: default avatarAlexander Samusev <[email protected]>
      Co-authored-by: default avatarMarcin S <[email protected]>
      Co-authored-by: default avatarNiklas Adolfsson <[email protected]>
      2fa8565f
  11. Jan 11, 2023
  12. Dec 19, 2022
  13. Oct 22, 2022
  14. Sep 20, 2022
    • ordian's avatar
      runtime/disputes: slashing (#5535) · 18c077a8
      ordian authored
      
      
      * disputes: runtime part of slashing
      
      * disputes: reward winners
      
      * disputes/slashing: validate_unsigned impl
      
      * fmt
      
      * disputes/slashing: report_dispute_lost_unsigned
      
      * disputes/slashing: separate winners from losers and report winners
      
      * disputes/slashing: refactoring
      
      * impl HandleReports
      
      * enable on Wenstend
      
      * fmt
      
      * add slashing pallet to the mock and test runtimes
      
      * fix a bug in report_dispute_lost_unsigned
      
      * fmt
      
      * disputes: remove new_participants from summary
      
      * disputes: remove punish_inconclusive
      
      * impl SlashingHandler for Pallet for type-safety
      
      * do not impl slashing::Config on mainnets yet
      
      * teach spellcheck deduplication
      
      * simplify interfaces and resolve some TODOs
      
      * resolve some more TODOs
      
      * minor typos
      
      * move slashing into a folder
      
      * remove unnecessary clone
      
      * fix validator_set_count calculation
      
      * introduce ValidatorSetCount
      
      * store ValidatorSetCount
      
      * fmt
      
      * add the benchmark
      
      * fmt
      
      * unflatten slashing
      
      * post-rebase fixes
      
      * remove winners eagerly
      
      * use real slashing weights for westend
      
      * remove bench test suite
      
      * zombinet: modify disputes test to check for an offence report
      
      * zombinet: add a timeout
      
      * add slashing pallet to Rococo
      
      * zombienet: revert back to rococo-local
      
      * fmt
      
      * remove TODOs
      
      * revert some accidental changes
      
      * slashing is submodule of disputes
      
      * Change the log target
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      
      * wrap comments with rustfmt, more docs, constants
      
      * use Defensive trait
      
      * cargo update -p sp-io
      
      * merge offence types, remove rewards for now
      
      * cargo update -p sp-io
      
      * benchmark fixes
      
      * fmt
      
      * unused var
      
      * fix block_author impl
      
      * ressurect RewardValidators trait
      
      * remove outdated comment
      
      * more module docs
      
      * introduce BenchmarkingConfig
      
      * typo fix
      
      * teach spellcheck unapplied
      
      * use Weight::new()
      
      * fix mocking rewards
      
      * use RefTimeWeight
      
      * ".git/.scripts/bench-bot.sh" runtime westend-dev runtime_parachains::disputes::slashing
      
      * refactor maybe_identify_validators
      
      * no more ticket in disguise
      
      * remove outdated comments
      
      * lower against valid to 0.1%
      
      * bump zombienet version for debug
      
      * use from_perthousand
      
      * post-merge fixes
      
      * another day, another Weight changes
      
      * Revert "bump zombienet version for debug"
      
      This reverts commit 0d9978711f8ec9a746a5e1c45e8ffbe7c75e7b5c.
      
      * do not reward block authors
      
      * fix outdated comment
      
      * use Pays from frame_support::dispatch::Pays
      
      * add timeout to is up
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarJavier Viola <[email protected]>
      Co-authored-by: default avatarJavier Viola <[email protected]>
      18c077a8