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

fix non-candidate slashing #1334

Merged
merged 6 commits into from
Aug 24, 2024
Merged

fix non-candidate slashing #1334

merged 6 commits into from
Aug 24, 2024

Conversation

ermalkaleci
Copy link
Contributor

@ermalkaleci ermalkaleci commented Aug 21, 2024

Pull Request Summary

Non candidates should be slash-able until lock period ends
Add call to update slash destination

@ermalkaleci ermalkaleci 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 Aug 21, 2024
ipapandinas
ipapandinas previously approved these changes Aug 22, 2024
Copy link

Code Coverage

Package Line Rate Branch Rate Health
chain-extensions/unified-accounts/src 0% 0%
pallets/astar-xcm-benchmarks/src/fungible 100% 0%
pallets/xc-asset-config/src 50% 0%
primitives/src/xcm 65% 0%
pallets/collator-selection/src 92% 0%
pallets/dapp-staking-v3/rpc/runtime-api/src 0% 0%
pallets/static-price-provider/src 85% 0%
pallets/unified-accounts/src 86% 0%
chain-extensions/types/assets/src 0% 0%
precompiles/dapp-staking-v3/src/test 0% 0%
precompiles/assets-erc20/src 78% 0%
pallets/dapp-staking-v3/src/benchmarking 98% 0%
precompiles/substrate-ecdsa/src 74% 0%
pallets/dapp-staking-v3/src 84% 0%
precompiles/dapp-staking-v3/src 90% 0%
precompiles/unified-accounts/src 100% 0%
pallets/ethereum-checked/src 74% 0%
pallets/dapp-staking-migration/src 0% 0%
pallets/astar-xcm-benchmarks/src 86% 0%
pallets/dynamic-evm-base-fee/src 89% 0%
chain-extensions/pallet-assets/src 56% 0%
pallets/dapp-staking-v3/src/test 0% 0%
primitives/src 59% 0%
pallets/inflation/src 93% 0%
pallets/astar-xcm-benchmarks/src/generic 100% 0%
precompiles/xcm/src 71% 0%
chain-extensions/types/unified-accounts/src 0% 0%
precompiles/sr25519/src 64% 0%
precompiles/dispatch-lockdrop/src 86% 0%
pallets/collective-proxy/src 86% 0%
pallets/price-aggregator/src 82% 0%
Summary 77% (3573 / 4636) 0% (0 / 0)

Minimum allowed line rate is 50%

@@ -198,7 +198,7 @@ pub mod pallet {
/// Candidates who initiated leave intent or kicked.
#[pallet::storage]
pub type NonCandidates<T: Config> =
StorageMap<_, Twox64Concat, T::AccountId, (SessionIndex, BalanceOf<T>), ValueQuery>;
StorageMap<_, Twox64Concat, T::AccountId, (SessionIndex, BalanceOf<T>), OptionQuery>;
Copy link
Contributor

Choose a reason for hiding this comment

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

I thought of this during my initial review. Better to use Option here, as a default value could have otherwise misled the system.

@ipapandinas
Copy link
Contributor

closes #1334

@ermalkaleci ermalkaleci merged commit 63a1bb5 into master Aug 24, 2024
8 checks passed
@ermalkaleci ermalkaleci deleted the fix/non-candidate-slashing branch August 24, 2024 21:34
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