@wireio/stake 2.7.3 → 2.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/stake.js CHANGED
@@ -738,6 +738,10 @@ var instructions$7 = [
738
738
  name: "epoch_state",
739
739
  writable: true
740
740
  },
741
+ {
742
+ name: "withdraw_global",
743
+ writable: true
744
+ },
741
745
  {
742
746
  name: "active_list"
743
747
  },
@@ -1931,6 +1935,7 @@ var instructions$7 = [
1931
1935
  },
1932
1936
  {
1933
1937
  name: "cranky",
1938
+ writable: true,
1934
1939
  signer: true
1935
1940
  },
1936
1941
  {
@@ -2002,6 +2007,78 @@ var instructions$7 = [
2002
2007
  }
2003
2008
  ]
2004
2009
  },
2010
+ {
2011
+ name: "migrate_batch_orchestrator",
2012
+ docs: [
2013
+ "One-shot migration: realloc BatchOrchestrator for the four per-op",
2014
+ "`*_started_epoch: u16` fields + restored `_reserved` buffer.",
2015
+ "Idempotent, ungated. `payer` covers the rent delta."
2016
+ ],
2017
+ discriminator: [
2018
+ 130,
2019
+ 240,
2020
+ 40,
2021
+ 175,
2022
+ 53,
2023
+ 209,
2024
+ 232,
2025
+ 11
2026
+ ],
2027
+ accounts: [
2028
+ {
2029
+ name: "payer",
2030
+ writable: true,
2031
+ signer: true
2032
+ },
2033
+ {
2034
+ name: "batch_orchestrator",
2035
+ docs: [
2036
+ "is the only authorization needed; the op is idempotent."
2037
+ ],
2038
+ writable: true
2039
+ },
2040
+ {
2041
+ name: "system_program"
2042
+ }
2043
+ ],
2044
+ args: [
2045
+ ]
2046
+ },
2047
+ {
2048
+ name: "migrate_stake_metrics",
2049
+ docs: [
2050
+ "One-shot migration: realloc StakeMetrics for new fields (mev_reward + _reserved)"
2051
+ ],
2052
+ discriminator: [
2053
+ 183,
2054
+ 154,
2055
+ 168,
2056
+ 221,
2057
+ 78,
2058
+ 179,
2059
+ 112,
2060
+ 165
2061
+ ],
2062
+ accounts: [
2063
+ {
2064
+ name: "global_config"
2065
+ },
2066
+ {
2067
+ name: "admin",
2068
+ writable: true,
2069
+ signer: true
2070
+ },
2071
+ {
2072
+ name: "stake_metrics",
2073
+ writable: true
2074
+ },
2075
+ {
2076
+ name: "system_program"
2077
+ }
2078
+ ],
2079
+ args: [
2080
+ ]
2081
+ },
2005
2082
  {
2006
2083
  name: "migrate_user_record",
2007
2084
  discriminator: [
@@ -2040,6 +2117,38 @@ var instructions$7 = [
2040
2117
  args: [
2041
2118
  ]
2042
2119
  },
2120
+ {
2121
+ name: "migrate_validator_info_batch",
2122
+ docs: [
2123
+ "One-shot migration: realloc ValidatorInfoAccounts for new fields (mev + _reserved)",
2124
+ "Pass validator_info PDAs via remaining_accounts"
2125
+ ],
2126
+ discriminator: [
2127
+ 250,
2128
+ 77,
2129
+ 53,
2130
+ 116,
2131
+ 38,
2132
+ 22,
2133
+ 12,
2134
+ 100
2135
+ ],
2136
+ accounts: [
2137
+ {
2138
+ name: "global_config"
2139
+ },
2140
+ {
2141
+ name: "admin",
2142
+ writable: true,
2143
+ signer: true
2144
+ },
2145
+ {
2146
+ name: "system_program"
2147
+ }
2148
+ ],
2149
+ args: [
2150
+ ]
2151
+ },
2043
2152
  {
2044
2153
  name: "process_graveyard_validators_batch",
2045
2154
  docs: [
@@ -3512,6 +3621,20 @@ var instructions$7 = [
3512
3621
  },
3513
3622
  {
3514
3623
  name: "stake_history"
3624
+ },
3625
+ {
3626
+ name: "vault",
3627
+ writable: true
3628
+ },
3629
+ {
3630
+ name: "reserve_pool",
3631
+ writable: true
3632
+ },
3633
+ {
3634
+ name: "stake_program"
3635
+ },
3636
+ {
3637
+ name: "clock"
3515
3638
  }
3516
3639
  ],
3517
3640
  args: [
@@ -4585,12 +4708,61 @@ var types$9 = [
4585
4708
  ],
4586
4709
  type: "u64"
4587
4710
  },
4711
+ {
4712
+ name: "mev_claims_next_index",
4713
+ docs: [
4714
+ "Next active_list index to process for MEV tip claims"
4715
+ ],
4716
+ type: "u16"
4717
+ },
4718
+ {
4719
+ name: "temp_total_mev_reward",
4720
+ docs: [
4721
+ "Temporary accumulator for MEV rewards across batches"
4722
+ ],
4723
+ type: "u64"
4724
+ },
4725
+ {
4726
+ name: "temp_total_outstanding_amount_to_unstake",
4727
+ docs: [
4728
+ "Temporary accumulator for sum of validators' amount_to_unstake across batches"
4729
+ ],
4730
+ type: "u64"
4731
+ },
4732
+ {
4733
+ name: "validators_sync_started_epoch",
4734
+ docs: [
4735
+ "Owns validators_sync_processed_this_epoch."
4736
+ ],
4737
+ type: "u16"
4738
+ },
4739
+ {
4740
+ name: "leaderboard_scores_started_epoch",
4741
+ docs: [
4742
+ "Owns leaderboard_scores_next_index."
4743
+ ],
4744
+ type: "u16"
4745
+ },
4746
+ {
4747
+ name: "graveyard_cleanup_started_epoch",
4748
+ docs: [
4749
+ "Owns graveyard_cleanup_next_index."
4750
+ ],
4751
+ type: "u16"
4752
+ },
4753
+ {
4754
+ name: "addition_started_epoch",
4755
+ docs: [
4756
+ "Owns addition_next_rank + addition_target_rank."
4757
+ ],
4758
+ type: "u16"
4759
+ },
4588
4760
  {
4589
4761
  name: "_reserved",
4590
4762
  type: {
4591
4763
  array: [
4592
4764
  "u8",
4593
- 23
4765
+ 64
4594
4766
  ]
4595
4767
  }
4596
4768
  }
@@ -4934,7 +5106,9 @@ var types$9 = [
4934
5106
  {
4935
5107
  name: "transient_threshold",
4936
5108
  docs: [
4937
- "Minimum transient stake to include in effective stake calculations"
5109
+ "DEPRECATED (WNS-33): no longer read. Kept for account layout stability.",
5110
+ "Rebalance now counts all transient stake on both sides of the delta equation,",
5111
+ "so the per-validator threshold gate was removed."
4938
5112
  ],
4939
5113
  type: "u64"
4940
5114
  },
@@ -5080,6 +5254,15 @@ var types$9 = [
5080
5254
  1
5081
5255
  ]
5082
5256
  }
5257
+ },
5258
+ {
5259
+ name: "_reserved_trailing",
5260
+ type: {
5261
+ array: [
5262
+ "u8",
5263
+ 32
5264
+ ]
5265
+ }
5083
5266
  }
5084
5267
  ]
5085
5268
  }
