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

ICS24: Change Provable keys #7517

Merged
merged 4 commits into from
Nov 12, 2024
Merged

Conversation

AdityaSripal
Copy link
Member

@AdityaSripal AdityaSripal commented Oct 25, 2024

Description

These keys are less verbose and aligned to be closer together for the same outgoing chain since we key on channelID first rather than the type of packet msg

closes: #7520


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

@AdityaSripal AdityaSripal changed the base branch from main to feat/ibc-eureka October 25, 2024 15:22
@AdityaSripal AdityaSripal marked this pull request as ready for review October 25, 2024 15:22
Copy link
Contributor

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

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

Bit of a nit but since we're using byte(1), byte(2)..etc, can we list them so they are:

  • Commitment
  • Ack
  • Receipt

rather than the reverse

@womensrights womensrights linked an issue Nov 11, 2024 that may be closed by this pull request
4 tasks
Copy link

Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

tweaked packet commitment prefix key which was added post PR, do take a quick peek beofr merging if possible!

return []byte(fmt.Sprintf("acks/channels/%s/sequences/%s", channelID, sdk.Uint64ToBigEndian(sequence)))
// PacketCommitmentKey returns the store key of under which a packet commitment is stored.
func PacketCommitmentKey(channelID string, sequence uint64) []byte {
return append(append([]byte(channelID), byte(1)), sdk.Uint64ToBigEndian(sequence)...)
}

// PacketCommitmentPrefixKey returns the store key prefix under which packet commitments for a particular channel are stored.
func PacketCommitmentPrefixKey(channelID string) []byte {
Copy link
Contributor

Choose a reason for hiding this comment

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

though wouldn't this key better belong in channel/v2/types/keys.go? Its only used for iterating through commitments in grpc req?

Currently similar for v1 but maybe a good idea to move. Leaving as is for now.

@AdityaSripal AdityaSripal merged commit 0050523 into feat/ibc-eureka Nov 12, 2024
65 checks passed
@AdityaSripal AdityaSripal deleted the aditya/fix-provable-keys branch November 12, 2024 13:38
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.

Restructure channel keys for v2 host
3 participants