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

Party

sv

Party

The SV operator party identifying the node.

svName

Text

The SV name in whose name the node is operated.

state

NodeState

  • 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

Party

svName

Text

state

RewardState

  • 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

Party

sv

Party

The SV party that submitted this report.

svName

Text

The name of the SV operator whose operator party was used to submit this report.

number

Int

The number of this report, starting from 0.

status

Optional SvStatus

None is used when initially creating the contract upon sv addition.

  • Choice Archive

    Controller: dso

    Returns: ()

    (no fields)

Data Types

data ForSv

ForSv

Field

Type

Description

dso

Party

svName

Text

instance Eq ForSv

instance Show ForSv

instance GetField "dso" ForSv Party

instance GetField "svName" ForSv Text

instance SetField "dso" ForSv Party

instance SetField "svName" ForSv Text

instance HasCheckedFetch SvRewardState ForSv

data ForSvNode

ForSvNode

Field

Type

Description

dso

Party

sv

Party

svName

Text

instance Eq ForSvNode

instance Show 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

NodeState

Field

Type

Description

synchronizerNodes

SynchronizerNodeConfigMap

The config for a synchronizer’s CometBFT, sequencer, mediator and scan nodes under control of an SV party.

instance Eq NodeState

instance Show NodeState

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.

RewardState

Field

Type

Description

numRoundsMissed

Int

Number of rounds for which they missed collecting coupons.

numRoundsCollected

Int

Number of rounds for which they collected coupons.

lastRoundCollected

Round

Last round for which they collected reward coupons.

numCouponsIssued

Int

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.

SvStatus

Field

Type

Description

createdAt

Time

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

Int

The height of the CometBFT chain at the time of submission

mediatorSynchronizerTime

Time

The latest synchronizer time observed on the mediator at the time of submission

participantSynchronizerTime

Time

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 Eq SvStatus

instance Show SvStatus

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