feat(e2e): allow customizing genesis parameters on the manifest#3969
Merged
feat(e2e): allow customizing genesis parameters on the manifest#3969
Conversation
added 6 commits
September 2, 2024 13:09
Author
|
There is a lint error I don't have idea what it means: |
andynog
suggested changes
Sep 3, 2024
Collaborator
andynog
left a comment
There was a problem hiding this comment.
Same comment made in #3967
We need to validate the key with a valid field in genesis otherwise we might get undesired behaviors
(e2e) > ./build/runner -f networks/single.toml setup
I[2024-09-03|14:34:21.615] setup msg="Generating testnet files in `networks/single`"
D[2024-09-03|14:34:21.616] Applying Genesis config consensus_params.evidence.max_bytes=1000
D[2024-09-03|14:34:21.616] Applying Genesis config chain_id=pr3969
here chain_id was set in the genesis.json file, but mispelling the field name to chainid
(e2e) > ./build/runner -f networks/single.toml setup
I[2024-09-03|14:34:32.827] setup msg="Generating testnet files in `networks/single`"
D[2024-09-03|14:34:32.827] Applying Genesis config consensus_params.evidence.max_bytes=1000
D[2024-09-03|14:34:32.827] Applying Genesis config chainid=pr3969
validation accepted invalid field name, so of course it was not set
{
"genesis_time": "2024-09-03T14:34:32.827736Z",
"chain_id": "single",
andynog
approved these changes
Sep 3, 2024
Collaborator
andynog
left a comment
There was a problem hiding this comment.
I will just unblock this, my previous comment is still valid but the implementation to solve the validation problem is not easy. Might need a future PR if we can get it to work.
cason
commented
Sep 4, 2024
test/e2e/pkg/testnet.go
Outdated
| tokens := strings.Split(entry, " = ") | ||
| if len(tokens) != 2 { | ||
| return fmt.Errorf("invalid config entry: \"%s\", "+ | ||
|
|
3 tasks
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 10, 2024
…eys (#4016) Addresses comments #3969 (review) and #3967 (review) on previous PRs. The solution is in fact simple, as it is possible to tell viper to return an error if one of the configured entries (key/value pairs) were not applied to the destination structure, because they don't exist or are invalid. --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Andy Nogueira <me@andynogueira.dev>
mergify bot
pushed a commit
that referenced
this pull request
Oct 20, 2024
Closes #3961. Similarly to #3967, introduces a new `genesis` field for manifest files. The format is `key = value` and multiple entries can be provided. For example, ``` genesis = [ "consensus_params.evidence.max_bytes = 1000", "chain_id = pr3969" ] ``` After the genesis document is produced by the `setup` implementation of the runner, the provided genesis customized configurations are applied to the generated genesis file. The solution also uses `viper`, as it allows setting only some specific keys, leaving the pre-produced content untouched. Note: this PR is based atop #3964 for simplicity, but it does not need to. --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Andy Nogueira <me@andynogueira.dev> (cherry picked from commit 6c5cd32) # Conflicts: # test/e2e/pkg/manifest.go # test/e2e/pkg/testnet.go # test/e2e/runner/setup.go
mergify bot
pushed a commit
that referenced
this pull request
Oct 20, 2024
…eys (#4016) Addresses comments #3969 (review) and #3967 (review) on previous PRs. The solution is in fact simple, as it is possible to tell viper to return an error if one of the configured entries (key/value pairs) were not applied to the destination structure, because they don't exist or are invalid. --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Andy Nogueira <me@andynogueira.dev> (cherry picked from commit bff1667) # Conflicts: # test/e2e/pkg/testnet.go # test/e2e/runner/setup.go
This was referenced Oct 20, 2024
cason
pushed a commit
that referenced
this pull request
Oct 20, 2024
Closes #3961. Similarly to #3967, introduces a new `genesis` field for manifest files. The format is `key = value` and multiple entries can be provided. For example, ``` genesis = [ "consensus_params.evidence.max_bytes = 1000", "chain_id = pr3969" ] ``` After the genesis document is produced by the `setup` implementation of the runner, the provided genesis customized configurations are applied to the generated genesis file. The solution also uses `viper`, as it allows setting only some specific keys, leaving the pre-produced content untouched. Note: this PR is based atop #3964 for simplicity, but it does not need to. --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Andy Nogueira <me@andynogueira.dev>
cason
pushed a commit
that referenced
this pull request
Oct 20, 2024
Closes #3961. Similarly to #3967, introduces a new `genesis` field for manifest files. The format is `key = value` and multiple entries can be provided. For example, ``` genesis = [ "consensus_params.evidence.max_bytes = 1000", "chain_id = pr3969" ] ``` After the genesis document is produced by the `setup` implementation of the runner, the provided genesis customized configurations are applied to the generated genesis file. The solution also uses `viper`, as it allows setting only some specific keys, leaving the pre-produced content untouched. Note: this PR is based atop #3964 for simplicity, but it does not need to. --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Andy Nogueira <me@andynogueira.dev>
6 tasks
cason
pushed a commit
that referenced
this pull request
Oct 20, 2024
…eys (#4016) Addresses comments #3969 (review) and #3967 (review) on previous PRs. The solution is in fact simple, as it is possible to tell viper to return an error if one of the configured entries (key/value pairs) were not applied to the destination structure, because they don't exist or are invalid. --- #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Andy Nogueira <me@andynogueira.dev>
3 tasks
cason
pushed a commit
that referenced
this pull request
Oct 20, 2024
…port #3969) (#4312) Closes #3961. Similarly to #3967, introduces a new `genesis` field for manifest files. The format is `key = value` and multiple entries can be provided. For example, ``` genesis = [ "consensus_params.evidence.max_bytes = 1000", "chain_id = pr3969" ] ``` After the genesis document is produced by the `setup` implementation of the runner, the provided genesis customized configurations are applied to the generated genesis file. The solution also uses `viper`, as it allows setting only some specific keys, leaving the pre-produced content untouched. Note: this PR is based atop #3964 for simplicity, but it does not need to. --- This is an manual backport of pull request #3969. #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
cason
pushed a commit
that referenced
this pull request
Oct 20, 2024
…eys (backport #4016) (#4313) Addresses comments #3969 (review) and #3967 (review) on previous PRs. The solution is in fact simple, as it is possible to tell viper to return an error if one of the configured entries (key/value pairs) were not applied to the destination structure, because they don't exist or are invalid. --- This is an manual backport of pull request #4016. #### PR checklist - [ ] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Andy Nogueira <me@andynogueira.dev>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3961.
Similarly to #3967, introduces a new
genesisfield for manifest files. The format iskey = valueand multiple entries can be provided. For example,After the genesis document is produced by the
setupimplementation of the runner, the provided genesis customized configurations are applied to the generated genesis file. The solution also usesviper, as it allows setting only some specific keys, leaving the pre-produced content untouched.Note: this PR is based atop #3964 for simplicity, but it does not need to.
PR checklist
.changelog(we use unclog to manage our changelog)docs/orspec/) and code comments