-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Deprecation] remove pallet::getter
usage from all pallets
#3326
Labels
Comments
ggwpez
added
I4-refactor
Code needs refactoring.
T2-pallets
This PR/Issue is related to a particular pallet.
labels
Feb 14, 2024
I want to work on pallet-aura |
This was referenced Feb 17, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 19, 2024
part of #3326 @ggwpez @kianenigma @shawntabrizi --------- Signed-off-by: Matteo Muraca <[email protected]> Co-authored-by: Kian Paimani <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 21, 2024
part of #3326 @ggwpez @kianenigma @shawntabrizi --------- Signed-off-by: Matteo Muraca <[email protected]> Co-authored-by: Kian Paimani <[email protected]>
This was referenced Feb 23, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
Mar 5, 2024
Part of #3326 This one is easier as all the storage items are public. @ggwpez @kianenigma @shawntabrizi --------- Signed-off-by: Matteo Muraca <[email protected]> Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Kian Paimani <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this issue
Mar 18, 2024
Part of #3326 @ggwpez @kianenigma @shawntabrizi polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp --------- Signed-off-by: Matteo Muraca <[email protected]>
This was referenced Mar 18, 2024
ordian
pushed a commit
that referenced
this issue
Mar 19, 2024
Part of #3326 @ggwpez @kianenigma @shawntabrizi polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp --------- Signed-off-by: Matteo Muraca <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this issue
Mar 19, 2024
Part of #3326 cc @kianenigma @ggwpez @liamaharon polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp --------- Signed-off-by: Matteo Muraca <[email protected]>
dharjeezy
pushed a commit
to dharjeezy/polkadot-sdk
that referenced
this issue
Mar 24, 2024
As I've been dancing around this pallet for quite some time anyway, I decided to remove getters at once. There were only a few leftovers in tests. Related: paritytech#3326 CC @muraca
dharjeezy
pushed a commit
to dharjeezy/polkadot-sdk
that referenced
this issue
Mar 24, 2024
Part of paritytech#3326 @ggwpez @kianenigma @shawntabrizi polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp --------- Signed-off-by: Matteo Muraca <[email protected]>
dharjeezy
pushed a commit
to dharjeezy/polkadot-sdk
that referenced
this issue
Mar 24, 2024
…#3740) Part of paritytech#3326 cc @kianenigma @ggwpez @liamaharon polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp --------- Signed-off-by: Matteo Muraca <[email protected]>
bgallois
pushed a commit
to duniter/duniter-polkadot-sdk
that referenced
this issue
Mar 25, 2024
part of paritytech#3326 @ggwpez @kianenigma @shawntabrizi --------- Signed-off-by: Matteo Muraca <[email protected]> Co-authored-by: Kian Paimani <[email protected]>
bgallois
pushed a commit
to duniter/duniter-polkadot-sdk
that referenced
this issue
Mar 25, 2024
part of paritytech#3326 @ggwpez @kianenigma @shawntabrizi --------- Signed-off-by: Matteo Muraca <[email protected]> Co-authored-by: Kian Paimani <[email protected]>
bgallois
pushed a commit
to duniter/duniter-polkadot-sdk
that referenced
this issue
Mar 25, 2024
) Part of paritytech#3326 This one is easier as all the storage items are public. @ggwpez @kianenigma @shawntabrizi --------- Signed-off-by: Matteo Muraca <[email protected]> Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Kian Paimani <[email protected]>
bgallois
pushed a commit
to duniter/duniter-polkadot-sdk
that referenced
this issue
Mar 25, 2024
As I've been dancing around this pallet for quite some time anyway, I decided to remove getters at once. There were only a few leftovers in tests. Related: paritytech#3326 CC @muraca
github-merge-queue bot
pushed a commit
that referenced
this issue
Jul 30, 2024
As per #3326, removes usage of the `pallet::getter` macro from the balances pallet. The syntax `StorageItem::<T, I>::get()` should be used instead. Also, adds public functions for compatibility. cc @muraca polkadot address: 5GsLutpKjbzsbTphebs9Uy4YK6gTN47MAaz6njPktidjR5cp --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
…ytech#4417) A part of paritytech#3326 Removes all #[pallet::getter] usage from the contracts mock network pallet. As the storage values were pub(super), read-only visibility was lost external to the crate upon the removal of the macros. I have implemented custom getters as a replacement, keeping the api the same. If we care very much about consistency of the storagevalue::<T>::get() syntax, the other option would be to set the storage values to pub. Though I find preserving data authority better myself. @muraca
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
…tech#4091) As per paritytech#3326, removes pallet::getter usage from the pallet authority-discovery. The syntax `StorageItem::<T, I>::get()` should be used instead. cc @muraca --------- Co-authored-by: Liam Aharon <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
…ets (paritytech#4392) As per paritytech#3326, removes pallet::getter usage from the bounties and child-bounties pallets. The syntax `StorageItem::<T, I>::get()` should be used instead. Changes to one pallet involved changes in the other, so I figured it'd be best to combine these two. cc @muraca --------- Co-authored-by: Bastian Köcher <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
As per paritytech#3326, removes usage of the pallet::getter macro from the democracy pallet. The syntax `StorageItem::<T, I>::get()` should be used instead. cc @muraca
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
…ritytech#4514) As per paritytech#3326, removes pallet::getter macro usage from pallet-fast-unstake. The syntax `StorageItem::<T, I>::get()` should be used instead. cc @muraca --------- Co-authored-by: Liam Aharon <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
this pr is a part of paritytech#3326 --------- Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
…itytech#4513) As per paritytech#3326, removes pallet::getter macro usage from the pallet-elections-phragmen. The syntax `StorageItem::<T, I>::get()` should be used instead. cc @muraca --------- Co-authored-by: Oliver Tale-Yazdi <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
As per paritytech#3326 , removes pallet::getter macro usage from pallet-membership. The syntax StorageItem::<T, I>::get() should be used instead. Also converts some syntax to turbo and reimplements the removed getters, following paritytech#223 cc @muraca --------- Co-authored-by: Dónal Murray <[email protected]> Co-authored-by: Kian Paimani <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
### ISSUE Link to the issue: paritytech#3326 cc @muraca Deliverables - [Deprecation] remove pallet::getter usage from all pallet-tips ### Test Outcomes ___ Successful tests by running `cargo test -p pallet-tips --features runtime-benchmarks` running 26 tests test tests::__construct_runtime_integrity_test::runtime_integrity_tests ... ok test benchmarking::bench_retract_tip ... ok test tests::equal_entries_invariant ... ok test benchmarking::bench_tip ... ok test tests::finders_fee_invariant ... ok test tests::genesis_config_works ... ok test tests::genesis_funding_works ... ok test benchmarking::bench_slash_tip ... ok test tests::reasons_invariant ... ok test benchmarking::bench_report_awesome ... ok test tests::close_tip_works ... ok test tests::report_awesome_from_beneficiary_and_tip_works ... ok test tests::test_genesis_config_builds ... ok test tests::test_last_reward_migration ... ok test benchmarking::bench_tip_new ... ok test benchmarking::bench_close_tip ... ok test tests::test_migration_v4 ... ok test tests::slash_tip_works ... ok test tests::report_awesome_and_tip_works_second_instance ... ok test tests::report_awesome_and_tip_works ... ok test tests::tip_changing_works ... ok test tests::zero_base_deposit_prohibited - should panic ... ok test tests::tip_median_calculation_works ... ok test tests::tip_new_cannot_be_used_twice ... ok test tests::tip_large_should_fail ... ok test tests::retract_tip_works ... ok test result: ok. 26 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s Doc-tests pallet_tips running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s --- Polkadot Address: 16htXkeVhfroBhL6nuqiwknfXKcT6WadJPZqEi2jRf9z4XPY --------- Co-authored-by: Bastian Köcher <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
…aritytech#4839) As per paritytech#3326, removes pallet::getter macro usage from the pallet-insecure-randomness-collective-flip. The syntax `StorageItem::<T, I>::get()` should be used instead. Explicitly implements the getters that were removed as well, following paritytech#223 Also makes the storage values public and converts some syntax to turbo cc @muraca --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
### ISSUE Link to the issue: paritytech#3326 cc @muraca Deliverables - [Deprecation] remove pallet::getter usage from all pallet-vesting ### Test Outcomes ___ Successful tests by running `cargo test -p pallet-vesting --features runtime-benchmarks` running 45 tests test benchmarking::bench_force_vested_transfer ... ok test benchmarking::bench_vest_other_locked ... ok test mock::__construct_runtime_integrity_test::runtime_integrity_tests ... ok test benchmarking::bench_not_unlocking_merge_schedules ... ok test benchmarking::bench_unlocking_merge_schedules ... ok test mock::test_genesis_config_builds ... ok test tests::build_genesis_has_storage_version_v1 ... ok test tests::check_vesting_status ... ok test benchmarking::bench_force_remove_vesting_schedule ... ok test tests::check_vesting_status_for_multi_schedule_account ... ok test benchmarking::bench_vest_locked ... ok test tests::extra_balance_should_transfer ... ok test tests::generates_multiple_schedules_from_genesis_config ... ok test tests::force_vested_transfer_allows_max_schedules ... ok test tests::force_vested_transfer_correctly_fails ... ok test tests::force_vested_transfer_works ... ok test tests::liquid_funds_should_transfer_with_delayed_vesting ... ok test tests::merge_finished_and_ongoing_schedules ... ok test benchmarking::bench_vest_unlocked ... ok test tests::merge_finished_and_yet_to_be_started_schedules ... ok test tests::merge_finishing_schedules_does_not_create_a_new_one ... ok test tests::merge_ongoing_and_yet_to_be_started_schedules ... ok test benchmarking::bench_vest_other_unlocked ... ok test tests::merge_ongoing_schedules ... ok test tests::merge_schedules_that_have_not_started ... ok test tests::merge_vesting_handles_per_block_0 ... ok test tests::per_block_works ... ok test tests::merge_schedules_throws_proper_errors ... ok test tests::multiple_schedules_from_genesis_config_errors - should panic ... ok test tests::merging_shifts_other_schedules_index ... ok test tests::non_vested_cannot_vest_other ... ok test tests::unvested_balance_should_not_transfer ... ok test tests::non_vested_cannot_vest ... ok test tests::vested_balance_should_transfer ... ok test tests::remove_vesting_schedule ... ok test tests::vested_transfer_correctly_fails ... ok test tests::vested_balance_should_transfer_with_multi_sched ... ok test tests::vested_balance_should_transfer_using_vest_other ... ok test tests::vested_transfer_less_than_existential_deposit_fails ... ok test tests::vesting_info_ending_block_as_balance_works ... ok test tests::vesting_info_validate_works ... ok test tests::vested_balance_should_transfer_using_vest_other_with_multi_sched ... ok test tests::vested_transfer_works ... ok test tests::vested_transfer_allows_max_schedules ... ok test benchmarking::bench_vested_transfer ... ok test result: ok. 45 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s --- Polkadot Address: 16htXkeVhfroBhL6nuqiwknfXKcT6WadJPZqEi2jRf9z4XPY
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
### ISSUE Link to the issue: paritytech#3326 cc @muraca Deliverables - [Deprecation] remove pallet::getter usage from pallet-transaction-storage ### Test Outcomes ___ cargo test -p pallet-transaction-storage --features runtime-benchmarks running 9 tests test mock::test_genesis_config_builds ... ok test tests::burns_fee ... ok test mock::__construct_runtime_integrity_test::runtime_integrity_tests ... ok test tests::discards_data ... ok test tests::renews_data ... ok test benchmarking::bench_renew ... ok test benchmarking::bench_store ... ok test tests::checks_proof ... ok test benchmarking::bench_check_proof_max has been running for over 60 seconds test benchmarking::bench_check_proof_max ... ok test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 72.57s Doc-tests pallet-transaction-storage running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s --- Polkadot Address: 16htXkeVhfroBhL6nuqiwknfXKcT6WadJPZqEi2jRf9z4XPY
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
### ISSUE Link to the issue: paritytech#3326 cc @muraca Deliverables - [Deprecation] remove pallet::getter usage from all pallet-babe ### Test Outcomes ___ Successful tests by running `cargo test -p pallet-babe --features runtime-benchmarks` running 32 tests test mock::__pallet_staking_reward_curve_test_module::reward_curve_piece_count ... ok test mock::__construct_runtime_integrity_test::runtime_integrity_tests ... ok test mock::test_genesis_config_builds ... ok 2024-06-28T17:02:11.158812Z ERROR runtime::storage: Corrupted state at `0x1cb6f36e027abb2091cfb5110ab5087f9aab0a5b63b359512deee557c9f4cf63`: Error { cause: Some(Error { cause: None, desc: "Could not decode `NextConfigDescriptor`, variant doesn't exist" }), desc: "Could not decode `Option::Some(T)`" } 2024-06-28T17:02:11.159752Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::add_epoch_configurations_migration_works ... ok test tests::author_vrf_output_for_secondary_vrf ... ok test benchmarking::bench_check_equivocation_proof ... ok 2024-06-28T17:02:11.160537Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::can_estimate_current_epoch_progress ... ok test tests::author_vrf_output_for_primary ... ok test tests::authority_index ... ok 2024-06-28T17:02:11.162327Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::empty_randomness_is_correct ... ok test tests::check_module ... ok 2024-06-28T17:02:11.163492Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::current_slot_is_processed_on_initialization ... ok test tests::can_enact_next_config ... ok 2024-06-28T17:02:11.164987Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.165007Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::can_predict_next_epoch_change ... ok test tests::first_block_epoch_zero_start ... ok test tests::initial_values ... ok 2024-06-28T17:02:11.168430Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.168685Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.170982Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.171220Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::only_root_can_enact_config_change ... ok test tests::no_author_vrf_output_for_secondary_plain ... ok test tests::can_fetch_current_and_next_epoch_data ... ok 2024-06-28T17:02:11.172960Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::report_equivocation_has_valid_weight ... ok 2024-06-28T17:02:11.173873Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.177084Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::report_equivocation_after_skipped_epochs_works ... 2024-06-28T17:02:11.177694Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.177703Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.177925Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.177927Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 ok 2024-06-28T17:02:11.179678Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.181446Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.183665Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.183874Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.185732Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.185951Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.189332Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.189559Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.189587Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::generate_equivocation_report_blob ... ok test tests::disabled_validators_cannot_author_blocks - should panic ... ok 2024-06-28T17:02:11.190552Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.192279Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.194735Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.196136Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.197240Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::skipping_over_epochs_works ... ok 2024-06-28T17:02:11.202783Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.202846Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.203029Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.205242Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::tracks_block_numbers_when_current_and_previous_epoch_started ... ok 2024-06-28T17:02:11.208965Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::report_equivocation_current_session_works ... ok test tests::report_equivocation_invalid_key_owner_proof ... ok 2024-06-28T17:02:11.216431Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 2024-06-28T17:02:11.216855Z ERROR runtime::timestamp: `pallet_timestamp::UnixTime::now` is called at genesis, invalid value returned: 0 test tests::report_equivocation_validate_unsigned_prevents_duplicates ... ok test tests::report_equivocation_invalid_equivocation_proof ... ok test tests::valid_equivocation_reports_dont_pay_fees ... ok test tests::report_equivocation_old_session_works ... ok test mock::__pallet_staking_reward_curve_test_module::reward_curve_precision ... ok test result: ok. 32 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.20s Doc-tests pallet-babe running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s --- Polkadot Address: 16htXkeVhfroBhL6nuqiwknfXKcT6WadJPZqEi2jRf9z4XPY
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
As per paritytech#3326, removes usage of the `pallet::getter` macro from the `session` pallet. The syntax `StorageItem::<T, I>::get()` should be used instead. Also, adds public functions for compatibility. NOTE: The `./historical` directory has not been modified. cc @muraca polkadot address: 5GsLutpKjbzsbTphebs9Uy4YK6gTN47MAaz6njPktidjR5cp --------- Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
As per paritytech#3326, removes pallet::getter macro usage from the pallet-identity. The syntax `StorageItem::<T, I>::get()` should be used instead. Also makes all storage values public cc @muraca --------- Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: command-bot <>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
…ech#4970) As per paritytech#3326, removes usage of the `pallet::getter` macro from the `transaction-payment` pallet. The syntax `StorageItem::<T, I>::get()` should be used instead. Also, adds public functions for compatibility. NOTE: The `Releases` enum has been made public to transition `StorageVersion` from `pub(super) type` to `pub type`. cc @muraca polkadot address: 5GsLutpKjbzsbTphebs9Uy4YK6gTN47MAaz6njPktidjR5cp --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
…-phase (paritytech#4487) As per paritytech#3326, removes pallet::getter macro usage from the election-provider-multi-phase pallet. The syntax `StorageItem::<T, I>::get()` should be used instead. cc @muraca --------- Co-authored-by: Oliver Tale-Yazdi <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
ISSUE Link to the issue: paritytech#3326 Deliverables [Deprecation] remove pallet::getter usage from pallet-proxy --------- Co-authored-by: Oliver Tale-Yazdi <[email protected]>
TarekkMA
pushed a commit
to moonbeam-foundation/polkadot-sdk
that referenced
this issue
Aug 2, 2024
As per paritytech#3326, removes usage of the `pallet::getter` macro from the balances pallet. The syntax `StorageItem::<T, I>::get()` should be used instead. Also, adds public functions for compatibility. cc @muraca polkadot address: 5GsLutpKjbzsbTphebs9Uy4YK6gTN47MAaz6njPktidjR5cp --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
12 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 28, 2024
ISSUE Link to the issue: #3326 Deliverables [Deprecation] remove pallet::getter usage from pallet-treasury --------- Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Dónal Murray <[email protected]> Co-authored-by: Dónal Murray <[email protected]> Co-authored-by: Bastian Köcher <[email protected]>
I'm taking on |
github-merge-queue bot
pushed a commit
that referenced
this issue
Oct 16, 2024
# Description Part of #3326 Removes pallet::getter from pallet-offences from type `Reports`. Adds a test to verify that retrieval of `Reports` still works with storage::getter. polkadot address: 155YyFVoMnv9BY6qxy2i5wxtveUw7WE1n5H81fL8PZKTA1Sd --------- Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: Dónal Murray <[email protected]>
I'm starting to work on |
github-merge-queue bot
pushed a commit
that referenced
this issue
Nov 13, 2024
# Description Part of #3326 Removes all pallet::getter occurrences from pallet-staking and replaces them with explicit implementations. Adds tests to verify that retrieval of affected entities works as expected so via storage::getter. ## Review Notes 1. Traits added to the `derive` attribute are used in tests (either directly or indirectly). 2. The getters had to be placed in a separate impl block since the other one is annotated with `#[pallet::call]` and that requires `#[pallet::call_index(0)]` annotation on each function in that block. So I thought it's better to separate them. --------- Co-authored-by: Dónal Murray <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]>
EgorPopelyaev
added a commit
to EgorPopelyaev/polkadot-sdk
that referenced
this issue
Nov 21, 2024
* Migrate pallet-transaction-storage and pallet-indices to benchmark v2 (paritytech#6290) Part of: paritytech#6202 --------- Co-authored-by: Giuseppe Re <[email protected]> Co-authored-by: GitHub Action <[email protected]> * fix prospective-parachains best backable chain reversion bug (paritytech#6417) Kudos to @EclesioMeloJunior for noticing it Also added a regression test for it. The existing unit test was exercising only the case where the full chain is reverted --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * Remove network starter that is no longer needed (paritytech#6400) # Description This seems to be an old artifact of the long closed paritytech/substrate#6827 that I noticed when working on related code earlier. ## Integration `NetworkStarter` was removed, simply remove its usage: ```diff -let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) = +let (network, system_rpc_tx, tx_handler_controller, sync_service) = build_network(BuildNetworkParams { ... -start_network.start_network(); ``` ## Review Notes Changes are trivial, the only reason for this to not be accepted is if it is desired to not start network automatically for whatever reason, in which case the description of network starter needs to change. # Checklist * [x] My PR includes a detailed description as outlined in the "Description" and its two subsections above. * [ ] My PR follows the [labeling requirements]( https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process ) of this project (at minimum one label for `T` required) * External contributors: ask maintainers to put the right label on your PR. --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * `fatxpool`: size limits implemented (paritytech#6262) This PR adds size-limits to the fork-aware transaction pool. **Review Notes** - Existing [`TrackedMap`](https://github.com/paritytech/polkadot-sdk/blob/58fd5ae4ce883f42c360e3ad4a5df7d2258b42fe/substrate/client/transaction-pool/src/graph/tracked_map.rs#L33-L41) is used in internal mempool to track the size of extrinsics: https://github.com/paritytech/polkadot-sdk/blob/58fd5ae4ce883f42c360e3ad4a5df7d2258b42fe/substrate/client/transaction-pool/src/graph/tracked_map.rs#L33-L41 - In this PR, I also removed the logic that kept transactions in the `tx_mem_pool` if they were immediately dropped by the views. Initially, I implemented this as an improvement: if there was available space in the _mempool_ and all views dropped the transaction upon submission, the transaction would still be retained in the _mempool_. However, upon further consideration, I decided to remove this functionality to reduce unnecessary complexity. Now, when all views drop a transaction during submission, it is automatically rejected, with the `submit/submit_and_watch` call returning `ImmediatelyDropped`. Closes: paritytech#5476 --------- Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * pallet-membership: Do not verify the `MembershipChanged` in bechmarks (paritytech#6439) There is no need to verify in the `pallet-membership` benchmark that the `MemembershipChanged` implementation works as the pallet thinks it should work. If you for example set it to `()`, `get_prime()` will always return `None`. TLDR: Remove the checks of `MembershipChanged` in the benchmarks to support any kind of implementation. --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]> * add FeeManager to pallet xcm (paritytech#5363) Closes paritytech#2082 change send xcm to use `xcm::executor::FeeManager` to determine if the sender should be charged. I had to change the `FeeManager` of the penpal config to ensure the same test behaviour as before. For the other tests, I'm using the `FeeManager` from the `xcm::executor::FeeManager` as this one is used to check if the fee can be waived on the charge fees method. --------- Co-authored-by: Adrian Catangiu <[email protected]> Co-authored-by: GitHub Action <[email protected]> * Use relay chain block number in the broker pallet instead of block number (paritytech#5656) Based on paritytech#3331 Related to paritytech#3268 Implements migrations with customizable block number to relay height number translation function. Adds block to relay height migration code for rococo and westend. --------- Co-authored-by: DavidK <[email protected]> Co-authored-by: Kian Paimani <[email protected]> * migrate pallet-nft-fractionalization to benchmarking v2 syntax (paritytech#6301) Migrates pallet-nft-fractionalization to benchmarking v2 syntax. Part of: * paritytech#6202 --------- Co-authored-by: Giuseppe Re <[email protected]> Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> * [pallet-revive] adjust fee dry-run calculation (paritytech#6393) - Fix bare_eth_transact so that it estimate more precisely the transaction fee - Add some context to the build.rs to make it easier to troubleshoot errors - Add TransactionBuilder for the RPC tests. - Improve error message, proxy rpc error from the node and handle reverted error message - Add logs in ReceiptInfo --------- Co-authored-by: GitHub Action <[email protected]> * NoOp Impl Polling Trait (paritytech#5311) Adds NoOp implementation for the `Polling` trait and updates benchmarks in `pallet-ranked-collective`. --------- Co-authored-by: Oliver Tale-Yazdi <[email protected]> * Migrate pallet-child-bounties benchmark to v2 (paritytech#6310) Part of: - paritytech#6202. --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Giuseppe Re <[email protected]> * Introduce `ConstUint` to make dependent types in `DefaultConfig` more adaptable (paritytech#6425) # Description Resolves paritytech#6193 This PR introduces `ConstUint` as a replacement for existing constant getter types like `ConstU8`, `ConstU16`, etc., providing a more flexible and unified approach. ## Integration This update is backward compatible, so developers can choose to adopt `ConstUint` in new implementations or continue using the existing types as needed. ## Review Notes `ConstUint` is a convenient alternative to `ConstU8`, `ConstU16`, and similar types, particularly useful for configuring `DefaultConfig` in pallets. It enables configuring the underlying integer for a specific type without the need to update all dependent types, offering enhanced flexibility in type management. # Checklist * [x] My PR includes a detailed description as outlined in the "Description" and its two subsections above. * [ ] My PR follows the [labeling requirements]( https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process ) of this project (at minimum one label for `T` required) * External contributors: ask maintainers to put the right label on your PR. * [ ] I have made corresponding changes to the documentation (if applicable) * [ ] I have added tests that prove my fix is effective or that my feature works (if applicable) * Use type alias for transactions (paritytech#6431) Very tiny change that helps with debugging of transactions propagation by referring to the same type alias not only at receiving side, but also on the sending size for symmetry * [Release|CI/CD] Fix audiences changelog template (paritytech#6444) This PR addresses an issue mentioned [here](paritytech#6424 (comment)). The problem was that when the prdoc file has two audiences, but only one description like in [prdoc_5660](https://github.com/paritytech/polkadot-sdk/blob/master/prdoc/1.16.0/pr_5660.prdoc) it was ignored by the template. * XCMv5: add ExecuteWithOrigin instruction (paritytech#6304) Added `ExecuteWithOrigin` instruction according to the old XCM RFC 38: polkadot-fellows/xcm-format#38. This instruction allows you to descend or clear while going back again. ## TODO - [x] Implementation - [x] Unit tests - [x] Integration tests - [x] Benchmarks - [x] PRDoc ## Future work Modify `WithComputedOrigin` barrier to allow, for example, fees to be paid with a descendant origin using this instruction. --------- Signed-off-by: Adrian Catangiu <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]> Co-authored-by: Andrii <[email protected]> Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: Joseph Zhao <[email protected]> Co-authored-by: Nazar Mokrynskyi <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: command-bot <> * rpc server: fix host filter for localhost on ipv6 (paritytech#6454) This PR fixes an issue that I discovered using connecting to the RPC via localhost using cURL, where cURL tries to connect to via ipv6 before ipv4 when querying `localhost` which messed up the http host filter whereas it would connect to the address `[::1]::9944 host_header: localhost:9944` but the ipv6 interface only whitelisted `[::1]:9944` which this fixes. So let's whitelist all localhost interfaces to avoid such weird edge-cases. ### Behavior before this PR ```bash $ polkadot --chain westend-dev & $ curl -v \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":"id","method":"system_name"}' \ http://localhost:9944 * Host localhost:9944 was resolved. * IPv6: ::1 * IPv4: 127.0.0.1 * Trying [::1]:9944... * Connected to localhost (::1) port 9944 > POST / HTTP/1.1 > Host: localhost:9944 > User-Agent: curl/8.5.0 > Accept: */* > Content-Type: application/json > Content-Length: 50 > < HTTP/1.1 403 Forbidden < content-type: text/plain < content-length: 41 < date: Tue, 12 Nov 2024 13:03:49 GMT < Provided Host header is not whitelisted. * Connection #0 to host localhost left intact ``` ### Behavior after this PR ```bash $ polkadot --chain westend-dev & ➜ wasm-tests (update-artifacts-1731284930) ✗ curl -v \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","id":"id","method":"system_name"}' \ http://localhost:9944 * Host localhost:9944 was resolved. * IPv6: ::1 * IPv4: 127.0.0.1 * Trying [::1]:9944... * Connected to localhost (::1) port 9944 > POST / HTTP/1.1 > Host: localhost:9944 > User-Agent: curl/8.5.0 > Accept: */* > Content-Type: application/json > Content-Length: 50 > < HTTP/1.1 200 OK < content-type: application/json; charset=utf-8 < vary: origin, access-control-request-method, access-control-request-headers < content-length: 54 < date: Tue, 12 Nov 2024 13:02:57 GMT < * Connection #0 to host localhost left intact {"jsonrpc":"2.0","id":"id","result":"Parity Polkadot"}% ``` --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: command-bot <> * [pallet-revive] eth-rpc fixes (paritytech#6453) - Breaking down the integration-test into multiple tests - Fix tx hash to use expected keccak-256 - Add option to ethers.js example to connect to westend and use a private key --------- Co-authored-by: GitHub Action <[email protected]> * Remove debug message about pruning active leaves (paritytech#6440) # Description The debug message was added to identify a potential memory leak. However, recent observations show that pruning works as expected. Therefore, it is best to remove this line, as it generates quite annoying logs. ## Integration Doesn't affect downstream projects. --------- Co-authored-by: GitHub Action <[email protected]> * [Tx ext stage 2: 1/4] Add `TransactionSource` as argument in `TransactionExtension::validate` (paritytech#6323) ## Meta This PR is part of 4 PR: * paritytech#6323 * paritytech#6324 * paritytech#6325 * paritytech#6326 ## Description One goal of transaction extension is to get rid or unsigned transactions. But unsigned transaction validation has access to the `TransactionSource`. The source is used for unsigned transactions that the node trust and don't want to pay upfront. Instead of using transaction source we could do: the transaction is valid if it is signed by the block author, conceptually it should work, but it doesn't look so easy. This PR add `TransactionSource` to the validate function for transaction extensions * remove pallet::getter from pallet-staking (paritytech#6184) # Description Part of paritytech#3326 Removes all pallet::getter occurrences from pallet-staking and replaces them with explicit implementations. Adds tests to verify that retrieval of affected entities works as expected so via storage::getter. ## Review Notes 1. Traits added to the `derive` attribute are used in tests (either directly or indirectly). 2. The getters had to be placed in a separate impl block since the other one is annotated with `#[pallet::call]` and that requires `#[pallet::call_index(0)]` annotation on each function in that block. So I thought it's better to separate them. --------- Co-authored-by: Dónal Murray <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> * Refactor pallet `society` (paritytech#6367) - [x] Removing `without_storage_info` and adding bounds on the stored types for pallet `society` - issue paritytech#6289 - [x] Migrating to benchmarking V2 - paritytech#6202 --------- Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Muharem <[email protected]> * frame-benchmarking: Use correct components for pallet instances (paritytech#6435) When using multiple instances of the same pallet, each instance was executed with the components of all instances. While actually each instance should only be executed with the components generated for the particular instance. The problem here was that in the runtime only the pallet-name was used to determine if a certain pallet should be benchmarked. When using instances, the pallet name is the same for both of these instances. The solution is to also take the instance name into account. The fix requires to change the `Benchmark` runtime api to also take the `instance`. The node side is written in a backwards compatible way to also support runtimes which do not yet support the `instance` parameter. --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: clangenb <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]> * Get rid of `libp2p` dependency in `sc-authority-discovery` (paritytech#5842) ## Issue paritytech#4859 ## Description This PR removes `libp2p` types in authority-discovery, and replace them with network backend agnostic types from `sc-network-types`. The `sc-network` interface is therefore updated accordingly. --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Dmitry Markin <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]> * backing: improve session buffering for runtime information (paritytech#6284) ## Issue [[paritytech#3421] backing: improve session buffering for runtime information](paritytech#3421) ## Description In the current implementation of the backing module, certain pieces of information, which remain unchanged throughout a session, are fetched multiple times via runtime API calls. The goal of this task was to introduce a local cache to store such session-stable information and perform the runtime API call only once per session. This PR implements caching specifically for the validators list, node features, executor parameters, minimum backing votes threshold, and validator-to-group mapping, which were previously fetched from the runtime or computed each time `PerRelayParentState` was built. Now, this information is cached and reused within the session. ## TODO * [X] Create a separate struct for per-session caches; * [X] Cache validators list; * [X] Cache node features; * [X] Cache executor parameters; * [X] Cache minimum backing votes threshold; * [X] Cache validator-to-group mapping; * [X] Update tests to reflect these changes; * [X] Add prdoc. ## For the next PR Cache validator groups and any other session-stable data (if present). * Add litep2p network protocol benches (paritytech#6455) # Description Add support to run networking protocol benchmarks with litep2p backend. Now we can compare the work of both libp2p and litep2p backends for notifications and request-response protocols. Next step: extract worker initialization from the benchmark loop. ### Example run on local machine <img width="916" alt="image" src="https://github.com/user-attachments/assets/6bb9f90a-76a4-417e-b9d3-db27aa8a356f"> ## Integration Does not affect downstream projects. ## Review Notes https://github.com/paritytech/polkadot-sdk/blob/d4d9502538e8a940b809ecc77843af3cea101e19/substrate/client/network/src/litep2p/service.rs#L510-L520 This method should be implemented to run request benchmarks. --------- Co-authored-by: GitHub Action <[email protected]> * Fixed bridges zombienet tests because of removed NetworkId::Rococo/Westend from xcm::v5 (paritytech#6465) Closes: paritytech#6449 * Fix staking benchmark (paritytech#6463) Found by @ggwpez Fix staking benchmark, error was introduced when migrating to v2: paritytech#6025 --------- Co-authored-by: GitHub Action <[email protected]> * add pipeline to build runtimes * Follow up work on `TransactionExtension` - fix weights and clean up `UncheckedExtrinsic` (paritytech#6418) Follow up to paritytech#3685 Partially fixes paritytech#6403 The main PR introduced bare support for the new extension version byte as well as extension weights and benchmarking. This PR: - Removes the redundant extension version byte from the signed v4 extrinsic, previously unused and defaulted to 0. - Adds the extension version byte to the inherited implication passed to `General` transactions. - Whitelists the `pallet_authorship::Author`, `frame_system::Digest` and `pallet_transaction_payment::NextFeeMultiplier` storage items as they are read multiple times by extensions for each transaction, but are hot in memory and currently overestimate the weight. - Whitelists the benchmark caller for `CheckEra` and `CheckGenesis` as the reads are performed for every transaction and overestimate the weight. - Updates the umbrella frame weight template to work with the system extension changes. - Plans on re-running the benchmarks at least for the `frame_system` extensions. --------- Signed-off-by: georgepisaltu <[email protected]> Co-authored-by: command-bot <> Co-authored-by: gui <[email protected]> * feat: add workflow to test readme generation (paritytech#6359) # Description Created a workflow to search for README.docify.md in the repo, and run cargo build --features generate-readme in the dir of the file (assuming it is related to a crate). If the git diff shows some output for the README.md, then the file update wasn't pushed on the branch, and the workflow fails. Closes paritytech#6331 ## Integration Downstream projects that want to adopt this README checking workflow should: 1. Copy the `.github/workflows/readme-check.yml` file to their repository 2. Ensure any `README.docify.md` files in their project follow the expected format 3. Implement the `generate-readme` feature flag in their Cargo.toml if not already present ## Review Notes This PR adds a GitHub Actions workflow that automatically verifies README.md files are up-to-date with their corresponding README.docify.md sources. Key implementation details: - The workflow runs on both PRs and pushes to main - It finds all `README.docify.md` files recursively in the repository - For each file found: - Builds the project with `--features generate-readme` in that directory - Checks if the README.md has any uncommitted changes - Fails if any README.md is out of sync --------- Co-authored-by: Alexander Samusev <[email protected]> Co-authored-by: Iulian Barbu <[email protected]> * [pallet-revive] set logs_bloom (paritytech#6460) Set the logs_bloom in the transaction receipt --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Cyrill Leutwiler <[email protected]> * Support more types in TypeWithDefault (paritytech#6411) # Description When using `TypeWithDefault<u32, ..>` as the default nonce provider to overcome the [replay attack](https://wiki.polkadot.network/docs/transaction-attacks#replay-attack) issue, it fails to compile due to `TypeWithDefault<u32, ..>: TryFrom<u64>` is not satisfied (which is required by trait `BaseArithmetic`). This is because the blanket implementation `TryFrom<U> for T where U: Into<T>` only impl `TryFrom<u16>` and `TryFrom<u8>` for `u32` since `u32` only impl `Into` for `u16` and `u8` but not `u64`. This PR fixes the issue by adding `TryFrom<u16/u32/u64/u128>` and `From<u8/u16/u32/u64/u128>` impl (using macro) for `TypeWithDefault<u8/u16/u32/u64/u128, ..>` and removing the blanket impl (otherwise the compiler will complain about conflicting impl), such that `TypeWithDefault<u8/u16/u32/u64/u128, ..>: AtLeast8/16/32Bit` is satisfied. ## Integration This PR adds support to more types to be used with `TypeWithDefault`, existing code that used `u64` with `TypeWithDefault` should not be affected, an unit test is added to ensure that. ## Review Notes This PR simply makes `TypeWithDefault<u8/u16/u32/u64/u128, ..>: AtLeast8/16/32Bit` satisfied --------- Signed-off-by: linning <[email protected]> * [pallet-revive] use evm decimals in call host fn (paritytech#6466) This PR update the pallet to use the EVM 18 decimal balance in contracts call and host functions instead of the native balance. It also updates the js example to add the piggy-bank solidity contract that expose the problem --------- Co-authored-by: GitHub Action <[email protected]> * network/litep2p: Update litep2p network backend to version 0.8.1 (paritytech#6484) This PR updates the litep2p backend to version 0.8.1 from 0.8.0. - Check the [litep2p updates forum post](https://forum.polkadot.network/t/litep2p-network-backend-updates/9973/3) for performance dashboards. - Check [litep2p release notes](paritytech/litep2p#288) The v0.8.1 release includes key fixes that enhance the stability and performance of the litep2p library. The focus is on long-running stability and improvements to polling mechanisms. ### Long Running Stability Improvements This issue caused long-running nodes to reject all incoming connections, impacting overall stability. Addressed a bug in the connection limits functionality that incorrectly tracked connections due for rejection. This issue caused an artificial increase in inbound peers, which were not being properly removed from the connection limit count. This fix ensures more accurate tracking and management of peer connections [paritytech#286](paritytech/litep2p#286). ### Polling implementation fixes This release provides multiple fixes to the polling mechanism, improving how connections and events are processed: - Resolved an overflow issue in TransportContext’s polling index for streams, preventing potential crashes ([paritytech#283](paritytech/litep2p#283)). - Fixed a delay in the manager’s poll_next function that prevented immediate polling of newly added futures ([paritytech#287](paritytech/litep2p#287)). - Corrected an issue where the listener did not return Poll::Ready(None) when it was closed, ensuring proper signal handling ([paritytech#285](paritytech/litep2p#285)). ### Fixed - manager: Fix connection limits tracking of rejected connections ([paritytech#286](paritytech/litep2p#286)) - transport: Fix waking up on filtered events from `poll_next` ([paritytech#287](paritytech/litep2p#287)) - transports: Fix missing Poll::Ready(None) event from listener ([paritytech#285](paritytech/litep2p#285)) - manager: Avoid overflow on stream implementation for `TransportContext` ([paritytech#283](paritytech/litep2p#283)) - manager: Log when polling returns Ready(None) ([paritytech#284](paritytech/litep2p#284)) ### Testing Done Started kusama nodes running side by side with a higher number of inbound and outbound connections (500). We previously tested with peers bounded at 50. This testing filtered out the fixes included in the latest release. With this high connection testing setup, litep2p outperforms libp2p in almost every domain, from performance to the warnings / errors encountered while operating the nodes. TLDR: this is the version we need to test on kusama validators next - Litep2p Repo | Count | Level | Triage report -|-|-|- polkadot-sdk | 409 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Peer disconnected with inflight after backoffs. Banned, disconnecting. ) litep2p | 128 | warn | Refusing to add known address that corresponds to a different peer ID litep2p | 54 | warn | inbound identify substream opened for peer who doesn't exist polkadot-sdk | 7 | error | 💔 Called `on_validated_block_announce` with a bad peer ID .* polkadot-sdk | 1 | warn | ❌ Error while dialing .*: .* polkadot-sdk | 1 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Invalid justification. Banned, disconnecting. ) - Libp2p Repo | Count | Level | Triage report -|-|-|- polkadot-sdk | 1023 | warn | 💔 Ignored block \(#.* -- .*\) announcement from .* because all validation slots are occupied. polkadot-sdk | 472 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Unsupported protocol. Banned, disconnecting. ) polkadot-sdk | 379 | error | 💔 Called `on_validated_block_announce` with a bad peer ID .* polkadot-sdk | 163 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Invalid justification. Banned, disconnecting. ) polkadot-sdk | 116 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Peer disconnected with inflight after backoffs. Banned, disconnecting. ) polkadot-sdk | 83 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Same block request multiple times. Banned, disconnecting. ) polkadot-sdk | 4 | warn | Re-finalized block #.* \(.*\) in the canonical chain, current best finalized is #.* polkadot-sdk | 2 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Genesis mismatch. Banned, disconnecting. ) polkadot-sdk | 2 | warn | Report .*: .* to .*. Reason: .*. Banned, disconnecting. ( Not requested block data. Banned, disconnecting. ) polkadot-sdk | 2 | warn | Can't listen on .* because: .* polkadot-sdk | 1 | warn | ❌ Error while dialing .*: .* --------- Signed-off-by: Alexandru Vasile <[email protected]> * sp-trie: minor fix to avoid possible panic during node decoding (paritytech#6486) # Description This PR is a simple fix consisting of adding a check to the process of decoding nodes of a storage proof to avoid panicking when receiving badly-constructed proofs, returning an error instead. This would close paritytech#6485 ## Integration No changes have to be done downstream, and as such the version bump should be minor. --------- Co-authored-by: Bastian Köcher <[email protected]> * migrate pallet-nomination-pool-benchmarking to benchmarking syntax v2 (paritytech#6302) Migrates pallet-nomination-pool-benchmarking to benchmarking syntax v2. Part of: * paritytech#6202 --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Giuseppe Re <[email protected]> * Migrate some pallets to benchmark v2 (paritytech#6311) Part of paritytech#6202 --------- Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Giuseppe Re <[email protected]> * Mention that account might still be required in doc for feeless if. (paritytech#6490) Co-authored-by: Bastian Köcher <[email protected]> * Pure state sync refactoring (part-1) (paritytech#6249) This pure refactoring of state sync is preparing for paritytech#4. As the rough plan in paritytech#4 (comment), there will be two PRs for the state sync refactoring. This first PR focuses on isolating the function `process_state_key_values()` as the central point for storing received state data in memory. This function will later be adapted to forward the state data directly to the DB layer for persistent sync. A follow-up PR will handle the encapsulation of `StateSyncMetadata` to support this persistent storage. Although there are many commits in this PR, each commit is small and intentionally incremental to facilitate a smoother review, please review them commit by commit. Each commit should represent an equivalent rewrite of the existing logic, with one exception paritytech@bb447b2, which has a slight deviation from the original but is correct IMHO. Please give this commit special attention during the review. * [WIP][ci] Add worfklow stopper (paritytech#4551) PR to implements workflow stopper - a custom solution to stop all workflows if one of a required jobs failed. Previously we had the same solution in GitLab and it saved a lot of compute. Because GitHub doesn't have one united pipeline and instead it has multiple workflows something like this has to be implemented. cc paritytech/ci_cd#939 * Remove `ProspectiveParachainsMode` usage in backing subsystem (paritytech#6215) Since async backing parameters runtime api is released on all networks the code in backing subsystem can be simplified by removing the usages of `ProspectiveParachainsMode` and keeping only the branches of the code under `ProspectiveParachainsMode::Enabled`. The PR does that and reworks the tests in mod.rs to use async backing. It's a preparation for paritytech#5079 --------- Co-authored-by: Alin Dima <[email protected]> Co-authored-by: command-bot <> * sp-runtime: Be a little bit more functional :D (paritytech#6526) Co-authored-by: GitHub Action <[email protected]> * `TransactionPool` API uses `async_trait` (paritytech#6528) This PR refactors `TransactionPool` API to use `async_trait`, replacing the` Pin<Box<...>>` pattern. This should improve readability and maintainability. The change is not altering any functionality. --------- Co-authored-by: GitHub Action <[email protected]> * sp-trie: correctly avoid panicking when decoding bad compact proofs (paritytech#6502) # Description Opening another PR because I added a test to check for my fix pushed in paritytech#6486 and realized that for some reason I completely forgot how to code and did not fix the underlying issue, since out-of-bounds indexing could still happen even with the check I added. This one should fix that and, as an added bonus, has a simple test used as an integrity check to make sure future changes don't accidently revert this fix. Now `sp-trie` should definitely not panic when faced with bad `CompactProof`s. Sorry about that 😅 This, like paritytech#6486, is related to issue paritytech#6485 ## Integration No changes have to be done downstream, and as such the version bump should be minor. --------- Co-authored-by: Bastian Köcher <[email protected]> * [pallet-revive] Update delegate_call to accept address and weight (paritytech#6111) Enhance the `delegate_call` function to accept an `address` target parameter instead of a `code_hash`. This allows direct identification of the target contract using the provided address. Additionally, introduce parameters for specifying a customizable `ref_time` limit and `proof_size` limit, thereby improving flexibility and control during contract interactions. --------- Co-authored-by: Alexander Theißen <[email protected]> * Fix metrics not shutting down if there are open connections (paritytech#6220) Fix prometheus metrics not shutting down if there are open connections. I fixed the same issue in the past but it broke again after a dependecy upgrade. See also: paritytech#1637 * Validator Re-Enabling (paritytech#5724) Aims to implement Stage 3 of Validator Disbling as outlined here: paritytech#4359 Features: - [x] New Disabling Strategy (Staking level) - [x] Re-enabling logic (Session level) - [x] More generic disabling decision output - [x] New Disabling Events Testing & Security: - [x] Unit tests - [x] Mock tests - [x] Try-runtime checks - [x] Try-runtime tested on westend snap - [x] Try-runtime CI tests - [ ] Re-enabling Zombienet Test (?) - [ ] SRLabs Audit Closes paritytech#4745 Closes paritytech#2418 --------- Co-authored-by: ordian <[email protected]> Co-authored-by: Ankan <[email protected]> Co-authored-by: Tsvetomir Dimitrov <[email protected]> * Migrate pallet-democracy benchmarks to benchmark v2 syntax (paritytech#6509) # Description Migrates pallet-democracy benchmarks to benchmark v2 syntax This is Part of paritytech#6202 --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: command-bot <> Co-authored-by: Dmitry Markin <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]> * Forward logging directives to Polkadot workers (paritytech#6534) This pull request forward all the logging directives given to the node via `RUST_LOG` or `-l` to the workers, instead of only forwarding `RUST_LOG`. --------- Co-authored-by: GitHub Action <[email protected]> * Support block gap created by fast sync (paritytech#5703) This is part 2 of paritytech#5406 (comment), properly handling the block gap generated during fast sync. Although paritytech#5406 remains unresolved due to the known issues in paritytech#5663, I decided to open up this PR earlier than later to speed up the overall progress. I've tested the fast sync locally with this PR, and it appears to be functioning well. (I was doing a fast sync from a discontinued archive node locally, thus the issue highlighted in paritytech#5663 (comment) was bypassed exactly.) Once the edge cases in paritytech#5663 are addressed, we can move forward by removing the body attribute from the LightState block request and complete the work on paritytech#5406. The changes in this PR are incremental, so reviewing commit by commit should provide the best clarity. cc @dmitry-markin --------- Co-authored-by: Bastian Köcher <[email protected]> * Pure state sync refactoring (part-2) (paritytech#6521) This PR is the second part of the pure state sync refactoring, encapsulating `StateSyncMetadata` as a separate entity. Now it's pretty straightforward what changes are needed for the persistent state sync as observed in the struct `StateSync`: - `state`: redirect directly to the DB layer instead of being accumulated in the memory. - `metadata`: handle the state sync metadata on disk whenever the state is forwarded to the DB, resume an ongoing state sync on a restart, etc. --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]> * Add and test events in `pallet-conviction-voting` (paritytech#6544) # Description paritytech#4613 introduced events for `pallet_conviction_voting::{vote, remove_vote, remove_other_vote}`. However: 1. it did not include `unlock` 2. the pallet's unit tests were missing an update ## Integration N/A ## Review Notes This is as paritytech#6261 was, so it is a trivial change. * Increase default trie cache size to 1GiB (paritytech#6546) The default trie cache size before was set to `64MiB`, which is quite low to achieve real speed ups. `1GiB` should be a reasonable number as the requirements for validators/collators/full nodes are much higher when it comes to minimum memory requirements. Also the cache will not use `1GiB` from the start and fills over time. The setting can be changed by setting `--trie-cache-size BYTE_SIZE`. --------- Co-authored-by: GitHub Action <[email protected]> * Bridges testing improvements (paritytech#6536) This PR includes: - Refactored integrity tests to support standalone deployment of `pallet-bridge-messages`. - Refactored the `open_and_close_bridge_works` test case to support multiple scenarios, such as: 1. A local chain opening a bridge. 2. Sibling parachains opening a bridge. 3. The relay chain opening a bridge. - Previously, we added instance support for `pallet-bridge-relayer` but overlooked updating the `DeliveryConfirmationPaymentsAdapter`. --------- Co-authored-by: GitHub Action <[email protected]> * Migrate pallet-scheduler benchmark to v2 (paritytech#6292) Part of: - paritytech#6202. --------- Signed-off-by: Xavier Lau <[email protected]> Co-authored-by: Giuseppe Re <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> * Removes constraint in `BlockNumberProvider` from treasury (paritytech#6522) paritytech#3970 updated the treasury pallet to support relay chain block number provider. However, it added a constraint to the BlockNumberProvider to have the same block number type as frame_system: ```rust type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>; ``` This PR removes that constraint as suggested by @gui1117 * add profile * exclude trigger on push --------- Signed-off-by: Adrian Catangiu <[email protected]> Signed-off-by: georgepisaltu <[email protected]> Signed-off-by: linning <[email protected]> Signed-off-by: Alexandru Vasile <[email protected]> Signed-off-by: Xavier Lau <[email protected]> Co-authored-by: Joseph Zhao <[email protected]> Co-authored-by: Giuseppe Re <[email protected]> Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Alin Dima <[email protected]> Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Nazar Mokrynskyi <[email protected]> Co-authored-by: Michal Kucharczyk <[email protected]> Co-authored-by: Sebastian Kunert <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]> Co-authored-by: jpserrat <[email protected]> Co-authored-by: davidk-pt <[email protected]> Co-authored-by: DavidK <[email protected]> Co-authored-by: Kian Paimani <[email protected]> Co-authored-by: clangenb <[email protected]> Co-authored-by: PG Herveou <[email protected]> Co-authored-by: Doordashcon <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: Xavier Lau <[email protected]> Co-authored-by: Jeeyong Um <[email protected]> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: Andrii <[email protected]> Co-authored-by: Branislav Kontur <[email protected]> Co-authored-by: Shawn Tabrizi <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Andrei Eres <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Michał Gil <[email protected]> Co-authored-by: Dónal Murray <[email protected]> Co-authored-by: Muharem <[email protected]> Co-authored-by: Kazunobu Ndong <[email protected]> Co-authored-by: Dmitry Markin <[email protected]> Co-authored-by: Alexandru Vasile <[email protected]> Co-authored-by: Stephane Gurgenidze <[email protected]> Co-authored-by: georgepisaltu <[email protected]> Co-authored-by: Viraj Bhartiya <[email protected]> Co-authored-by: Alexander Samusev <[email protected]> Co-authored-by: Iulian Barbu <[email protected]> Co-authored-by: Cyrill Leutwiler <[email protected]> Co-authored-by: NingLin-P <[email protected]> Co-authored-by: Tobi Demeco <[email protected]> Co-authored-by: Guillaume Thiolliere <[email protected]> Co-authored-by: Liu-Cheng Xu <[email protected]> Co-authored-by: Tsvetomir Dimitrov <[email protected]> Co-authored-by: Ermal Kaleci <[email protected]> Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: tmpolaczyk <[email protected]> Co-authored-by: Maciej <[email protected]> Co-authored-by: ordian <[email protected]> Co-authored-by: Ankan <[email protected]> Co-authored-by: Alexandre R. Baldé <[email protected]> Co-authored-by: Xavier Lau <[email protected]> Co-authored-by: gupnik <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
This issue tracks the removal of
pallet::getter
in all pallets, as per #223. The preferred syntax isKey::<T>::get()
.This approach avoids a huge PR and lots of merge conflicts, a mistake I already made when I tried to perform this task last year.
As these PRs introduce breaking changes, a
prdoc
file is required. An example is this one I wrote for #3371I suggest to use the prdoc cli tool.
Bridges:
pallet-bridge-grandpa
pallet-bridge-messages
pallet-bridge-relayers
pallet-xcm-bridge-hub-router
snowbridge-pallet-ethereum-client
snowbridge-pallet-inbound-queue
snowbridge-pallet-outbound-queue
snowbridge-pallet-system
Cumulus:
cumulus-pallet-aura-ext
removedpallet::getter
usage from cumulus pallets #3471pallet-collator-selection
removedpallet::getter
usage from cumulus pallets #3471cumulus-pallet-parachain-system
removedpallet::getter
usage from cumulus pallets #3471pallet-parachain-template
removedpallet::getter
from example pallets #3371staging-parachain-info
removedpallet::getter
usage from cumulus pallets #3471Polkadot:
polkadot-runtime-common
Removedpallet::getter
usage from Polkadot Runtime pallets #3660polkadot-runtime-parachains
Removedpallet::getter
usage from Polkadot Runtime pallets #3660pallet-xcm
xcm-simulator-example
xcm-simulator-fuzzer
FRAME:
pallet-template
removedpallet::getter
from example pallets #3371pallet-alliance
Removedpallet::getter
usage frompallet-alliance
#3738pallet-aura
Pallet AURA: remove pallet::getter macro and write the corresponding code #3350pallet-authority-discovery
Removepallet::getter
usage from authority-discovery pallet #4091pallet-babe
pallet-balances
pallet-beefy
Removedpallet::getter
usage from Beefy and MMR pallets #3740pallet-beefy-mmr
Removedpallet::getter
usage from Beefy and MMR pallets #3740pallet-bounties
Remove pallet::getter usage from the bounties and child-bounties pallets #4392pallet-child-bounties
Remove pallet::getter usage from the bounties and child-bounties pallets #4392pallet-collective
Removedpallet::getter
usage frompallet-collective
#3456pallet-contracts-mock-network
Remove pallet::getter usage from pallet-contracts-mock-network #4417pallet-democracy
Remove pallet::getter usage from the democracy pallet #4472pallet-election-provider-multi-phase
Remove pallet::getter macro usage from pallet-election-provider-multi-phase #4487pallet-elections-phragmen
Remove pallet::getter macro usage from pallet-elections-phragmen #4513pallet-example-basic
removedpallet::getter
from example pallets #3371pallet-example-kitchensink
removedpallet::getter
from example pallets #3371pallet-example-offchain-worker
removedpallet::getter
from example pallets #3371pallet-fast-unstake
Remove usage of the pallet::getter macro from pallet-fast-unstake #4514pallet-grandpa
pallet-identity
pallet-im-online
Remove getters fromim-online
pallet #3589pallet-insecure-randomness-collective-flip
pallet-membership
pallet-mmr
Removedpallet::getter
usage from Beefy and MMR pallets #3740pallet-nft-fractionalization
pallet-node-authorization
pallet-offences
remove pallet::getter from pallet-offences #6027pallet-proxy
pallet-recovery
pallet-sassafras
pallet-scored-pool
pallet-session
pallet-staking
pallet-state-trie-migration
pallet-sudo
removedpallet::getter
frompallet-sudo
#3370frame-support
frame-system
pallet-timestamp
remove pallet::getter usage from pallet-timestamp #3374pallet-tips
pallet-transaction-payment
pallet-transaction-storage
pallet-treasury
pallet-vesting
substrate-test-runtime
cc @kianenigma @shawntabrizi
The text was updated successfully, but these errors were encountered: