Skip to content

Commit

Permalink
FSM event explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Aug 10, 2023
1 parent 9ed7195 commit a834a5b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions x/ccv/consumer/keeper/throttle_retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ import (
//
// Throttling with retries follows a finite-state machine design:
//
// 2 states: "No Slash" and "Standby".
// Initial State: "No Slash"
// Transition Event: ("No Slash", Slash packet sent) => ("Standby")
// Transition Event: ("Standby", V1Result ack received) => ("No Slash")
// Transition Event: ("Standby", Slash packet successfully handled) => ("No Slash")
// Internal Transition Event: ("Standby", Slash packet bounced) => ("Standby", with SlashRecord.WaitingOnReply = false)
// Transition Event: ("Standby", Retry sent) => ("Standby", new cycle)
//
// Description in words:
//
// 1. "No slash": If no slash record exists, the consumer is permitted to send packets from the pending packets queue.
// The consumer starts in this state from genesis.
//
Expand Down

0 comments on commit a834a5b

Please sign in to comment.