1. Jun 20, 2024
  2. Jun 19, 2024
  3. Jun 18, 2024
    • Sebastian Kunert's avatar
    • Sebastian Kunert's avatar
      c109088d
    • Javyer's avatar
      Migrated commands to github actions (#4701) · 6daa939b
      Javyer authored
      Migrated commands individually to work as GitHub actions with a
      [`workflow_dispatch`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch)
      event.
      
      This will not disable the command-bot yet, but it's the first step
      before disabling it.
      
      ### Commands migrated
      - [x] bench-all
      - [x] bench-overhead
      - [x] bench
      - [x] fmt
      - [x] update-ui
      
      Also created an action that will inform users about the new
      documentation when they comment `bot`.
      
      ### Created documentation 
      Created a detailed documentation on how to use this action. Found the
      documentation
      [here](https://github.com/paritytech/polkadot-sdk/blob/bullrich/cmd-action/.github/commands-readme.md
      
      ).
      
      ---------
      
      Co-authored-by: default avatarAlexander Samusev <[email protected]>
      Co-authored-by: default avatarPrzemek Rzad <[email protected]>
      6daa939b
    • tianyeyouyou's avatar
      chore: remove redundant words. (#4653) · e1729592
      tianyeyouyou authored
      
      
      remove redundant words in comments.
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      e1729592
    • Bastian Köcher's avatar
      Unify `code_at` logic between `CallExecutor` & `Client` (#4618) · 029a6562
      Bastian Köcher authored
      This unifies the logic between `CallExecutor` and `Client` when it comes
      to fetching the `code` for a given block. The actual `code` depends on
      potential overrides/substitutes.
      
      Besides that it changes the logic in the lookahead collator on which
      `ValidationCodeHash` it sends to the validator alongside the `POV`. We
      are now sending the code hash as found on the relay chain. This is done
      as the local node could run with an override which is compatible to the
      validation code on the relay chain, but has a different hash.
      029a6562
    • Tin Chung's avatar
      Add set_partial_params dispatchable function (#3843) · cc387132
      Tin Chung authored
      # ISSUE
      - Link to issue: https://github.com/paritytech/polkadot-sdk/issues/3617
      
      
      # Description
      > Any set parameter / update config call with multiple arguments should
      have each argument to be an Option field. Please put this to some best
      practice document. This allows new update config call does not need to
      duplicate the fields that does not need to update. It also makes
      concurrent votes of update call possible, otherwise there will be race
      condition. It also helps with review such proposal otherwise reviewers
      need to check the other fields should remain the same.
      - [ ] Concurrent call & race condition testing
      - [x] Each argument of the `ParamsType` is an `Option` field. Introduce
      through
      ```rust
      pub type PartialParamsOf<T, I> =
      		ParamsType<Option<<T as Config<I>>::Balance>, Option<BlockNumberFor<T>>, RANK_COUNT>;
      ```
      # Outcome
      ```rust
      let params = ParamsType {
      	active_salary: [None; 9],
      	passive_salary: [None; 9],
      	demotion_period: [None, Some(10), None, None, None, None, None, None, None],
      	min_promotion_period: [None; 9],
      	offboard_timeout: Some(1),
      };
      CoreFellowship::set_partial_params(signed(2), Box::new(params.clone())),
      ```
      Test coverage
      ```diff
      running 21 tests
      test tests::unit::__construct_runtime_integrity_test::runtime_integrity_tests ... ok
      test tests::unit::basic_stuff ... ok
      test tests::integration::test_genesis_config_builds ... ok
      test tests::integration::__construct_runtime_integrity_test::runtime_integrity_tests ... ok
      test tests::unit::auto_demote_offboard_works ... ok
      test tests::unit::auto_demote_works ... ok
      test tests::unit::get_salary_works ... ok
      test tests::unit::active_changing_get_salary_works ... ok
      test tests::integration::swap_bad_noops ... ok
      test tests::unit::promote_postpones_auto_demote ... ok
      test tests::unit::infinite_demotion_period_works ... ok
      test tests::unit::proof_postpones_auto_demote ... ok
      test tests::unit::induct_works ... ok
      test tests::unit::set_params_works ... ok
      test tests::unit::test_genesis_config_builds ... ok
      test tests::unit::offboard_works ... ok
      test tests::unit::sync_works ... ok
      + test tests::unit::set_partial_params_works ... ok
      test tests::integration::swap_exhaustive_works ... ok
      test tests::unit::promote_works ... ok
      test tests::integration::swap_simple_works ... ok
      
      test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
      
         Doc-tests pallet_core_fellowship
      
      running 0 tests
      
      test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
      ```
      
      polkadot address: 19nSqFQorfF2HxD3oBzWM3oCh4SaCRKWt1yvmgaPYGCo71J
      
      ---------
      
      Co-authored-by: default avatarDónal Murray <[email protected]>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      cc387132
    • Tin Chung's avatar
      Remove deprecated treasury pallet calls (#3820) · 40677b64
      Tin Chung authored
      # ISSUE
      - Link to the issue:
      https://github.com/paritytech/polkadot-sdk/issues/3800
      # Deliverables
      - [x] remove deprecated calls;
      (https://github.com/paritytech/polkadot-sdk/pull/3820/commits/d579b673672454d0dc7b5049e5cbbe6077da520b)
      - [x] set explicit coded indexes for Error and Event enums, remove
      unused variants and keep the same indexes for the rest;
      (https://github.com/paritytech/polkadot-sdk/pull/3820/commits/d579b673672454d0dc7b5049e5cbbe6077da520b)
      - [x] remove unused Config's type parameters;
      (https://github.com/paritytech/polkadot-sdk/pull/3820/commits/d579b673672454d0dc7b5049e5cbbe6077da520b)
      - [x] remove irrelevant tests and adopt relevant using old api;
      (https://github.com/paritytech/polkadot-sdk/pull/3820/commits/d579b673672454d0dc7b5049e5cbbe6077da520b)
      - [x] remove benchmarks for removed calls;
      (https://github.com/paritytech/polkadot-sdk/pull/3820/commits/1a3d5f1f96756555ddebd1b898c03464ffffdb25)
      - [x] prdoc
      (https://github.com/paritytech/polkadot-sdk/pull/3820/commits/d579b673672454d0dc7b5049e5cbbe6077da520b)
      - [x] remove deprecated methods from the `treasury/README.md` and add
      up-to-date dispatchable functions documentation
      (https://github.com/paritytech/polkadot-sdk/pull/3820/commits/d579b673672454d0dc7b5049e5cbbe6077da520b)
      - [x] remove deprecated weight functions
      (https://github.com/paritytech/polkadot-sdk/pull/3820/commits/8f74134b82df9a6df2824bbbe1555667223f1a83)
      > ### Separated to other issues
      > - [ ] remove storage items like Proposals and ProposalCount, that are
      not used anymore
      
      Adjust all treasury pallet instances within polkadot-sdk
      - [x] `pallet_bounty`, `tip`, `child_bounties`:
      https://github.com/openguild-labs/polkadot-sdk/pull/3
      - [x] Remove deprecated treasury weight functions used in Westend and
      Rococo runtime `collective-westend`, `collective-rococo`
      
      Add migration for westend and rococo to clean the data from removed
      storage items
      - [ ] https://github.com/paritytech/polkadot-sdk/pull/3828
      # Test Outcomes
      Successful tests by running `cargo test --features runtime-benchmarks`
      ```
      running 38 tests
      test tests::__construct_runtime_integrity_test::runtime_integrity_tests ... ok
      test benchmarking::benchmarks::bench_check_status ... ok
      test benchmarking::benchmarks::bench_payout ... ok
      test benchmarking::benchmarks::bench_spend_local ... ok
      test tests::accepted_spend_proposal_enacted_on_spend_period ... ok
      test benchmarking::benchmarks::bench_spend ... ok
      test tests::accepted_spend_proposal_ignored_outside_spend_period ... ok
      test benchmarking::benchmarks::bench_void_spend ... ok
      test benchmarking::benchmarks::bench_remove_approval ... ok
      test tests::genesis_funding_works ... ok
      test tests::genesis_config_works ... ok
      test tests::inexistent_account_works ... ok
      test tests::minting_works ... ok
      test tests::check_status_works ... ok
      test tests::payout_retry_works ... ok
      test tests::pot_underflow_should_not_diminish ... ok
      test tests::remove_already_removed_approval_fails ... ok
      test tests::spend_local_origin_permissioning_works ... ok
      test tests::spend_valid_from_works ... ok
      test tests::spend_expires ... ok
      test tests::spend_works ... ok
      test tests::test_genesis_config_builds ... ok
      test tests::spend_payout_works ... ok
      test tests::spend_local_origin_works ... ok
      test tests::spend_origin_works ... ok
      test tests::spending_local_in_batch_respects_max_total ... ok
      test tests::spending_in_batch_respects_max_total ... ok
      test tests::try_state_proposals_invariant_2_works ... ok
      test tests::try_state_proposals_invariant_1_works ... ok
      test tests::try_state_spends_invariant_2_works ... ok
      test tests::try_state_spends_invariant_1_works ... ok
      test tests::treasury_account_doesnt_get_deleted ... ok
      test tests::try_state_spends_invariant_3_works ... ok
      test tests::unused_pot_should_diminish ... ok
      test tests::void_spend_works ... ok
      test tests::try_state_proposals_invariant_3_works ... ok
      test tests::max_approvals_limited ... ok
      test benchmarking::benchmarks::bench_on_initialize_proposals ... ok
      
      test result: ok. 38 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s
      
         Doc-tests pallet_treasury
      
      running 2 tests
      test substrate/frame/treasury/src/lib.rs - (line 52) ... ignored
      test substrate/frame/treasury/src/lib.rs - (line 79) ... ignored
      
      test result: ok. 0 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.00s
      ```
      
      polkadot address: 19nSqFQorfF2HxD3oBzWM3oCh4SaCRKWt1yvmgaPYGCo71J
      40677b64
    • Andrei Sandu's avatar
      glutton: also increase parachain block length (#4728) · 1dc68de8
      Andrei Sandu authored
      Glutton currently is useful mostly for stress testing relay chain
      validators. It is unusable for testing the collator networking and block
      announcement and import scenarios. This PR resolves that by improving
      glutton pallet to also buff up the blocks, up to the runtime configured
      `BlockLength`.
      
      ### How it works
      Includes an additional inherent in each parachain block. The `garbage`
      argument passed to the inherent is filled with trash data. It's size is
      computed by applying the newly introduced `block_length` percentage to
      the maximum block length for mandatory dispatch class. After
      https://github.com/paritytech/polkadot-sdk/pull/4765
      
       is merged, the
      length of inherent extrinsic will be added to the total block proof
      size.
      
      The remaining weight is burnt in `on_idle` as configured by the
      `storage` percentage parameter.
      
      
      TODO:
      - [x] PRDoc
      - [x] Readme update
      - [x] Add tests
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <[email protected]>
      1dc68de8
    • Daan van der Plas's avatar
      refactor: parachain template (#4684) · 7c847f8d
      Daan van der Plas authored
      Update parachain template pallet based on polkadot sdk docs
      
      @Kianenigma
      
      
      
      ---------
      
      Co-authored-by: default avatarKian Paimani <[email protected]>
      7c847f8d
  4. Jun 17, 2024
  5. Jun 14, 2024
  6. Jun 13, 2024