Skip to content
Unverified Commit 40677b64 authored by Tin Chung's avatar Tin Chung Committed by GitHub
Browse files

Remove deprecated treasury pallet calls (#3820)

# 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/d579b673)
- [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/d579b673)
- [x] remove unused Config's type parameters;
(https://github.com/paritytech/polkadot-sdk/pull/3820/commits/d579b673)
- [x] remove irrelevant tests and adopt relevant using old api;
(https://github.com/paritytech/polkadot-sdk/pull/3820/commits/d579b673)
- [x] remove benchmarks for removed calls;
(https://github.com/paritytech/polkadot-sdk/pull/3820/commits/1a3d5f1f)
- [x] prdoc
(https://github.com/paritytech/polkadot-sdk/pull/3820/commits/d579b673)
- [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/d579b673)
- [x] remove deprecated weight functions
(https://github.com/paritytech/polkadot-sdk/pull/3820/commits/8f74134b)
> ### 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
parent 1dc68de8
Pipeline #481625 waiting for manual action with stages
in 12 minutes and 56 seconds