Splice.DSO.SvState
Templates to track per-sv state.
Templates
template SvNodeState
State of a node managed by an SV operator party.
There is exactly one such state per SV operator party. Even though every SV can operate at most one node at any one time, there can though be multiple SV node states per SV, as the state of offboarded nodes is kept around for debugging purposes.
Signatory: dso
Field
Type
Description
dso
sv
The SV operator party identifying the node.
svName
The SV name in whose name the node is operated.
state
Choice Archive
Controller: dso
Returns: ()
(no fields)
template SvRewardState
State of reward collection for a sv identified by their sv name.
Signatory: dso
Field
Type
Description
dso
svName
state
Choice Archive
Controller: dso
Returns: ()
(no fields)
template SvStatusReport
A singleton contract per SV party that is used to regularly submit status reports.
Individual status reports serve as a heartbeat for a specific SV party and its associoated SV node ; and to distribute that SVs view on the network to all other SVs.
Signatory: dso
Field
Type
Description
dso
sv
The SV party that submitted this report.
svName
The name of the SV operator whose operator party was used to submit this report.
number
The number of this report, starting from 0.
status
None is used when initially creating the contract upon sv addition.
Choice Archive
Controller: dso
Returns: ()
(no fields)
Data Types
data ForSv
data ForSvNode
instance GetField "dso" ForSvNode Party
instance GetField "sv" ForSvNode Party
instance GetField "svName" ForSvNode Text
instance SetField "dso" ForSvNode Party
instance SetField "sv" ForSvNode Party
instance SetField "svName" ForSvNode Text
instance HasCheckedFetch SvNodeState ForSvNode
instance HasCheckedFetch SvStatusReport ForSvNode
data NodeState
Field
Type
Description
synchronizerNodes
The config for a synchronizer’s CometBFT, sequencer, mediator and scan nodes under control of an SV party.
instance GetField "state" SvNodeState NodeState
instance GetField "synchronizerNodes" NodeState SynchronizerNodeConfigMap
instance SetField "state" SvNodeState NodeState
instance SetField "synchronizerNodes" NodeState SynchronizerNodeConfigMap
data RewardState
Reward collection state of an SV.
Note that we keep some extra aggregates in this state to make it easier to interpret it. In principle, these could be derived from the transaction history, but that would be much more onerous to implement.
Field
Type
Description
numRoundsMissed
Number of rounds for which they missed collecting coupons.
numRoundsCollected
Number of rounds for which they collected coupons.
lastRoundCollected
Round
Last round for which they collected reward coupons.
numCouponsIssued
Number of SV reward coupons issued by them for their beneficiaries.
instance Eq RewardState
instance Show RewardState
instance GetField "lastRoundCollected" RewardState Round
instance GetField "numCouponsIssued" RewardState Int
instance GetField "numRoundsCollected" RewardState Int
instance GetField "numRoundsMissed" RewardState Int
instance GetField "state" SvRewardState RewardState
instance SetField "lastRoundCollected" RewardState Round
instance SetField "numCouponsIssued" RewardState Int
instance SetField "numRoundsCollected" RewardState Int
instance SetField "numRoundsMissed" RewardState Int
instance SetField "state" SvRewardState RewardState
data SvStatus
The status of an SV as seen from their SV node’s perspective. We generally add values here that are expected to regularly increase, so that SV node operators can run alerting off of them.
Field
Type
Description
createdAt
The wall clock time of the SV node at the time when the SV node started to gather the data points in this report to submit them.
cometBftHeight
The height of the CometBFT chain at the time of submission
mediatorSynchronizerTime
The latest synchronizer time observed on the mediator at the time of submission
participantSynchronizerTime
The latest synchronizer time observed on the participant at the time of submission
latestOpenRound
Round
The maximum round number of the OpenMiningRound contracts at the time of submission
instance GetField "cometBftHeight" SvStatus Int
instance GetField "createdAt" SvStatus Time
instance GetField "latestOpenRound" SvStatus Round
instance GetField "mediatorSynchronizerTime" SvStatus Time
instance GetField "participantSynchronizerTime" SvStatus Time
instance GetField "status" SvStatusReport (Optional SvStatus)
instance GetField "status" DsoRules_SubmitStatusReport SvStatus
instance SetField "cometBftHeight" SvStatus Int
instance SetField "createdAt" SvStatus Time
instance SetField "latestOpenRound" SvStatus Round
instance SetField "mediatorSynchronizerTime" SvStatus Time
instance SetField "participantSynchronizerTime" SvStatus Time
instance SetField "status" SvStatusReport (Optional SvStatus)
instance SetField "status" DsoRules_SubmitStatusReport SvStatus