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

refactor: use local clock time only for transfer CLI relative timeouts #5908

Merged
merged 11 commits into from
Mar 4, 2024

Conversation

damiannolan
Copy link
Member

Description

  • Refactors transfer CLI to use local clock time only for relative timeouts.
  • Removes the stateful query on the node to client and consensus states.
  • Disables relative timeout by block height.

closes: #3594


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/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

@damiannolan damiannolan marked this pull request as ready for review February 26, 2024 16:48
Copy link
Member Author

@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.

I'm not sure if I would consider this an API breaking change but it definitely has implications on end users. If its going to target v9 anyway I suppose it doesn't matter.

Let me know and I can remove the value which I've currently marked as deprecated.

modules/apps/transfer/types/packet.go Outdated Show resolved Hide resolved
@damiannolan
Copy link
Member Author

Published as r4r for e2es, and will manually test tomorrow morning 👍🏻

Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

Thanks, @damiannolan!

modules/apps/transfer/client/cli/tx.go Outdated Show resolved Hide resolved
modules/apps/transfer/client/cli/tx.go Show resolved Hide resolved
@@ -73,8 +82,8 @@ func newSendTxCmd() *cobra.Command {
Use: "send-tx [connection-id] [path/to/packet_msg.json]",
Short: "Send an interchain account tx on the provided connection.",
Long: strings.TrimSpace(`Submits pre-built packet data containing messages to be executed on the host chain
and attempts to send the packet. Packet data is provided as json, file or string. An
appropriate relative timeoutTimestamp must be provided with flag {relative-packet-timeout}`),
and attempts to send the packet. Packet data is provided as json, file or string. A relative timeout timestamp can be provided with flag {packet-timeout-timestamp}.
Copy link
Contributor

Choose a reason for hiding this comment

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

If it's correct that absolute timeout timestamps can be used when flagAbsoluteTimeouts is true and flagPacketTimeoutTimestamp is also set, should we update this doc string to clarify that? At the moment, the way it reads I think a reader would think flagPacketTimeoutTimestamp can only be used for relative timeouts...

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated in 7f673fb

feel free to push another commit if you want to change it.

Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Thanks @damiannolan !

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

LGTM thanks @damiannolan

@damiannolan damiannolan merged commit 1229c46 into main Mar 4, 2024
70 checks passed
@damiannolan damiannolan deleted the damian/3594-use-local-clocktime-for-clis branch March 4, 2024 13:12
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.

Consider relying solely on local clock time for transfer CLI relative timeouts
5 participants