-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Gateway] Enforce minimum stake when staking (#843)
## Summary 1. Adds minimum stake validation to the gateway stake message handler (i.e. total stake must be >= minimum stake). 2. Updates error returns in the same handler to ensure all error paths return appropriate gRPC status errors. 3. Replaces some warn and error level logs with info level, which I believe is more appropriate (until we have a practical debug level, at which point they should become debug logs). ## Dependencies - #809 ## Dependents - #844 - #845 - #847 - #848 - #849 - #850 - #857 ## Issue Gateway staking min stake validation. - #612 ## Type of change Select one or more from the following: - [x] New feature, functionality or library - [x] Consensus breaking; add the `consensus-breaking` label if so. See #791 for details - [ ] Bug fix - [ ] Code health or cleanup - [ ] Documentation - [ ] Other (specify) ## Testing <!-- READ & DELETE: - Documentation changes: only keep this if you're making documentation changes - Unit Testing: Remove this if you didn't make code changes - E2E Testing: Remove this if you didn't make code changes - See the quickstart guide for instructions: https://dev.poktroll.com/developer_guide/quickstart - DevNet E2E Testing: Remove this if you didn't make code changes - THIS IS VERY EXPENSIVE: only do it after all the reviews are complete. - Optionally run `make trigger_ci` if you want to re-trigger tests without any code changes - If tests fail, try re-running failed tests only using the GitHub UI as shown [here](https://github.com/pokt-network/poktroll/assets/1892194/607984e9-0615-4569-9452-4c730190c1d2) --> - [ ] **Documentation**: `make docusaurus_start`; only needed if you make doc changes - [x] **Unit Tests**: `make go_develop_and_test` - [ ] **LocalNet E2E Tests**: `make test_e2e` - [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR. ## Sanity Checklist - [x] I have tested my changes using the available tooling - [x] I have commented my code - [x] I have performed a self-review of my own code; both comments & source code - [ ] I create and reference any new tickets, if applicable - [ ] I have left TODOs throughout the codebase, if applicable --------- Co-authored-by: Redouane Lakrache <r3d0ne@gmail.com> Co-authored-by: Daniel Olshansky <olshansky.daniel@gmail.com> Co-authored-by: red-0ne <red-0ne@users.noreply.github.com>
- Loading branch information
1 parent
1fafa38
commit a752b66
Showing
2 changed files
with
86 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters