Skip to content

refactor(genutil): Use sdk types genesis validator (backport #21678)#22183

Merged
julienrbrt merged 2 commits into
release/v0.52.xfrom
mergify/bp/release/v0.52.x/pr-21678
Oct 9, 2024
Merged

refactor(genutil): Use sdk types genesis validator (backport #21678)#22183
julienrbrt merged 2 commits into
release/v0.52.xfrom
mergify/bp/release/v0.52.x/pr-21678

Conversation

@mergify

@mergify mergify Bot commented Oct 9, 2024

Copy link
Copy Markdown
Contributor

Description

follow up to: #21382


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:

  • confirmed ! in the type prefix if API or client breaking change

  • targeted the correct branch (see PR Targeting)

  • provided a link to the relevant issue or specification

  • reviewed "Files changed" and left comments if necessary

  • included the necessary unit and integration tests

  • added a changelog entry to CHANGELOG.md

  • updated the relevant documentation or specification, including comments for documenting Go code

  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • New Features

    • Introduced a new interface for handling public keys from JSON data.
    • Enhanced the application state export to include consensus validators.
    • Added functionality for migrating legacy genesis files to a new format.
    • Integrated staking functionalities into the application.
    • Added new methods for querying application state based on specific versions.
    • Improved compatibility with the Cosmos SDK through standardized validator handling.
  • Bug Fixes

    • Improved robustness in handling validator initialization during tests.
  • Refactor

    • Simplified validator handling by replacing custom structures with standardized SDK types.
    • Streamlined the export process for genesis files.
    • Enhanced state management capabilities with new query functionality.

This is an automatic backport of pull request #21678 done by [Mergify](https://mergify.com).

@mergify mergify Bot requested a review from a team October 9, 2024 05:24
@mergify mergify Bot added the conflicts label Oct 9, 2024
@mergify

mergify Bot commented Oct 9, 2024

Copy link
Copy Markdown
Contributor Author

Cherry-pick of 4aeb053 has failed:

On branch mergify/bp/release/v0.52.x/pr-21678
Your branch is up to date with 'origin/release/v0.52.x'.

You are currently cherry-picking commit 4aeb05392.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   crypto/codec/pubkey.go
	new file:   crypto/keys/jsonkey.go
	modified:   server/types/app.go
	modified:   simapp/export.go
	modified:   simapp/v2/export.go
	modified:   tests/e2e/genutil/export_test.go
	modified:   types/staking.go
	modified:   x/genutil/client/cli/migrate.go
	new file:   x/genutil/migration/v052/migrate.go
	new file:   x/genutil/migration/v052/migrate_test.go
	new file:   x/genutil/migration/v052/testdata/old_app_genesis.json
	modified:   x/genutil/types/genesis.go
	modified:   x/genutil/types/testdata/app_genesis.json
	modified:   x/genutil/utils.go
	modified:   x/genutil/v2/cli/export.go
	modified:   x/genutil/v2/types.go
	modified:   x/staking/genesis.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   runtime/v2/app.go
	deleted by us:   runtime/v2/builder.go
	deleted by us:   runtime/v2/manager.go
	deleted by us:   runtime/v2/services/genesis.go
	both modified:   simapp/v2/app_di.go
	both modified:   simapp/v2/app_test.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions Bot added C:x/staking C:CLI C:x/genutil genutil module issues labels Oct 9, 2024
@julienrbrt julienrbrt self-assigned this Oct 9, 2024

@julienrbrt julienrbrt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can do the partial backport

Comment thread runtime/v2/manager.go Fixed
Comment thread runtime/v2/manager.go Fixed
Comment thread runtime/v2/manager.go Fixed
Comment thread runtime/v2/manager.go Fixed
Comment thread runtime/v2/services/genesis.go Fixed
Comment thread runtime/v2/services/genesis.go Fixed
Comment thread runtime/v2/services/genesis.go Fixed
Comment thread runtime/v2/services/genesis.go Fixed
Comment thread runtime/v2/services/genesis.go Fixed
Comment thread simapp/v2/app_di.go Fixed
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
@julienrbrt julienrbrt force-pushed the mergify/bp/release/v0.52.x/pr-21678 branch from 0df34b9 to d727f9b Compare October 9, 2024 06:52
@julienrbrt julienrbrt merged commit c3a6f35 into release/v0.52.x Oct 9, 2024
@julienrbrt julienrbrt deleted the mergify/bp/release/v0.52.x/pr-21678 branch October 9, 2024 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants