-
Notifications
You must be signed in to change notification settings - Fork 126
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
feat!: throttle with retries, consumer changes #1024
feat!: throttle with retries, consumer changes #1024
Conversation
…ttle-with-retries-consumer-changes
Co-authored-by: Marius Poke <marius.poke@posteo.de>
…//github.com/cosmos/interchain-security into shawn/throttle-with-retries-consumer-changes
Co-authored-by: Marius Poke <marius.poke@posteo.de>
…//github.com/cosmos/interchain-security into shawn/throttle-with-retries-consumer-changes
@@ -223,6 +236,40 @@ func (k Keeper) SendPackets(ctx sdk.Context) { | |||
// in conjunction with the ibc module's execution of "acknowledgePacket", | |||
// according to https://github.com/cosmos/ibc/tree/main/spec/core/ics-004-channel-and-packet-semantics#processing-acknowledgements | |||
func (k Keeper) OnAcknowledgementPacket(ctx sdk.Context, packet channeltypes.Packet, ack channeltypes.Acknowledgement) error { | |||
if res := ack.GetResult(); res != nil { | |||
if len(res) != 1 { | |||
return fmt.Errorf("acknowledgement result length must be 1, got %d", len(res)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this error message logged by IBC? If not, we should log it for better debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea it seems to be logged here https://github.com/cosmos/ibc-go/blob/000e9d20b15b3c6939cefc0e26daa4b64c1be8fb/modules/core/keeper/msg_server.go#L680
Description
Implements the consumer-side changes from https://cosmos.github.io/interchain-security/adrs/adr-008-throttle-retries. See this comment for further context on how the behavior from the ADR was implemented in code.
Note the changes should be self documented, with an addition to the ADR to explain how upgrading would look like. Essentially, these changes should be merged separately and only affect consumers, with the provider throttling remaining unchanged. Then a future PR with provider changes can fully enable "throttling v2".
Note e2e tests for new throttling functionality will be added to the PR introducing provider changes.
IMPORTANT: Note diff tests are currently commented out for this PR. We'll need a decision around what to do there.
Closes #1101
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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
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...
!
in the type prefix if API or client breaking change