@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.
@@ -708,6 +708,10 @@ export type LiqsolCore = {
708
708
  "name": "epochState",
709
709
  "writable": true
710
710
  },
711
+ {
712
+ "name": "withdrawGlobal",
713
+ "writable": true
714
+ },
711
715
  {
712
716
  "name": "activeList"
713
717
  },
@@ -1880,6 +1884,7 @@ export type LiqsolCore = {
1880
1884
  },
1881
1885
  {
1882
1886
  "name": "cranky",
1887
+ "writable": true,
1883
1888
  "signer": true
1884
1889
  },
1885
1890
  {
@@ -1951,6 +1956,76 @@ export type LiqsolCore = {
1951
1956
  }
1952
1957
  ]
1953
1958
  },
1959
+ {
1960
+ "name": "migrateBatchOrchestrator",
1961
+ "docs": [
1962
+ "One-shot migration: realloc BatchOrchestrator for the four per-op",
1963
+ "`*_started_epoch: u16` fields + restored `_reserved` buffer.",
1964
+ "Idempotent, ungated. `payer` covers the rent delta."
1965
+ ],
1966
+ "discriminator": [
1967
+ 130,
1968
+ 240,
1969
+ 40,
1970
+ 175,
1971
+ 53,
1972
+ 209,
1973
+ 232,
1974
+ 11
1975
+ ],
1976
+ "accounts": [
1977
+ {
1978
+ "name": "payer",
1979
+ "writable": true,
1980
+ "signer": true
1981
+ },
1982
+ {
1983
+ "name": "batchOrchestrator",
1984
+ "docs": [
1985
+ "is the only authorization needed; the op is idempotent."
1986
+ ],
1987
+ "writable": true
1988
+ },
1989
+ {
1990
+ "name": "systemProgram"
1991
+ }
1992
+ ],
1993
+ "args": []
1994
+ },
1995
+ {
1996
+ "name": "migrateStakeMetrics",
1997
+ "docs": [
1998
+ "One-shot migration: realloc StakeMetrics for new fields (mev_reward + _reserved)"
1999
+ ],
2000
+ "discriminator": [
2001
+ 183,
2002
+ 154,
2003
+ 168,
2004
+ 221,
2005
+ 78,
2006
+ 179,
2007
+ 112,
2008
+ 165
2009
+ ],
2010
+ "accounts": [
2011
+ {
2012
+ "name": "globalConfig"
2013
+ },
2014
+ {
2015
+ "name": "admin",
2016
+ "writable": true,
2017
+ "signer": true
2018
+ },
2019
+ {
2020
+ "name": "stakeMetrics",
2021
+ "writable": true
2022
+ },
2023
+ {
2024
+ "name": "systemProgram"
2025
+ }
2026
+ ],
2027
+ "args": []
2028
+ },
1954
2029
  {
1955
2030
  "name": "migrateUserRecord",
1956
2031
  "discriminator": [
@@ -1988,6 +2063,37 @@ export type LiqsolCore = {
1988
2063
  ],
1989
2064
  "args": []
1990
2065
  },
2066
+ {
2067
+ "name": "migrateValidatorInfoBatch",
2068
+ "docs": [
2069
+ "One-shot migration: realloc ValidatorInfoAccounts for new fields (mev + _reserved)",
2070
+ "Pass validator_info PDAs via remaining_accounts"
2071
+ ],
2072
+ "discriminator": [
2073
+ 250,
2074
+ 77,
2075
+ 53,
2076
+ 116,
2077
+ 38,
2078
+ 22,
2079
+ 12,
2080
+ 100
2081
+ ],
2082
+ "accounts": [
2083
+ {
2084
+ "name": "globalConfig"
2085
+ },
2086
+ {
2087
+ "name": "admin",
2088
+ "writable": true,
2089
+ "signer": true
2090
+ },
2091
+ {
2092
+ "name": "systemProgram"
2093
+ }
2094
+ ],
2095
+ "args": []
2096
+ },
1991
2097
  {
1992
2098
  "name": "processGraveyardValidatorsBatch",
1993
2099
  "docs": [
@@ -3442,6 +3548,20 @@ export type LiqsolCore = {
3442
3548
  },
3443
3549
  {
3444
3550
  "name": "stakeHistory"
3551
+ },
3552
+ {
3553
+ "name": "vault",
3554
+ "writable": true
3555
+ },
3556
+ {
3557
+ "name": "reservePool",
3558
+ "writable": true
3559
+ },
3560
+ {
3561
+ "name": "stakeProgram"
3562
+ },
3563
+ {
3564
+ "name": "clock"
3445
3565
  }
3446
3566
  ],
3447
3567
  "args": []
@@ -4513,12 +4633,61 @@ export type LiqsolCore = {
4513
4633
  ],
4514
4634
  "type": "u64"
4515
4635
  },
4636
+ {
4637
+ "name": "mevClaimsNextIndex",
4638
+ "docs": [
4639
+ "Next active_list index to process for MEV tip claims"
4640
+ ],
4641
+ "type": "u16"
4642
+ },
4643
+ {
4644
+ "name": "tempTotalMevReward",
4645
+ "docs": [
4646
+ "Temporary accumulator for MEV rewards across batches"
4647
+ ],
4648
+ "type": "u64"
4649
+ },
4650
+ {
4651
+ "name": "tempTotalOutstandingAmountToUnstake",
4652
+ "docs": [
4653
+ "Temporary accumulator for sum of validators' amount_to_unstake across batches"
4654
+ ],
4655
+ "type": "u64"
4656
+ },
4657
+ {
4658
+ "name": "validatorsSyncStartedEpoch",
4659
+ "docs": [
4660
+ "Owns validators_sync_processed_this_epoch."
4661
+ ],
4662
+ "type": "u16"
4663
+ },
4664
+ {
4665
+ "name": "leaderboardScoresStartedEpoch",
4666
+ "docs": [
4667
+ "Owns leaderboard_scores_next_index."
4668
+ ],
4669
+ "type": "u16"
4670
+ },
4671
+ {
4672
+ "name": "graveyardCleanupStartedEpoch",
4673
+ "docs": [
4674
+ "Owns graveyard_cleanup_next_index."
4675
+ ],
4676
+ "type": "u16"
4677
+ },
4678
+ {
4679
+ "name": "additionStartedEpoch",
4680
+ "docs": [
4681
+ "Owns addition_next_rank + addition_target_rank."
4682
+ ],
4683
+ "type": "u16"
4684
+ },
4516
4685
  {
4517
4686
  "name": "reserved",
4518
4687
  "type": {
4519
4688
  "array": [
4520
4689
  "u8",
4521
- 23
4690
+ 64
4522
4691
  ]
4523
4692
  }
4524
4693
  }
@@ -4862,7 +5031,9 @@ export type LiqsolCore = {
4862
5031
  {
4863
5032
  "name": "transientThreshold",
4864
5033
  "docs": [
4865
- "Minimum transient stake to include in effective stake calculations"
5034
+ "DEPRECATED (WNS-33): no longer read. Kept for account layout stability.",
5035
+ "Rebalance now counts all transient stake on both sides of the delta equation,",
5036
+ "so the per-validator threshold gate was removed."
4866
5037
  ],
4867
5038
  "type": "u64"
4868
5039
  },
@@ -5008,6 +5179,15 @@ export type LiqsolCore = {
5008
5179
  1
5009
5180
  ]
5010
5181
  }
5182
+ },
5183
+ {
5184
+ "name": "reservedTrailing",
5185
+ "type": {
5186
+ "array": [
5187
+ "u8",
5188
+ 32
5189
+ ]
5190
+ }
5011
5191
  }
