Skip to content

Commit

Permalink
Update throttle_retry.go
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Aug 7, 2023
1 parent ebe3cd5 commit 81f47fb
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions x/ccv/consumer/keeper/throttle_retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,16 @@ import (
//
// The slash packet remains at the head of the pending packets queue within the "Standby" state.
//
// - If the consumer receives a V1Result ack from the provider, the consumer checks for a slash record,
// and if found, the consumer transitions from "Standby" to "No Slash". The slash record is cleared upon this transition,
// and the slash packet is popped from the pending packets queue.
// - If the consumer receives a V1Result ack from the provider,
// OR if the consumer receives an ack from the provider that the slash packet was successfully handled,
// the consumer transitions from "Standby" to "No Slash".
// The slash record is cleared upon this transition, and the slash packet is popped from the pending packets queue.
//
// - Else if the consumer receives a reply from the provider that the slash packet was successfully handled,
// the consumer transitions from "Standby" to "No Slash". The slash record is cleared upon this transition,
// and the slash packet is popped from the pending packets queue.
//
// - Else if the consumer receives a reply from the provider that the slash packet was bounced (not handled),
// - Else if the consumer receives an ack from the provider that the slash packet was bounced (not handled),
// then SlashRecord.WaitingOnReply is set false, and the consumer retries sending the slash packet after a delay period.
//
// Once a retry is sent, the consumer enters a new cycle of the "Standby" state and the process repeats.
//
// Once the slash packet is successfully handled, the consumer transitions from "Standby" to "No Slash",
// the slash record is cleared upon this transition, and the slash packet is popped from the pending packets queue.
//
// This design is implemented below, and in relay.go under SendPackets() and OnAcknowledgementPacket().
//

Expand Down

0 comments on commit 81f47fb

Please sign in to comment.