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

[Docs] Update "Adding On-Chain Module Parameters" #839

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Sep 26, 2024

Summary

Updates "Adding On-Chain Module Parameters" doc to:

  1. Reflect recent changes in param update testing (see: [Testing] refractor: param update E2E tests as integration tests #826)
  2. Group related steps
  3. Improve consistency between and readability of code snippets
  4. Fill in gaps:
  • Omitted steps/files.
  • Adding individual param updates (MsgUpdateParam) to a module which doesn't already support it.

Issue

Type of change

Select one or more from the following:

Testing

  • Documentation: make docusaurus_start; only needed if you make doc changes
  • 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

  • I have tested my changes using the available tooling
  • I have commented my code
  • 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

@bryanchriswhite bryanchriswhite added the documentation Improvements or additions to documentation label Sep 26, 2024
@bryanchriswhite bryanchriswhite self-assigned this Sep 26, 2024
- Add logger values
- Add error logs
- Ensure gRPC status error returns
- Fix test param field argument
bryanchriswhite added a commit that referenced this pull request Oct 14, 2024
## Summary

```bash
ignite scaffold message update-param --module supplier --signer authority name as_type --response params
```

Adds the `MsgUpdateParam` message so that the supplier module may update
individual parameters following section 0 from the updated docs (see
#839).

## Dependencies

- #809
- #843 
- #844 
- #845
- #847
- #848

## Dependents
  
- #850
- #857
- #852 
- #861 
- #851 
- #863 

## Issue

- #612

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **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
- [x] 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>
bryanchriswhite added a commit that referenced this pull request Oct 14, 2024
## Summary

- Adds the `min_stake` param to the supplier module following section 0
from the updated docs (see
#839).
- Adds missing validation unit test coverage around existing application
module param, max_delegated_gateways.
- Pushes validation from the MsgUpdateParam handler down into
MsgUpdateParam#ValidateBasic().
- Ensures Params#Valid() is called prior to setting params in
MsgUpdateParam handler.
- Updates error returns in the same handler to ensure all error paths
return appropriate gRPC status errors.

## Dependencies

- #809
- #843 
- #844 
- #845
- #847
- #848
- #849

## Dependents
  
- #857
- #852 
- #861 
- #851 
- #863 

## Issue

- #612

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **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
- [x] 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>
bryanchriswhite added a commit that referenced this pull request Oct 14, 2024
## Summary

The "adding_params.md" doc has (or will have) changed substantially (see
#839) since the shared module's param logic was last updated. This PR
aligns the shared module's param logic with the snippets in the updated
docs.

Specifically, this refresh includes:
- Moving validation logic from `msgServer#UpdateParam()` to
`MsgUpdateParam#ValidateBasic()`.
- Replacing magic strings of param names with their standard variable
counterparts (i.e. `sharedtypes.Param...`).
- Improving some local variable names.
- Replacing usages of `interface{}` with `any`.

## Dependencies

- #809
- #843 
- #844 
- #845
- #847
- #848
- #849
- #850
- #857

## Dependents

- #851 
- #861 

## Issue

- #612

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **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
- [ ] 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>
bryanchriswhite added a commit that referenced this pull request Oct 14, 2024
## Summary

The "adding_params.md" doc has (or will have) changed substantially (see
#839) since the proof module's param logic was last updated. This PR
aligns the proof module's param logic with the snippets in the updated
docs.

Specifically, this refresh includes:
- Moving validation logic from `msgServer#UpdateParam()` to
`MsgUpdateParam#ValidateBasic()`.
- Replacing magic strings of param names with their standard variable
counterparts (i.e. `prooftypes.Param...`).
- Improving some local variable names.
- Replacing usages of `interface{}` with `any`.
- Improving validation for all coin type params to be consistent with
application, gateway, and supplier coin type validation.

# Dependencies

- #809
- #843 
- #844 
- #845
- #847
- #848
- #849
- #850
- #857
- #852

## Dependents

- #861 

## Issue

- #612

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **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
- [ ] 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>
bryanchriswhite added a commit that referenced this pull request Oct 14, 2024
## Summary

The "adding_params.md" doc has (or will have) changed substantially (see
#839) since the shared module's param logic was last updated. This PR
aligns the service module's param logic with the snippets in the updated
docs.

Specifically, this refresh includes:
- Moving validation logic from `msgServer#UpdateParam()` to
`MsgUpdateParam#ValidateBasic()`.
- Replacing magic strings of param names with their standard variable
counterparts (i.e. `prooftypes.Param...`).
- Improving some local variable names.
- Replacing usages of `interface{}` with `any`.
- Improving validation for all coin type params to be consistent with
application, gateway, and supplier coin type validation.

## Dependencies

- #809
- #843 
- #844 
- #845
- #847
- #848
- #849
- #850
- #857
- #852 
- #851

## Issue

- #612

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Testing

- [ ] **Documentation**: `make docusaurus_start`; only needed if you
make doc changes
- [ ] **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

- [ ] I have tested my changes using the available tooling
- [ ] I have commented my code
- [ ] 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>
@bryanchriswhite bryanchriswhite added governance Governance related changes on-chain On-chain business logic labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation governance Governance related changes on-chain On-chain business logic
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

1 participant