5012
5192
  ]
5013
5193
  }
@@ -5228,16 +5408,32 @@ export type LiqsolCore = {
5228
5408
  "type": "u8"
5229
5409
  },
5230
5410
  {
5231
- "name": "padding",
5411
+ "name": "align",
5232
5412
  "docs": [
5233
- "Reserved space for future upgrades"
5413
+ "Alignment byte (keeps u16 fields below properly aligned)"
5234
5414
  ],
5235
- "type": {
5236
- "array": [
5237
- "u8",
5238
- 5
5239
- ]
5240
- }
5415
+ "type": "u8"
5416
+ },
5417
+ {
5418
+ "name": "crankNextIndex",
5419
+ "docs": [
5420
+ "Next validator index to process during crank_update_scores"
5421
+ ],
5422
+ "type": "u16"
5423
+ },
5424
+ {
5425
+ "name": "lastCrankEpoch",
5426
+ "docs": [
5427
+ "Last epoch when crank_update_scores completed all validators"
5428
+ ],
5429
+ "type": "u16"
5430
+ },
5431
+ {
5432
+ "name": "crankStartedEpoch",
5433
+ "docs": [
5434
+ "Epoch when start_crank was called (signals an active crank cycle)"
5435
+ ],
5436
+ "type": "u16"
5241
5437
  }
5242
5438
  ]
5243
5439
  }
@@ -5897,9 +6093,13 @@ export type LiqsolCore = {
5897
6093
  "type": "bool"
5898
6094
  },
5899
6095
  {
5900
- "name": "additionNextRank",
6096
+ "name": "unstakeAllocationStartedEpoch",
5901
6097
  "docs": [
5902
- "DEPRECATED see BatchOrchestrator.addition_next_rank. Always 0."
6098
+ "Epoch in which the current unstake allocation cycle was started.",
6099
+ "Used to detect stale cycles that span epoch boundaries — if the epoch",
6100
+ "has advanced, the cycle is reset and restarted to avoid resuming",
6101
+ "against a mutated validator active list.",
6102
+ "(Repurposed from the deprecated addition_next_rank field — verified 0 on the mainnet.)"
5903
6103
  ],
5904
6104
  "type": "u16"
5905
6105
  },
@@ -6000,6 +6200,34 @@ export type LiqsolCore = {
6000
6200
  {
6001
6201
  "name": "bump",
6002
6202
  "type": "u8"
6203
+ },
6204
+ {
6205
+ "name": "mevReward",
6206
+ "docs": [
6207
+ "MEV rewards swept from main stake accounts this epoch (accumulated, reset after pay cycle)"
6208
+ ],
6209
+ "type": "u64"
6210
+ },
6211
+ {
6212
+ "name": "totalOutstandingAmountToUnstake",
6213
+ "docs": [
6214
+ "WNS-16: total amount_to_unstake across all validators at last metrics refresh.",
6215
+ "Represents allocated-but-not-yet-deactivated unstake obligations.",
6216
+ "Subtracted from unstakeable_stake in admission control to prevent double-promising."
6217
+ ],
6218
+ "type": "u64"
6219
+ },
6220
+ {
6221
+ "name": "reserved",
6222
+ "docs": [
6223
+ "Reserved space for future use"
6224
+ ],
6225
+ "type": {
6226
+ "array": [
6227
+ "u8",
6228
+ 24
6229
+ ]
6230
+ }
6003
6231
  }
6004
6232
  ]
6005
6233
  }
@@ -6326,6 +6554,25 @@ export type LiqsolCore = {
6326
6554
  {
6327
6555
  "name": "stateTransitionTriggerStakeAmount",
6328
6556
  "type": "u64"
6557
+ },
6558
+ {
6559
+ "name": "mevEarned",
6560
+ "docs": [
6561
+ "MEV reward swept for this validator in the current epoch"
6562
+ ],
6563
+ "type": "u64"
6564
+ },
6565
+ {
6566
+ "name": "reserved",
6567
+ "docs": [
6568
+ "Reserved space for future use"
6569
+ ],
6570
+ "type": {
6571
+ "array": [
6572
+ "u8",
6573
+ 24
6574
+ ]
6575
+ }
6329
6576
  }
6330
6577
  ]
6331
6578
  }
@@ -331,7 +331,9 @@ export type TransferHook = {
331
331
  {
332
332
  "name": "transientThreshold",
333
333
  "docs": [
334
- "Minimum transient stake to include in effective stake calculations"
334
+ "DEPRECATED (WNS-33): no longer read. Kept for account layout stability.",
335
+ "Rebalance now counts all transient stake on both sides of the delta equation,",
336
+ "so the per-validator threshold gate was removed."
335
337
  ],
336
338
  "type": "u64"
337
339
  },
@@ -477,6 +479,15 @@ export type TransferHook = {
477
479
  1
478
480
  ]
479
481
  }
482
+ },
483
+ {
484
+ "name": "reservedTrailing",
485
+ "type": {
486
+ "array": [
487
+ "u8",
488
+ 32
489
+ ]
490
+ }
480
491
  }
481
492
  ]
482
493
  }
@@ -13,6 +13,26 @@ export type ValidatorLeaderboard = {
13
13
  "description": "Created with Anchor"
14
14
  },
15
15
  "instructions": [
16
+ {
17
+ "name": "crankUpdateScores",
18
+ "discriminator": [
19
+ 163,
20
+ 247,
21
+ 66,
22
+ 109,
23
+ 22,
24
+ 206,
25
+ 61,
26
+ 95
27
+ ],
28
+ "accounts": [
29
+ {
30
+ "name": "leaderboardState",
31
+ "writable": true
32
+ }
33
+ ],
34
+ "args": []
35
+ },
16
36
  {
17
37
  "name": "initializeLeaderboard",
18
38
  "discriminator": [
@@ -42,27 +62,27 @@ export type ValidatorLeaderboard = {
42
62
  "args": []
43
63
  },
44
64
  {
45
- "name": "reallocLeaderboard",
65
+ "name": "migrateV14",
46
66
  "discriminator": [
47
- 2,
48
- 70,
49
- 106,
50
- 94,
51
- 81,
52
- 225,
53
- 113,
54
- 152
67
+ 41,
68
+ 152,
69
+ 69,
70
+ 58,
71
+ 215,
72
+ 119,
73
+ 255,
74
+ 189
55
75
  ],
56
76
  "accounts": [
57
77
  {
58
- "name": "leaderboardState",
59
- "writable": true
60
- },
61
- {
62
- "name": "payer",
78
+ "name": "authority",
63
79
  "writable": true,
64
80
  "signer": true
65
81
  },
82
+ {
83
+ "name": "leaderboardState",
84
+ "writable": true
85
+ },
66
86
  {
67
87
  "name": "systemProgram"
68
88
  }
@@ -70,29 +90,26 @@ export type ValidatorLeaderboard = {
70
90
  "args": []
71
91
  },
72
92
  {
73
- "name": "updateCommission",
93
+ "name": "reallocLeaderboard",
74
94
  "discriminator": [
75
95
  2,
76
- 202,
77
- 72,
78
- 156,
79
- 19,
80
- 253,
81
- 91,
82
- 174
96
+ 70,
97
+ 106,
98
+ 94,
99
+ 81,
100
+ 225,
101
+ 113,
102
+ 152
83
103
  ],
84
104
  "accounts": [
85
105
  {
86
- "name": "registrant",
87
- "writable": true,
88
- "signer": true
89
- },
90
- {
91
- "name": "voteAccount"
106
+ "name": "leaderboardState",
107
+ "writable": true
92
108
  },
93
109
  {
94
- "name": "validatorRecord",
95
- "writable": true
110
+ "name": "payer",
111
+ "writable": true,
112
+ "signer": true
96
113
  },
97
114
  {
98
115
  "name": "systemProgram"
@@ -101,28 +118,25 @@ export type ValidatorLeaderboard = {
101
118
  "args": []
102
119
  },
103
120
  {
104
- "name": "updateMevCommission",
121
+ "name": "startCrank",
105
122
  "discriminator": [
106
- 107,
107
- 65,
108
- 238,
109
- 108,
110
- 183,
111
- 47,
112
- 236,
113
- 203
123
+ 31,
124
+ 83,
125
+ 66,
126
+ 14,
127
+ 249,
128
+ 131,
129
+ 221,
130
+ 67
114
131
  ],
115
132
  "accounts": [
116
133
  {
117
- "name": "signer",
134
+ "name": "cranker",
118
135
  "signer": true
119
136
  },
120
137
  {
121
- "name": "validatorRecord",
138
+ "name": "leaderboardState",
122
139
  "writable": true
123
- },
124
- {
125
- "name": "tipDistributionAccount"
126
140
  }
127
141
  ],
128
142
  "args": []
@@ -146,7 +160,10 @@ export type ValidatorLeaderboard = {
146
160
  "signer": true
147
161
  },
148
162
  {
149
- "name": "voteAccount"
163
+ "name": "voteAccount",
164
+ "docs": [
165
+ "If no longer owned by the vote program (closed/reclaimed), score is set to 0."
166
+ ]
150
167
  },
151
168
  {
152
169
  "name": "validatorRecord",
@@ -160,16 +177,7 @@ export type ValidatorLeaderboard = {
160
177
  "name": "systemProgram"
161
178
  }
162
179
  ],
163
- "args": [
164
- {
165
- "name": "vpp",
166
- "type": "u8"
167
- },
168
- {
169
- "name": "proposedRank",
170
- "type": "u16"
171
- }
172
- ]
180
+ "args": []
173
181
  }
174
182
  ],
175
183
  "accounts": [
@@ -416,16 +424,32 @@ export type ValidatorLeaderboard = {
416
424
  "type": "u8"
417
425
  },
418
426
  {
419
- "name": "padding",
427
+ "name": "align",
420
428
  "docs": [
421
- "Reserved space for future upgrades"
429
+ "Alignment byte (keeps u16 fields below properly aligned)"
422
430
  ],
423
- "type": {
424
- "array": [
425
- "u8",
426
- 5
427
- ]
428
- }
431
+ "type": "u8"
432
+ },
433
+ {
434
+ "name": "crankNextIndex",
435
+ "docs": [
436
+ "Next validator index to process during crank_update_scores"
437
+ ],
438
+ "type": "u16"
439
+ },
440
+ {
441
+ "name": "lastCrankEpoch",
442
+ "docs": [
443
+ "Last epoch when crank_update_scores completed all validators"
444
+ ],
445
+ "type": "u16"
446
+ },
447
+ {
448
+ "name": "crankStartedEpoch",
449
+ "docs": [
450
+ "Epoch when start_crank was called (signals an active crank cycle)"
451
+ ],
452
+ "type": "u16"
429
453
  }
430
454
  ]
431
455
  }
@@ -536,15 +560,13 @@ export type ValidatorLeaderboard = {
536
560
  {
537
561
  "name": "mevCommission",
538
562
  "docs": [
539
- "Current MEV commission in basis points"
563
+ "DEPRECATED: MEV commission fields are no longer written or read by any instruction.",
564
+ "Retained to preserve account layout (removing would require migration)."
540
565
  ],
541
566
  "type": "u16"
542
567
  },
543
568
  {
544
569
  "name": "mevCommissionHistory",
545
- "docs": [
546
- "Circular buffer of past 10 MEV commission values"
547
- ],
548
570
  "type": {
549
571
  "array": [
550
572
  "u16",
@@ -554,16 +576,10 @@ export type ValidatorLeaderboard = {
554
576
  },
555
577
  {
556
578
  "name": "mevCommissionIndex",
557
- "docs": [
558
- "Current index in mev_commission_history circular buffer (0-9)"
559
- ],
560
579
  "type": "u8"
561
580
  },
562
581
  {
563
582
  "name": "lastMevCommissionUpdate",
564
- "docs": [
565
- "Last epoch when MEV commission was updated"
566
- ],
567
583
  "type": "u64"
568
584
  },
569
585
  {