Skip to content

chore: revamp cleanups#1604

Open
ipapandinas wants to merge 8 commits intomasterfrom
chore/revamp-cleanup
Open

chore: revamp cleanups#1604
ipapandinas wants to merge 8 commits intomasterfrom
chore/revamp-cleanup

Conversation

@ipapandinas
Copy link
Contributor

@ipapandinas ipapandinas commented Mar 17, 2026

Pull Request Summary

This PR performs the following cleanups:

  • Remove DynamicPercentage variant
  • Remove slot_number_args
  • Remove MaxNumberOfContractsLegacy config parameter
  • Remove Oracle, OracleMembership, PriceAggregator and StaticPrice pallets and all related code

@ipapandinas ipapandinas added shiden related to shiden runtime astar Related to Astar shibuya related to shibuya runtime This PR/Issue is related to the topic “runtime”. labels Mar 17, 2026
Copy link
Contributor

@Dinonard Dinonard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick glance, LGTM overall

Comment on lines +110 to +115
OldTierThreshold::DynamicPercentage { percentage, .. } => {
TierThreshold::FixedPercentage {
required_percentage: *percentage,
}
}
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't exist in live chains anymore though, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, it shouldn’t exist on current live chains. I kept the DynamicPercentage arm for historical-storage compatibility in the migration, so old state still upgrades safely if encountered.

@ipapandinas
Copy link
Contributor Author

/bench astar,shibuya,shiden all

@github-actions
Copy link

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/23336716016.
Please wait for a while.
Branch: chore/revamp-cleanup
SHA: cbbfb86

@ipapandinas
Copy link
Contributor Author

/bench astar,shibuya,shiden all

@github-actions
Copy link

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/23348193204.
Please wait for a while.
Branch: chore/revamp-cleanup
SHA: cbbfb86

@ipapandinas
Copy link
Contributor Author

/bench astar,shibuya all

@github-actions
Copy link

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/23443949948.
Please wait for a while.
Branch: chore/revamp-cleanup
SHA: cbbfb86

@github-actions
Copy link

Benchmarks have been finished.
You can download artifacts if exists https://github.com/AstarNetwork/Astar/actions/runs/23443949948.

@ipapandinas
Copy link
Contributor Author

/bench shiden all

@github-actions
Copy link

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/23453287853.
Please wait for a while.
Branch: chore/revamp-cleanup
SHA: cbbfb86

@ipapandinas
Copy link
Contributor Author

/bench shiden all

@github-actions
Copy link

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/23498145389.
Please wait for a while.
Branch: chore/revamp-cleanup
SHA: b0cdebd

@github-actions
Copy link

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/23498145389.
Please wait for a while.
Branch: chore/revamp-cleanup
SHA: ba59d73

@ipapandinas
Copy link
Contributor Author

/bench shiden all

@github-actions
Copy link

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/23536786154.
Please wait for a while.
Branch: chore/revamp-cleanup
SHA: ba59d73

@ipapandinas
Copy link
Contributor Author

/bench shiden all

@github-actions
Copy link

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/23546388504.
Please wait for a while.
Branch: chore/revamp-cleanup
SHA: ba59d73

@Dinonard
Copy link
Contributor

@ipapandinas it should be enough to bench dApp staking & inflation.
Those are impacted by the cleanup.

For the rest, we can leave it for later (separate issue).

@github-actions
Copy link

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/23546388504.
Please wait for a while.
Branch: chore/revamp-cleanup
SHA: ba59d73

@github-actions
Copy link

Benchmarks have been finished.
You can download artifacts if exists https://github.com/AstarNetwork/Astar/actions/runs/23546388504.

@ipapandinas ipapandinas marked this pull request as ready for review March 25, 2026 19:22
@ipapandinas
Copy link
Contributor Author

@Dinonard I managed to make the benchmark pass

>;

parameter_types! {
pub const DappStakingPruneMaxPeriod: u32 = 105;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very precise, but it would be better to give it a larger number, in case new periods start before you migrate.

You could put some hard limit, and read the actual number of values off the chain.
Hard limit ensures iteration is bounded, and reading the value off the chain ensures it's exactly what you need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion but I’m preserving PeriodEnd for now (removed from the migration). It is tiny in storage and it is still use in rewards claiming. I will cleanup it in the following PR for #1589.

@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Health
chain-extensions/types/assets/src 0% 0%
precompiles/dapp-staking/src/test 0% 0%
precompiles/substrate-ecdsa/src 74% 0%
pallets/collective-proxy/src 94% 0%
pallets/dapp-staking/src 83% 0%
pallets/dapp-staking/src/test 0% 0%
pallets/unified-accounts/src 80% 0%
pallets/vesting-mbm/src 87% 0%
pallets/inflation/src 58% 0%
precompiles/dispatch-lockdrop/src 89% 0%
pallets/collator-selection/src 82% 0%
pallets/dynamic-evm-base-fee/src 85% 0%
pallets/astar-xcm-benchmarks/src 86% 0%
precompiles/unified-accounts/src 100% 0%
pallets/astar-xcm-benchmarks/src/fungible 100% 0%
pallets/democracy-mbm/src 30% 0%
primitives/src 55% 0%
chain-extensions/types/unified-accounts/src 0% 0%
chain-extensions/pallet-assets/src 55% 0%
precompiles/dapp-staking/src 89% 0%
pallets/astar-xcm-benchmarks/src/generic 100% 0%
chain-extensions/unified-accounts/src 0% 0%
pallets/ethereum-checked/src 76% 0%
precompiles/assets-erc20/src 77% 0%
precompiles/sr25519/src 69% 0%
precompiles/xcm/src 69% 0%
primitives/src/xcm 66% 0%
pallets/dapp-staking/src/benchmarking 94% 0%
pallets/xc-asset-config/src 57% 0%
pallets/dapp-staking/rpc/runtime-api/src 0% 0%
Summary 73% (3715 / 5070) 0% (0 / 0)

Minimum allowed line rate is 50%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

astar Related to Astar runtime This PR/Issue is related to the topic “runtime”. shibuya related to shibuya shiden related to shiden runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants