-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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: Delegating an amount below the minimum returns a misleading error message #25337
Comments
cc: @joncinque |
Bah, sorry about that, we need to actually add a new error and return that finally, based on another feature flag probably |
Bummer. It is insufficient to just reword the error message? |
I think it could cause issues, since during rollout some nodes would produce the old error message, and others produce the new one. It depends on how those error messages are used by the runtime, but I'm cautious due to this note: solana/sdk/program/src/instruction.rs Lines 220 to 230 in 84f1e5c
Maybe @jackcmay can tell us for sure what we should do since he put in #17864 |
Yeah, changing the |
Problem
When the following features are enabled, delegating a stake amount below the minimum will return with an error saying "Error: split amount is more than is staked", which is misleading since the error was caused during
delegate
and notsplit
.Features:
Code in question:
solana/sdk/program/src/stake/instruction.rs
Lines 35 to 36 in c49efae
Originally encountered in #25336
Proposed Solution
Reword the error message.Add a new error behind a feature-gate.
The text was updated successfully, but these errors were encountered: