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

stake-contract: use StakeConfig for minimum_stake and slash warning #3233

Merged
merged 12 commits into from
Dec 20, 2024

Conversation

herr-seppia
Copy link
Member

@herr-seppia herr-seppia commented Dec 19, 2024

  • Change stake contract to use configurable values instead of const
  • Deprecate MINIMUM_STAKE (use DEFAULT_MINIMUM_STAKE instead)
  • Reorganize imports for stake-contract

Neotamandua
Neotamandua previously approved these changes Dec 19, 2024
Copy link
Member

@Neotamandua Neotamandua left a comment

Choose a reason for hiding this comment

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

LGTM, but I added some small nits

contracts/stake/src/state.rs Show resolved Hide resolved
contracts/stake/src/state.rs Show resolved Hide resolved
contracts/stake/src/state.rs Outdated Show resolved Hide resolved
Copy link
Member

@Neotamandua Neotamandua left a comment

Choose a reason for hiding this comment

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

also do we maybe wanna move the pub const MINIMUM_STAKE to the top, where the other const are defined?

@herr-seppia
Copy link
Member Author

also do we maybe wanna move the pub const MINIMUM_STAKE to the top, where the other const are defined?

I tried to change as less as possible
Take into consideration that future execution core versions will rename those const into "DEFAULT_" as soon as they are not used anymore by clients (wallets should ask the node their current config)

Anyway, for now using the CONST is still safe since we are not planning to change it

Copy link
Member

@moCello moCello left a comment

Choose a reason for hiding this comment

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

Aside the conf vs config name, LGTM

Copy link
Member

@moCello moCello left a comment

Choose a reason for hiding this comment

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

LGTM

@herr-seppia herr-seppia merged commit 09def4b into master Dec 20, 2024
16 checks passed
@herr-seppia herr-seppia deleted the stake-conf branch December 20, 2024 10:37
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.

3 participants