code.vegaprotocol.io/vega@v0.79.0/protos/sources/vega/snapshot/v1/snapshot.proto (about) 1 syntax = "proto3"; 2 3 package vega.snapshot.v1; 4 5 import "vega/assets.proto"; 6 import "vega/chain_events.proto"; 7 import "vega/checkpoint/v1/checkpoint.proto"; 8 import "vega/data/v1/data.proto"; 9 import "vega/events/v1/events.proto"; 10 import "vega/governance.proto"; 11 import "vega/markets.proto"; 12 import "vega/vega.proto"; 13 14 option go_package = "code.vegaprotocol.io/vega/protos/vega/snapshot/v1"; 15 16 enum Format { 17 // Default value, always invalid 18 FORMAT_UNSPECIFIED = 0; 19 // Standard proto encoding 20 FORMAT_PROTO = 1; 21 // Compressed proto, might come in handy 22 FORMAT_PROTO_COMPRESSED = 2; 23 // Simple JSON serialisation, probably not going to be used 24 FORMAT_JSON = 3; 25 } 26 27 message Snapshot { 28 uint64 height = 1; 29 Format format = 2; 30 uint32 chunks = 3; 31 bytes hash = 4; 32 bytes metadata = 5; 33 } 34 35 // NodeHash represents an exported node from the AVL tree and contains all the 36 // data necessary to reconstruct an identical copy of the AVL tree after it's 37 // been serialised 38 message NodeHash { 39 // Node's full key, for example epoch.all 40 string key = 3; 41 // Hash of the node's value 42 string hash = 4; 43 // Height of the node in the tree 44 int32 height = 5; 45 // Version of that node i.e., how many times its value has changed during tree 46 // updates 47 int64 version = 6; 48 // Whether or not the node contains a snapshot payload, only leaf nodes in the 49 // AVL contain payloads 50 bool is_leaf = 7; 51 } 52 53 message Metadata { 54 int64 version = 1; 55 repeated string chunk_hashes = 2; 56 repeated NodeHash node_hashes = 3; 57 string protocol_version = 4; 58 bool protocol_upgrade = 5; 59 } 60 61 // Chunk is simply an as-is chunk belonging to a snapshot 62 // not sure how usable this type would be 63 message Chunk { 64 repeated Payload data = 1; 65 int64 nr = 2; // in case of multi-part data, this is chunk nr... 66 int64 of = 3; // ...of a total of N chunks 67 } 68 69 message Payload { 70 oneof data { 71 ActiveAssets active_assets = 1; 72 PendingAssets pending_assets = 2; 73 BankingWithdrawals banking_withdrawals = 3; 74 BankingDeposits banking_deposits = 4; 75 BankingSeen banking_seen = 5; 76 BankingAssetActions banking_asset_actions = 6; 77 Checkpoint checkpoint = 7; 78 CollateralAccounts collateral_accounts = 8; 79 CollateralAssets collateral_assets = 9; 80 DelegationActive delegation_active = 10; 81 DelegationPending delegation_pending = 11; 82 DelegationAuto delegation_auto = 12; 83 GovernanceActive governance_active = 13; 84 GovernanceEnacted governance_enacted = 14; 85 StakingAccounts staking_accounts = 15; 86 MatchingBook matching_book = 16; 87 NetParams network_parameters = 17; 88 ExecutionMarkets execution_markets = 18; 89 MarketPositions market_positions = 19; 90 AppState app_state = 20; 91 EpochState epoch = 21; 92 RewardsPendingPayouts rewards_pending_payouts = 23; 93 GovernanceNode governance_node = 24; 94 LimitState limit_state = 25; 95 VoteSpamPolicy vote_spam_policy = 26; 96 SimpleSpamPolicy simple_spam_policy = 27; 97 Notary notary = 28; 98 EventForwarder event_forwarder = 31; 99 StakeVerifierDeposited stake_verifier_deposited = 32; 100 StakeVerifierRemoved stake_verifier_removed = 33; 101 Witness witness = 34; 102 DelegationLastReconciliationTime delegation_last_reconciliation_time = 35; 103 Topology topology = 36; 104 OracleDataBatch oracle_data = 37; 105 LiquidityParameters liquidity_parameters = 38; 106 LiquidityPendingProvisions liquidity_pending_provisions = 39; 107 LiquidityPartiesLiquidityOrders liquidity_parties_liquidity_orders = 40; 108 LiquidityPartiesOrders liquidity_parties_orders = 41; 109 LiquidityProvisions liquidity_provisions = 42; 110 LiquiditySupplied liquidity_supplied = 43; 111 LiquidityTarget liquidity_target = 44; 112 FloatingPointConsensus floating_point_consensus = 46; 113 MarketTracker market_tracker = 47; 114 BankingRecurringTransfers banking_recurring_transfers = 49; 115 BankingScheduledTransfers banking_scheduled_transfers = 50; 116 ERC20MultiSigTopologyVerified erc20_multisig_topology_verified = 51; 117 ERC20MultiSigTopologyPending erc20_multisig_topology_pending = 52; 118 ProofOfWork proof_of_work = 53; 119 PendingAssetUpdates pending_asset_updates = 54; 120 ProtocolUpgradeProposals protocol_upgrade_proposals = 55; 121 BankingBridgeState banking_primary_bridge_state = 56; 122 SettlementState settlement_state = 57; 123 LiquidityScores liquidity_scores = 58; 124 SpotLiquidityTarget spot_liquidity_target = 59; 125 BankingRecurringGovernanceTransfers banking_recurring_governance_transfers = 60; 126 BankingScheduledGovernanceTransfers banking_scheduled_governance_transfers = 61; 127 EthContractCallResults eth_contract_call_results = 62; 128 EthOracleVerifierLastBlock eth_oracle_verifier_last_block = 63; 129 LiquidityV2Provisions liquidity_v2_provisions = 64; 130 LiquidityV2PendingProvisions liquidity_v2_pending_provisions = 65; 131 LiquidityV2Performances liquidity_v2_performances = 66; 132 LiquidityV2Supplied liquidity_v2_supplied = 67; 133 LiquidityV2Scores liquidity_v2_scores = 68; 134 HoldingAccountTracker holding_account_tracker = 69; 135 Teams teams = 70; 136 TeamSwitches team_switches = 71; 137 Vesting vesting = 72; 138 ReferralProgramData referral_program = 73; 139 ActivityStreak activity_streak = 76; 140 VolumeDiscountProgram volume_discount_program = 77; 141 LiquidityV2Parameters liquidity_v2_parameters = 78; 142 LiquidityV2PaidFeesStats liquidity_v2_paid_fees_stats = 79; 143 Liquidation liquidation = 80; 144 BankingTransferFeeDiscounts banking_transfer_fee_discounts = 81; 145 GovernanceBatchActive governance_batch_active = 82; 146 Parties parties = 83; 147 L2EthOracles l2_eth_oracles = 84; 148 EthOracleVerifierMisc eth_oracle_verifier_misc = 85; 149 BankingEVMBridgeStates banking_evm_bridge_states = 86; 150 EVMMultisigTopologies evm_multisig_topologies = 87; 151 TxCache tx_cache = 88; 152 EVMFwdHeartbeats evm_fwd_heartbeats = 89; 153 VolumeRebateProgram volume_rebate_program = 90; 154 } 155 } 156 157 message OrderHoldingQuantities { 158 string id = 1; 159 string quantity = 2; 160 string fee = 3; 161 } 162 163 message HoldingAccountTracker { 164 string market_id = 1; 165 repeated OrderHoldingQuantities order_holding = 2; 166 } 167 168 message TimestampedTotalStake { 169 uint64 total_stake = 1; 170 int64 time = 2; 171 } 172 173 message TimestampedOpenInterest { 174 uint64 open_interest = 1; 175 int64 time = 2; 176 } 177 178 message LiquidityTarget { 179 string market_id = 1; 180 int64 current_time = 2; 181 int64 scheduled_truncate = 3; 182 repeated uint64 current_open_interests = 4; 183 repeated TimestampedOpenInterest previous_open_interests = 5; 184 TimestampedOpenInterest max_open_interests = 6; 185 } 186 187 message SpotLiquidityTarget { 188 string market_id = 1; 189 int64 current_time = 2; 190 int64 scheduled_truncate = 3; 191 repeated uint64 current_total_stake = 4; 192 repeated TimestampedTotalStake previous_total_stake = 5; 193 TimestampedTotalStake max_total_stake = 6; 194 } 195 196 message LiquidityOffsetProbabilityPair { 197 uint32 offset = 1; 198 string probability = 2; 199 } 200 201 message LiquiditySupplied { 202 string market_id = 1; 203 bool consensus_reached = 2; 204 repeated LiquidityOffsetProbabilityPair bid_cache = 3; 205 repeated LiquidityOffsetProbabilityPair ask_cache = 4; 206 } 207 208 message OracleDataBatch { 209 repeated OracleData oracle_data = 1; 210 } 211 212 message OracleData { 213 repeated vega.data.v1.Signer signers = 1; 214 repeated OracleDataPair data = 2; 215 repeated vega.data.v1.Property meta_data = 3; 216 } 217 218 message OracleDataPair { 219 string key = 1; 220 string value = 2; 221 } 222 223 message Witness { 224 repeated Resource resources = 1; 225 } 226 227 message Resource { 228 string id = 1; 229 int64 check_until = 2; 230 repeated string votes = 3; 231 uint32 state = 4; 232 } 233 234 message EventForwarderBucket { 235 int64 ts = 1; 236 repeated string hashes = 2; 237 } 238 239 message EventForwarder { 240 // this is deprecated, use the other one now 241 repeated string acked_events = 1; 242 repeated EventForwarderBucket buckets = 2; 243 string chain_id = 3; 244 } 245 246 message CollateralAccounts { 247 repeated vega.Account accounts = 1; 248 int64 next_balance_snapshot = 2; 249 repeated Earmarked earmarked_balances = 3; 250 } 251 252 message Earmarked { 253 // the earmarked account id 254 string account_id = 1; 255 // the earmarked balance 256 string earmarked_balance = 2; 257 } 258 259 message CollateralAssets { 260 repeated vega.Asset assets = 1; 261 } 262 263 message ActiveAssets { 264 repeated vega.Asset assets = 1; 265 } 266 267 message PendingAssets { 268 repeated vega.Asset assets = 1; 269 } 270 271 message PendingAssetUpdates { 272 repeated vega.Asset assets = 1; 273 } 274 275 message Withdrawal { 276 string ref = 1; 277 vega.Withdrawal withdrawal = 2; 278 } 279 280 message Deposit { 281 string id = 1; 282 vega.Deposit deposit = 2; 283 } 284 285 message TxRef { 286 string asset = 1; 287 uint64 block_nr = 2; 288 string hash = 3; 289 uint64 log_index = 4; 290 string chain_id = 5; 291 } 292 293 message BankingWithdrawals { 294 repeated Withdrawal withdrawals = 1; 295 } 296 297 message BankingDeposits { 298 repeated Deposit deposit = 1; 299 } 300 301 message BankingSeen { 302 repeated string refs = 1; 303 uint64 last_seen_primary_eth_block = 2; 304 uint64 last_seen_secondary_eth_block = 3; 305 } 306 307 message BankingAssetActions { 308 repeated vega.checkpoint.v1.AssetAction asset_action = 1; 309 } 310 311 message BankingRecurringTransfers { 312 vega.checkpoint.v1.RecurringTransfers recurring_transfers = 1; 313 int64 next_metric_update = 2; 314 } 315 316 message BankingScheduledTransfers { 317 repeated vega.checkpoint.v1.ScheduledTransferAtTime transfers_at_time = 1; 318 } 319 320 message BankingRecurringGovernanceTransfers { 321 repeated vega.checkpoint.v1.GovernanceTransfer recurring_transfers = 1; 322 } 323 324 message BankingScheduledGovernanceTransfers { 325 repeated vega.checkpoint.v1.ScheduledGovernanceTransferAtTime transfers_at_time = 1; 326 } 327 328 message BankingBridgeState { 329 vega.checkpoint.v1.BridgeState bridge_state = 1; 330 } 331 332 message BankingEVMBridgeStates { 333 repeated vega.checkpoint.v1.BridgeState bridge_states = 1; 334 } 335 336 message Checkpoint { 337 int64 next_cp = 1; 338 } 339 340 message DelegationLastReconciliationTime { 341 int64 last_reconciliation_time = 1; 342 } 343 344 message DelegationActive { 345 repeated vega.Delegation delegations = 1; 346 } 347 348 message DelegationPending { 349 repeated vega.Delegation delegations = 1; 350 repeated vega.Delegation undelegation = 2; 351 } 352 353 message DelegationAuto { 354 repeated string parties = 1; 355 } 356 357 message ProposalData { 358 vega.Proposal proposal = 1; 359 repeated vega.Vote yes = 2; 360 repeated vega.Vote no = 3; 361 repeated vega.Vote invalid = 4; 362 } 363 364 message GovernanceEnacted { 365 repeated ProposalData proposals = 1; 366 } 367 368 message GovernanceActive { 369 repeated ProposalData proposals = 1; 370 } 371 372 message BatchProposalData { 373 ProposalData batch_proposal = 1; 374 repeated vega.Proposal proposals = 2; 375 } 376 377 message GovernanceBatchActive { 378 repeated BatchProposalData batch_proposals = 1; 379 } 380 381 message GovernanceNode { 382 repeated vega.Proposal proposals = 1; 383 repeated ProposalData proposal_data = 2; // includes votes 384 repeated BatchProposalData batch_proposal_data = 3; 385 } 386 387 message StakingAccount { 388 string party = 1; 389 string balance = 2; 390 repeated vega.events.v1.StakeLinking events = 3; 391 } 392 393 message StakingAccounts { 394 repeated StakingAccount accounts = 1; 395 string staking_asset_total_supply = 2; 396 vega.StakeTotalSupply pending_stake_total_supply = 3; 397 } 398 399 message MatchingBook { 400 string market_id = 1; 401 repeated vega.Order buy = 2; 402 repeated vega.Order sell = 3; 403 string last_traded_price = 4; 404 bool auction = 5; 405 uint64 batch_id = 6; 406 repeated string pegged_order_ids = 7; 407 } 408 409 message NetParams { 410 repeated vega.NetworkParameter params = 1; 411 } 412 413 message DecimalMap { 414 int64 key = 1; 415 string val = 2; 416 } 417 418 message TimePrice { 419 int64 time = 1; 420 string price = 2; 421 } 422 423 message PriceVolume { 424 string price = 1; 425 uint64 volume = 2; 426 } 427 428 message PriceRange { 429 string min = 1; 430 string max = 2; 431 string ref = 3; 432 } 433 434 message PriceBound { 435 bool active = 1; 436 string up_factor = 2; 437 string down_factor = 3; 438 vega.PriceMonitoringTrigger trigger = 4; 439 } 440 441 message PriceRangeCache { 442 PriceBound bound = 1; 443 PriceRange range = 2; 444 uint64 bound_index = 3; 445 } 446 447 message CurrentPrice { 448 string price = 1; 449 uint64 volume = 2; 450 } 451 452 message PastPrice { 453 int64 time = 1; 454 string volume_weighted_price = 2; 455 } 456 457 message PriceMonitor { 458 bool initialised = 3; 459 repeated DecimalMap fp_horizons = 4; 460 int64 now = 5; 461 int64 update = 6; 462 repeated PriceBound bounds = 7; 463 int64 price_range_cache_time = 8; 464 repeated PriceRangeCache price_range_cache = 9; 465 int64 ref_price_cache_time = 10; 466 repeated DecimalMap ref_price_cache = 11; 467 repeated CurrentPrice prices_now = 12; 468 repeated PastPrice prices_past = 13; 469 bool consensus_reached = 14; 470 } 471 472 message AuctionState { 473 vega.Market.TradingMode mode = 1; 474 vega.Market.TradingMode default_mode = 2; 475 vega.AuctionTrigger trigger = 3; 476 int64 begin = 4; 477 vega.AuctionDuration end = 5; 478 bool start = 6; 479 bool stop = 7; 480 vega.AuctionTrigger extension = 8; 481 bool extension_event_sent = 9; 482 } 483 484 message EquityShareLP { 485 string id = 1; 486 string stake = 2; 487 string share = 3; 488 string avg = 4; 489 string vshare = 5; 490 } 491 492 message EquityShare { 493 string mvp = 1; 494 bool opening_auction_ended = 2; 495 repeated EquityShareLP lps = 3; 496 string r = 4; 497 string p_mvp = 5; 498 } 499 500 message FeeSplitter { 501 int64 time_window_start = 1; 502 string trade_value = 2; 503 string avg = 3; 504 uint64 window = 4; 505 } 506 507 message SpotMarket { 508 vega.Market market = 1; 509 PriceMonitor price_monitor = 2; 510 AuctionState auction_state = 3; 511 PeggedOrders pegged_orders = 4; 512 repeated vega.Order expiring_orders = 5; 513 string last_best_bid = 6; 514 string last_best_ask = 7; 515 string last_mid_bid = 8; 516 string last_mid_ask = 9; 517 string last_market_value_proxy = 10; 518 int64 last_equity_share_distributed = 11; 519 EquityShare equity_share = 12; 520 string current_mark_price = 13; 521 FeeSplitter fee_splitter = 14; 522 int64 next_mark_to_market = 15; 523 string last_traded_price = 16; 524 repeated string parties = 17; 525 bool closed = 18; 526 StopOrders stop_orders = 19; 527 repeated vega.Order expiring_stop_orders = 20; 528 vega.events.v1.FeesStats fees_stats = 21; 529 bool has_traded = 22; 530 MarketLiquidity market_liquidity = 23; 531 ProtocolAutomatedPurchase protocol_automated_purchase = 24; 532 } 533 534 message Market { 535 vega.Market market = 1; 536 PriceMonitor price_monitor = 2; 537 AuctionState auction_state = 3; 538 PeggedOrders pegged_orders = 4; 539 repeated vega.Order expiring_orders = 5; 540 string last_best_bid = 6; 541 string last_best_ask = 7; 542 string last_mid_bid = 8; 543 string last_mid_ask = 9; 544 string last_market_value_proxy = 10; 545 int64 last_equity_share_distributed = 11; 546 EquityShare equity_share = 12; 547 string current_mark_price = 13; 548 string risk_factor_short = 14; 549 string risk_factor_long = 15; 550 bool risk_factor_consensus_reached = 16; 551 FeeSplitter fee_splitter = 17; 552 string settlement_data = 18; 553 int64 next_mark_to_market = 19; 554 string last_traded_price = 20; 555 repeated string parties = 21; 556 bool closed = 22; 557 bool succeeded = 23; 558 StopOrders stop_orders = 24; 559 repeated vega.Order expiring_stop_orders = 25; 560 Product product = 26; 561 vega.events.v1.FeesStats fees_stats = 27; 562 repeated PartyMarginFactor party_margin_factor = 28; 563 CompositePriceCalculator mark_price_calculator = 29; 564 optional CompositePriceCalculator internal_composite_price_calculator = 30; 565 int64 next_internal_composite_price_calc = 31; 566 MarketLiquidity market_liquidity = 32; 567 AmmState amm = 33; 568 } 569 570 message PartyMarginFactor { 571 string party = 1; 572 string margin_factor = 2; 573 } 574 575 message AmmState { 576 repeated StringMapEntry sqrter = 1; 577 repeated StringMapEntry amm_party_ids = 2; 578 repeated PoolMapEntry pools = 3; 579 } 580 581 message PoolMapEntry { 582 message Curve { 583 string l = 1; 584 string high = 2; 585 string low = 3; 586 string pv = 4; 587 bool empty = 5; 588 } 589 590 message Pool { 591 string id = 1; 592 string amm_party_id = 2; 593 string commitment = 3; 594 vega.events.v1.AMM.ConcentratedLiquidityParameters parameters = 4; 595 string asset = 5; 596 string market = 6; 597 Curve lower = 7; 598 Curve upper = 8; 599 vega.events.v1.AMM.Status status = 9; 600 string proposed_fee = 10; 601 string slippage_tolerance = 11; 602 string minimum_price_change_trigger = 12; 603 } 604 605 string party = 1; 606 Pool pool = 2; 607 } 608 609 message StringMapEntry { 610 string key = 1; 611 string value = 2; 612 } 613 614 // eventually support multiple products 615 message Product { 616 oneof type { 617 Perps perps = 1; 618 } 619 } 620 621 message DataPoint { 622 string price = 1; 623 int64 timestamp = 2; 624 } 625 626 message AuctionIntervals { 627 repeated int64 t = 1; 628 int64 auction_start = 2; 629 int64 total = 3; 630 } 631 632 message TWAPData { 633 int64 start = 1; 634 int64 end = 2; 635 string sum_product = 3; 636 } 637 638 message Perps { 639 string id = 1; 640 repeated DataPoint external_data_point = 2; 641 repeated DataPoint internal_data_point = 3; 642 uint64 seq = 4; 643 int64 started_at = 5; 644 TWAPData external_twap_data = 6; 645 TWAPData internal_twap_data = 7; 646 AuctionIntervals auction_intervals = 8; 647 } 648 649 message OrdersAtPrice { 650 string price = 1; 651 repeated string orders = 2; 652 } 653 654 message PricedStopOrders { 655 repeated OrdersAtPrice falls_bellow = 1; 656 repeated OrdersAtPrice rises_above = 2; 657 } 658 659 message TrailingStopOrders { 660 string last_seen_price = 1; 661 repeated OffsetsAtPrice falls_bellow = 2; 662 repeated OffsetsAtPrice rises_above = 3; 663 } 664 665 message OrdersAtOffset { 666 string offset = 1; 667 repeated string orders = 2; 668 } 669 670 message OffsetsAtPrice { 671 string price = 1; 672 repeated OrdersAtOffset offsets = 2; 673 } 674 675 message StopOrders { 676 repeated events.v1.StopOrderEvent stop_orders = 1; 677 PricedStopOrders priced_stop_orders = 2; 678 TrailingStopOrders trailing_stop_orders = 3; 679 } 680 681 message PeggedOrders { 682 repeated vega.Order parked_orders = 2; 683 } 684 685 message SLANetworkParams { 686 string bond_penalty_factor = 1; 687 string early_exit_penalty = 2; 688 string max_liquidity_fee = 3; 689 string non_performance_bond_penalty_max = 4; 690 string non_performance_bond_penalty_slope = 5; 691 string stake_to_ccy_volume = 6; 692 int64 providers_fee_calculation_time_step = 7; 693 } 694 695 message ExecutionMarkets { 696 repeated Market markets = 1; 697 repeated SpotMarket spot_markets = 2; 698 repeated vega.checkpoint.v1.MarketState settled_markets = 3; 699 repeated Successors successors = 4; 700 repeated string market_ids = 5; 701 SLANetworkParams sla_network_params = 6; 702 } 703 704 message Successors { 705 string parent_market = 1; 706 repeated string successor_markets = 2; 707 } 708 709 message Position { 710 string party_id = 1; 711 int64 size = 2; 712 int64 buy = 3; 713 int64 sell = 4; 714 string price = 5; 715 string buy_sum_product = 6; 716 string sell_sum_product = 7; 717 bool distressed = 8; 718 bytes average_entry_price = 9; 719 } 720 721 message MarketPositions { 722 string market_id = 1; 723 repeated Position positions = 2; 724 repeated PartyPositionStats parties_records = 3; 725 } 726 727 message PartyPositionStats { 728 string party = 1; 729 optional uint64 latest_open_interest = 2; 730 optional uint64 lowest_open_interest = 3; 731 optional uint64 traded_volume = 4; 732 } 733 734 message SettlementState { 735 string market_id = 1; 736 string last_mark_price = 2; 737 repeated LastSettledPosition last_settled_positions = 3; 738 repeated SettlementTrade trades = 4; 739 } 740 741 message LastSettledPosition { 742 string party = 1; 743 int64 settled_position = 2; 744 } 745 746 message SettlementTrade { 747 string party_id = 1; 748 string price = 2; 749 string market_price = 3; 750 int64 size = 4; 751 int64 new_size = 5; 752 } 753 754 message AppState { 755 uint64 height = 1; 756 string block = 2; 757 int64 time = 3; 758 string chain_id = 4; 759 string protocol_version = 5; 760 bool protocol_upgrade = 6; 761 int64 prev_block_time = 7; 762 } 763 764 // EpochState details 765 message EpochState { 766 // Sequence number that increases by one each epoch 767 uint64 seq = 1; 768 // Time at which this epoch started 769 int64 start_time = 3; 770 // Time at which this epoch should end 771 int64 expire_time = 4; 772 // Ready to start a new epoch 773 bool ready_to_start_new_epoch = 6; 774 // Ready to end epoch 775 bool ready_to_end_epoch = 7; 776 } 777 778 message RewardsPendingPayouts { 779 repeated ScheduledRewardsPayout scheduled_rewards_payout = 1; 780 } 781 782 message ScheduledRewardsPayout { 783 int64 payout_time = 1; 784 repeated RewardsPayout rewards_payout = 2; 785 } 786 787 message RewardsPayout { 788 string from_account = 1; 789 string asset = 2; 790 repeated RewardsPartyAmount reward_party_amount = 3; 791 string total_reward = 4; 792 string epoch_seq = 5; 793 int64 timestamp = 6; 794 } 795 796 message RewardsPartyAmount { 797 string party = 1; 798 string amount = 2; 799 } 800 801 // LimitState details 802 message LimitState { 803 // Number of blocks into the bootstrapping phase 804 uint32 block_count = 1; 805 // Whether or not the limit on market proposals has been lifted 806 bool can_propose_market = 2; 807 // Whether or not the limit on asset proposals has been lifted 808 bool can_propose_asset = 3; 809 // Whether or not the genesis state is loaded 810 bool genesis_loaded = 4; 811 // Fields derived from the genesis state 812 bool propose_market_enabled = 5; 813 bool propose_asset_enabled = 6; 814 int64 propose_market_enabled_from = 7; 815 int64 propose_asset_enabled_from = 8; 816 bool propose_spot_market_enabled = 9; 817 bool propose_perps_market_enabled = 10; 818 bool can_use_amm_enabled = 11; 819 } 820 821 message VoteSpamPolicy { 822 repeated PartyProposalVoteCount party_to_vote = 1; 823 repeated BannedParty banned_parties = 2; 824 repeated PartyTokenBalance token_balance = 3; 825 repeated BlockRejectStats recent_blocks_reject_stats = 4; 826 uint64 current_block_index = 5; 827 uint64 last_increase_block = 6; 828 uint64 current_epoch_seq = 7; 829 string min_voting_tokens_factor = 8; 830 } 831 832 message PartyProposalVoteCount { 833 string party = 1; 834 string proposal = 2; 835 uint64 count = 3; 836 } 837 838 message PartyTokenBalance { 839 string party = 1; 840 string balance = 2; 841 } 842 843 message BlockRejectStats { 844 uint64 rejected = 1; 845 uint64 total = 2; 846 } 847 848 message SpamPartyTransactionCount { 849 string party = 1; 850 uint64 count = 2; 851 } 852 853 message SimpleSpamPolicy { 854 string policy_name = 1; 855 repeated SpamPartyTransactionCount party_to_count = 2; 856 repeated BannedParty banned_parties = 3; 857 repeated PartyTokenBalance token_balance = 4; 858 uint64 current_epoch_seq = 5; 859 } 860 861 message NotarySigs { 862 string id = 1; 863 int32 kind = 2; 864 string node = 3; 865 string sig = 4; 866 bool pending = 5; 867 } 868 869 message Notary { 870 repeated NotarySigs notary_sigs = 1; 871 } 872 873 message StakeVerifierDeposited { 874 repeated StakeVerifierPending pending_deposited = 1; 875 } 876 877 message StakeVerifierRemoved { 878 repeated StakeVerifierPending pending_removed = 1; 879 } 880 881 message StakeVerifierPending { 882 string ethereum_address = 1; 883 string vega_public_key = 2; 884 string amount = 3; 885 int64 block_time = 4; 886 uint64 block_number = 5; 887 uint64 log_index = 6; 888 string tx_id = 7; 889 string id = 8; 890 } 891 892 message L2EthOracles { 893 repeated ChainIdEthOracles chain_id_eth_oracles = 1; 894 } 895 896 message ChainIdEthOracles { 897 string source_chain_id = 1; 898 EthOracleVerifierLastBlock last_block = 2; 899 EthContractCallResults call_results = 3; 900 EthOracleVerifierMisc misc = 4; 901 } 902 903 message EthOracleVerifierLastBlock { 904 uint64 block_height = 1; 905 uint64 block_time = 2; 906 } 907 908 message EthOracleVerifierMisc { 909 repeated EthVerifierBucket buckets = 1; 910 EthOracleVerifierLastBlock patch_block = 2; 911 } 912 913 message EthContractCallResults { 914 repeated EthContractCallResult pending_contract_call_result = 1; 915 } 916 917 message EthContractCallResult { 918 uint64 block_height = 1; 919 uint64 block_time = 2; 920 string spec_id = 3; 921 bytes result = 4; 922 optional string error = 5; 923 optional uint64 chain_id = 6; 924 } 925 926 message EthVerifierBucket { 927 int64 ts = 1; 928 repeated string hashes = 2; 929 } 930 931 message PendingKeyRotation { 932 uint64 block_height = 1; 933 string node_id = 2; 934 string new_pub_key = 3; 935 uint32 new_pub_key_index = 4; 936 } 937 938 message PendingEthereumKeyRotation { 939 uint64 block_height = 1; 940 string node_id = 2; 941 string new_address = 3; 942 string submitter = 4; 943 string old_address = 5; 944 } 945 946 message Topology { 947 repeated ValidatorState validator_data = 1; 948 repeated string chain_keys = 2; 949 repeated PendingKeyRotation pending_pub_key_rotations = 3; 950 ValidatorPerformance validator_performance = 4; 951 repeated PendingEthereumKeyRotation pending_ethereum_key_rotations = 5; 952 ToplogySignatures signatures = 6; 953 repeated PendingEthereumKeyRotation unsolved_ethereum_key_rotations = 7; 954 } 955 956 message ToplogySignatures { 957 repeated PendingERC20MultisigControlSignature pending_signatures = 1; 958 repeated IssuedERC20MultisigControlSignature issued_signatures = 2; 959 } 960 961 message PendingERC20MultisigControlSignature { 962 string node_id = 1; 963 string ethereum_address = 2; 964 string nonce = 3; 965 uint64 epoch_seq = 4; 966 bool added = 5; 967 } 968 969 message IssuedERC20MultisigControlSignature { 970 string resource_id = 1; 971 string ethereum_address = 2; 972 string submitter_address = 3; 973 string chain_id = 4; 974 } 975 976 message ValidatorState { 977 vega.events.v1.ValidatorUpdate validator_update = 1; 978 uint64 block_added = 2; 979 int32 status = 3; 980 uint64 status_change_block = 4; 981 uint64 last_block_with_positive_ranking = 5; 982 uint64 eth_events_forwarded = 6; 983 HeartbeatTracker heartbeat_tracker = 7; 984 int64 validator_power = 8; 985 vega.RankingScore ranking_score = 9; 986 } 987 988 message HeartbeatTracker { 989 string expected_next_hash = 1; 990 int64 expected_next_hash_since = 2; 991 int32 block_index = 3; 992 repeated bool block_sigs = 4; 993 } 994 995 message PerformanceStats { 996 string validator_address = 1; 997 uint64 proposed = 2; 998 uint64 elected = 3; 999 uint64 voted = 4; 1000 int64 last_height_voted = 5; 1001 int64 last_height_proposed = 6; 1002 int64 last_height_elected = 7; 1003 } 1004 1005 message ValidatorPerformance { 1006 repeated PerformanceStats validator_perf_stats = 1; 1007 } 1008 1009 message LiquidityParameters { 1010 string max_fee = 1; 1011 string max_shape_size = 2; 1012 string stake_to_obligation_factor = 3; 1013 // Market ID these liquidity parameters apply to. Required for key generation 1014 string market_id = 4; 1015 } 1016 1017 message LiquidityPendingProvisions { 1018 repeated string pending_provisions = 1; 1019 // Market ID these liquidity provisions apply to. Required for key generation 1020 string market_id = 2; 1021 } 1022 1023 message LiquidityPartiesLiquidityOrders { 1024 repeated PartyOrders party_orders = 1; 1025 // Market ID these liquidity orders apply to. Required for key generation 1026 string market_id = 2; 1027 } 1028 1029 message PartyOrders { 1030 string party = 1; 1031 repeated vega.Order orders = 2; 1032 } 1033 1034 message LiquidityPartiesOrders { 1035 repeated PartyOrders party_orders = 1; 1036 // Market ID these orders apply to. 1037 string market_id = 2; 1038 } 1039 1040 message LiquidityProvisions { 1041 repeated vega.LiquidityProvision liquidity_provisions = 1; 1042 // Market ID these provisions apply to. 1043 string market_id = 2; 1044 } 1045 1046 message LiquidityScores { 1047 int32 running_average_counter = 1; 1048 repeated LiquidityScore scores = 2; 1049 string market_id = 3; 1050 } 1051 1052 message LiquidityScore { 1053 string score = 1; 1054 string party_id = 2; 1055 } 1056 1057 message LiquidityV2Parameters { 1058 // Market ID these liquidity parameters apply to. Required for key generation 1059 string market_id = 1; 1060 // market specific SLA parameters, will be different than the ones in the market 1061 // snapshot since they apply at the end of an epoch 1062 vega.LiquiditySLAParameters market_sla_parameters = 2; 1063 // network wide SLA parameters, will be different than network paramters in the 1064 // snapshot since they apply at the end of an epoch 1065 string stake_to_volume = 3; 1066 string bond_penalty_slope = 4; 1067 string bond_penalty_max = 5; 1068 } 1069 1070 message LiquidityV2PaidFeesStats { 1071 // Market ID these liquidity parameters apply to. Required for key generation 1072 string market_id = 1; 1073 1074 vega.events.v1.PaidLiquidityFeesStats stats = 2; 1075 } 1076 1077 message LiquidityV2Provisions { 1078 // Market ID these liquidity parameters apply to. Required for key generation 1079 string market_id = 1; 1080 1081 repeated vega.LiquidityProvision liquidity_provisions = 2; 1082 } 1083 1084 message LiquidityV2PendingProvisions { 1085 // Market ID these liquidity parameters apply to. Required for key generation 1086 string market_id = 1; 1087 1088 repeated vega.LiquidityProvision pending_liquidity_provisions = 2; 1089 } 1090 1091 message LiquidityV2Performances { 1092 // Market ID these liquidity parameters apply to. Required for key generation 1093 string market_id = 1; 1094 1095 int64 epoch_start_time = 2; 1096 1097 repeated LiquidityV2PerformancePerParty performance_per_party = 3; 1098 } 1099 1100 message LiquidityV2PerformancePerParty { 1101 string party = 1; 1102 1103 int64 elapsed_time_meeting_sla_during_epoch = 2; 1104 int64 commitment_start_time = 3; 1105 repeated string registered_penalties_per_epoch = 4; 1106 uint32 position_in_penalties_per_epoch = 5; 1107 string last_epoch_fraction_of_time_on_book = 6; 1108 string last_epoch_fee_penalty = 7; 1109 string last_epoch_bond_penalty = 8; 1110 string required_liquidity = 9; 1111 string notional_volume_buys = 10; 1112 string notional_volume_sells = 11; 1113 } 1114 1115 message LiquidityV2Scores { 1116 // Market ID these liquidity parameters apply to. Required for key generation 1117 string market_id = 1; 1118 1119 int32 running_average_counter = 2; 1120 repeated LiquidityScore scores = 3; 1121 int64 last_fee_distribution_time = 4; 1122 int64 fee_calculation_time_step = 5; 1123 } 1124 1125 message LiquidityV2Supplied { 1126 // Market ID these liquidity parameters apply to. Required for key generation 1127 string market_id = 1; 1128 1129 bool consensus_reached = 2; 1130 repeated LiquidityOffsetProbabilityPair bid_cache = 3; 1131 repeated LiquidityOffsetProbabilityPair ask_cache = 4; 1132 } 1133 1134 // Snapshot payload for floating point consensus 1135 message FloatingPointConsensus { 1136 repeated NextTimeTrigger next_time_trigger = 1; 1137 repeated StateVarInternalState state_variables = 2; 1138 } 1139 1140 message StateVarInternalState { 1141 string id = 1; 1142 int32 state = 2; 1143 string event_id = 3; 1144 repeated FloatingPointValidatorResult validators_results = 4; 1145 int32 rounds_since_meaningful_update = 5; 1146 } 1147 1148 message FloatingPointValidatorResult { 1149 string id = 1; 1150 repeated vega.KeyValueBundle bundle = 2; 1151 } 1152 1153 message NextTimeTrigger { 1154 string asset = 1; 1155 string market = 2; 1156 string id = 3; 1157 int64 next_trigger = 4; 1158 } 1159 1160 message MarketTracker { 1161 repeated checkpoint.v1.MarketActivityTracker market_activity = 1; 1162 repeated checkpoint.v1.TakerNotionalVolume taker_notional_volume = 2; 1163 repeated checkpoint.v1.MarketToPartyTakerNotionalVolume market_to_party_taker_notional_volume = 3; 1164 repeated checkpoint.v1.EpochPartyTakerFees epoch_taker_fees = 4; 1165 repeated checkpoint.v1.GameEligibilityTracker game_eligibility_tracker = 5; 1166 } 1167 1168 message SignerEventsPerAddress { 1169 string address = 1; 1170 repeated vega.events.v1.ERC20MultiSigSignerEvent events = 2; 1171 } 1172 1173 message ERC20MultiSigTopologyVerified { 1174 repeated string signers = 1; 1175 repeated SignerEventsPerAddress events_per_address = 2; 1176 vega.events.v1.ERC20MultiSigThresholdSetEvent threshold = 3; 1177 repeated string seen_events = 4; 1178 } 1179 1180 message ERC20MultiSigTopologyPending { 1181 repeated vega.events.v1.ERC20MultiSigSignerEvent pending_signers = 1; 1182 repeated vega.events.v1.ERC20MultiSigThresholdSetEvent pending_threshold_set = 2; 1183 repeated string witnessed_signers = 3; 1184 repeated string witnessed_threshold_sets = 4; 1185 } 1186 1187 message EVMMultisigTopology { 1188 string chain_id = 1; 1189 ERC20MultiSigTopologyVerified verified = 2; 1190 ERC20MultiSigTopologyPending pending = 3; 1191 } 1192 1193 message EVMMultisigTopologies { 1194 repeated EVMMultisigTopology evm_multisig_topology = 1; 1195 } 1196 1197 message ProofOfWork { 1198 repeated uint64 block_height = 1; 1199 repeated string block_hash = 2; 1200 repeated TransactionsAtHeight tx_at_height = 4; 1201 repeated TransactionsAtHeight tid_at_height = 6; 1202 repeated BannedParty banned = 7; 1203 repeated ProofOfWorkParams pow_params = 8; 1204 repeated ProofOfWorkState pow_state = 9; 1205 uint64 last_pruning_block = 10; 1206 repeated NonceRefsAtHeight nonce_refs_at_height = 11; 1207 } 1208 1209 message BannedParty { 1210 string party = 1; 1211 int64 until = 2; 1212 } 1213 1214 message ProofOfWorkParams { 1215 uint64 spam_pow_number_of_past_blocks = 1; 1216 uint32 spam_pow_difficulty = 2; 1217 string spam_pow_hash_function = 3; 1218 uint64 spam_pow_number_of_tx_per_block = 4; 1219 bool spam_pow_increasing_difficulty = 5; 1220 uint64 from_block = 6; 1221 int64 until_block = 7; 1222 } 1223 1224 message ProofOfWorkState { 1225 repeated ProofOfWorkBlockState pow_state = 1; 1226 } 1227 1228 message ProofOfWorkBlockState { 1229 uint64 block_height = 1; 1230 repeated ProofOfWorkPartyStateForBlock party_state = 2; 1231 } 1232 1233 message ProofOfWorkPartyStateForBlock { 1234 string party = 1; 1235 uint64 seen_count = 2; 1236 uint64 observed_difficulty = 3; 1237 } 1238 1239 message TransactionsAtHeight { 1240 uint64 height = 1; 1241 repeated string transactions = 2; 1242 } 1243 1244 message NonceRef { 1245 string party = 1; 1246 uint64 nonce = 2; 1247 } 1248 1249 message NonceRefsAtHeight { 1250 uint64 height = 1; 1251 repeated NonceRef refs = 2; 1252 } 1253 1254 message ProtocolUpgradeProposals { 1255 repeated vega.events.v1.ProtocolUpgradeEvent active_proposals = 1; 1256 AcceptedProtocolUpgradeProposal accepted_proposal = 2; 1257 } 1258 1259 message AcceptedProtocolUpgradeProposal { 1260 // Block height at which to perform the upgrade 1261 uint64 upgrade_block_height = 1; 1262 // Release tag for the vega binary 1263 string vega_release_tag = 2; 1264 } 1265 1266 message Teams { 1267 repeated Team teams = 1; 1268 } 1269 1270 message Team { 1271 string id = 1; 1272 Membership referrer = 2; 1273 repeated Membership referees = 3; 1274 string name = 4; 1275 string team_url = 5; 1276 string avatar_url = 6; 1277 int64 created_at = 7; 1278 bool closed = 8; 1279 repeated string allow_list = 9; 1280 } 1281 1282 message Membership { 1283 string party_id = 1; 1284 int64 joined_at = 2; 1285 uint64 started_at_epoch = 3; 1286 } 1287 1288 message TeamSwitches { 1289 repeated TeamSwitch team_switches = 1; 1290 } 1291 1292 message TeamSwitch { 1293 string from_team_id = 1; 1294 string to_team_id = 2; 1295 string party_id = 3; 1296 } 1297 1298 message Vesting { 1299 repeated PartyReward parties_reward = 1; 1300 } 1301 1302 message PartyReward { 1303 string party = 1; 1304 repeated AssetLocked asset_locked = 2; 1305 repeated InVesting in_vesting = 3; 1306 } 1307 1308 message ReferralProgramData { 1309 repeated FactorByReferee factor_by_referee = 1; 1310 vega.ReferralProgram current_program = 2; 1311 vega.ReferralProgram new_program = 3; 1312 uint64 last_program_version = 4; 1313 bool program_has_ended = 5; 1314 repeated ReferralSet sets = 6; 1315 } 1316 1317 message ReferralSet { 1318 string id = 1; 1319 int64 created_at = 2; 1320 int64 updated_at = 3; 1321 Membership referrer = 4; 1322 repeated Membership referees = 5; 1323 repeated RunningVolume running_volumes = 6; 1324 // deprecated 1325 string current_reward_factor = 7; 1326 string current_rewards_multiplier = 8; 1327 // deprecated 1328 string current_rewards_factor_multiplier = 9; 1329 vega.RewardFactors current_rewards_factors_multiplier = 10; 1330 vega.RewardFactors current_reward_factors = 11; 1331 } 1332 1333 message RunningVolume { 1334 uint64 epoch = 1; 1335 bytes volume = 2; 1336 } 1337 1338 message FactorByReferee { 1339 string party = 1; 1340 // deprecated 1341 bytes discount_factor = 2; 1342 bytes taker_volume = 3; 1343 vega.DiscountFactors discount_factors = 4; 1344 } 1345 1346 message AssetLocked { 1347 string asset = 1; 1348 repeated EpochBalance epoch_balances = 2; 1349 } 1350 1351 message EpochBalance { 1352 uint64 epoch = 1; 1353 string balance = 2; 1354 } 1355 1356 message InVesting { 1357 string asset = 1; 1358 string balance = 2; 1359 } 1360 1361 message ActivityStreak { 1362 repeated PartyActivityStreak parties_activity_streak = 1; 1363 } 1364 1365 message PartyActivityStreak { 1366 string party = 1; 1367 uint64 active = 2; 1368 uint64 inactive = 3; 1369 bytes reward_distribution_multiplier = 4; 1370 bytes reward_vesting_multiplier = 5; 1371 } 1372 1373 message PartyRebateData { 1374 string party = 1; 1375 string fraction = 2; 1376 string maker_fee_received = 3; 1377 } 1378 1379 message VolumeRebateProgram { 1380 repeated string parties = 1; 1381 repeated PartyRebateData party_rebate_data = 2; 1382 vega.VolumeRebateProgram current_program = 3; 1383 vega.VolumeRebateProgram new_program = 4; 1384 repeated VolumeRebateStats factors_by_party = 5; 1385 uint64 last_program_version = 6; 1386 bool program_has_ended = 7; 1387 } 1388 1389 message VolumeRebateStats { 1390 string party = 1; 1391 string rebate_factor = 2; 1392 } 1393 1394 message VolumeDiscountProgram { 1395 repeated string parties = 1; 1396 repeated EpochPartyVolumes epoch_party_volumes = 2; 1397 uint64 epoch_data_index = 3; 1398 repeated PartyVolume average_party_volume = 4; 1399 vega.VolumeDiscountProgram current_program = 5; 1400 vega.VolumeDiscountProgram new_program = 6; 1401 repeated VolumeDiscountStats factors_by_party = 7; 1402 uint64 last_program_version = 8; 1403 bool program_has_ended = 9; 1404 } 1405 1406 message VolumeDiscountStats { 1407 string party = 1; 1408 // deprecated 1409 string discount_factor = 2; 1410 vega.DiscountFactors discount_factors = 3; 1411 } 1412 1413 message EpochPartyVolumes { 1414 repeated PartyVolume party_volume = 1; 1415 } 1416 1417 message PartyVolume { 1418 string party = 1; 1419 bytes volume = 2; 1420 } 1421 1422 message Liquidation { 1423 string market_id = 1; 1424 int64 network_pos = 2; 1425 int64 next_step = 3; 1426 vega.LiquidationStrategy config = 4; 1427 } 1428 1429 message PartyAssetAmount { 1430 string party = 1; 1431 string asset = 2; 1432 string amount = 3; 1433 } 1434 1435 message BankingTransferFeeDiscounts { 1436 repeated PartyAssetAmount party_asset_discount = 1; 1437 } 1438 1439 message CompositePriceCalculator { 1440 string composite_price = 1; 1441 vega.CompositePriceConfiguration price_configuration = 2; 1442 repeated vega.Trade trades = 3; 1443 repeated string price_sources = 4; 1444 repeated int64 price_source_last_update = 5; 1445 repeated TimePrice book_price_at_time = 6; 1446 } 1447 1448 message Parties { 1449 repeated PartyProfile profiles = 1; 1450 } 1451 1452 message PartyProfile { 1453 string party_id = 1; 1454 string alias = 2; 1455 repeated vega.Metadata metadata = 3; 1456 repeated string derived_keys = 4; 1457 } 1458 1459 message AMMValues { 1460 string party = 1; 1461 string stake = 2; 1462 string score = 3; 1463 int64 tick = 4; 1464 } 1465 1466 message MarketLiquidity { 1467 string price_range = 1; 1468 int64 tick = 2; 1469 repeated AMMValues amm = 3; 1470 } 1471 1472 message DelayedTx { 1473 repeated bytes tx = 1; 1474 uint64 height = 2; 1475 } 1476 1477 message TxCache { 1478 repeated DelayedTx txs = 1; 1479 } 1480 1481 message EVMFwdPendingHeartbeat { 1482 uint64 block_height = 1; 1483 uint64 block_time = 2; 1484 string contract_address = 3; 1485 string chain_id = 4; 1486 } 1487 1488 message EVMFwdLastSeen { 1489 string chain_id = 1; 1490 string contract_address = 2; 1491 uint64 block_height = 3; 1492 } 1493 1494 message EVMFwdHeartbeats { 1495 repeated EVMFwdPendingHeartbeat pending_heartbeats = 1; 1496 repeated EVMFwdLastSeen last_seen = 2; 1497 } 1498 1499 message ProtocolAutomatedPurchase { 1500 string id = 1; 1501 vega.NewProtocolAutomatedPurchaseChanges config = 2; 1502 string next_auction_amount = 3; 1503 string last_oracle_price = 4; 1504 int64 last_oracle_update_time = 5; 1505 string active_order = 6; 1506 vega.Side side = 7; 1507 bool ready_to_stop = 8; 1508 }