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

test: Add backtransform functionality to genesis transform cli #1534

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

bermuell
Copy link
Contributor

@bermuell bermuell commented Dec 20, 2023

Description

Closes: #1512

Changes will allow to transform exported consumer genesis data from version v2.x, v3.x, v4.x to a specified target version
v2.x, v3.x, v4.x . With that newer version of provider chain exports can be transformed for older consumer chains e.g. 2.x


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
  • Targeted the correct branch (see PR Targeting)
  • Provided a link to the relevant issue or specification
  • Reviewed "Files changed" and left comments if necessary
  • 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.

I have...

  • Confirmed the correct type prefix in the PR title
  • Confirmed all author checklist items have been addressed
  • Confirmed that this PR does not change production code

@bermuell bermuell added the C:Testing Assigned automatically by the PR labeler label Dec 20, 2023
@bermuell bermuell requested a review from MSalopek December 20, 2023 16:20
@bermuell bermuell marked this pull request as ready for review December 20, 2023 16:21
@bermuell bermuell requested a review from a team as a code owner December 20, 2023 16:21
Copy link
Contributor

@MSalopek MSalopek left a comment

Choose a reason for hiding this comment

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

LGTM.

We need docs on this. Consider adding them in this or a different PR.

Copy link
Contributor

@p-offtermatt p-offtermatt left a comment

Choose a reason for hiding this comment

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

LGTM, added some comments.

I think this is already in the docs, right?
https://cosmos.github.io/interchain-security/consumer-development/consumer-genesis-transformation
Could you double-check that everything there is still consistent with what this PR adapts?

app/consumer/genesis.go Outdated Show resolved Hide resolved
app/consumer/genesis.go Outdated Show resolved Hide resolved
app/consumer/genesis.go Outdated Show resolved Hide resolved
app/consumer/genesis_test.go Show resolved Hide resolved
app/consumer/genesis_test.go Show resolved Hide resolved
@github-actions github-actions bot added the C:Docs Assigned automatically by the PR labeler label Dec 21, 2023
@p-offtermatt
Copy link
Contributor

Thanks, changes look good to me!

@bermuell bermuell force-pushed the bernd/1512-consumer_genesis_backtransform branch from 9532b48 to 6d429df Compare December 21, 2023 17:36
return nil, fmt.Errorf("marshalling transformation result failed: %v", err)
}

// remove all prehash_key_before_comparison entries not supported by ics23 versions used by v2.x
Copy link
Contributor Author

Choose a reason for hiding this comment

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

going the shortcut here bypassing json result manipulation as element is deeply nested in consumer genesis type.

@bermuell bermuell force-pushed the bernd/1512-consumer_genesis_backtransform branch from 6d429df to 505a77f Compare January 3, 2024 10:23
@bermuell bermuell force-pushed the bernd/1512-consumer_genesis_backtransform branch from 505a77f to 0b8668a Compare January 3, 2024 12:23
@bermuell bermuell added this pull request to the merge queue Jan 3, 2024
Merged via the queue into main with commit a71ef4f Jan 3, 2024
16 of 18 checks passed
@bermuell bermuell deleted the bernd/1512-consumer_genesis_backtransform branch January 3, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Docs Assigned automatically by the PR labeler C:Testing Assigned automatically by the PR labeler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support CCV consumer genesis backward transformation
4 participants