@@ -5300,16 +5483,32 @@ var types$9 = [
5300
5483
  type: "u8"
5301
5484
  },
5302
5485
  {
5303
- name: "_padding",
5486
+ name: "_align",
5304
5487
  docs: [
5305
- "Reserved space for future upgrades"
5488
+ "Alignment byte (keeps u16 fields below properly aligned)"
5306
5489
  ],
5307
- type: {
5308
- array: [
5309
- "u8",
5310
- 5
5311
- ]
5312
- }
5490
+ type: "u8"
5491
+ },
5492
+ {
5493
+ name: "crank_next_index",
5494
+ docs: [
5495
+ "Next validator index to process during crank_update_scores"
5496
+ ],
5497
+ type: "u16"
5498
+ },
5499
+ {
5500
+ name: "last_crank_epoch",
5501
+ docs: [
5502
+ "Last epoch when crank_update_scores completed all validators"
5503
+ ],
5504
+ type: "u16"
5505
+ },
5506
+ {
5507
+ name: "crank_started_epoch",
5508
+ docs: [
5509
+ "Epoch when start_crank was called (signals an active crank cycle)"
5510
+ ],
5511
+ type: "u16"
5313
5512
  }
5314
5513
  ]
5315
5514
  }
@@ -5969,9 +6168,13 @@ var types$9 = [
5969
6168
  type: "bool"
5970
6169
  },
5971
6170
  {
5972
- name: "addition_next_rank",
6171
+ name: "unstake_allocation_started_epoch",
5973
6172
  docs: [
5974
- "DEPRECATED see BatchOrchestrator.addition_next_rank. Always 0."
6173
+ "Epoch in which the current unstake allocation cycle was started.",
6174
+ "Used to detect stale cycles that span epoch boundaries — if the epoch",
6175
+ "has advanced, the cycle is reset and restarted to avoid resuming",
6176
+ "against a mutated validator active list.",
6177
+ "(Repurposed from the deprecated addition_next_rank field — verified 0 on the mainnet.)"
5975
6178
  ],
5976
6179
  type: "u16"
5977
6180
  },
@@ -6072,6 +6275,34 @@ var types$9 = [
6072
6275
  {
6073
6276
  name: "bump",
6074
6277
  type: "u8"
6278
+ },
6279
+ {
6280
+ name: "mev_reward",
6281
+ docs: [
6282
+ "MEV rewards swept from main stake accounts this epoch (accumulated, reset after pay cycle)"
6283
+ ],
6284
+ type: "u64"
6285
+ },
6286
+ {
6287
+ name: "total_outstanding_amount_to_unstake",
6288
+ docs: [
6289
+ "WNS-16: total amount_to_unstake across all validators at last metrics refresh.",
6290
+ "Represents allocated-but-not-yet-deactivated unstake obligations.",
6291
+ "Subtracted from unstakeable_stake in admission control to prevent double-promising."
6292
+ ],
6293
+ type: "u64"
6294
+ },
6295
+ {
6296
+ name: "_reserved",
6297
+ docs: [
6298
+ "Reserved space for future use"
6299
+ ],
6300
+ type: {
6301
+ array: [
6302
+ "u8",
6303
+ 24
6304
+ ]
6305
+ }
6075
6306
  }
6076
6307
  ]
6077
6308
  }
@@ -6398,6 +6629,25 @@ var types$9 = [
6398
6629
  {
6399
6630
  name: "state_transition_trigger_stake_amount",
6400
6631
  type: "u64"
6632
+ },
6633
+ {
6634
+ name: "mev_earned",
6635
+ docs: [
6636
+ "MEV reward swept for this validator in the current epoch"
6637
+ ],
6638
+ type: "u64"
6639
+ },
6640
+ {
6641
+ name: "_reserved",
6642
+ docs: [
6643
+ "Reserved space for future use"
6644
+ ],
6645
+ type: {
6646
+ array: [
6647
+ "u8",
6648
+ 24
6649
+ ]
6650
+ }
6401
6651
  }
6402
6652
  ]
6403
6653
  }
@@ -6995,6 +7245,27 @@ var metadata$5 = {
6995
7245
  description: "Created with Anchor"
6996
7246
  };
6997
7247
  var instructions$5 = [
7248
+ {
7249
+ name: "crank_update_scores",
7250
+ discriminator: [
7251
+ 163,
7252
+ 247,
7253
+ 66,
7254
+ 109,
7255
+ 22,
7256
+ 206,
7257
+ 61,
7258
+ 95
7259
+ ],
7260
+ accounts: [
7261
+ {
7262
+ name: "leaderboard_state",
7263
+ writable: true
7264
+ }
7265
+ ],
7266
+ args: [
7267
+ ]
7268
+ },
6998
7269
  {
6999
7270
  name: "initialize_leaderboard",
7000
7271
  discriminator: [
@@ -7025,27 +7296,27 @@ var instructions$5 = [
7025
7296
  ]
7026
7297
  },
7027
7298
  {
7028
- name: "realloc_leaderboard",
7299
+ name: "migrate_v1_4",
7029
7300
  discriminator: [
7030
- 2,
7031
- 70,
7032
- 106,
7033
- 94,
7034
- 81,
7035
- 225,
7036
- 113,
7037
- 152
7301
+ 41,
7302
+ 152,
7303
+ 69,
7304
+ 58,
7305
+ 215,
7306
+ 119,
7307
+ 255,
7308
+ 189
7038
7309
  ],
7039
7310
  accounts: [
7040
7311
  {
7041
- name: "leaderboard_state",
7042
- writable: true
7043
- },
7044
- {
7045
- name: "payer",
7312
+ name: "authority",
7046
7313
  writable: true,
7047
7314
  signer: true
7048
7315
  },
7316
+ {
7317
+ name: "leaderboard_state",
7318
+ writable: true
7319
+ },
7049
7320
  {
7050
7321
  name: "system_program"
7051
7322
  }
@@ -7054,29 +7325,26 @@ var instructions$5 = [
7054
7325
  ]
7055
7326
  },
7056
7327
  {
7057
- name: "update_commission",
7328
+ name: "realloc_leaderboard",
7058
7329
  discriminator: [
7059
7330
  2,
7060
- 202,
7061
- 72,
7062
- 156,
7063
- 19,
7064
- 253,
7065
- 91,
7066
- 174
7331
+ 70,
7332
+ 106,
7333
+ 94,
7334
+ 81,
7335
+ 225,
7336
+ 113,
7337
+ 152
7067
7338
  ],
7068
7339
  accounts: [
7069
7340
  {
7070
- name: "registrant",
7071
- writable: true,
7072
- signer: true
7073
- },
7074
- {
7075
- name: "vote_account"
7341
+ name: "leaderboard_state",
7342
+ writable: true
7076
7343
  },
7077
7344
  {
7078
- name: "validator_record",
7079
- writable: true
7345
+ name: "payer",
7346
+ writable: true,
7347
+ signer: true
7080
7348
  },
7081
7349
  {
7082
7350
  name: "system_program"
@@ -7086,28 +7354,25 @@ var instructions$5 = [
7086
7354
  ]
7087
7355
  },
7088
7356
  {
7089
- name: "update_mev_commission",
7357
+ name: "start_crank",
7090
7358
  discriminator: [
7091
- 107,
7092
- 65,
7093
- 238,
7094
- 108,
7095
- 183,
7096
- 47,
7097
- 236,
7098
- 203
7359
+ 31,
7360
+ 83,
7361
+ 66,
7362
+ 14,
7363
+ 249,
7364
+ 131,
7365
+ 221,
7366
+ 67
7099
7367
  ],
7100
7368
  accounts: [
7101
7369
  {
7102
- name: "signer",
7370
+ name: "cranker",
7103
7371
  signer: true
7104
7372
  },
7105
7373
  {
7106
- name: "validator_record",
7374
+ name: "leaderboard_state",
7107
7375
  writable: true
7108
- },
7109
- {
7110
- name: "tip_distribution_account"
7111
7376
  }
7112
7377
  ],
7113
7378
  args: [
@@ -7132,7 +7397,10 @@ var instructions$5 = [
7132
7397
  signer: true
7133
7398
  },
7134
7399
  {
7135
- name: "vote_account"
7400
+ name: "vote_account",
7401
+ docs: [
7402
+ "If no longer owned by the vote program (closed/reclaimed), score is set to 0."
7403
+ ]
7136
7404
  },
7137
7405
  {
7138
7406
  name: "validator_record",
@@ -7147,14 +7415,6 @@ var instructions$5 = [
7147
7415
  }
7148
7416
  ],
7149
7417
  args: [
7150
- {
7151
- name: "vpp",
7152
- type: "u8"
7153
- },
7154
- {
7155
- name: "proposed_rank",
7156
- type: "u16"
7157
- }
7158
7418
  ]
7159
7419
  }
7160
7420
  ];
@@ -7402,16 +7662,32 @@ var types$7 = [
7402
7662
  type: "u8"
7403
7663
  },
7404
7664
  {
7405
- name: "_padding",
7665
+ name: "_align",
7406
7666
  docs: [
7407
- "Reserved space for future upgrades"
7667
+ "Alignment byte (keeps u16 fields below properly aligned)"
7408
7668
  ],
7409
- type: {
7410
- array: [
7411
- "u8",
7412
- 5
7413
- ]
7414
- }
7669
+ type: "u8"
7670
+ },
7671
+ {
7672
+ name: "crank_next_index",
7673
+ docs: [
7674
+ "Next validator index to process during crank_update_scores"
7675
+ ],
7676
+ type: "u16"
7677
+ },
7678
+ {
7679
+ name: "last_crank_epoch",
7680
+ docs: [
7681
+ "Last epoch when crank_update_scores completed all validators"
7682
+ ],
7683
+ type: "u16"
7684
+ },
7685
+ {
7686
+ name: "crank_started_epoch",
7687
+ docs: [
7688
+ "Epoch when start_crank was called (signals an active crank cycle)"
7689
+ ],
7690
+ type: "u16"
7415
7691
  }
7416
7692
  ]
7417
7693
  }
@@ -7522,15 +7798,13 @@ var types$7 = [
7522
7798
  {
7523
7799
  name: "mev_commission",
7524
7800
  docs: [
7525
- "Current MEV commission in basis points"
7801
+ "DEPRECATED: MEV commission fields are no longer written or read by any instruction.",
7802
+ "Retained to preserve account layout (removing would require migration)."
7526
7803
  ],
7527
7804
  type: "u16"
7528
7805
  },
7529
7806
  {
7530
7807
  name: "mev_commission_history",
7531
- docs: [
7532
- "Circular buffer of past 10 MEV commission values"
7533
- ],
7534
7808
  type: {
7535
7809
  array: [
7536
7810
  "u16",
@@ -7540,16 +7814,10 @@ var types$7 = [
7540
7814
  },
7541
7815
  {
7542
7816
  name: "mev_commission_index",
7543
- docs: [
7544
- "Current index in mev_commission_history circular buffer (0-9)"
7545
- ],
7546
7817
  type: "u8"
7547
7818
  },
7548
7819
  {
7549
7820
  name: "last_mev_commission_update",
7550
- docs: [
7551
- "Last epoch when MEV commission was updated"
7552
- ],
7553
7821
  type: "u64"
7554
7822
  },
7555
7823
  {
@@ -7900,7 +8168,9 @@ var types$6 = [
7900
8168
  {
7901
8169
  name: "transient_threshold",
7902
8170
  docs: [
7903
- "Minimum transient stake to include in effective stake calculations"
8171
+ "DEPRECATED (WNS-33): no longer read. Kept for account layout stability.",
8172
+ "Rebalance now counts all transient stake on both sides of the delta equation,",
8173
+ "so the per-validator threshold gate was removed."
7904
8174
  ],
7905
8175
  type: "u64"
7906
8176
  },
@@ -8046,6 +8316,15 @@ var types$6 = [
8046
8316
  1
8047
8317
  ]
8048
8318
  }
8319
+ },
8320
+ {
8321
+ name: "_reserved_trailing",
8322
+ type: {
8323
+ array: [
8324
+ "u8",
8325
+ 32
8326
+ ]
8327
+ }
8049
8328
  }
8050
8329
  ]
8051
8330
  }