code.vegaprotocol.io/vega@v0.79.0/protos/sources/vega/checkpoint/v1/checkpoint.proto (about)

     1  syntax = "proto3";
     2  
     3  package vega.checkpoint.v1;
     4  
     5  import "vega/assets.proto";
     6  import "vega/chain_events.proto";
     7  import "vega/events/v1/events.proto";
     8  import "vega/governance.proto";
     9  import "vega/markets.proto";
    10  import "vega/vega.proto";
    11  
    12  option go_package = "code.vegaprotocol.io/vega/protos/vega/checkpoint/v1";
    13  
    14  // CheckpointState is the entire checkpoint serialised. Basically it is the serialisation of the Checkpoint message + hash.
    15  message CheckpointState {
    16    bytes hash = 1;
    17    bytes state = 2;
    18  }
    19  
    20  // Checkpoint aggregates the various engine snapshots
    21  message Checkpoint {
    22    bytes governance = 1;
    23    bytes assets = 2;
    24    bytes collateral = 3;
    25    bytes network_parameters = 4;
    26    bytes delegation = 5;
    27    bytes epoch = 6; // will just be an epoch event
    28    bytes block = 7;
    29    bytes rewards = 8;
    30    bytes banking = 9;
    31    bytes validators = 10;
    32    bytes staking = 11;
    33    bytes multisig_control = 12;
    34    bytes market_tracker = 13;
    35    bytes execution = 14;
    36  }
    37  
    38  // AssetEntry is a single (enabled) asset
    39  message AssetEntry {
    40    string id = 1;
    41    vega.AssetDetails asset_details = 2;
    42  }
    43  
    44  // Assets contains all the enabled assets as AssetEntries
    45  message Assets {
    46    repeated AssetEntry assets = 1;
    47    repeated AssetEntry pending_listing_assets = 2;
    48  }
    49  
    50  // AssetBalance represents the total balance of a given asset for a party
    51  message AssetBalance {
    52    string party = 1;
    53    string asset = 2;
    54    string balance = 3;
    55  }
    56  
    57  // Collateral contains the balances per party
    58  message Collateral {
    59    repeated AssetBalance balances = 1;
    60  }
    61  
    62  // NetParams contains all network parameters
    63  message NetParams {
    64    repeated vega.NetworkParameter params = 1;
    65  }
    66  
    67  // Proposals will contain all accepted proposals
    68  message Proposals {
    69    repeated vega.Proposal proposals = 1;
    70  }
    71  
    72  // Delegated amounts for party/node
    73  // `undelegate` and `epoch_seq` are only relevant for pending entries
    74  message DelegateEntry {
    75    string party = 1;
    76    string node = 2;
    77    string amount = 3;
    78    bool undelegate = 4;
    79    uint64 epoch_seq = 5;
    80  }
    81  
    82  // Delegate contains all entries for a checkpoint
    83  message Delegate {
    84    repeated DelegateEntry active = 1;
    85    repeated DelegateEntry pending = 2;
    86    repeated string auto_delegation = 3;
    87  }
    88  
    89  // Block message contains data related to block at which the checkpoint
    90  // was created i.e. the block height
    91  message Block {
    92    int64 height = 1;
    93  }
    94  
    95  message Rewards {
    96    repeated RewardPayout rewards = 1;
    97  }
    98  
    99  message RewardPayout {
   100    int64 payout_time = 1;
   101    repeated PendingRewardPayout rewards_payout = 2;
   102  }
   103  
   104  message PendingRewardPayout {
   105    string from_account = 1;
   106    string asset = 2;
   107    repeated PartyAmount party_amount = 3;
   108    string total_reward = 4;
   109    string epoch_seq = 5;
   110    int64 timestamp = 6;
   111  }
   112  
   113  message PartyAmount {
   114    string party = 1;
   115    string amount = 2;
   116  }
   117  
   118  message PendingKeyRotation {
   119    // Relative target block height is: target block height - current block height.
   120    // Useful for cross blockchain compatibility.
   121    uint64 relative_target_block_height = 1;
   122    string node_id = 2;
   123    string new_pub_key = 3;
   124    uint32 new_pub_key_index = 4;
   125  }
   126  
   127  message PendingEthereumKeyRotation {
   128    // Relative target block height is: target block height - current block height.
   129    // Useful for cross blockchain compatibility.
   130    uint64 relative_target_block_height = 1;
   131    string node_id = 2;
   132    string new_address = 3;
   133  }
   134  
   135  message ScheduledTransfer {
   136    vega.Transfer transfer = 1;
   137    vega.AccountType account_type = 2;
   138    string reference = 3;
   139    vega.events.v1.Transfer oneoff_transfer = 4;
   140  }
   141  
   142  message ScheduledTransferAtTime {
   143    int64 deliver_on = 1;
   144    repeated ScheduledTransfer transfers = 2;
   145  }
   146  
   147  message RecurringTransfers {
   148    repeated vega.events.v1.Transfer recurring_transfers = 1;
   149    int64 next_metric_update = 2;
   150  }
   151  
   152  message GovernanceTransfer {
   153    string id = 1;
   154    string reference = 2;
   155    vega.events.v1.Transfer.Status status = 3;
   156    int64 timestamp = 4;
   157    vega.NewTransferConfiguration config = 5;
   158  }
   159  
   160  message ScheduledGovernanceTransferAtTime {
   161    int64 deliver_on = 1;
   162    repeated GovernanceTransfer transfers = 2;
   163  }
   164  
   165  message Banking {
   166    repeated ScheduledTransferAtTime transfers_at_time = 1;
   167    RecurringTransfers recurring_transfers = 2;
   168    BridgeState primary_bridge_state = 3;
   169    repeated AssetAction asset_actions = 4;
   170    uint64 last_seen_primary_eth_block = 5;
   171    repeated string seen_refs = 6;
   172    repeated ScheduledGovernanceTransferAtTime governance_transfers_at_time = 7;
   173    repeated GovernanceTransfer recurring_governance_transfers = 8;
   174    BridgeState secondary_bridge_state = 9;
   175    uint64 last_seen_secondary_eth_block = 10;
   176  }
   177  
   178  message BridgeState {
   179    bool active = 1;
   180    uint64 block_height = 2;
   181    uint64 log_index = 3;
   182    string chain_id = 4;
   183  }
   184  
   185  message Validators {
   186    repeated ValidatorState validator_state = 1;
   187    repeated PendingKeyRotation pending_key_rotations = 2;
   188    repeated PendingEthereumKeyRotation pending_ethereum_key_rotations = 3;
   189  }
   190  
   191  message ValidatorState {
   192    vega.events.v1.ValidatorUpdate validator_update = 1;
   193    int32 status = 2;
   194    uint64 eth_events_forwarded = 3;
   195    int64 validator_power = 4;
   196    vega.RankingScore ranking_score = 5;
   197    int32 heartbeat_block_index = 6;
   198    repeated bool heartbeat_block_sigs = 7;
   199  }
   200  
   201  message Staking {
   202    repeated vega.events.v1.StakeLinking accepted = 1;
   203    uint64 last_block_seen = 2;
   204  }
   205  
   206  message MultisigControl {
   207    repeated vega.events.v1.ERC20MultiSigSignerEvent signers = 1;
   208    vega.events.v1.ERC20MultiSigThresholdSetEvent threshold_set = 2;
   209    uint64 last_block_seen = 3;
   210  }
   211  
   212  message MarketTracker {
   213    repeated MarketActivityTracker market_activity = 1;
   214    repeated TakerNotionalVolume taker_notional_volume = 2;
   215    repeated MarketToPartyTakerNotionalVolume market_to_party_taker_notional_volume = 3;
   216    repeated EpochPartyTakerFees epoch_taker_fees = 4;
   217    repeated GameEligibilityTracker game_eligibility_tracker = 5;
   218  }
   219  
   220  message MarketActivityTracker {
   221    string market = 1;
   222    string asset = 2;
   223    repeated PartyFees maker_fees_received = 3;
   224    repeated PartyFees maker_fees_paid = 4;
   225    repeated PartyFees lp_fees = 5;
   226    string proposer = 6;
   227    repeated string bonus_paid = 7;
   228    string value_traded = 8;
   229    bool ready_to_delete = 9;
   230  
   231    repeated TWPositionData time_weighted_position = 10;
   232    repeated TWNotionalData time_weighted_notional = 11;
   233    repeated ReturnsData returns_data = 12;
   234  
   235    repeated EpochPartyFees maker_fees_received_history = 13;
   236    repeated EpochPartyFees maker_fees_paid_history = 14;
   237    repeated EpochPartyFees lp_fees_history = 15;
   238  
   239    repeated EpochTimeWeightPositionData time_weighted_position_data_history = 16;
   240    repeated EpochTimeWeightedNotionalData time_weighted_notional_data_history = 17;
   241    repeated EpochReturnsData returns_data_history = 18;
   242    repeated PartyFees infra_fees = 19;
   243    repeated PartyFees lp_paid_fees = 20;
   244  
   245    repeated ReturnsData realised_returns = 21;
   246    repeated EpochReturnsData realised_returns_history = 22;
   247  
   248    repeated string amm_parties = 23;
   249  
   250    repeated PartyFees buy_back_fees = 24;
   251    repeated PartyFees treasury_fees = 25;
   252  
   253    string notional_volume_for_epoch = 26;
   254    repeated string epoch_notional_volume = 27;
   255  }
   256  
   257  message GameEligibilityTracker {
   258    string game_id = 1;
   259    repeated EpochEligibility epoch_eligibility = 2;
   260  }
   261  
   262  message EpochEligibility {
   263    repeated string eligible_parties = 1;
   264  }
   265  
   266  message EpochPartyTakerFees {
   267    repeated AssetMarketPartyTakerFees epoch_party_taker_fees_paid = 1;
   268  }
   269  
   270  message EpochTimeWeightPositionData {
   271    repeated PartyTimeWeightedPosition party_time_weighted_positions = 1;
   272  }
   273  
   274  message EpochTimeWeightedNotionalData {
   275    repeated PartyTimeWeightedNotional party_time_weighted_notionals = 1;
   276  }
   277  
   278  message PartyTimeWeightedNotional {
   279    string party = 1;
   280    bytes tw_notional = 2;
   281  }
   282  
   283  message PartyTimeWeightedPosition {
   284    string party = 1;
   285    uint64 tw_position = 2;
   286  }
   287  
   288  message AssetMarketPartyTakerFees {
   289    string asset = 1;
   290    string market = 2;
   291    repeated PartyTakerFees taker_fees = 3;
   292  }
   293  
   294  message PartyTakerFees {
   295    string party = 1;
   296    bytes taker_fees = 2;
   297  }
   298  
   299  message EpochPartyFees {
   300    repeated PartyFeesHistory party_fees = 1;
   301  }
   302  
   303  message TakerNotionalVolume {
   304    string party = 1;
   305    bytes volume = 2;
   306  }
   307  
   308  message MarketToPartyTakerNotionalVolume {
   309    string market = 1;
   310    repeated TakerNotionalVolume taker_notional_volume = 2;
   311  }
   312  
   313  message EpochReturnsData {
   314    repeated ReturnsData returns = 1;
   315  }
   316  
   317  message ReturnsData {
   318    string party = 1;
   319    bytes return = 2;
   320  }
   321  
   322  message TWPositionData {
   323    string party = 1;
   324    uint64 position = 2;
   325    int64 time = 3;
   326    uint64 tw_position = 4;
   327  }
   328  
   329  message TWNotionalData {
   330    string party = 1;
   331    bytes notional = 2;
   332    int64 time = 3;
   333    bytes tw_notional = 4;
   334    bytes price = 5;
   335  }
   336  
   337  message PartyFees {
   338    string party = 1;
   339    string fee = 2;
   340  }
   341  
   342  message PartyFeesHistory {
   343    string party = 1;
   344    bytes fee = 2;
   345  }
   346  
   347  message AssetAction {
   348    string id = 1;
   349    uint32 state = 2;
   350    string asset = 3;
   351    uint64 block_number = 4;
   352    uint64 tx_index = 5;
   353    string hash = 6;
   354  
   355    vega.BuiltinAssetDeposit builtin_deposit = 7;
   356    vega.ERC20Deposit erc20_deposit = 8;
   357    vega.ERC20AssetList asset_list = 9;
   358    vega.ERC20AssetLimitsUpdated erc20_asset_limits_updated = 10;
   359    bool erc20_bridge_stopped = 11;
   360    bool erc20_bridge_resumed = 12;
   361    string chain_id = 13;
   362  }
   363  
   364  message ELSShare {
   365    // Party ID of the liquidity provider.
   366    string party_id = 1;
   367    // The equity-like share of the liquidity provider, representing their share in the total provided liquidity expressed as a value between 0 and 1.
   368    string share = 2;
   369    // Amount committed. This is the total commitment made. It does not necessarily match the LP balance.
   370    string supplied_stake = 3;
   371    // LP stake, weighted according to the time the stake was committed and market growth.
   372    string virtual_stake = 4;
   373    // Average entry valuation. As time increases the weight of stake, this is the overall valuation of the current stake.
   374    string avg = 5;
   375  }
   376  
   377  message MarketState {
   378    // Unique ID for the market
   379    string id = 1;
   380  
   381    // The current equity-like share data for a market.
   382    repeated ELSShare shares = 2;
   383  
   384    // Current balance of the insurance pool.
   385    string insurance_balance = 3;
   386  
   387    // Total trade value which last determined the growth rate of the market.
   388    string last_trade_value = 4;
   389  
   390    // Total trade volume which last determined the growth rate of the market.
   391    string last_trade_volume = 5;
   392  
   393    // Succession window in nanoseconds: the timestamp when this market cannot be succeeded anymore.
   394    int64 succession_window = 6;
   395  
   396    // The underlying market should be present in case the successor market is enacted during the succession window.
   397    // This field can be omitted if the market is not yet settled.
   398    vega.Market market = 7;
   399  }
   400  
   401  message ExecutionState {
   402    // Market data that should be preserved, like equity-like shares, and settled markets that have pending successor markets.
   403    repeated MarketState data = 1;
   404  }