Splice.DecentralizedSynchronizer
Types and contracts for managing synchronizer fees
Templates
template MemberTraffic
The state of the extra synchronizer traffic purchases of a sequencer sv.
Signatory: dso
Field
Type
Description
dso
memberId
The id of the sequencer member (participant or mediator) for which traffic has been purchased
synchronizerId
The id of the synchronizer for which this contract tracks purchased extra traffic
migrationId
The migration id of the synchronizer for which this contract tracks purchased extra traffic
totalPurchased
The number of bytes of extra traffic purchased
numPurchases
Number of times extra traffic has been purchased
amuletSpent
Total Amulet spent on extra traffic
usdSpent
Total USD spent on extra traffic
Choice Archive
Controller: dso
Returns: ()
(no fields)
Data Types
data AmuletDecentralizedSynchronizerConfig
The configuration of the logical concept of a decentralized synchronizer, which consists over its lifetime of a series of actual synchronizers, which are introduced for handling the (rare) occasions of switching to a new synchronizer protocol version.
AmuletDecentralizedSynchronizerConfig
Field
Type
Description
requiredSynchronizers
The synchronizer-ids of all synchronizers that Amulet and ANS users should be connected to.
activeSynchronizer
The synchronizer-id of the synchronizer on which the SVs accepts transactions involving the AmuletRules and related contracts, which must be one of the
requiredSynchronizers
.fees
The fees charged for using the decentralized synchronizer. We use the same fees across all active decentralized synchronizers.
instance Eq AmuletDecentralizedSynchronizerConfig
instance Show AmuletDecentralizedSynchronizerConfig
instance GetField "activeSynchronizer" AmuletDecentralizedSynchronizerConfig Text
instance GetField "decentralizedSynchronizer" (AmuletConfig unit) AmuletDecentralizedSynchronizerConfig
instance GetField "fees" AmuletDecentralizedSynchronizerConfig SynchronizerFeesConfig
instance GetField "requiredSynchronizers" AmuletDecentralizedSynchronizerConfig (Set Text)
instance SetField "activeSynchronizer" AmuletDecentralizedSynchronizerConfig Text
instance SetField "decentralizedSynchronizer" (AmuletConfig unit) AmuletDecentralizedSynchronizerConfig
instance SetField "fees" AmuletDecentralizedSynchronizerConfig SynchronizerFeesConfig
instance SetField "requiredSynchronizers" AmuletDecentralizedSynchronizerConfig (Set Text)
The limits defining the free base rate delivered by the synchronizer. It defines the base rate as allowing at most burstAmount of sequencing traffic within a window of burstWindow seconds.
instance Eq BaseRateTrafficLimits
instance Show BaseRateTrafficLimits
instance GetField "baseRateTrafficLimits" SynchronizerFeesConfig BaseRateTrafficLimits
instance GetField "burstAmount" BaseRateTrafficLimits Int
instance GetField "burstWindow" BaseRateTrafficLimits RelTime
instance SetField "baseRateTrafficLimits" SynchronizerFeesConfig BaseRateTrafficLimits
instance SetField "burstAmount" BaseRateTrafficLimits Int
instance SetField "burstWindow" BaseRateTrafficLimits RelTime
data ForMemberTraffic
instance Eq ForMemberTraffic
instance Show ForMemberTraffic
instance GetField "dso" ForMemberTraffic Party
instance GetField "memberId" ForMemberTraffic Text
instance GetField "migrationId" ForMemberTraffic Int
instance GetField "synchronizerId" ForMemberTraffic Text
instance SetField "dso" ForMemberTraffic Party
instance SetField "memberId" ForMemberTraffic Text
instance SetField "migrationId" ForMemberTraffic Int
instance SetField "synchronizerId" ForMemberTraffic Text
instance HasCheckedFetch MemberTraffic ForMemberTraffic
Synchronizer fees related configuration to be tracked on the DsoRules contract
Field
Type
Description
baseRateTrafficLimits
Configuration limits for base rate traffic
extraTrafficPrice
The price of extra traffic denominated in $/MB
readVsWriteScalingFactor
How much the sending of a message to its recipient costs in terms of bytes written to the synchronizer. This factor is specified in parts per 10,000 (or per 10 mille) We charge for sending messages depending on the number of recipients, as delivering the message incurs a cost as well, albeit usually a much smaller one than the cost of a write.
minTopupAmount
The minimum amount of extra traffic (in bytes) that must be bought when buying extra traffic. This ensures that the SVs can amortize the cost of executing that transaction.
instance Eq SynchronizerFeesConfig
instance Show SynchronizerFeesConfig
instance GetField "baseRateTrafficLimits" SynchronizerFeesConfig BaseRateTrafficLimits
instance GetField "extraTrafficPrice" SynchronizerFeesConfig Decimal
instance GetField "fees" AmuletDecentralizedSynchronizerConfig SynchronizerFeesConfig
instance GetField "minTopupAmount" SynchronizerFeesConfig Int
instance GetField "readVsWriteScalingFactor" SynchronizerFeesConfig Int
instance SetField "baseRateTrafficLimits" SynchronizerFeesConfig BaseRateTrafficLimits
instance SetField "extraTrafficPrice" SynchronizerFeesConfig Decimal
instance SetField "fees" AmuletDecentralizedSynchronizerConfig SynchronizerFeesConfig
instance SetField "minTopupAmount" SynchronizerFeesConfig Int
instance SetField "readVsWriteScalingFactor" SynchronizerFeesConfig Int
Functions
- initialMemberTraffic
: Party -> Text -> Text -> Int -> MemberTraffic