Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

remove status and minStake #401

Merged
merged 1 commit into from
Dec 21, 2023
Merged

remove status and minStake #401

merged 1 commit into from
Dec 21, 2023

Conversation

cryptoAtwill
Copy link
Collaborator

@cryptoAtwill cryptoAtwill commented Dec 19, 2023

This PR removes the minStake and status from the GATEWAY contracts.

Previously we had this as we only have collateral based PermissionMode and the idea is to use these parameters to control in the Gateway to enforce some control over different subnets. But now we are moving towards different PermissionMode and these parameters no longer required.

Note that minStake is a parameter applied to all subnets created, but for PermissionMode.Federated, there is no collateral requirements, so a minStake in the Gateway must be 0. Anything above zero will prevent Federated subnet to be register in the gateway. If minStake is always 0, just remove this parameter.

At the same time, status will be deprecated as well as collateral alone does not manage the status of the subnet. Overall, subnets are managing their own stake requirements and status, so that the gateway does not really need to be aware of subnet’s status and status is not used anywhere except for listing subnets. Subnet’s status is managed in SubnetActor now, in bootstrapped and killed parameters, Gateway no longer needs to maintain the status.

@raulk
Copy link
Contributor

raulk commented Dec 20, 2023

@cryptoAtwill could you elaborate on the context and the motivation, for other team mates and contributors to follow?

@raulk raulk requested review from raulk, snissn and dnkolegov December 21, 2023 00:18
@raulk
Copy link
Contributor

raulk commented Dec 21, 2023

Thanks for the description, @cryptoAtwill! This is the operative point for me:

Overall, subnets are managing their own stake requirements and status, so that the gateway does not really need to be aware of subnet’s status and status is not used anywhere except for listing subnets.

@raulk
Copy link
Contributor

raulk commented Dec 21, 2023

LGTM -- feel free to merge at your convenience, @cryptoAtwill!

@cryptoAtwill cryptoAtwill merged commit 8632617 into dev Dec 21, 2023
8 checks passed
@cryptoAtwill cryptoAtwill deleted the remove-minStake branch December 21, 2023 07:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants