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

Feature/plmc 215 evaluator slashing #56

Merged
merged 10 commits into from
Aug 3, 2023

Conversation

JuaniRios
Copy link
Contributor

No description provided.

@JuaniRios JuaniRios requested a review from lrazovic July 31, 2023 14:35
@JuaniRios JuaniRios self-assigned this Jul 31, 2023
@linear
Copy link

linear bot commented Jul 31, 2023

@JuaniRios JuaniRios marked this pull request as draft July 31, 2023 14:37
@JuaniRios JuaniRios marked this pull request as ready for review August 2, 2023 16:26

type EvaluatorSlash: Get<Percent>;

type TreasuryAccount: Get<AccountIdOf<Self>>;
Copy link
Member

Choose a reason for hiding this comment

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

The FRAME's pallet-staking uses OnUnbalanced<NegativeImbalanceOf<Self>> instead of Get<AccountIdOf<Self>> (src: https://github.com/paritytech/substrate/blob/f7e81b9be4fb3f2906a3768fe74d70c8228ab553/frame/staking/src/pallet/mod.rs#L167) to send the slashed amount to the Treasury. This allows to put in the runtime configuration:

...
type TreasuryAccount = Treasury;
...

instead of:

parameter_types! {
	pub TreasuryAccount: AccountId = [69u8; 32].into();
}
...
type TreasuryAccount = TreasuryAccount;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you add that modification?

Copy link
Member

@lrazovic lrazovic Aug 3, 2023

Choose a reason for hiding this comment

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

Postponed since the pallet-treasury still uses the Currency trait. (src: https://github.com/paritytech/substrate/blob/f7e81b9be4fb3f2906a3768fe74d70c8228ab553/frame/treasury/src/lib.rs#L148). To check the viability/need/want to mix the different Traits.

@lrazovic lrazovic merged commit 289efd9 into main Aug 3, 2023
@lrazovic lrazovic deleted the feature/plmc-215-evaluator-slashing branch October 11, 2023 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants