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

Consistent params validation #394

Merged
merged 9 commits into from
Oct 18, 2022
Merged

Consistent params validation #394

merged 9 commits into from
Oct 18, 2022

Conversation

shaspitz
Copy link
Contributor

Consumer genesis params were previously not validated on ValidateGenesis, now they are. This is consistent with how validation is done for provider genesis. These changes are needed for #393

Note genesis param validation may be redundant with the checks that happen internally for SetParams in InitGenesis. An alternative to the current changes in this PR is removing genesis param validation altogether from consumer and provider. No matter what, we should be consistent between consumer and provider

Copy link
Contributor

@mpoke mpoke left a comment

Choose a reason for hiding this comment

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

LGTM. See my comments below.

x/ccv/consumer/types/params.go Outdated Show resolved Hide resolved
x/ccv/consumer/types/params.go Outdated Show resolved Hide resolved
x/ccv/consumer/types/params.go Show resolved Hide resolved
x/ccv/provider/types/params.go Show resolved Hide resolved
x/ccv/types/shared_params.go Outdated Show resolved Hide resolved
Copy link
Contributor

@sainoe sainoe left a comment

Choose a reason for hiding this comment

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

LGTM! Just two tiny adjustments in x/ccv/consumer/types/params_test.go

x/ccv/consumer/types/params_test.go Outdated Show resolved Hide resolved
x/ccv/consumer/types/params_test.go Outdated Show resolved Hide resolved
mpoke and others added 3 commits October 18, 2022 11:31
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
@danwt danwt merged commit 27e55b4 into main Oct 18, 2022
@danwt danwt deleted the params-validation branch October 18, 2022 11:48
danwt pushed a commit that referenced this pull request Oct 23, 2022
commit 3f9100a
Author: Shawn Marshall-Spitzbart <44221603+smarshall-spitzbart@users.noreply.github.com>
Date:   Thu Oct 20 10:47:27 2022 -0700

    Replace hardcoded constants with params (#393)

    * changes

    * edits

    * Update params_test.go

    * small

    * Update genesis_test.go

    * remove "num" from historical entries param

    * comment

    * use params p1

    * use params p2

    * use params p3

    * p4

    * change default transfer timeout period

    * Update proposal_test.go

    * default historical entries

    * is negative

    * add test case

    * forgot one

    * comment

commit 00ea78b
Author: Shawn Marshall-Spitzbart <44221603+smarshall-spitzbart@users.noreply.github.com>
Date:   Thu Oct 20 08:15:57 2022 -0700

    Importable e2e tests (#401)

commit 9dda4b6
Author: Marius Poke <marius.poke@posteo.de>
Date:   Tue Oct 18 16:36:08 2022 +0200

    Fixing and updating QA plan (#375)

    * fixing and updating QA plan

    * add link to 4.07 e2e test

    * add link to issue

    * fix typo

    * updating links

    * Update docs/quality_assurance.md

    Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>

    * remove ambigous concern

    * Patches qa plan with diff testing changes (#399)

    * Start changes (to be reverted)

    * Revert "Start changes (to be reverted)"

    This reverts commit 330ee3a.

    * Update QA plan

    Co-authored-by: Daniel <danwtisdall@gmail.com>

    * markdown linter

    * formatting

    Co-authored-by: Shawn Marshall-Spitzbart <44221603+smarshall-spitzbart@users.noreply.github.com>
    Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
    Co-authored-by: Daniel T <30197399+danwt@users.noreply.github.com>
    Co-authored-by: Daniel <danwtisdall@gmail.com>

commit 27e55b4
Author: Shawn Marshall-Spitzbart <44221603+smarshall-spitzbart@users.noreply.github.com>
Date:   Tue Oct 18 04:48:26 2022 -0700

    Consistent params validation (#394)

    * changes

    * Update shared_params.go

    * Create params_test.go

    * corrections

    * remove println

    * Update x/ccv/consumer/types/params_test.go

    Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>

    * Update x/ccv/consumer/types/params_test.go

    Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>

    * fixing TestValidateParams

    Co-authored-by: Marius Poke <marius.poke@posteo.de>
    Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
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.

4 participants