Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.canton.network/llms.txt

Use this file to discover all available pages before exploring further.

Types and contracts for managing synchronizer fees

Templates

template MemberTraffic
The state of the extra synchronizer traffic purchases of a sequencer sv. Signatory: dso
FieldTypeDescription
dsoParty
memberIdTextThe id of the sequencer member (participant or mediator) for which traffic has been purchased
synchronizerIdTextThe id of the synchronizer for which this contract tracks purchased extra traffic
migrationIdIntThe migration id of the synchronizer for which this contract tracks purchased extra traffic
totalPurchasedIntThe number of bytes of extra traffic purchased
numPurchasesIntNumber of times extra traffic has been purchased
amuletSpentDecimalTotal Amulet spent on extra traffic
usdSpentDecimalTotal 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
FieldTypeDescription
requiredSynchronizersSet TextThe synchronizer-ids of all synchronizers that Amulet and ANS users should be connected to.
activeSynchronizerTextThe synchronizer-id of the synchronizer on which the SVs accepts transactions involving the AmuletRules and related contracts, which must be one of the requiredSynchronizers.
feesSynchronizerFeesConfigThe 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) instance Patchable AmuletDecentralizedSynchronizerConfig
data BaseRateTrafficLimits
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.
BaseRateTrafficLimits
FieldTypeDescription
burstAmountIntThe total burstAmount in bytes of sequencing traffic delivered over the burstWindow
burstWindowRelTimeTime window within which the burstAmount must not be exceeded
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 instance Patchable BaseRateTrafficLimits
data ForMemberTraffic
ForMemberTraffic
FieldTypeDescription
dsoParty
memberIdText
synchronizerIdText
migrationIdInt
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
data SynchronizerFeesConfig
Synchronizer fees related configuration to be tracked on the DsoRules contract
SynchronizerFeesConfig
FieldTypeDescription
baseRateTrafficLimitsBaseRateTrafficLimitsConfiguration limits for base rate traffic
extraTrafficPriceDecimalThe price of extra traffic denominated in $/MB
readVsWriteScalingFactorIntHow 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.
minTopupAmountIntThe 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 instance Patchable SynchronizerFeesConfig

Functions

validAmuletDecentralizedSynchronizerConfig : AmuletDecentralizedSynchronizerConfig -> Bool
initialMemberTraffic : Party -> Text -> Text -> Int -> MemberTraffic