Skip to content
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

dApp Staking v3 improvements #1114

Merged
merged 8 commits into from
Dec 22, 2023
Merged

Conversation

Dinonard
Copy link
Member

@Dinonard Dinonard commented Dec 21, 2023

Pull Request Summary

Various post-testnet launch improvements.

Maintenance Mode & Migration

Migration doesn't force maintenance mode unless it's really needed. This allows dApp staking v3 to be used before the entire v2 storage has been cleaned up.

Migration Benchmarks

Redid benchmarks for the migration to measure how much is cleaned up in a bulk.
This is useful since the major bottleneck when doing cleanup is the PoV size, which is grossly overestimated
when only one value is cleaned up. Because trie nodes are reused for multiple entries, since they belong to the same pallet, we end up with lesser overestimates if we do bulk benchmarks.

Missing OnRuntimeUpgrade Setting

Added setting of current era info when runtime is upgraded - otherwise it would incorrectly start from zero.
Even if that happens, it's not a breaking bug, but it's incorrect to look at.

Force Calls For Testing

Added two additional root-only calls to be used for dApp staking v3 testing.
They will be removed prior to production network launch.

TODOs

  • re-run & integrate migration benchmarks

@Dinonard Dinonard added the runtime This PR/Issue is related to the topic “runtime”. label Dec 21, 2023
@Dinonard
Copy link
Member Author

/bench shibuya-dev pallet_dapp_staking_migration

Copy link

Benchmarks job is scheduled at https://github.com/AstarNetwork/Astar/actions/runs/7289356746.
Please wait for a while.
Branch: feat/dapp-staking-v3-improvements
SHA: a432dff

Copy link

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

@Dinonard Dinonard marked this pull request as ready for review December 21, 2023 15:24
@Dinonard Dinonard added the shibuya related to shibuya label Dec 21, 2023
ashutoshvarma
ashutoshvarma previously approved these changes Dec 22, 2023
Copy link
Member

@ashutoshvarma ashutoshvarma left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

Code Coverage

Package Line Rate Branch Rate Health
precompiles/assets-erc20/src 81% 0%
pallets/dapps-staking/src/pallet 85% 0%
pallets/ethereum-checked/src 48% 0%
pallets/dapps-staking/src 81% 0%
chain-extensions/types/xvm/src 0% 0%
pallets/dynamic-evm-base-fee/src 81% 0%
pallets/xvm/src 40% 0%
precompiles/dapp-staking-v3/src 90% 0%
precompiles/substrate-ecdsa/src 74% 0%
primitives/src 66% 0%
precompiles/dapps-staking/src 94% 0%
pallets/dapp-staking-v3/src/test 0% 0%
precompiles/unified-accounts/src 100% 0%
pallets/dapp-staking-v3/rpc/runtime-api/src 0% 0%
precompiles/sr25519/src 64% 0%
precompiles/dapp-staking-v3/src/test 0% 0%
pallets/unified-accounts/src 84% 0%
pallets/dapp-staking-migration/src 39% 0%
precompiles/xcm/src 72% 0%
chain-extensions/types/assets/src 0% 0%
chain-extensions/xvm/src 0% 0%
chain-extensions/unified-accounts/src 0% 0%
pallets/collator-selection/src 69% 0%
primitives/src/xcm 66% 0%
chain-extensions/types/unified-accounts/src 0% 0%
pallets/dapp-staking-v3/src 78% 0%
pallets/inflation/src 70% 0%
precompiles/xvm/src 74% 0%
pallets/dapp-staking-v3/src/benchmarking 0% 0%
chain-extensions/pallet-assets/src 0% 0%
pallets/xc-asset-config/src 53% 0%
pallets/block-rewards-hybrid/src 87% 0%
Summary 67% (3142 / 4658) 0% (0 / 0)

Minimum allowed line rate is 50%

@Dinonard Dinonard merged commit 036c146 into master Dec 22, 2023
8 checks passed
@Dinonard Dinonard deleted the feat/dapp-staking-v3-improvements branch December 22, 2023 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runtime This PR/Issue is related to the topic “runtime”. shibuya related to shibuya
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants