Splice.DsoRules

Templates

template Confirmation

A confirmation for the DSO delegate to take action as part of standard DSO. Used for executing automated actions in a shortened process. See the comments on ActionRequiringConfirmation for details.

Signatory: dso

Field

Type

Description

dso

Party

confirmer

Party

action

ActionRequiringConfirmation

expiresAt

Time

template DsoRules

Signatory: dso

Field

Type

Description

dso

Party

epoch

Int

The number of DSO delegates that have already been elected.

svs

Map Party SvInfo

offboardedSvs

Map Party OffboardedSvInfo

dsoDelegate

Party

config

DsoRulesConfig

initialTrafficState

Map Text TrafficState

Map from participant/mediator ID to its traffic state at the time of synchronizer bootstrapping. Used for testing, empty in prod.

isDevNet

Bool

template ElectionRequest

A request to elect a new DSO delegate. TODO(#7649) revise and/or remove

Signatory: dso

Field

Type

Description

dso

Party

requester

Party

epoch

Int

reason

ElectionRequestReason

ranking

[Party]

  • Choice Archive

    Controller: dso

    Returns: ()

    (no fields)

template VoteRequest

A request for the other svs to vote on the execution of an action requiring confirmation. We use this for implementing on-ledger governance actions triggered by SV operators in a uniform way.

See the comments on ActionRequiringConfirmation for details.

Version2, which tracks all votes in a single contract.

Signatory: dso

Field

Type

Description

dso

Party

requester

Text

The SV that requested to execute the action.

action

ActionRequiringConfirmation

The action whose confirmation is required.

reason

Reason

The reason for requesting the execution of the action. Typically a reference to some off-ledger justification.

voteBefore

Time

The time before which votes are accepted, and SHOULD be submitted.

votes

Map Text Vote

The votes cast by current or previous SVs. These may be previous SVs in case there was an SV change after the vote was requested.

trackingCid

Optional (ContractId VoteRequest)

An optional tracking ContractId to be used for tracking the vote request through its updates. This is always set to the first ContractId of the original vote request (None on creation).

  • Choice Archive

    Controller: dso

    Returns: ()

    (no fields)

Orphan Typeclass Instances

instance HasCheckedFetch FeaturedAppRight ForDso

Data Types

data ActionRequiringConfirmation

Actions that require confirmation from SV nodes before they can be executed.

There are two processes for executing such actions:

  1. Any SV can request a vote to execute such an action upon which the other SV’s can respond with their votes for whether they accept the execution or not. This process requires votes from 2/3 of all SVs* for the action to be considered definitive and it can be used for all actions that require confirmation.

  2. Some of the actions that require confirmations should be executed automatically once the ledger and the wall-clocks of the SV nodes are in a particular state. These actions are confirmed by each SV node automatically once the action’s precondition is met. Once 2/3 of all SV’ss confirmations* are visible to the DSO delegate it executes them.

  • Simplified for clarity; see requiredNumVotes for exact formula.

Process 2 is an optimization of Process 1 for the case where no disagreement to the action is expected. It avoids the extra round-trip and the complications of having the DSO delegate to reliably initiate the vote when it is time to execute an automated action that requires confirmation.

We expect honest SV nodes to only create confirmations for actions whose preconditions are met. We also rely on the execution of these actions to be idempotent, as more than the required number of confirmations can be created and the DSO delegate could thus in principle execute the corresponding action multiple times.

Note also that having these two processes also aids in distinguishing between manually initiated ad-hoc votes and the regular confirmations that need to happen during standard DSO.

ARC_DsoRules

Field

Type

Description

dsoAction

DsoRules_ActionRequiringConfirmation

ARC_AmuletRules

Field

Type

Description

amuletRulesAction

AmuletRules_ActionRequiringConfirmation

ARC_AnsEntryContext

Field

Type

Description

ansEntryContextCid

ContractId AnsEntryContext

ansEntryContextAction

AnsEntryContext_ActionRequiringConfirmation

ExtActionRequiringConformation

Field

Type

Description

dummyUnitField

()

Extension constructor (and field) to work around the current lack of upgrading for variants in Daml 3.0 This on takes care of providing extensibility for the specific variants below.

instance Eq ActionRequiringConfirmation

instance Show ActionRequiringConfirmation

instance GetField "action" Confirmation ActionRequiringConfirmation

instance GetField "action" DsoRules_ConfirmAction ActionRequiringConfirmation

instance GetField "action" DsoRules_ExecuteConfirmedAction ActionRequiringConfirmation

instance GetField "action" DsoRules_RequestVote ActionRequiringConfirmation

instance GetField "action" VoteRequest ActionRequiringConfirmation

instance GetField "amuletRulesAction" ActionRequiringConfirmation AmuletRules_ActionRequiringConfirmation

instance GetField "ansEntryContextAction" ActionRequiringConfirmation AnsEntryContext_ActionRequiringConfirmation

instance GetField "ansEntryContextCid" ActionRequiringConfirmation (ContractId AnsEntryContext)

instance GetField "dsoAction" ActionRequiringConfirmation DsoRules_ActionRequiringConfirmation

instance GetField "dummyUnitField" ActionRequiringConfirmation ()

instance SetField "action" Confirmation ActionRequiringConfirmation

instance SetField "action" DsoRules_ConfirmAction ActionRequiringConfirmation

instance SetField "action" DsoRules_ExecuteConfirmedAction ActionRequiringConfirmation

instance SetField "action" DsoRules_RequestVote ActionRequiringConfirmation

instance SetField "action" VoteRequest ActionRequiringConfirmation

instance SetField "amuletRulesAction" ActionRequiringConfirmation AmuletRules_ActionRequiringConfirmation

instance SetField "ansEntryContextAction" ActionRequiringConfirmation AnsEntryContext_ActionRequiringConfirmation

instance SetField "ansEntryContextCid" ActionRequiringConfirmation (ContractId AnsEntryContext)

instance SetField "dsoAction" ActionRequiringConfirmation DsoRules_ActionRequiringConfirmation

instance SetField "dummyUnitField" ActionRequiringConfirmation ()

data AmuletRules_ActionRequiringConfirmation

CRARC_MiningRound_StartIssuing AmuletRules_MiningRound_StartIssuing

Automated action to start an issuing round once the summary of the reward coupons have been computed.

CRARC_MiningRound_Archive AmuletRules_MiningRound_Archive

Automated action to archive a closed mining round once no expired reward coupons are left.

CRARC_AddFutureAmuletConfigSchedule AmuletRules_AddFutureAmuletConfigSchedule

Voted action to add a config schedule to the AmuletRules.

CRARC_RemoveFutureAmuletConfigSchedule AmuletRules_RemoveFutureAmuletConfigSchedule

Voted action to remove a config schedule from the AmuletRules.

CRARC_UpdateFutureAmuletConfigSchedule AmuletRules_UpdateFutureAmuletConfigSchedule

Voted action to update a config schedule in the AmuletRules.

instance Eq AmuletRules_ActionRequiringConfirmation

instance Show AmuletRules_ActionRequiringConfirmation

instance GetField "amuletRulesAction" ActionRequiringConfirmation AmuletRules_ActionRequiringConfirmation

instance SetField "amuletRulesAction" ActionRequiringConfirmation AmuletRules_ActionRequiringConfirmation

data AnsEntryContext_ActionRequiringConfirmation

ANSRARC_CollectInitialEntryPayment AnsEntryContext_CollectInitialEntryPayment

Automated action to collect initial payment of an ans entry.

ANSRARC_RejectEntryInitialPayment AnsEntryContext_RejectEntryInitialPayment

Automated action to reject initial payment of an ans entry.

instance Eq AnsEntryContext_ActionRequiringConfirmation

instance Show AnsEntryContext_ActionRequiringConfirmation

instance GetField "ansEntryContextAction" ActionRequiringConfirmation AnsEntryContext_ActionRequiringConfirmation

instance SetField "ansEntryContextAction" ActionRequiringConfirmation AnsEntryContext_ActionRequiringConfirmation

data Confirmation_ExpireResult

data DsoRulesConfig

DsoRulesConfig

Field

Type

Description

numUnclaimedRewardsThreshold

Int

The minimum number of unclaimed rewards required for merging

numMemberTrafficContractsThreshold

Int

The minimum number of member traffic contracts required for merging

actionConfirmationTimeout

RelTime

The TTL for contracts representing a confirmation

svOnboardingRequestTimeout

RelTime

The TTL for contracts representing an incomplete onboarding

svOnboardingConfirmedTimeout

RelTime

The TTL for contracts representing an SV confirmation

voteRequestTimeout

RelTime

The TTL for a VoteRequest and its associated Vote s

dsoDelegateInactiveTimeout

RelTime

The amount of time given to the DSO delegate to complete an action it should take care of

synchronizerNodeConfigLimits

SynchronizerNodeConfigLimits

Limits to enforce on the svs’ SynchronizerNodeConfig

maxTextLength

Int

Generic upper limit on text fields in choices and contracts.

decentralizedSynchronizer

DsoDecentralizedSynchronizerConfig

nextScheduledSynchronizerUpgrade

Optional SynchronizerUpgradeSchedule

instance Eq DsoRulesConfig

instance Show DsoRulesConfig

instance GetField "actionConfirmationTimeout" DsoRulesConfig RelTime

instance GetField "config" DsoBootstrap DsoRulesConfig

instance GetField "config" DsoRules DsoRulesConfig

instance GetField "decentralizedSynchronizer" DsoRulesConfig DsoDecentralizedSynchronizerConfig

instance GetField "dsoDelegateInactiveTimeout" DsoRulesConfig RelTime

instance GetField "maxTextLength" DsoRulesConfig Int

instance GetField "newConfig" DsoRules_SetConfig DsoRulesConfig

instance GetField "nextScheduledSynchronizerUpgrade" DsoRulesConfig (Optional SynchronizerUpgradeSchedule)

instance GetField "numMemberTrafficContractsThreshold" DsoRulesConfig Int

instance GetField "numUnclaimedRewardsThreshold" DsoRulesConfig Int

instance GetField "svOnboardingConfirmedTimeout" DsoRulesConfig RelTime

instance GetField "svOnboardingRequestTimeout" DsoRulesConfig RelTime

instance GetField "synchronizerNodeConfigLimits" DsoRulesConfig SynchronizerNodeConfigLimits

instance GetField "voteRequestTimeout" DsoRulesConfig RelTime

instance SetField "actionConfirmationTimeout" DsoRulesConfig RelTime

instance SetField "config" DsoBootstrap DsoRulesConfig

instance SetField "config" DsoRules DsoRulesConfig

instance SetField "decentralizedSynchronizer" DsoRulesConfig DsoDecentralizedSynchronizerConfig

instance SetField "dsoDelegateInactiveTimeout" DsoRulesConfig RelTime

instance SetField "maxTextLength" DsoRulesConfig Int

instance SetField "newConfig" DsoRules_SetConfig DsoRulesConfig

instance SetField "nextScheduledSynchronizerUpgrade" DsoRulesConfig (Optional SynchronizerUpgradeSchedule)

instance SetField "numMemberTrafficContractsThreshold" DsoRulesConfig Int

instance SetField "numUnclaimedRewardsThreshold" DsoRulesConfig Int

instance SetField "svOnboardingConfirmedTimeout" DsoRulesConfig RelTime

instance SetField "svOnboardingRequestTimeout" DsoRulesConfig RelTime

instance SetField "synchronizerNodeConfigLimits" DsoRulesConfig SynchronizerNodeConfigLimits

instance SetField "voteRequestTimeout" DsoRulesConfig RelTime

data DsoRules_ActionRequiringConfirmation

SRARC_AddSv DsoRules_AddSv

Voted action to directly add an SV

SRARC_OffboardSv DsoRules_OffboardSv

Voted action to remove an SV

SRARC_ConfirmSvOnboarding DsoRules_ConfirmSvOnboarding

Automated action to confirm that a party can become an SV.

SRARC_GrantFeaturedAppRight DsoRules_GrantFeaturedAppRight

Voted action to grant a featured app right. Not idempotent.

SRARC_RevokeFeaturedAppRight DsoRules_RevokeFeaturedAppRight

Revoke a specific featured app right.

SRARC_SetConfig DsoRules_SetConfig

Voted action to change the DsoRulesConfig. Not idempotent.

SRARC_UpdateSvRewardWeight DsoRules_UpdateSvRewardWeight

Voted action to update the reward weight of an SV.

SRARC_CreateExternalPartyAmuletRules DsoRules_CreateExternalPartyAmuletRules

Create ExternalPartyAmuletRules contract if it has not been created as part of network bootstrapping.

SRARC_CreateTransferCommandCounter DsoRules_CreateTransferCommandCounter

Create TransferCommandCounter contract for the given sender if it does not already exist

instance Eq DsoRules_ActionRequiringConfirmation

instance Show DsoRules_ActionRequiringConfirmation

instance GetField "dsoAction" ActionRequiringConfirmation DsoRules_ActionRequiringConfirmation

instance SetField "dsoAction" ActionRequiringConfirmation DsoRules_ActionRequiringConfirmation

data DsoRules_AddConfirmedSvResult

data DsoRules_AddSvResult

data DsoRules_AdvanceOpenMiningRoundsResult

DsoRules_AdvanceOpenMiningRoundsResult

Field

Type

Description

summarizingRound

ContractId SummarizingMiningRound

openRound

ContractId OpenMiningRound

instance GetField "openRound" DsoRules_AdvanceOpenMiningRoundsResult (ContractId OpenMiningRound)

instance GetField "summarizingRound" DsoRules_AdvanceOpenMiningRoundsResult (ContractId SummarizingMiningRound)

instance SetField "openRound" DsoRules_AdvanceOpenMiningRoundsResult (ContractId OpenMiningRound)

instance SetField "summarizingRound" DsoRules_AdvanceOpenMiningRoundsResult (ContractId SummarizingMiningRound)

instance HasExercise DsoRules DsoRules_AdvanceOpenMiningRounds DsoRules_AdvanceOpenMiningRoundsResult

instance HasFromAnyChoice DsoRules DsoRules_AdvanceOpenMiningRounds DsoRules_AdvanceOpenMiningRoundsResult

instance HasToAnyChoice DsoRules DsoRules_AdvanceOpenMiningRounds DsoRules_AdvanceOpenMiningRoundsResult

data DsoRules_Amulet_ExpireResult

data DsoRules_ArchiveOutdatedElectionRequestResult

data DsoRules_ArchiveSvOnboardingRequestResult

data DsoRules_CastVoteResult

data DsoRules_ClaimExpiredRewardsResult

data DsoRules_CloseVoteRequestResult

DsoRules_CloseVoteRequestResult

Field

Type

Description

request

VoteRequest

The original vote request.

completedAt

Time

When the vote request was completed.

offboardedVoters

[Text]

SVs that voted but were offboarded before the vote completed.

abstainingSvs

[Text]

SVs that did not vote.

outcome

VoteRequestOutcome

The final result of the vote.

instance Eq DsoRules_CloseVoteRequestResult

instance Show DsoRules_CloseVoteRequestResult

instance GetField "abstainingSvs" DsoRules_CloseVoteRequestResult [Text]

instance GetField "completedAt" DsoRules_CloseVoteRequestResult Time

instance GetField "offboardedVoters" DsoRules_CloseVoteRequestResult [Text]

instance GetField "outcome" DsoRules_CloseVoteRequestResult VoteRequestOutcome

instance GetField "request" DsoRules_CloseVoteRequestResult VoteRequest

instance SetField "abstainingSvs" DsoRules_CloseVoteRequestResult [Text]

instance SetField "completedAt" DsoRules_CloseVoteRequestResult Time

instance SetField "offboardedVoters" DsoRules_CloseVoteRequestResult [Text]

instance SetField "outcome" DsoRules_CloseVoteRequestResult VoteRequestOutcome

instance SetField "request" DsoRules_CloseVoteRequestResult VoteRequest

instance HasExercise DsoRules DsoRules_CloseVoteRequest DsoRules_CloseVoteRequestResult

instance HasFromAnyChoice DsoRules DsoRules_CloseVoteRequest DsoRules_CloseVoteRequestResult

instance HasToAnyChoice DsoRules DsoRules_CloseVoteRequest DsoRules_CloseVoteRequestResult

data DsoRules_CollectEntryRenewalPaymentResult

DsoRules_CollectEntryRenewalPaymentResult

Field

Type

Description

ansEntry

ContractId AnsEntry

subscriptionState

ContractId SubscriptionIdleState

instance GetField "ansEntry" DsoRules_CollectEntryRenewalPaymentResult (ContractId AnsEntry)

instance GetField "subscriptionState" DsoRules_CollectEntryRenewalPaymentResult (ContractId SubscriptionIdleState)

instance SetField "ansEntry" DsoRules_CollectEntryRenewalPaymentResult (ContractId AnsEntry)

instance SetField "subscriptionState" DsoRules_CollectEntryRenewalPaymentResult (ContractId SubscriptionIdleState)

instance HasExercise DsoRules DsoRules_CollectEntryRenewalPayment DsoRules_CollectEntryRenewalPaymentResult

instance HasFromAnyChoice DsoRules DsoRules_CollectEntryRenewalPayment DsoRules_CollectEntryRenewalPaymentResult

instance HasToAnyChoice DsoRules DsoRules_CollectEntryRenewalPayment DsoRules_CollectEntryRenewalPaymentResult

data DsoRules_ConfirmActionResult

data DsoRules_ConfirmSvOnboardingResult

data DsoRules_CreateExternalPartyAmuletRulesResult

DsoRules_CreateExternalPartyAmuletRulesResult

Field

Type

Description

externalPartyAmuletRulesCid

ContractId ExternalPartyAmuletRules

instance Eq DsoRules_CreateExternalPartyAmuletRulesResult

instance Show DsoRules_CreateExternalPartyAmuletRulesResult

instance GetField "externalPartyAmuletRulesCid" DsoRules_CreateExternalPartyAmuletRulesResult (ContractId ExternalPartyAmuletRules)

instance SetField "externalPartyAmuletRulesCid" DsoRules_CreateExternalPartyAmuletRulesResult (ContractId ExternalPartyAmuletRules)

instance HasExercise DsoRules DsoRules_CreateExternalPartyAmuletRules DsoRules_CreateExternalPartyAmuletRulesResult

instance HasFromAnyChoice DsoRules DsoRules_CreateExternalPartyAmuletRules DsoRules_CreateExternalPartyAmuletRulesResult

instance HasToAnyChoice DsoRules DsoRules_CreateExternalPartyAmuletRules DsoRules_CreateExternalPartyAmuletRulesResult

data DsoRules_CreateTransferCommandCounterResult

DsoRules_CreateTransferCommandCounterResult

Field

Type

Description

transferCommandCounterCid

ContractId TransferCommandCounter

instance Eq DsoRules_CreateTransferCommandCounterResult

instance Show DsoRules_CreateTransferCommandCounterResult

instance GetField "transferCommandCounterCid" DsoRules_CreateTransferCommandCounterResult (ContractId TransferCommandCounter)

instance SetField "transferCommandCounterCid" DsoRules_CreateTransferCommandCounterResult (ContractId TransferCommandCounter)

instance HasExercise DsoRules DsoRules_CreateTransferCommandCounter DsoRules_CreateTransferCommandCounterResult

instance HasFromAnyChoice DsoRules DsoRules_CreateTransferCommandCounter DsoRules_CreateTransferCommandCounterResult

instance HasToAnyChoice DsoRules DsoRules_CreateTransferCommandCounter DsoRules_CreateTransferCommandCounterResult

data DsoRules_ElectDsoDelegateResult

data DsoRules_ExecuteConfirmedActionResult

data DsoRules_ExpireAnsEntryResult

data DsoRules_ExpireStaleConfirmationResult

data DsoRules_ExpireSubscriptionResult

data DsoRules_ExpireSvOnboardingConfirmedResult

data DsoRules_ExpireSvOnboardingRequestResult

data DsoRules_ExpireTransferPreapprovalResult

data DsoRules_GarbageCollectAmuletPriceVotesResult

data DsoRules_GrantFeaturedAppRightResult

data DsoRules_LockedAmulet_ExpireAmuletResult

data DsoRules_MergeMemberTrafficContractsResult

data DsoRules_MergeSvRewardStateResult

data DsoRules_MergeUnclaimedRewardsResult

data DsoRules_MergeValidatorLicenseResult

data DsoRules_MiningRound_CloseResult

data DsoRules_OffboardSvResult

data DsoRules_OnboardValidatorResult

data DsoRules_PruneAmuletConfigScheduleResult

data DsoRules_ReceiveSvRewardCouponResult

DsoRules_ReceiveSvRewardCouponResult

Field

Type

Description

svRewardState

ContractId SvRewardState

svRewardCoupons

[ContractId SvRewardCoupon]

instance GetField "svRewardCoupons" DsoRules_ReceiveSvRewardCouponResult [ContractId SvRewardCoupon]

instance GetField "svRewardState" DsoRules_ReceiveSvRewardCouponResult (ContractId SvRewardState)

instance SetField "svRewardCoupons" DsoRules_ReceiveSvRewardCouponResult [ContractId SvRewardCoupon]

instance SetField "svRewardState" DsoRules_ReceiveSvRewardCouponResult (ContractId SvRewardState)

instance HasExercise DsoRules DsoRules_ReceiveSvRewardCoupon DsoRules_ReceiveSvRewardCouponResult

instance HasFromAnyChoice DsoRules DsoRules_ReceiveSvRewardCoupon DsoRules_ReceiveSvRewardCouponResult

instance HasToAnyChoice DsoRules DsoRules_ReceiveSvRewardCoupon DsoRules_ReceiveSvRewardCouponResult

data DsoRules_RequestElectionResult

data DsoRules_RequestVoteResult

data DsoRules_RevokeFeaturedAppRightResult

data DsoRules_SetConfigResult

data DsoRules_SetSynchronizerNodeConfigResult

data DsoRules_StartSvOnboardingResult

data DsoRules_SubmitStatusReportResult

data DsoRules_TerminateSubscriptionResult

data DsoRules_UpdateAmuletPriceVoteResult

data DsoRules_UpdateSvRewardWeightResult

data DsoSummary

DsoSummary

Field

Type

Description

dsoDelegate

Party

numSvs

Int

requiredNumVotes

Int

The number of votes required for considering a confirmation, a request for a vote, or a DSO delegate election definitive.

instance Eq DsoSummary

instance Show DsoSummary

instance GetField "dsoDelegate" DsoSummary Party

instance GetField "numSvs" DsoSummary Int

instance GetField "requiredNumVotes" DsoSummary Int

instance SetField "dsoDelegate" DsoSummary Party

instance SetField "numSvs" DsoSummary Int

instance SetField "requiredNumVotes" DsoSummary Int

data ElectionRequestReason

ERR_DsoDelegateUnavailable

ERR_OtherReason Text

ExtElectionRequestReason

Field

Type

Description

dummyUnitField

()

Extension constructor (and field) to work around the current lack of upgrading for variants in Daml 3.0

instance Eq ElectionRequestReason

instance Ord ElectionRequestReason

instance Show ElectionRequestReason

instance GetField "dummyUnitField" ElectionRequestReason ()

instance GetField "reason" DsoRules_RequestElection ElectionRequestReason

instance GetField "reason" ElectionRequest ElectionRequestReason

instance SetField "dummyUnitField" ElectionRequestReason ()

instance SetField "reason" DsoRules_RequestElection ElectionRequestReason

instance SetField "reason" ElectionRequest ElectionRequestReason

data OffboardedSvInfo

Information about offboarded svs

OffboardedSvInfo

Field

Type

Description

name

Text

Human-readable name; must be unique.

participantId

Text

Participant ID of the offboarded SV.

instance Eq OffboardedSvInfo

instance Show OffboardedSvInfo

instance GetField "name" OffboardedSvInfo Text

instance GetField "offboardedSvs" DsoRules (Map Party OffboardedSvInfo)

instance GetField "participantId" OffboardedSvInfo Text

instance SetField "name" OffboardedSvInfo Text

instance SetField "offboardedSvs" DsoRules (Map Party OffboardedSvInfo)

instance SetField "participantId" OffboardedSvInfo Text

data Reason

Reason

Field

Type

Description

url

Text

Url pointing to additional background on the reason, e.g., using a https://w3c-ccg.github.io/hashlink/

body

Text

Freeform text intended for human consumption.

instance Eq Reason

instance Show Reason

instance GetField "body" Reason Text

instance GetField "reason" DsoRules_RequestVote Reason

instance GetField "reason" Vote Reason

instance GetField "reason" VoteRequest Reason

instance GetField "url" Reason Text

instance SetField "body" Reason Text

instance SetField "reason" DsoRules_RequestVote Reason

instance SetField "reason" Vote Reason

instance SetField "reason" VoteRequest Reason

instance SetField "url" Reason Text

data SvInfo

Information about SVs relevant to DSO governance.

SvInfo

Field

Type

Description

name

Text

Human-readable name; must be unique.

joinedAsOfRound

Round

Round in which the SV joined

svRewardWeight

Int

Weight of the SV in the SV reward distribution.

participantId

Text

Participant ID of the SV, stored here as PartyToParticipant mappings are tracked via state on the DsoRules + SvOnboardingConfirmed contracts.

instance Eq SvInfo

instance Show SvInfo

instance GetField "joinedAsOfRound" SvInfo Round

instance GetField "name" SvInfo Text

instance GetField "participantId" SvInfo Text

instance GetField "svRewardWeight" SvInfo Int

instance GetField "svs" DsoRules (Map Party SvInfo)

instance SetField "joinedAsOfRound" SvInfo Round

instance SetField "name" SvInfo Text

instance SetField "participantId" SvInfo Text

instance SetField "svRewardWeight" SvInfo Int

instance SetField "svs" DsoRules (Map Party SvInfo)

data SynchronizerUpgradeSchedule

SynchronizerUpgradeSchedule

Field

Type

Description

time

Time

The time at which the migration is scheduled to start.

migrationId

Int

The incremental integer ID of the migration.

instance Eq SynchronizerUpgradeSchedule

instance Show SynchronizerUpgradeSchedule

instance GetField "migrationId" SynchronizerUpgradeSchedule Int

instance GetField "nextScheduledSynchronizerUpgrade" DsoRulesConfig (Optional SynchronizerUpgradeSchedule)

instance GetField "time" SynchronizerUpgradeSchedule Time

instance SetField "migrationId" SynchronizerUpgradeSchedule Int

instance SetField "nextScheduledSynchronizerUpgrade" DsoRulesConfig (Optional SynchronizerUpgradeSchedule)

instance SetField "time" SynchronizerUpgradeSchedule Time

data TrafficState

TrafficState

Field

Type

Description

consumedTraffic

Int

Bytes of extra traffic consumed before the decentralized synchronizer was bootstrapped.

instance Eq TrafficState

instance Show TrafficState

instance GetField "consumedTraffic" TrafficState Int

instance GetField "initialTrafficState" DsoBootstrap (Map Text TrafficState)

instance GetField "initialTrafficState" DsoRules (Map Text TrafficState)

instance SetField "consumedTraffic" TrafficState Int

instance SetField "initialTrafficState" DsoBootstrap (Map Text TrafficState)

instance SetField "initialTrafficState" DsoRules (Map Text TrafficState)

data Vote

A vote cast by an SV.

Vote

Field

Type

Description

sv

Party

The SV party used to submit the vote.

accept

Bool

Whether the responder accepted the request to execute the action or not.

reason

Reason

The reason for voting this way.

instance Eq Vote

instance Show Vote

instance GetField "accept" Vote Bool

instance GetField "reason" Vote Reason

instance GetField "sv" Vote Party

instance GetField "vote" DsoRules_CastVote Vote

instance GetField "votes" VoteRequest (Map Text Vote)

instance SetField "accept" Vote Bool

instance SetField "reason" Vote Reason

instance SetField "sv" Vote Party

instance SetField "vote" DsoRules_CastVote Vote

instance SetField "votes" VoteRequest (Map Text Vote)

data VoteRequestOutcome

VRO_AcceptedButActionFailed

Field

Type

Description

description

Text

Description of the failure.

VRO_Accepted

Field

Type

Description

effectiveAt

Time

Time when the action will be effective.

VRO_Rejected

VRO_Expired

ExtVoteRequestOutcome

Field

Type

Description

dummyUnitField

()

instance Eq VoteRequestOutcome

instance Show VoteRequestOutcome

instance GetField "description" VoteRequestOutcome Text

instance GetField "dummyUnitField" VoteRequestOutcome ()

instance GetField "effectiveAt" VoteRequestOutcome Time

instance GetField "outcome" DsoRules_CloseVoteRequestResult VoteRequestOutcome

instance SetField "description" VoteRequestOutcome Text

instance SetField "dummyUnitField" VoteRequestOutcome ()

instance SetField "effectiveAt" VoteRequestOutcome Time

instance SetField "outcome" DsoRules_CloseVoteRequestResult VoteRequestOutcome

data VotingState a

VotingState

Field

Type

Description

rankings

Map a [[a]]

Candidate and the remaining rankings in case that candidate is eliminated.

loosers

Set a

Loosers are tracked explicitly and removed lazily to avoid the cubic runtime that would result from filtering the remaining rankings eagerly.

instance Ord a => Eq (VotingState a)

instance (Show a, Ord a) => Show (VotingState a)

instance GetField "loosers" (VotingState a) (Set a)

instance GetField "rankings" (VotingState a) (Map a [[a]])

instance SetField "loosers" (VotingState a) (Set a)

instance SetField "rankings" (VotingState a) (Map a [[a]])

Functions

pruneAtLeastOne

: Ord t => t -> Schedule t a -> Optional (Schedule t a)

summarizeDso

: DsoRules -> DsoSummary

executeActionRequiringConfirmation

: ContractId DsoRules -> Optional (ContractId AmuletRules) -> ActionRequiringConfirmation -> Update ()

Execute an action which requires certain number of confirmations from SVs. Each confirmed action can at most be executed once.

instantRunOffVoting

: Ord a => Int -> Int -> [(a, [a])] -> a

determineWinner

: Ord a => Int -> Int -> VotingState a -> a

Determine the winner of a preference voting election using Instant-RunOff voting https://en.wikipedia.org/wiki/Instant-runoff_voting

distributeVotes

: Ord a => a -> VotingState a -> VotingState a

tallyVotes

: Ord a => [[a]] -> VotingState a -> VotingState a

tallyVote

: Ord a => VotingState a -> [a] -> VotingState a

requireWellformedReason

: DsoRulesConfig -> Reason -> Update ()

requireWellformedVote

: DsoRulesConfig -> Vote -> Update ()

ensureNotExpired

: Time -> Update ()

actionRequiringConfirmationEffectiveAt

: ActionRequiringConfirmation -> Optional Time

Get the future-dated effectiveAt of an action requiring confirmation.

getSvInfo

: Party -> DsoRules -> Update SvInfo

lookupSvInfoByName

: Text -> DsoRules -> Optional (Party, SvInfo)

svHasBeenOnboardedBefore

: Text -> DsoRules -> Bool

Returns True if an SV with that name is either currently onboarded or an SV with that name has been onboarded before and is now in offboardedSvs.

ensureNeverOperatedNode

: Party -> DsoRules -> Update ()

dsoRules_addSv

: DsoRules -> DsoRules_AddSv -> Update (ContractId DsoRules)

createPerSvContracts

: DsoRules -> DsoRules_AddSv -> Update ()

createPerSvPartyContracts

: Party -> Party -> Text -> SynchronizerNodeConfigMap -> Optional Decimal -> Update ()