@wireio/stake 0.1.2 → 0.2.0

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "address": "BsxpwvCaoerUPdY4CgPFgHMmgN939ogDd8MMvH7Zdpgr",
2
+ "address": "HR3t8mA25TdJpwLph2h2L7KhK7ynWoAByYYzgUAfd5rk",
3
3
  "metadata": {
4
4
  "name": "liqsol_core",
5
5
  "version": "0.1.0",
@@ -8,98 +8,110 @@
8
8
  },
9
9
  "instructions": [
10
10
  {
11
- "name": "add_bond_level",
11
+ "name": "accumulate_unstake_request",
12
+ "docs": [
13
+ "Accumulate unstake requests to be processed in next allocation cycle",
14
+ "Multiple requests can be accumulated before calculating allocations",
15
+ "Returns the target epoch when this unstake request will be processed"
16
+ ],
12
17
  "discriminator": [
13
- 102,
18
+ 24,
19
+ 73,
20
+ 69,
21
+ 139,
14
22
  36,
15
- 12,
16
- 245,
17
- 60,
18
- 124,
19
- 92,
20
- 74
23
+ 209,
24
+ 105,
25
+ 252
21
26
  ],
22
27
  "accounts": [
23
28
  {
24
- "name": "authority",
29
+ "name": "admin",
25
30
  "writable": true,
26
31
  "signer": true
27
32
  },
28
33
  {
29
- "name": "bar_config"
30
- },
31
- {
32
- "name": "bond_level",
34
+ "name": "stake_allocation_state",
35
+ "docs": [
36
+ "Stake allocation state - to accumulate pending unstake requests"
37
+ ],
33
38
  "writable": true
34
39
  },
35
40
  {
36
- "name": "system_program"
37
- }
38
- ],
39
- "args": [
40
- {
41
- "name": "bond_id",
42
- "type": {
43
- "array": [
44
- "u8",
45
- 32
46
- ]
47
- }
41
+ "name": "stake_metrics",
42
+ "docs": [
43
+ "Stake metrics - to validate total unstake amount is available"
44
+ ]
48
45
  },
49
46
  {
50
- "name": "warmup_period",
51
- "type": "u64"
47
+ "name": "maintenance_ledger",
48
+ "docs": [
49
+ "Maintenance ledger - to determine target processing epoch"
50
+ ]
52
51
  },
53
52
  {
54
- "name": "cooldown_period",
55
- "type": "u64"
56
- },
53
+ "name": "clock"
54
+ }
55
+ ],
56
+ "args": [
57
57
  {
58
- "name": "min_receipt_principal",
58
+ "name": "amount",
59
59
  "type": "u64"
60
- },
61
- {
62
- "name": "roles",
63
- "type": {
64
- "array": [
65
- {
66
- "defined": {
67
- "name": "Role"
68
- }
69
- },
70
- 4
71
- ]
72
- }
73
60
  }
74
- ]
61
+ ],
62
+ "returns": "u64"
75
63
  },
76
64
  {
77
- "name": "add_validator",
65
+ "name": "add_validator_v2",
78
66
  "docs": [
79
- "Done///"
67
+ "Add a new validator"
80
68
  ],
81
69
  "discriminator": [
82
- 250,
83
- 113,
84
- 53,
85
- 54,
86
- 141,
87
- 117,
88
- 215,
89
- 185
70
+ 217,
71
+ 158,
72
+ 30,
73
+ 19,
74
+ 123,
75
+ 99,
76
+ 110,
77
+ 30
90
78
  ],
91
79
  "accounts": [
92
80
  {
93
81
  "name": "authority",
82
+ "writable": true,
94
83
  "signer": true
95
84
  },
96
85
  {
97
- "name": "validator_registry",
86
+ "name": "active_list",
87
+ "docs": [
88
+ "Active list - will add the validator here"
89
+ ],
90
+ "writable": true
91
+ },
92
+ {
93
+ "name": "validator_info",
94
+ "docs": [
95
+ "Create the validator info account"
96
+ ],
97
+ "writable": true
98
+ },
99
+ {
100
+ "name": "validator_transient",
101
+ "docs": [
102
+ "Create the validator transient account"
103
+ ],
98
104
  "writable": true
99
105
  },
100
106
  {
101
- "name": "transients_tracking",
107
+ "name": "stake_allocation_state",
108
+ "docs": [
109
+ "Stake allocation state - to update total_active_vpp when adding validator"
110
+ ],
102
111
  "writable": true
112
+ },
113
+ {
114
+ "name": "system_program"
103
115
  }
104
116
  ],
105
117
  "args": [
@@ -149,110 +161,199 @@
149
161
  ]
150
162
  },
151
163
  {
152
- "name": "bond_wire_receipt",
164
+ "name": "aggregate_stake_metrics",
165
+ "docs": [
166
+ "V2: Aggregate stake metrics across all validators using PDA architecture"
167
+ ],
153
168
  "discriminator": [
154
- 56,
155
- 121,
156
- 67,
157
- 27,
158
- 75,
159
- 101,
160
- 114,
161
- 5
169
+ 13,
170
+ 245,
171
+ 47,
172
+ 202,
173
+ 170,
174
+ 73,
175
+ 98,
176
+ 207
162
177
  ],
163
178
  "accounts": [
164
179
  {
165
- "name": "payer",
166
- "writable": true,
180
+ "name": "admin",
167
181
  "signer": true
168
182
  },
169
183
  {
170
- "name": "bond_level",
184
+ "name": "stake_metrics",
171
185
  "writable": true
172
186
  },
173
187
  {
174
- "name": "actor",
175
- "docs": [
176
- "Actor being bonded/flagged"
177
- ]
188
+ "name": "epoch_state",
189
+ "writable": true
190
+ },
191
+ {
192
+ "name": "payout_state",
193
+ "writable": true
194
+ },
195
+ {
196
+ "name": "processing_state",
197
+ "writable": true
178
198
  },
179
199
  {
180
- "name": "bonded_actor",
200
+ "name": "active_list"
201
+ }
202
+ ],
203
+ "args": []
204
+ },
205
+ {
206
+ "name": "blacklist_validator",
207
+ "docs": [
208
+ "Blacklist a validator (user-facing, maintenance will handle graveyard movement)",
209
+ "UnderPerforming is set automatically when score is updated",
210
+ "Another serious emergency stop function"
211
+ ],
212
+ "discriminator": [
213
+ 125,
214
+ 42,
215
+ 36,
216
+ 229,
217
+ 27,
218
+ 38,
219
+ 226,
220
+ 62
221
+ ],
222
+ "accounts": [
223
+ {
224
+ "name": "validator_info",
181
225
  "writable": true
182
226
  },
183
227
  {
184
- "name": "bond_owner",
228
+ "name": "stake_allocation_state",
185
229
  "docs": [
186
- "Owner of the WireReceipt bond"
230
+ "Stake allocation state - to update total_active_vpp when VPP changes"
187
231
  ],
232
+ "writable": true
233
+ }
234
+ ],
235
+ "args": [
236
+ {
237
+ "name": "vote_account",
238
+ "type": "pubkey"
239
+ }
240
+ ]
241
+ },
242
+ {
243
+ "name": "calculate_unstake_allocations",
244
+ "docs": [
245
+ "Calculate unstake allocations across validators (batched, up to 10 per call)",
246
+ "Distributes the FROZEN processing amount proportionally based on active stake",
247
+ "Call this after accumulating requests via accumulate_unstake_request"
248
+ ],
249
+ "discriminator": [
250
+ 156,
251
+ 232,
252
+ 48,
253
+ 116,
254
+ 107,
255
+ 60,
256
+ 136,
257
+ 140
258
+ ],
259
+ "accounts": [
260
+ {
261
+ "name": "admin",
188
262
  "writable": true,
189
263
  "signer": true
190
264
  },
191
265
  {
192
- "name": "bar_config"
193
- },
194
- {
195
- "name": "wire_receipt",
266
+ "name": "stake_allocation_state",
196
267
  "docs": [
197
- "The WireReceipt account used as the bond; must belong to the bond owner"
268
+ "Stake allocation state - to track unstake allocation batching"
198
269
  ],
199
270
  "writable": true
200
271
  },
201
272
  {
202
- "name": "system_program"
273
+ "name": "stake_metrics",
274
+ "docs": [
275
+ "Stake metrics - to validate total unstake amount is available"
276
+ ]
277
+ },
278
+ {
279
+ "name": "active_list",
280
+ "docs": [
281
+ "Active validator list - to verify validators are in active list"
282
+ ]
283
+ },
284
+ {
285
+ "name": "maintenance_ledger",
286
+ "docs": [
287
+ "Maintenance ledger - to track last unstake allocation epoch"
288
+ ],
289
+ "writable": true
203
290
  }
204
291
  ],
205
292
  "args": []
206
293
  },
207
294
  {
208
- "name": "claim_bond",
295
+ "name": "calculate_validator_allocations",
209
296
  "discriminator": [
210
- 173,
211
- 34,
212
- 157,
213
- 61,
214
- 45,
215
- 120,
216
- 246,
217
- 11
297
+ 48,
298
+ 217,
299
+ 8,
300
+ 168,
301
+ 228,
302
+ 221,
303
+ 140,
304
+ 112
218
305
  ],
219
306
  "accounts": [
220
307
  {
221
- "name": "bond_owner",
308
+ "name": "admin",
222
309
  "writable": true,
223
310
  "signer": true
224
311
  },
225
312
  {
226
- "name": "bar_config",
313
+ "name": "stake_allocation_state",
227
314
  "docs": [
228
- "Reserved for future OPP assertions"
229
- ]
315
+ "Stake allocation state - to track rebalancing progress"
316
+ ],
317
+ "writable": true
230
318
  },
231
319
  {
232
- "name": "bond_level"
320
+ "name": "stake_metrics",
321
+ "docs": [
322
+ "Stake metrics - to get current total active stake"
323
+ ]
233
324
  },
234
325
  {
235
- "name": "actor",
326
+ "name": "active_list",
236
327
  "docs": [
237
- "Actor whose bond is being claimed/cleared"
328
+ "Active validator list - to verify validators are in active list"
238
329
  ]
239
330
  },
240
331
  {
241
- "name": "bonded_actor",
332
+ "name": "reserve_pool",
333
+ "docs": [
334
+ "Reserve pool - to read current balance"
335
+ ],
242
336
  "writable": true
243
337
  },
244
338
  {
245
- "name": "wire_receipt",
339
+ "name": "maintenance_ledger",
246
340
  "docs": [
247
- "The WireReceipt to unlock after claiming bond"
341
+ "Maintenance ledger - to track last rebalance epoch"
248
342
  ],
249
343
  "writable": true
344
+ },
345
+ {
346
+ "name": "clock"
250
347
  }
251
348
  ],
252
349
  "args": [
253
350
  {
254
- "name": "reclaim_storage",
255
- "type": "bool"
351
+ "name": "encumbered_funds",
352
+ "type": "u64"
353
+ },
354
+ {
355
+ "name": "validators_count",
356
+ "type": "u8"
256
357
  }
257
358
  ]
258
359
  },
@@ -311,6 +412,67 @@
311
412
  ],
312
413
  "args": []
313
414
  },
415
+ {
416
+ "name": "cleanup_from_graveyard",
417
+ "docs": [
418
+ "Cleanup a validator from graveyard after cooldown expires, get him outta here//"
419
+ ],
420
+ "discriminator": [
421
+ 154,
422
+ 168,
423
+ 171,
424
+ 22,
425
+ 38,
426
+ 14,
427
+ 26,
428
+ 229
429
+ ],
430
+ "accounts": [
431
+ {
432
+ "name": "authority",
433
+ "writable": true,
434
+ "signer": true
435
+ },
436
+ {
437
+ "name": "graveyard_list",
438
+ "docs": [
439
+ "Graveyard list - will remove from here"
440
+ ],
441
+ "writable": true
442
+ },
443
+ {
444
+ "name": "validator_info",
445
+ "docs": [
446
+ "Validator info - check cooldown, optionally close"
447
+ ],
448
+ "writable": true
449
+ },
450
+ {
451
+ "name": "validator_transient",
452
+ "docs": [
453
+ "Validator transient - close and refund rent"
454
+ ],
455
+ "writable": true
456
+ },
457
+ {
458
+ "name": "stake_allocation_state",
459
+ "docs": [
460
+ "Stake allocation state - DO NOT update (validator not going back to active list during cleanup)",
461
+ "This is here for consistency but won't be used in cleanup_from_graveyard"
462
+ ],
463
+ "writable": true
464
+ },
465
+ {
466
+ "name": "system_program"
467
+ }
468
+ ],
469
+ "args": [
470
+ {
471
+ "name": "vote_account",
472
+ "type": "pubkey"
473
+ }
474
+ ]
475
+ },
314
476
  {
315
477
  "name": "deposit",
316
478
  "discriminator": [
@@ -424,152 +586,69 @@
424
586
  ]
425
587
  },
426
588
  {
427
- "name": "deposit_to_reserve",
589
+ "name": "force_validator_unstake",
428
590
  "docs": [
429
- "Done///",
430
- "/// TODO: delete after development or put in that flag thing"
591
+ "A function you can call to directly influence the amount to unstake from a particular validator",
592
+ "Tbh this is a bypass of the system and should not be called unless you know what you are doing"
431
593
  ],
432
594
  "discriminator": [
433
- 8,
434
- 79,
435
- 123,
436
- 129,
595
+ 7,
596
+ 208,
437
597
  146,
438
- 140,
439
- 178,
440
- 128
598
+ 241,
599
+ 10,
600
+ 219,
601
+ 109,
602
+ 30
441
603
  ],
442
604
  "accounts": [
443
605
  {
444
- "name": "depositor",
606
+ "name": "admin",
445
607
  "writable": true,
446
608
  "signer": true
447
609
  },
448
610
  {
449
- "name": "reserve_pool",
450
- "writable": true
451
- },
452
- {
453
- "name": "vault"
454
- },
455
- {
456
- "name": "ephemeral_stake",
611
+ "name": "validator_info",
612
+ "docs": [
613
+ "Validator info account to update"
614
+ ],
457
615
  "writable": true
458
- },
459
- {
460
- "name": "controller_state"
461
- },
462
- {
463
- "name": "stake_program"
464
- },
465
- {
466
- "name": "system_program"
467
- },
468
- {
469
- "name": "clock"
470
- },
471
- {
472
- "name": "stake_history"
473
- },
474
- {
475
- "name": "rent"
476
616
  }
477
617
  ],
478
618
  "args": [
479
619
  {
480
- "name": "amount",
481
- "type": "u64"
620
+ "name": "vote_account",
621
+ "type": "pubkey"
482
622
  },
483
623
  {
484
- "name": "seed",
485
- "type": "u32"
624
+ "name": "amount",
625
+ "type": "u64"
486
626
  }
487
627
  ]
488
628
  },
489
629
  {
490
- "name": "distribute_from_reserve",
630
+ "name": "get_min_max_resolved_epoch_deactivations",
491
631
  "docs": [
492
- "Done///"
493
- ],
494
- "discriminator": [
495
- 204,
496
- 157,
497
- 72,
498
- 30,
499
- 26,
500
- 149,
501
- 166,
502
- 166
503
- ],
504
- "accounts": [
505
- {
506
- "name": "reserve_pool",
507
- "writable": true
508
- },
509
- {
510
- "name": "vault"
511
- },
512
- {
513
- "name": "epoch_state",
514
- "writable": true
515
- },
516
- {
517
- "name": "processing_state",
518
- "writable": true
519
- },
520
- {
521
- "name": "validator_registry",
522
- "writable": true
523
- },
524
- {
525
- "name": "stake_program"
526
- },
527
- {
528
- "name": "system_program"
529
- },
530
- {
531
- "name": "clock"
532
- },
533
- {
534
- "name": "stake_history"
535
- },
536
- {
537
- "name": "stake_config"
538
- },
539
- {
540
- "name": "rent"
541
- }
632
+ "Get minimum max_resolved_epoch_deactivations from MaintenanceLedger",
633
+ "This is designed to be called via CPI from other programs"
542
634
  ],
543
- "args": [
544
- {
545
- "name": "validators_count",
546
- "type": "u8"
547
- }
548
- ]
549
- },
550
- {
551
- "name": "get_transient_values",
552
635
  "discriminator": [
553
- 13,
554
- 139,
555
- 204,
556
- 177,
557
- 30,
558
- 98,
559
- 185,
560
- 246
636
+ 171,
637
+ 169,
638
+ 39,
639
+ 207,
640
+ 181,
641
+ 67,
642
+ 86,
643
+ 73
561
644
  ],
562
645
  "accounts": [
563
646
  {
564
- "name": "validator_registry"
647
+ "name": "epoch_state"
565
648
  }
566
649
  ],
567
- "args": [
568
- {
569
- "name": "vote_account",
570
- "type": "pubkey"
571
- }
572
- ]
650
+ "args": [],
651
+ "returns": "u16"
573
652
  },
574
653
  {
575
654
  "name": "init_bucket",
@@ -652,16 +731,19 @@
652
731
  "args": []
653
732
  },
654
733
  {
655
- "name": "initialize_bar",
734
+ "name": "initialize_active_list",
735
+ "docs": [
736
+ "Initialize the active validator list (zero-copy)"
737
+ ],
656
738
  "discriminator": [
657
- 35,
658
- 177,
659
- 162,
660
- 209,
661
- 1,
662
- 193,
663
- 155,
664
- 110
739
+ 222,
740
+ 123,
741
+ 57,
742
+ 119,
743
+ 223,
744
+ 4,
745
+ 150,
746
+ 36
665
747
  ],
666
748
  "accounts": [
667
749
  {
@@ -670,7 +752,7 @@
670
752
  "signer": true
671
753
  },
672
754
  {
673
- "name": "bar_config",
755
+ "name": "active_list",
674
756
  "writable": true
675
757
  },
676
758
  {
@@ -711,28 +793,28 @@
711
793
  "args": []
712
794
  },
713
795
  {
714
- "name": "initialize_pay_cycle",
796
+ "name": "initialize_graveyard_list",
715
797
  "docs": [
716
- "Done///"
798
+ "Initialize the graveyard validator list (zero-copy)"
717
799
  ],
718
800
  "discriminator": [
719
- 1,
720
- 184,
721
- 249,
801
+ 178,
802
+ 8,
722
803
  179,
723
- 11,
724
- 182,
725
- 239,
726
- 224
804
+ 111,
805
+ 75,
806
+ 19,
807
+ 130,
808
+ 176
727
809
  ],
728
810
  "accounts": [
729
811
  {
730
- "name": "admin",
812
+ "name": "payer",
731
813
  "writable": true,
732
814
  "signer": true
733
815
  },
734
816
  {
735
- "name": "pay_cycle",
817
+ "name": "graveyard_list",
736
818
  "writable": true
737
819
  },
738
820
  {
@@ -878,6 +960,37 @@
878
960
  ],
879
961
  "args": []
880
962
  },
963
+ {
964
+ "name": "initialize_stake_allocation_state",
965
+ "discriminator": [
966
+ 159,
967
+ 99,
968
+ 175,
969
+ 136,
970
+ 251,
971
+ 241,
972
+ 88,
973
+ 82
974
+ ],
975
+ "accounts": [
976
+ {
977
+ "name": "admin",
978
+ "writable": true,
979
+ "signer": true
980
+ },
981
+ {
982
+ "name": "stake_allocation_state",
983
+ "writable": true
984
+ },
985
+ {
986
+ "name": "clock"
987
+ },
988
+ {
989
+ "name": "system_program"
990
+ }
991
+ ],
992
+ "args": []
993
+ },
881
994
  {
882
995
  "name": "initialize_stake_controller_state",
883
996
  "docs": [
@@ -978,73 +1091,6 @@
978
1091
  ],
979
1092
  "args": []
980
1093
  },
981
- {
982
- "name": "initialize_transients_tracking",
983
- "docs": [
984
- "Done///"
985
- ],
986
- "discriminator": [
987
- 45,
988
- 17,
989
- 111,
990
- 28,
991
- 248,
992
- 238,
993
- 237,
994
- 30
995
- ],
996
- "accounts": [
997
- {
998
- "name": "payer",
999
- "writable": true,
1000
- "signer": true
1001
- },
1002
- {
1003
- "name": "transients_tracking",
1004
- "writable": true
1005
- },
1006
- {
1007
- "name": "system_program"
1008
- }
1009
- ],
1010
- "args": []
1011
- },
1012
- {
1013
- "name": "initialize_validator_registry",
1014
- "docs": [
1015
- "Done///"
1016
- ],
1017
- "discriminator": [
1018
- 168,
1019
- 49,
1020
- 128,
1021
- 236,
1022
- 25,
1023
- 7,
1024
- 168,
1025
- 85
1026
- ],
1027
- "accounts": [
1028
- {
1029
- "name": "payer",
1030
- "writable": true,
1031
- "signer": true
1032
- },
1033
- {
1034
- "name": "validator_registry",
1035
- "writable": true
1036
- },
1037
- {
1038
- "name": "system_program"
1039
- }
1040
- ],
1041
- "args": [
1042
- {
1043
- "name": "authority",
1044
- "type": "pubkey"
1045
- }
1046
- ]
1047
- },
1048
1094
  {
1049
1095
  "name": "initialize_vault",
1050
1096
  "docs": [
@@ -1109,19 +1155,20 @@
1109
1155
  "args": []
1110
1156
  },
1111
1157
  {
1112
- "name": "maintenance_merge_transients",
1158
+ "name": "merge_activating_stakes",
1113
1159
  "docs": [
1114
- "Done///"
1160
+ "V2: Merge activating transient stakes using PDA architecture",
1161
+ "Returns the number of epochs successfully merged"
1115
1162
  ],
1116
1163
  "discriminator": [
1117
- 171,
1118
- 33,
1119
- 27,
1120
- 133,
1121
- 97,
1122
- 62,
1123
- 213,
1124
- 96
1164
+ 181,
1165
+ 183,
1166
+ 76,
1167
+ 92,
1168
+ 57,
1169
+ 11,
1170
+ 212,
1171
+ 189
1125
1172
  ],
1126
1173
  "accounts": [
1127
1174
  {
@@ -1133,16 +1180,34 @@
1133
1180
  "writable": true
1134
1181
  },
1135
1182
  {
1136
- "name": "validator_registry",
1137
- "writable": true
1183
+ "name": "active_list",
1184
+ "docs": [
1185
+ "Active validators list (zero-copy)"
1186
+ ]
1138
1187
  },
1139
1188
  {
1140
- "name": "transients_tracking",
1141
- "writable": true
1189
+ "name": "graveyard_list",
1190
+ "docs": [
1191
+ "Graveyard validators list (zero-copy) - needed to check validators in cooldown"
1192
+ ]
1142
1193
  },
1143
1194
  {
1144
- "name": "stake_program"
1145
- },
1195
+ "name": "validator_info",
1196
+ "docs": [
1197
+ "Validator info PDA for the validator being processed"
1198
+ ],
1199
+ "writable": true
1200
+ },
1201
+ {
1202
+ "name": "validator_transient",
1203
+ "docs": [
1204
+ "Validator transient tracking PDA for the validator being processed"
1205
+ ],
1206
+ "writable": true
1207
+ },
1208
+ {
1209
+ "name": "stake_program"
1210
+ },
1146
1211
  {
1147
1212
  "name": "system_program"
1148
1213
  },
@@ -1173,24 +1238,143 @@
1173
1238
  "name": "start_epoch",
1174
1239
  "type": "u64"
1175
1240
  }
1241
+ ],
1242
+ "returns": "u16"
1243
+ },
1244
+ {
1245
+ "name": "merge_deactivated_stakes",
1246
+ "docs": [
1247
+ "V2: Merge fully deactivated stakes back to reserve"
1248
+ ],
1249
+ "discriminator": [
1250
+ 160,
1251
+ 255,
1252
+ 180,
1253
+ 104,
1254
+ 216,
1255
+ 98,
1256
+ 248,
1257
+ 73
1258
+ ],
1259
+ "accounts": [
1260
+ {
1261
+ "name": "admin",
1262
+ "writable": true,
1263
+ "signer": true
1264
+ },
1265
+ {
1266
+ "name": "vault",
1267
+ "writable": true
1268
+ },
1269
+ {
1270
+ "name": "active_list",
1271
+ "docs": [
1272
+ "Active validators list (zero-copy)"
1273
+ ]
1274
+ },
1275
+ {
1276
+ "name": "graveyard_list",
1277
+ "docs": [
1278
+ "Graveyard validators list (zero-copy) - needed to check validators in cooldown"
1279
+ ]
1280
+ },
1281
+ {
1282
+ "name": "validator_info",
1283
+ "docs": [
1284
+ "Validator info PDA for the validator being processed"
1285
+ ],
1286
+ "writable": true
1287
+ },
1288
+ {
1289
+ "name": "validator_transient",
1290
+ "docs": [
1291
+ "Validator transient tracking PDA for the validator being processed"
1292
+ ],
1293
+ "writable": true
1294
+ },
1295
+ {
1296
+ "name": "stake_program"
1297
+ },
1298
+ {
1299
+ "name": "system_program"
1300
+ },
1301
+ {
1302
+ "name": "clock"
1303
+ },
1304
+ {
1305
+ "name": "stake_history"
1306
+ },
1307
+ {
1308
+ "name": "rent"
1309
+ },
1310
+ {
1311
+ "name": "epoch_state",
1312
+ "writable": true
1313
+ },
1314
+ {
1315
+ "name": "processing_state",
1316
+ "writable": true
1317
+ }
1318
+ ],
1319
+ "args": [
1320
+ {
1321
+ "name": "vote_account",
1322
+ "type": "pubkey"
1323
+ }
1176
1324
  ]
1177
1325
  },
1178
1326
  {
1179
- "name": "move_transient_to_active",
1327
+ "name": "move_to_graveyard",
1328
+ "docs": [
1329
+ "Move a validator from active list to graveyard, this is a serious function called in exceptional cases where something has gone awry with the validator",
1330
+ "and our system would be too late to catch it"
1331
+ ],
1180
1332
  "discriminator": [
1181
- 140,
1182
- 99,
1183
- 170,
1184
- 186,
1185
- 84,
1333
+ 171,
1186
1334
  61,
1187
- 184,
1188
- 75
1335
+ 145,
1336
+ 127,
1337
+ 189,
1338
+ 218,
1339
+ 221,
1340
+ 199
1189
1341
  ],
1190
1342
  "accounts": [
1191
1343
  {
1192
- "name": "validator_registry",
1344
+ "name": "authority",
1345
+ "writable": true,
1346
+ "signer": true
1347
+ },
1348
+ {
1349
+ "name": "active_list",
1350
+ "docs": [
1351
+ "Active list - will remove from here"
1352
+ ],
1193
1353
  "writable": true
1354
+ },
1355
+ {
1356
+ "name": "graveyard_list",
1357
+ "docs": [
1358
+ "Graveyard list - will add here"
1359
+ ],
1360
+ "writable": true
1361
+ },
1362
+ {
1363
+ "name": "validator_info",
1364
+ "docs": [
1365
+ "Update the validator info to mark as blacklisted/underperforming"
1366
+ ],
1367
+ "writable": true
1368
+ },
1369
+ {
1370
+ "name": "stake_allocation_state",
1371
+ "docs": [
1372
+ "Stake allocation state - to update total_active_vpp when removing validator"
1373
+ ],
1374
+ "writable": true
1375
+ },
1376
+ {
1377
+ "name": "system_program"
1194
1378
  }
1195
1379
  ],
1196
1380
  "args": [
@@ -1199,8 +1383,12 @@
1199
1383
  "type": "pubkey"
1200
1384
  },
1201
1385
  {
1202
- "name": "amount",
1203
- "type": "u64"
1386
+ "name": "reason",
1387
+ "type": {
1388
+ "defined": {
1389
+ "name": "ValidatorStateChangeReason"
1390
+ }
1391
+ }
1204
1392
  }
1205
1393
  ]
1206
1394
  },
@@ -1224,10 +1412,6 @@
1224
1412
  "name": "admin",
1225
1413
  "signer": true
1226
1414
  },
1227
- {
1228
- "name": "pay_cycle",
1229
- "writable": true
1230
- },
1231
1415
  {
1232
1416
  "name": "stake_metrics",
1233
1417
  "writable": true
@@ -1241,7 +1425,8 @@
1241
1425
  "writable": true
1242
1426
  },
1243
1427
  {
1244
- "name": "distribution_state"
1428
+ "name": "distribution_state",
1429
+ "writable": true
1245
1430
  },
1246
1431
  {
1247
1432
  "name": "liqsol_mint",
@@ -1270,6 +1455,151 @@
1270
1455
  ],
1271
1456
  "args": []
1272
1457
  },
1458
+ {
1459
+ "name": "process_stake_orders",
1460
+ "docs": [
1461
+ "V2: Process stake orders using PDA architecture with pre-calculated allocations"
1462
+ ],
1463
+ "discriminator": [
1464
+ 92,
1465
+ 161,
1466
+ 223,
1467
+ 219,
1468
+ 54,
1469
+ 232,
1470
+ 40,
1471
+ 16
1472
+ ],
1473
+ "accounts": [
1474
+ {
1475
+ "name": "admin",
1476
+ "writable": true,
1477
+ "signer": true
1478
+ },
1479
+ {
1480
+ "name": "reserve_pool",
1481
+ "writable": true
1482
+ },
1483
+ {
1484
+ "name": "vault"
1485
+ },
1486
+ {
1487
+ "name": "epoch_state",
1488
+ "writable": true
1489
+ },
1490
+ {
1491
+ "name": "processing_state",
1492
+ "writable": true
1493
+ },
1494
+ {
1495
+ "name": "active_list",
1496
+ "docs": [
1497
+ "Active validator list - used to get total validator count"
1498
+ ]
1499
+ },
1500
+ {
1501
+ "name": "stake_allocation_state",
1502
+ "docs": [
1503
+ "Stake allocation state - to verify allocations have been calculated for current epoch"
1504
+ ],
1505
+ "writable": true
1506
+ },
1507
+ {
1508
+ "name": "stake_program"
1509
+ },
1510
+ {
1511
+ "name": "system_program"
1512
+ },
1513
+ {
1514
+ "name": "clock"
1515
+ },
1516
+ {
1517
+ "name": "stake_history"
1518
+ },
1519
+ {
1520
+ "name": "stake_config"
1521
+ },
1522
+ {
1523
+ "name": "rent"
1524
+ }
1525
+ ],
1526
+ "args": [
1527
+ {
1528
+ "name": "validators_count",
1529
+ "type": "u8"
1530
+ }
1531
+ ]
1532
+ },
1533
+ {
1534
+ "name": "process_unstake_orders",
1535
+ "docs": [
1536
+ "V2: Process unstake orders by splitting and deactivating stakes"
1537
+ ],
1538
+ "discriminator": [
1539
+ 44,
1540
+ 122,
1541
+ 251,
1542
+ 185,
1543
+ 253,
1544
+ 193,
1545
+ 250,
1546
+ 191
1547
+ ],
1548
+ "accounts": [
1549
+ {
1550
+ "name": "admin",
1551
+ "signer": true
1552
+ },
1553
+ {
1554
+ "name": "vault",
1555
+ "writable": true
1556
+ },
1557
+ {
1558
+ "name": "epoch_state",
1559
+ "writable": true
1560
+ },
1561
+ {
1562
+ "name": "processing_state",
1563
+ "writable": true
1564
+ },
1565
+ {
1566
+ "name": "active_list",
1567
+ "docs": [
1568
+ "Active validator list - used to get total validator count"
1569
+ ]
1570
+ },
1571
+ {
1572
+ "name": "graveyard_list",
1573
+ "docs": [
1574
+ "Graveyard validator list - allows unstaking from graveyard validators"
1575
+ ]
1576
+ },
1577
+ {
1578
+ "name": "clock"
1579
+ },
1580
+ {
1581
+ "name": "stake_history"
1582
+ },
1583
+ {
1584
+ "name": "stake_config"
1585
+ },
1586
+ {
1587
+ "name": "rent"
1588
+ },
1589
+ {
1590
+ "name": "system_program"
1591
+ },
1592
+ {
1593
+ "name": "stake_program"
1594
+ }
1595
+ ],
1596
+ "args": [
1597
+ {
1598
+ "name": "validators_count",
1599
+ "type": "u8"
1600
+ }
1601
+ ]
1602
+ },
1273
1603
  {
1274
1604
  "name": "purchase_warrants_from_yield",
1275
1605
  "discriminator": [
@@ -1780,23 +2110,84 @@
1780
2110
  ],
1781
2111
  "accounts": [
1782
2112
  {
1783
- "name": "admin",
2113
+ "name": "admin",
2114
+ "writable": true,
2115
+ "signer": true
2116
+ },
2117
+ {
2118
+ "name": "tranche_state",
2119
+ "writable": true
2120
+ },
2121
+ {
2122
+ "name": "price_history",
2123
+ "writable": true
2124
+ },
2125
+ {
2126
+ "name": "system_program"
2127
+ }
2128
+ ],
2129
+ "args": []
2130
+ },
2131
+ {
2132
+ "name": "restore_from_graveyard",
2133
+ "docs": [
2134
+ "Move a validator from the graveyard to the active list, this is a serious function called in exceptional cases where something has gone awry with our programmatic",
2135
+ "decision to put the validator in the graveyard"
2136
+ ],
2137
+ "discriminator": [
2138
+ 13,
2139
+ 118,
2140
+ 10,
2141
+ 220,
2142
+ 199,
2143
+ 124,
2144
+ 142,
2145
+ 248
2146
+ ],
2147
+ "accounts": [
2148
+ {
2149
+ "name": "authority",
1784
2150
  "writable": true,
1785
2151
  "signer": true
1786
2152
  },
1787
2153
  {
1788
- "name": "tranche_state",
2154
+ "name": "active_list",
2155
+ "docs": [
2156
+ "Active list - will remove from here"
2157
+ ],
1789
2158
  "writable": true
1790
2159
  },
1791
2160
  {
1792
- "name": "price_history",
2161
+ "name": "graveyard_list",
2162
+ "docs": [
2163
+ "Graveyard list - will add here"
2164
+ ],
2165
+ "writable": true
2166
+ },
2167
+ {
2168
+ "name": "validator_info",
2169
+ "docs": [
2170
+ "Update the validator info to mark as blacklisted/underperforming"
2171
+ ],
2172
+ "writable": true
2173
+ },
2174
+ {
2175
+ "name": "stake_allocation_state",
2176
+ "docs": [
2177
+ "Stake allocation state - to update total_active_vpp when removing validator"
2178
+ ],
1793
2179
  "writable": true
1794
2180
  },
1795
2181
  {
1796
2182
  "name": "system_program"
1797
2183
  }
1798
2184
  ],
1799
- "args": []
2185
+ "args": [
2186
+ {
2187
+ "name": "vote_account",
2188
+ "type": "pubkey"
2189
+ }
2190
+ ]
1800
2191
  },
1801
2192
  {
1802
2193
  "name": "set_d_day",
@@ -1828,31 +2219,41 @@
1828
2219
  ]
1829
2220
  },
1830
2221
  {
1831
- "name": "set_min_warmup_cooldown",
2222
+ "name": "set_last_state_change_epoch",
2223
+ "docs": [
2224
+ "Admin function to directly set last_state_change_epoch (useful for testing cooldowns)"
2225
+ ],
1832
2226
  "discriminator": [
1833
- 68,
1834
- 204,
1835
- 32,
1836
- 34,
1837
- 89,
1838
- 181,
1839
- 12,
1840
- 5
2227
+ 94,
2228
+ 57,
2229
+ 139,
2230
+ 195,
2231
+ 123,
2232
+ 224,
2233
+ 227,
2234
+ 106
1841
2235
  ],
1842
2236
  "accounts": [
1843
2237
  {
1844
- "name": "authority",
1845
- "signer": true
2238
+ "name": "validator_info",
2239
+ "writable": true
1846
2240
  },
1847
2241
  {
1848
- "name": "bar_config",
2242
+ "name": "stake_allocation_state",
2243
+ "docs": [
2244
+ "Stake allocation state - to update total_active_vpp when VPP changes"
2245
+ ],
1849
2246
  "writable": true
1850
2247
  }
1851
2248
  ],
1852
2249
  "args": [
1853
2250
  {
1854
- "name": "min_warmup_cooldown",
1855
- "type": "u64"
2251
+ "name": "vote_account",
2252
+ "type": "pubkey"
2253
+ },
2254
+ {
2255
+ "name": "epoch",
2256
+ "type": "u16"
1856
2257
  }
1857
2258
  ]
1858
2259
  },
@@ -1914,47 +2315,6 @@
1914
2315
  }
1915
2316
  ]
1916
2317
  },
1917
- {
1918
- "name": "slash_bond",
1919
- "discriminator": [
1920
- 143,
1921
- 246,
1922
- 51,
1923
- 243,
1924
- 88,
1925
- 198,
1926
- 217,
1927
- 48
1928
- ],
1929
- "accounts": [
1930
- {
1931
- "name": "authority",
1932
- "writable": true,
1933
- "signer": true
1934
- },
1935
- {
1936
- "name": "bar_config"
1937
- },
1938
- {
1939
- "name": "actor",
1940
- "docs": [
1941
- "Actor being slashed"
1942
- ]
1943
- },
1944
- {
1945
- "name": "bonded_actor",
1946
- "writable": true
1947
- },
1948
- {
1949
- "name": "wire_receipt",
1950
- "docs": [
1951
- "The WireReceipt used as collateral - will be zeroed"
1952
- ],
1953
- "writable": true
1954
- }
1955
- ],
1956
- "args": []
1957
- },
1958
2318
  {
1959
2319
  "name": "stake_liqsol",
1960
2320
  "discriminator": [
@@ -2041,62 +2401,20 @@
2041
2401
  ]
2042
2402
  },
2043
2403
  {
2044
- "name": "sync_validator_scores",
2045
- "discriminator": [
2046
- 10,
2047
- 26,
2048
- 245,
2049
- 222,
2050
- 183,
2051
- 46,
2052
- 70,
2053
- 181
2054
- ],
2055
- "accounts": [
2056
- {
2057
- "name": "authority",
2058
- "signer": true
2059
- },
2060
- {
2061
- "name": "validator_registry",
2062
- "writable": true
2063
- },
2064
- {
2065
- "name": "stake_controller_program"
2066
- }
2067
- ],
2068
- "args": [
2069
- {
2070
- "name": "vote_accounts",
2071
- "type": {
2072
- "vec": "pubkey"
2073
- }
2074
- },
2075
- {
2076
- "name": "validator_metrics",
2077
- "type": {
2078
- "vec": {
2079
- "defined": {
2080
- "name": "ValidatorMetrics"
2081
- }
2082
- }
2083
- }
2084
- }
2085
- ]
2086
- },
2087
- {
2088
- "name": "sync_validator_stakes",
2404
+ "name": "sync_main_stake_accounts",
2089
2405
  "docs": [
2090
- "Done///"
2406
+ "V2: Sync main stake accounts using PDA architecture (batched)",
2407
+ "Processes up to 10 validators per transaction via remaining_accounts",
2408
+ "Note: Only syncs primary delegated stakes, not transient stakes"
2091
2409
  ],
2092
2410
  "discriminator": [
2093
- 40,
2094
- 56,
2095
- 118,
2096
- 52,
2097
- 20,
2098
- 213,
2099
- 229,
2411
+ 159,
2412
+ 17,
2413
+ 201,
2414
+ 39,
2415
+ 89,
2416
+ 62,
2417
+ 65,
2100
2418
  135
2101
2419
  ],
2102
2420
  "accounts": [
@@ -2105,119 +2423,37 @@
2105
2423
  "signer": true
2106
2424
  },
2107
2425
  {
2108
- "name": "main_validator_stake"
2109
- },
2110
- {
2111
- "name": "validator_registry",
2426
+ "name": "processing_state",
2427
+ "docs": [
2428
+ "Processing state for tracking batch progress"
2429
+ ],
2112
2430
  "writable": true
2113
2431
  },
2114
2432
  {
2115
- "name": "stake_history"
2116
- }
2117
- ],
2118
- "args": [
2119
- {
2120
- "name": "validator",
2121
- "type": "pubkey"
2122
- }
2123
- ]
2124
- },
2125
- {
2126
- "name": "unbond",
2127
- "discriminator": [
2128
- 151,
2129
- 129,
2130
- 36,
2131
- 46,
2132
- 102,
2133
- 195,
2134
- 111,
2135
- 122
2136
- ],
2137
- "accounts": [
2138
- {
2139
- "name": "bond_owner",
2140
- "signer": true
2433
+ "name": "epoch_state",
2434
+ "docs": [
2435
+ "Epoch state to mark completion"
2436
+ ],
2437
+ "writable": true
2141
2438
  },
2142
2439
  {
2143
- "name": "bar_config",
2440
+ "name": "active_list",
2144
2441
  "docs": [
2145
- "Reserved for future OPP assertions"
2442
+ "Active validator list - to check validator counts"
2146
2443
  ]
2147
2444
  },
2148
2445
  {
2149
- "name": "bond_level"
2150
- },
2151
- {
2152
- "name": "actor",
2446
+ "name": "graveyard_list",
2153
2447
  "docs": [
2154
- "Actor whose bond is being released"
2448
+ "Graveyard validator list - to check validator counts"
2155
2449
  ]
2156
2450
  },
2157
2451
  {
2158
- "name": "bonded_actor",
2159
- "writable": true
2452
+ "name": "stake_history"
2160
2453
  }
2161
2454
  ],
2162
2455
  "args": []
2163
2456
  },
2164
- {
2165
- "name": "update_bond_level",
2166
- "discriminator": [
2167
- 48,
2168
- 233,
2169
- 159,
2170
- 234,
2171
- 230,
2172
- 200,
2173
- 171,
2174
- 205
2175
- ],
2176
- "accounts": [
2177
- {
2178
- "name": "authority",
2179
- "signer": true
2180
- },
2181
- {
2182
- "name": "bar_config"
2183
- },
2184
- {
2185
- "name": "bond_level",
2186
- "writable": true
2187
- }
2188
- ],
2189
- "args": [
2190
- {
2191
- "name": "warmup_period",
2192
- "type": "u64"
2193
- },
2194
- {
2195
- "name": "cooldown_period",
2196
- "type": "u64"
2197
- },
2198
- {
2199
- "name": "min_receipt_principal",
2200
- "type": "u64"
2201
- },
2202
- {
2203
- "name": "roles",
2204
- "type": {
2205
- "array": [
2206
- {
2207
- "defined": {
2208
- "name": "Role"
2209
- }
2210
- },
2211
- 4
2212
- ]
2213
- }
2214
- },
2215
- {
2216
- "name": "enabled",
2217
- "type": "bool"
2218
- }
2219
- ]
2220
- },
2221
2457
  {
2222
2458
  "name": "update_growth_parameters",
2223
2459
  "discriminator": [
@@ -2232,87 +2468,29 @@
2232
2468
  ],
2233
2469
  "accounts": [
2234
2470
  {
2235
- "name": "admin",
2236
- "writable": true,
2237
- "signer": true
2238
- },
2239
- {
2240
- "name": "tranche_state",
2241
- "writable": true
2242
- },
2243
- {
2244
- "name": "price_history",
2245
- "writable": true
2246
- },
2247
- {
2248
- "name": "system_program"
2249
- }
2250
- ],
2251
- "args": [
2252
- {
2253
- "name": "supply_growth_bps",
2254
- "type": "u16"
2255
- },
2256
- {
2257
- "name": "price_growth_bps",
2258
- "type": "u16"
2259
- }
2260
- ]
2261
- },
2262
- {
2263
- "name": "update_max_resolved_deactivations",
2264
- "discriminator": [
2265
- 231,
2266
- 111,
2267
- 22,
2268
- 0,
2269
- 70,
2270
- 141,
2271
- 42,
2272
- 204
2273
- ],
2274
- "accounts": [
2275
- {
2276
- "name": "transients_tracking",
2277
- "writable": true
2278
- }
2279
- ],
2280
- "args": [
2281
- {
2282
- "name": "vote_account",
2283
- "type": "pubkey"
2471
+ "name": "admin",
2472
+ "writable": true,
2473
+ "signer": true
2284
2474
  },
2285
2475
  {
2286
- "name": "new_value",
2287
- "type": "u16"
2288
- }
2289
- ]
2290
- },
2291
- {
2292
- "name": "update_max_resolved_stake",
2293
- "discriminator": [
2294
- 241,
2295
- 21,
2296
- 28,
2297
- 14,
2298
- 58,
2299
- 11,
2300
- 76,
2301
- 44
2302
- ],
2303
- "accounts": [
2476
+ "name": "tranche_state",
2477
+ "writable": true
2478
+ },
2304
2479
  {
2305
- "name": "transients_tracking",
2480
+ "name": "price_history",
2306
2481
  "writable": true
2482
+ },
2483
+ {
2484
+ "name": "system_program"
2307
2485
  }
2308
2486
  ],
2309
2487
  "args": [
2310
2488
  {
2311
- "name": "vote_account",
2312
- "type": "pubkey"
2489
+ "name": "supply_growth_bps",
2490
+ "type": "u16"
2313
2491
  },
2314
2492
  {
2315
- "name": "new_value",
2493
+ "name": "price_growth_bps",
2316
2494
  "type": "u16"
2317
2495
  }
2318
2496
  ]
@@ -2362,86 +2540,6 @@
2362
2540
  }
2363
2541
  ]
2364
2542
  },
2365
- {
2366
- "name": "update_stake_state_on_sync",
2367
- "docs": [
2368
- "Done///"
2369
- ],
2370
- "discriminator": [
2371
- 146,
2372
- 155,
2373
- 114,
2374
- 27,
2375
- 121,
2376
- 60,
2377
- 159,
2378
- 234
2379
- ],
2380
- "accounts": [
2381
- {
2382
- "name": "admin",
2383
- "signer": true
2384
- },
2385
- {
2386
- "name": "stake_metrics",
2387
- "writable": true
2388
- },
2389
- {
2390
- "name": "epoch_state",
2391
- "writable": true
2392
- },
2393
- {
2394
- "name": "payout_state",
2395
- "writable": true
2396
- },
2397
- {
2398
- "name": "processing_state",
2399
- "writable": true
2400
- },
2401
- {
2402
- "name": "validator_registry",
2403
- "writable": true
2404
- },
2405
- {
2406
- "name": "pay_cycle",
2407
- "writable": true
2408
- }
2409
- ],
2410
- "args": []
2411
- },
2412
- {
2413
- "name": "update_transients_tracking",
2414
- "discriminator": [
2415
- 146,
2416
- 77,
2417
- 164,
2418
- 79,
2419
- 174,
2420
- 67,
2421
- 108,
2422
- 106
2423
- ],
2424
- "accounts": [
2425
- {
2426
- "name": "transients_tracking",
2427
- "writable": true
2428
- }
2429
- ],
2430
- "args": [
2431
- {
2432
- "name": "vote_account",
2433
- "type": "pubkey"
2434
- },
2435
- {
2436
- "name": "params",
2437
- "type": {
2438
- "defined": {
2439
- "name": "TransientUpdateParams"
2440
- }
2441
- }
2442
- }
2443
- ]
2444
- },
2445
2543
  {
2446
2544
  "name": "update_user",
2447
2545
  "discriminator": [
@@ -2516,6 +2614,112 @@
2516
2614
  ],
2517
2615
  "args": []
2518
2616
  },
2617
+ {
2618
+ "name": "update_validator_info_v2",
2619
+ "docs": [
2620
+ "Update validator info fields (V2), function to force update a validator's info, should not be used unless in development for testing"
2621
+ ],
2622
+ "discriminator": [
2623
+ 123,
2624
+ 47,
2625
+ 0,
2626
+ 192,
2627
+ 74,
2628
+ 132,
2629
+ 84,
2630
+ 46
2631
+ ],
2632
+ "accounts": [
2633
+ {
2634
+ "name": "validator_info",
2635
+ "writable": true
2636
+ },
2637
+ {
2638
+ "name": "stake_allocation_state",
2639
+ "docs": [
2640
+ "Stake allocation state - to update total_active_vpp when VPP changes"
2641
+ ],
2642
+ "writable": true
2643
+ }
2644
+ ],
2645
+ "args": [
2646
+ {
2647
+ "name": "vote_account",
2648
+ "type": "pubkey"
2649
+ },
2650
+ {
2651
+ "name": "current_active_stake_amount",
2652
+ "type": {
2653
+ "option": "u64"
2654
+ }
2655
+ },
2656
+ {
2657
+ "name": "epoch_reward_amount",
2658
+ "type": {
2659
+ "option": "u64"
2660
+ }
2661
+ },
2662
+ {
2663
+ "name": "transient_active_stake_amount",
2664
+ "type": {
2665
+ "option": "u64"
2666
+ }
2667
+ },
2668
+ {
2669
+ "name": "epoch",
2670
+ "type": {
2671
+ "option": "u64"
2672
+ }
2673
+ },
2674
+ {
2675
+ "name": "performance_score",
2676
+ "type": {
2677
+ "option": "u8"
2678
+ }
2679
+ }
2680
+ ]
2681
+ },
2682
+ {
2683
+ "name": "update_validator_transient",
2684
+ "docs": [
2685
+ "Update validator transient tracking (V2), another function not to be really used in production except for testing//",
2686
+ "TODO: discuss wether to let this function be ?"
2687
+ ],
2688
+ "discriminator": [
2689
+ 124,
2690
+ 36,
2691
+ 28,
2692
+ 172,
2693
+ 25,
2694
+ 233,
2695
+ 39,
2696
+ 219
2697
+ ],
2698
+ "accounts": [
2699
+ {
2700
+ "name": "validator_transient",
2701
+ "writable": true
2702
+ }
2703
+ ],
2704
+ "args": [
2705
+ {
2706
+ "name": "vote_account",
2707
+ "type": "pubkey"
2708
+ },
2709
+ {
2710
+ "name": "max_resolved_epoch_deactivations",
2711
+ "type": {
2712
+ "option": "u16"
2713
+ }
2714
+ },
2715
+ {
2716
+ "name": "max_resolved_activating_stake",
2717
+ "type": {
2718
+ "option": "u16"
2719
+ }
2720
+ }
2721
+ ]
2722
+ },
2519
2723
  {
2520
2724
  "name": "withdraw_stake",
2521
2725
  "discriminator": [
@@ -2604,42 +2808,16 @@
2604
2808
  ],
2605
2809
  "accounts": [
2606
2810
  {
2607
- "name": "BarConfig",
2608
- "discriminator": [
2609
- 172,
2610
- 166,
2611
- 67,
2612
- 186,
2613
- 146,
2614
- 5,
2615
- 198,
2616
- 67
2617
- ]
2618
- },
2619
- {
2620
- "name": "BondLevel",
2621
- "discriminator": [
2622
- 103,
2623
- 61,
2624
- 221,
2625
- 129,
2626
- 28,
2627
- 118,
2628
- 201,
2629
- 85
2630
- ]
2631
- },
2632
- {
2633
- "name": "BondedActor",
2811
+ "name": "BatchOrchestrator",
2634
2812
  "discriminator": [
2635
- 127,
2636
- 148,
2637
2813
  70,
2638
- 241,
2639
- 91,
2640
- 0,
2641
- 3,
2642
- 233
2814
+ 163,
2815
+ 206,
2816
+ 225,
2817
+ 7,
2818
+ 189,
2819
+ 73,
2820
+ 94
2643
2821
  ]
2644
2822
  },
2645
2823
  {
@@ -2655,19 +2833,6 @@
2655
2833
  103
2656
2834
  ]
2657
2835
  },
2658
- {
2659
- "name": "EpochState",
2660
- "discriminator": [
2661
- 191,
2662
- 63,
2663
- 139,
2664
- 237,
2665
- 144,
2666
- 12,
2667
- 223,
2668
- 210
2669
- ]
2670
- },
2671
2836
  {
2672
2837
  "name": "Global",
2673
2838
  "discriminator": [
@@ -2708,16 +2873,16 @@
2708
2873
  ]
2709
2874
  },
2710
2875
  {
2711
- "name": "PayCycle",
2876
+ "name": "MaintenanceLedger",
2712
2877
  "discriminator": [
2713
- 119,
2714
- 127,
2715
- 39,
2716
- 70,
2717
- 134,
2878
+ 140,
2879
+ 250,
2880
+ 92,
2718
2881
  173,
2719
- 90,
2720
- 225
2882
+ 147,
2883
+ 65,
2884
+ 26,
2885
+ 39
2721
2886
  ]
2722
2887
  },
2723
2888
  {
@@ -2760,16 +2925,16 @@
2760
2925
  ]
2761
2926
  },
2762
2927
  {
2763
- "name": "ProcessingState",
2928
+ "name": "StakeAllocationState",
2764
2929
  "discriminator": [
2765
- 47,
2766
- 15,
2767
- 142,
2768
- 130,
2769
- 245,
2770
- 250,
2930
+ 23,
2931
+ 238,
2932
+ 120,
2771
2933
  198,
2772
- 161
2934
+ 156,
2935
+ 165,
2936
+ 151,
2937
+ 119
2773
2938
  ]
2774
2939
  },
2775
2940
  {
@@ -2864,29 +3029,42 @@
2864
3029
  ]
2865
3030
  },
2866
3031
  {
2867
- "name": "ValidatorRegistry",
3032
+ "name": "ValidatorInfoAccount",
3033
+ "discriminator": [
3034
+ 195,
3035
+ 243,
3036
+ 81,
3037
+ 187,
3038
+ 172,
3039
+ 232,
3040
+ 57,
3041
+ 59
3042
+ ]
3043
+ },
3044
+ {
3045
+ "name": "ValidatorList",
2868
3046
  "discriminator": [
2869
- 168,
2870
- 113,
2871
- 195,
2872
- 186,
2873
- 62,
2874
- 121,
2875
- 163,
2876
- 230
3047
+ 131,
3048
+ 181,
3049
+ 125,
3050
+ 127,
3051
+ 46,
3052
+ 36,
3053
+ 40,
3054
+ 167
2877
3055
  ]
2878
3056
  },
2879
3057
  {
2880
- "name": "ValidatorTransientsTracking",
3058
+ "name": "ValidatorTransientAccount",
2881
3059
  "discriminator": [
2882
- 120,
2883
- 82,
2884
- 6,
2885
- 162,
2886
- 246,
2887
- 129,
2888
- 133,
2889
- 63
3060
+ 97,
3061
+ 207,
3062
+ 155,
3063
+ 142,
3064
+ 86,
3065
+ 170,
3066
+ 118,
3067
+ 161
2890
3068
  ]
2891
3069
  },
2892
3070
  {
@@ -2973,230 +3151,121 @@
2973
3151
  "errors": [
2974
3152
  {
2975
3153
  "code": 6000,
2976
- "name": "DestinationAccountDoesNotExist",
2977
- "msg": "Destination stake account does not exist"
3154
+ "name": "NoRewardsToClaim",
3155
+ "msg": "No rewards to claim"
2978
3156
  },
2979
3157
  {
2980
3158
  "code": 6001,
2981
- "name": "SourceAccountDoesNotExist",
2982
- "msg": "Source stake account does not exist"
3159
+ "name": "InsufficientBalance",
3160
+ "msg": "Insufficient balance"
2983
3161
  },
2984
3162
  {
2985
3163
  "code": 6002,
2986
- "name": "InvalidDestinationOwner",
2987
- "msg": "Destination account not owned by stake program"
3164
+ "name": "InsufficientFunds",
3165
+ "msg": "Insufficient funds"
2988
3166
  },
2989
3167
  {
2990
3168
  "code": 6003,
2991
- "name": "InvalidSourceOwner",
2992
- "msg": "Source account not owned by stake program"
3169
+ "name": "Unauthorized",
3170
+ "msg": "Unauthorized - caller is not the distribution authority"
2993
3171
  },
2994
3172
  {
2995
3173
  "code": 6004,
2996
- "name": "ClockBorrowFailed",
2997
- "msg": "Failed to borrow clock data"
3174
+ "name": "InvalidMint",
3175
+ "msg": "Invalid mint"
2998
3176
  },
2999
3177
  {
3000
3178
  "code": 6005,
3001
- "name": "ClockDeserializeFailed",
3002
- "msg": "Failed to deserialize clock"
3179
+ "name": "InvalidOwner",
3180
+ "msg": "Invalid owner"
3003
3181
  },
3004
3182
  {
3005
3183
  "code": 6006,
3006
- "name": "DestinationAnalysisFailed",
3007
- "msg": "Failed to analyze destination stake account"
3184
+ "name": "InvalidUserRecord",
3185
+ "msg": "Invalid user record"
3008
3186
  },
3009
3187
  {
3010
3188
  "code": 6007,
3011
- "name": "SourceAnalysisFailed",
3012
- "msg": "Failed to analyze source stake account"
3189
+ "name": "InvalidWithdrawal",
3190
+ "msg": "Invalid withdrawal - balance increased instead of decreased"
3013
3191
  },
3014
3192
  {
3015
3193
  "code": 6008,
3016
- "name": "DestinationStillActivating",
3017
- "msg": "Destination stake is still activating"
3194
+ "name": "InvalidProgramId",
3195
+ "msg": "Invalid program ID"
3018
3196
  },
3019
3197
  {
3020
3198
  "code": 6009,
3021
- "name": "DestinationDeactivating",
3022
- "msg": "Destination stake is deactivating"
3199
+ "name": "InstructionIntrospectionFailed",
3200
+ "msg": "Instruction introspection failed"
3023
3201
  },
3024
3202
  {
3025
3203
  "code": 6010,
3026
- "name": "SourceStillActivating",
3027
- "msg": "Source stake is still activating"
3028
- },
3029
- {
3030
- "code": 6011,
3031
- "name": "SourceDeactivating",
3032
- "msg": "Source stake is deactivating"
3033
- },
3034
- {
3035
- "code": 6012,
3036
- "name": "DestinationBorrowFailed",
3037
- "msg": "Failed to borrow destination account data"
3038
- },
3039
- {
3040
- "code": 6013,
3041
- "name": "DestinationParseFailed",
3042
- "msg": "Failed to parse destination stake state"
3043
- },
3044
- {
3045
- "code": 6014,
3046
- "name": "SourceBorrowFailed",
3047
- "msg": "Failed to borrow source account data"
3048
- },
3049
- {
3050
- "code": 6015,
3051
- "name": "SourceParseFailed",
3052
- "msg": "Failed to parse source stake state"
3053
- },
3054
- {
3055
- "code": 6016,
3056
- "name": "DifferentValidators",
3057
- "msg": "Stakes are delegated to different validators"
3058
- },
3059
- {
3060
- "code": 6017,
3061
- "name": "DifferentStakers",
3062
- "msg": "Stakes have different staker authorities"
3063
- },
3064
- {
3065
- "code": 6018,
3066
- "name": "DifferentWithdrawers",
3067
- "msg": "Stakes have different withdrawer authorities"
3068
- },
3069
- {
3070
- "code": 6019,
3071
- "name": "AuthoritiesNotFound",
3072
- "msg": "Could not extract authorities from accounts"
3073
- },
3074
- {
3075
- "code": 6020,
3076
- "name": "MergeInstructionFailed",
3077
- "msg": "Merge instruction failed"
3078
- },
3079
- {
3080
- "code": 6021,
3081
- "name": "EpochRewardsActive",
3082
- "msg": "Epoch rewards distribution is active - stake operations blocked"
3083
- },
3084
- {
3085
- "code": 6022,
3086
- "name": "DifferentCreditsObserved",
3087
- "msg": "Stakes have different credits_observed - cannot merge until both earn same rewards"
3204
+ "name": "ReceiptFulfilled",
3205
+ "msg": "Receipt already fulfilled"
3088
3206
  }
3089
3207
  ],
3090
3208
  "types": [
3091
3209
  {
3092
- "name": "BarConfig",
3210
+ "name": "BatchOrchestrator",
3093
3211
  "type": {
3094
3212
  "kind": "struct",
3095
3213
  "fields": [
3096
3214
  {
3097
- "name": "authority",
3098
- "type": "pubkey"
3215
+ "name": "validators_processed_this_epoch",
3216
+ "type": "u8"
3099
3217
  },
3100
3218
  {
3101
- "name": "min_warmup_cooldown",
3219
+ "name": "current_merge_processing_epoch",
3220
+ "docs": [
3221
+ "Intra batch state, how many validators have been processed for activating transient merges - reset to 0 at the end of each epoch OR at the beginning of the function call when there is a mismatch",
3222
+ "between the current_merge_processing_epoch and the actual current epoch//"
3223
+ ],
3102
3224
  "type": "u64"
3103
3225
  },
3104
3226
  {
3105
- "name": "bump",
3227
+ "name": "validators_merge_processed_this_epoch",
3106
3228
  "type": "u8"
3107
- }
3108
- ]
3109
- }
3110
- },
3111
- {
3112
- "name": "BondLevel",
3113
- "type": {
3114
- "kind": "struct",
3115
- "fields": [
3116
- {
3117
- "name": "id",
3118
- "type": {
3119
- "array": [
3120
- "u8",
3121
- 32
3122
- ]
3123
- }
3124
3229
  },
3125
3230
  {
3126
- "name": "warmup_period",
3231
+ "name": "current_deactivating_merge_epoch",
3127
3232
  "type": "u64"
3128
3233
  },
3129
3234
  {
3130
- "name": "cooldown_period",
3131
- "type": "u64"
3235
+ "name": "validators_deactivating_merge_processed",
3236
+ "type": "u8"
3132
3237
  },
3133
3238
  {
3134
- "name": "min_receipt_principal",
3135
- "docs": [
3136
- "Minimum principal across WireReceipt buckets (staked + purchased + purchased_with_sol)"
3137
- ],
3138
- "type": "u64"
3239
+ "name": "validators_sync_processed_this_epoch",
3240
+ "type": "u8"
3139
3241
  },
3140
3242
  {
3141
- "name": "roles",
3142
- "docs": [
3143
- "Roles granted when bonding at this level"
3144
- ],
3145
- "type": {
3146
- "array": [
3147
- {
3148
- "defined": {
3149
- "name": "Role"
3150
- }
3151
- },
3152
- 4
3153
- ]
3154
- }
3243
+ "name": "validators_unstake_processed_this_epoch",
3244
+ "type": "u8"
3155
3245
  },
3156
3246
  {
3157
- "name": "enabled",
3247
+ "name": "distribution_in_progress",
3158
3248
  "type": "bool"
3159
3249
  },
3160
3250
  {
3161
- "name": "bump",
3251
+ "name": "validators_aggregate_processed_this_epoch",
3162
3252
  "type": "u8"
3163
- }
3164
- ]
3165
- }
3166
- },
3167
- {
3168
- "name": "BondedActor",
3169
- "type": {
3170
- "kind": "struct",
3171
- "fields": [
3172
- {
3173
- "name": "actor",
3174
- "type": "pubkey"
3175
- },
3176
- {
3177
- "name": "bond_owner",
3178
- "type": "pubkey"
3179
3253
  },
3180
3254
  {
3181
- "name": "wire_receipt",
3182
- "type": "pubkey"
3255
+ "name": "temp_total_active_stake",
3256
+ "type": "u64"
3183
3257
  },
3184
3258
  {
3185
- "name": "bond_level_id",
3186
- "type": {
3187
- "array": [
3188
- "u8",
3189
- 32
3190
- ]
3191
- }
3259
+ "name": "temp_total_transient_stake",
3260
+ "type": "u64"
3192
3261
  },
3193
3262
  {
3194
- "name": "bonded_at",
3195
- "type": "i64"
3263
+ "name": "temp_total_reward",
3264
+ "type": "u64"
3196
3265
  },
3197
3266
  {
3198
- "name": "unbonded_at",
3199
- "type": "i64"
3267
+ "name": "temp_total_unstakeable_stake",
3268
+ "type": "u64"
3200
3269
  },
3201
3270
  {
3202
3271
  "name": "bump",
@@ -3253,50 +3322,6 @@
3253
3322
  ]
3254
3323
  }
3255
3324
  },
3256
- {
3257
- "name": "EpochState",
3258
- "type": {
3259
- "kind": "struct",
3260
- "fields": [
3261
- {
3262
- "name": "last_updated_global_epoch",
3263
- "type": "u64"
3264
- },
3265
- {
3266
- "name": "last_distribution_epoch",
3267
- "type": {
3268
- "option": "u64"
3269
- }
3270
- },
3271
- {
3272
- "name": "last_distribution_slot",
3273
- "type": {
3274
- "option": "u64"
3275
- }
3276
- },
3277
- {
3278
- "name": "last_deactivation_epoch",
3279
- "type": "u64"
3280
- },
3281
- {
3282
- "name": "last_rebalance_epoch",
3283
- "type": "u64"
3284
- },
3285
- {
3286
- "name": "last_merge_transients_epoch",
3287
- "type": "u64"
3288
- },
3289
- {
3290
- "name": "current_merge_processing_epoch",
3291
- "type": "u64"
3292
- },
3293
- {
3294
- "name": "bump",
3295
- "type": "u8"
3296
- }
3297
- ]
3298
- }
3299
- },
3300
3325
  {
3301
3326
  "name": "Global",
3302
3327
  "docs": [
@@ -3453,30 +3478,56 @@
3453
3478
  }
3454
3479
  },
3455
3480
  {
3456
- "name": "PayCycle",
3481
+ "name": "MaintenanceLedger",
3457
3482
  "type": {
3458
3483
  "kind": "struct",
3459
3484
  "fields": [
3460
3485
  {
3461
- "name": "epoch",
3486
+ "name": "last_sync_epoch",
3487
+ "type": "u16"
3488
+ },
3489
+ {
3490
+ "name": "last_updated_stake_metrics_epoch",
3491
+ "type": "u64"
3492
+ },
3493
+ {
3494
+ "name": "last_distribution_epoch",
3495
+ "type": {
3496
+ "option": "u64"
3497
+ }
3498
+ },
3499
+ {
3500
+ "name": "last_distribution_slot",
3501
+ "type": {
3502
+ "option": "u64"
3503
+ }
3504
+ },
3505
+ {
3506
+ "name": "last_merge_deactivating_transients_epoch",
3462
3507
  "type": "u64"
3463
3508
  },
3464
3509
  {
3465
- "name": "total_yield",
3510
+ "name": "last_rebalance_allocation_epoch",
3466
3511
  "type": "u64"
3467
3512
  },
3468
3513
  {
3469
- "name": "timestamp",
3470
- "type": "i64"
3514
+ "name": "last_merge_activating_transients_epoch",
3515
+ "type": "u64"
3471
3516
  },
3472
3517
  {
3473
- "name": "fulfilled",
3474
- "type": "bool"
3518
+ "name": "last_unstake_epoch",
3519
+ "type": {
3520
+ "option": "u64"
3521
+ }
3475
3522
  },
3476
3523
  {
3477
- "name": "last_slot_paid_for",
3524
+ "name": "last_unstake_allocation_epoch",
3478
3525
  "type": "u64"
3479
3526
  },
3527
+ {
3528
+ "name": "min_max_resolved_epoch_deactivations",
3529
+ "type": "u16"
3530
+ },
3480
3531
  {
3481
3532
  "name": "bump",
3482
3533
  "type": "u8"
@@ -3540,29 +3591,33 @@
3540
3591
  "kind": "struct",
3541
3592
  "fields": [
3542
3593
  {
3543
- "name": "total_paid_out_this_epoch",
3594
+ "name": "total_yield_paid_out_epoch",
3544
3595
  "type": "u64"
3545
3596
  },
3546
- {
3547
- "name": "epoch_payout_delta",
3548
- "type": "i64"
3549
- },
3550
3597
  {
3551
3598
  "name": "fees_remaining_to_distribute",
3552
3599
  "type": "u64"
3553
3600
  },
3554
3601
  {
3555
- "name": "fee_payout_per_pc",
3602
+ "name": "total_fees_deposited",
3556
3603
  "type": "u64"
3557
3604
  },
3558
3605
  {
3559
- "name": "total_fees_deposited",
3560
- "type": "u64"
3606
+ "name": "total_cumulative_payout_alltime",
3607
+ "type": "u128"
3561
3608
  },
3562
3609
  {
3563
- "name": "total_cumulative_payout",
3610
+ "name": "total_cumulative_payout_epoch",
3564
3611
  "type": "u64"
3565
3612
  },
3613
+ {
3614
+ "name": "timestamp",
3615
+ "type": "i64"
3616
+ },
3617
+ {
3618
+ "name": "epoch",
3619
+ "type": "u16"
3620
+ },
3566
3621
  {
3567
3622
  "name": "bump",
3568
3623
  "type": "u8"
@@ -3617,47 +3672,86 @@
3617
3672
  }
3618
3673
  },
3619
3674
  {
3620
- "name": "ProcessingState",
3675
+ "name": "StakeAllocationState",
3676
+ "docs": [
3677
+ "Stake allocation state tracking for validator stake distribution and unstake orders",
3678
+ "Tracks both staking allocations (VPP-based) and unstake order batching"
3679
+ ],
3621
3680
  "type": {
3622
3681
  "kind": "struct",
3623
3682
  "fields": [
3624
3683
  {
3625
- "name": "validators_processed_this_epoch",
3626
- "type": "u8"
3684
+ "name": "total_active_vpp",
3685
+ "docs": [
3686
+ "Sum of all VPP scores for Trusted validators in the active list"
3687
+ ],
3688
+ "type": "u64"
3627
3689
  },
3628
3690
  {
3629
- "name": "validators_merge_processed_this_epoch",
3691
+ "name": "bump",
3692
+ "docs": [
3693
+ "Bump seed for PDA"
3694
+ ],
3630
3695
  "type": "u8"
3631
3696
  },
3632
3697
  {
3633
- "name": "distribution_in_progress",
3698
+ "name": "initial_reserve_balance",
3699
+ "docs": [
3700
+ "Initial reserve balance when distribution cycle started (for batched distribution)"
3701
+ ],
3702
+ "type": "u64"
3703
+ },
3704
+ {
3705
+ "name": "pending_unstake_amount_this_epoch",
3706
+ "docs": [
3707
+ "Accumulates unstake requests during the epoch (before allocation starts)",
3708
+ "Resets to 0 when allocation cycle begins"
3709
+ ],
3710
+ "type": "u64"
3711
+ },
3712
+ {
3713
+ "name": "unstake_allocation_in_progress",
3714
+ "docs": [
3715
+ "Whether unstake allocation is currently in progress (batched processing)"
3716
+ ],
3634
3717
  "type": "bool"
3635
3718
  },
3636
3719
  {
3637
- "name": "bump",
3638
- "type": "u8"
3639
- }
3640
- ]
3641
- }
3642
- },
3643
- {
3644
- "name": "Role",
3645
- "docs": [
3646
- "Role granted by a bond level"
3647
- ],
3648
- "type": {
3649
- "kind": "struct",
3650
- "fields": [
3720
+ "name": "validators_processed_this_unstake_allocation",
3721
+ "docs": [
3722
+ "Number of validators processed in the current unstake allocation batch"
3723
+ ],
3724
+ "type": "u16"
3725
+ },
3651
3726
  {
3652
- "name": "role_id",
3727
+ "name": "processing_unstake_amount_this_allocation",
3728
+ "docs": [
3729
+ "FROZEN amount being allocated across all batches this cycle",
3730
+ "Set at start of allocation, prevents race conditions with new requests"
3731
+ ],
3653
3732
  "type": "u64"
3654
3733
  },
3655
3734
  {
3656
- "name": "execution_delay",
3735
+ "name": "rebalance_in_progress",
3736
+ "docs": [
3737
+ "Whether rebalancing is currently in progress (batched processing)"
3738
+ ],
3739
+ "type": "bool"
3740
+ },
3741
+ {
3742
+ "name": "validators_processed_this_rebalance",
3743
+ "docs": [
3744
+ "Number of validators processed in the current rebalance cycle"
3745
+ ],
3746
+ "type": "u16"
3747
+ },
3748
+ {
3749
+ "name": "total_amount_to_distribute_this_rebalance",
3657
3750
  "docs": [
3658
- "Delay in seconds before role becomes active (for time-locked operations)"
3751
+ "Total amount to distribute for this rebalance cycle (after subtracting encumbered funds and buffer)",
3752
+ "Saved at the start to ensure consistency across all batches"
3659
3753
  ],
3660
- "type": "u32"
3754
+ "type": "u64"
3661
3755
  }
3662
3756
  ]
3663
3757
  }
@@ -3707,6 +3801,10 @@
3707
3801
  "name": "sol_system_pay_rate",
3708
3802
  "type": "u64"
3709
3803
  },
3804
+ {
3805
+ "name": "unstakeable_stake",
3806
+ "type": "u64"
3807
+ },
3710
3808
  {
3711
3809
  "name": "bump",
3712
3810
  "type": "u8"
@@ -3851,74 +3949,6 @@
3851
3949
  ]
3852
3950
  }
3853
3951
  },
3854
- {
3855
- "name": "TransientStakeEntry",
3856
- "type": {
3857
- "kind": "struct",
3858
- "fields": [
3859
- {
3860
- "name": "vote_account",
3861
- "type": "pubkey"
3862
- },
3863
- {
3864
- "name": "max_resolved_epoch_deactivations",
3865
- "type": "u16"
3866
- },
3867
- {
3868
- "name": "max_resolved_activating_stake",
3869
- "type": "u16"
3870
- },
3871
- {
3872
- "name": "last_updated_epoch_activations",
3873
- "type": "u16"
3874
- },
3875
- {
3876
- "name": "last_updated_epoch_deactivations_rebalancing",
3877
- "type": "u16"
3878
- },
3879
- {
3880
- "name": "last_updated_epoch_deactivations_withdrawals",
3881
- "type": "u16"
3882
- },
3883
- {
3884
- "name": "total_deactivation_amount_for_epoch",
3885
- "type": "u64"
3886
- }
3887
- ]
3888
- }
3889
- },
3890
- {
3891
- "name": "TransientUpdateParams",
3892
- "type": {
3893
- "kind": "struct",
3894
- "fields": [
3895
- {
3896
- "name": "max_resolved_epoch_deactivations",
3897
- "type": {
3898
- "option": "u16"
3899
- }
3900
- },
3901
- {
3902
- "name": "max_resolved_activating_stake",
3903
- "type": {
3904
- "option": "u16"
3905
- }
3906
- },
3907
- {
3908
- "name": "last_updated_epoch_activations",
3909
- "type": {
3910
- "option": "u16"
3911
- }
3912
- },
3913
- {
3914
- "name": "last_updated_epoch_deactivations",
3915
- "type": {
3916
- "option": "u16"
3917
- }
3918
- }
3919
- ]
3920
- }
3921
- },
3922
3952
  {
3923
3953
  "name": "UserRecord",
3924
3954
  "type": {
@@ -3996,113 +4026,330 @@
3996
4026
  }
3997
4027
  },
3998
4028
  {
3999
- "name": "ValidatorInfo",
4029
+ "name": "ValidatorInfoAccount",
4030
+ "docs": [
4031
+ "Per-validator information account",
4032
+ "Seed: [\"validator_info\", vote_account]"
4033
+ ],
4000
4034
  "type": {
4001
4035
  "kind": "struct",
4002
4036
  "fields": [
4003
4037
  {
4004
4038
  "name": "vote_account",
4039
+ "docs": [
4040
+ "Vote account this info belongs to"
4041
+ ],
4005
4042
  "type": "pubkey"
4006
4043
  },
4007
4044
  {
4008
4045
  "name": "vpp",
4046
+ "docs": [
4047
+ "Validator Performance Points (0-100 score)"
4048
+ ],
4049
+ "type": "u8"
4050
+ },
4051
+ {
4052
+ "name": "bump",
4053
+ "docs": [
4054
+ "Bump seed for PDA"
4055
+ ],
4009
4056
  "type": "u8"
4010
4057
  },
4011
4058
  {
4012
4059
  "name": "current_active_stake",
4060
+ "docs": [
4061
+ "Fully active stake earning rewards"
4062
+ ],
4013
4063
  "type": "u64"
4014
4064
  },
4015
4065
  {
4016
4066
  "name": "epoch_reward",
4067
+ "docs": [
4068
+ "Rewards earned in the last epoch",
4069
+ "This is update in the function: sync_validator_stakes_v2 and is a simple subtraction of current - previous active stake. This does cater for deactivations etc. so",
4070
+ "no worries"
4071
+ ],
4017
4072
  "type": "u64"
4018
4073
  },
4019
4074
  {
4020
4075
  "name": "transient_active_stake",
4076
+ "docs": [
4077
+ "Stake warming up (activating), not fully active yet"
4078
+ ],
4079
+ "type": "u64"
4080
+ },
4081
+ {
4082
+ "name": "transient_deactivating_stake",
4083
+ "docs": [
4084
+ "Stake cooling down (deactivating), no longer earning rewards"
4085
+ ],
4021
4086
  "type": "u64"
4022
4087
  },
4023
4088
  {
4024
4089
  "name": "last_chain_sync_epoch",
4090
+ "docs": [
4091
+ "When was this entry last updated from the chain?",
4092
+ "This is update in the function: sync_validator_stakes_v2"
4093
+ ],
4094
+ "type": "u16"
4095
+ },
4096
+ {
4097
+ "name": "last_score_sync_epoch",
4098
+ "docs": [
4099
+ "When was this VPP score last updated from our Validator Leaderboard program?"
4100
+ ],
4101
+ "type": "u16"
4102
+ },
4103
+ {
4104
+ "name": "last_state_change_epoch",
4105
+ "docs": [
4106
+ "When was the validator state last changed? (helps determine cooldowns)"
4107
+ ],
4025
4108
  "type": "u16"
4109
+ },
4110
+ {
4111
+ "name": "amount_to_stake",
4112
+ "docs": [
4113
+ "The amount of stake to stake"
4114
+ ],
4115
+ "type": "u64"
4116
+ },
4117
+ {
4118
+ "name": "amount_to_unstake",
4119
+ "docs": [
4120
+ "The amount of stake to unstake"
4121
+ ],
4122
+ "type": "u64"
4123
+ },
4124
+ {
4125
+ "name": "validator_repute",
4126
+ "docs": [
4127
+ "State of the validator"
4128
+ ],
4129
+ "type": {
4130
+ "defined": {
4131
+ "name": "ValidatorReputation"
4132
+ }
4133
+ }
4134
+ },
4135
+ {
4136
+ "name": "validator_state",
4137
+ "type": {
4138
+ "defined": {
4139
+ "name": "ValidatorState"
4140
+ }
4141
+ }
4142
+ },
4143
+ {
4144
+ "name": "state_transition_trigger_stake_amount",
4145
+ "type": "u64"
4026
4146
  }
4027
4147
  ]
4028
4148
  }
4029
4149
  },
4030
4150
  {
4031
- "name": "ValidatorMetrics",
4151
+ "name": "ValidatorList",
4152
+ "docs": [
4153
+ "Zero-copy validator list account",
4154
+ "Stores a fixed-capacity array of validator vote account pubkeys"
4155
+ ],
4156
+ "serialization": "bytemuckunsafe",
4157
+ "repr": {
4158
+ "kind": "c"
4159
+ },
4032
4160
  "type": {
4033
4161
  "kind": "struct",
4034
4162
  "fields": [
4035
4163
  {
4036
- "name": "commission",
4037
- "type": "u8"
4164
+ "name": "count",
4165
+ "docs": [
4166
+ "Current number of validators in the list"
4167
+ ],
4168
+ "type": "u32"
4038
4169
  },
4039
4170
  {
4040
- "name": "skip_rate_bps",
4171
+ "name": "capacity",
4172
+ "docs": [
4173
+ "Maximum capacity of the list"
4174
+ ],
4041
4175
  "type": "u32"
4042
4176
  },
4043
4177
  {
4044
- "name": "is_delinquent",
4045
- "type": "bool"
4178
+ "name": "bump",
4179
+ "docs": [
4180
+ "PDA bump seed"
4181
+ ],
4182
+ "type": "u8"
4046
4183
  },
4047
4184
  {
4048
- "name": "activated_stake",
4049
- "type": "u64"
4185
+ "name": "_padding",
4186
+ "docs": [
4187
+ "Padding for alignment"
4188
+ ],
4189
+ "type": {
4190
+ "array": [
4191
+ "u8",
4192
+ 7
4193
+ ]
4194
+ }
4195
+ },
4196
+ {
4197
+ "name": "validators",
4198
+ "docs": [
4199
+ "Fixed array of validator vote account pubkeys",
4200
+ "Using Option to allow for empty slots (None = empty)"
4201
+ ],
4202
+ "type": {
4203
+ "array": [
4204
+ {
4205
+ "defined": {
4206
+ "name": "ValidatorListEntry"
4207
+ }
4208
+ },
4209
+ 256
4210
+ ]
4211
+ }
4050
4212
  }
4051
4213
  ]
4052
4214
  }
4053
4215
  },
4054
4216
  {
4055
- "name": "ValidatorRegistry",
4217
+ "name": "ValidatorListEntry",
4218
+ "serialization": "bytemuckunsafe",
4219
+ "repr": {
4220
+ "kind": "c"
4221
+ },
4056
4222
  "type": {
4057
4223
  "kind": "struct",
4058
4224
  "fields": [
4059
4225
  {
4060
- "name": "authority",
4226
+ "name": "vote_account",
4227
+ "docs": [
4228
+ "Vote account pubkey (all zeros = empty slot)"
4229
+ ],
4061
4230
  "type": "pubkey"
4231
+ }
4232
+ ]
4233
+ }
4234
+ },
4235
+ {
4236
+ "name": "ValidatorReputation",
4237
+ "type": {
4238
+ "kind": "enum",
4239
+ "variants": [
4240
+ {
4241
+ "name": "Trusted"
4062
4242
  },
4063
4243
  {
4064
- "name": "validators",
4065
- "type": {
4066
- "vec": {
4067
- "defined": {
4068
- "name": "ValidatorInfo"
4069
- }
4070
- }
4071
- }
4244
+ "name": "Blacklisted"
4072
4245
  },
4073
4246
  {
4074
- "name": "last_update_epoch",
4075
- "type": "u64"
4247
+ "name": "UnderPerforming"
4248
+ }
4249
+ ]
4250
+ }
4251
+ },
4252
+ {
4253
+ "name": "ValidatorState",
4254
+ "type": {
4255
+ "kind": "enum",
4256
+ "variants": [
4257
+ {
4258
+ "name": "Warming"
4076
4259
  },
4077
4260
  {
4078
- "name": "bump",
4079
- "type": "u8"
4261
+ "name": "NotDelegated"
4262
+ },
4263
+ {
4264
+ "name": "Cooling"
4265
+ },
4266
+ {
4267
+ "name": "Warm"
4268
+ }
4269
+ ]
4270
+ }
4271
+ },
4272
+ {
4273
+ "name": "ValidatorStateChangeReason",
4274
+ "type": {
4275
+ "kind": "enum",
4276
+ "variants": [
4277
+ {
4278
+ "name": "Blacklisted"
4279
+ },
4280
+ {
4281
+ "name": "UnderPerforming"
4080
4282
  }
4081
4283
  ]
4082
4284
  }
4083
4285
  },
4084
4286
  {
4085
- "name": "ValidatorTransientsTracking",
4287
+ "name": "ValidatorTransientAccount",
4288
+ "docs": [
4289
+ "Per-validator transient stake tracking account",
4290
+ "Seed: [\"validator_transient\", vote_account]",
4291
+ "",
4292
+ "This account tracks the resolution status of transient stake accounts",
4293
+ "(both activating and deactivating) for a specific validator."
4294
+ ],
4086
4295
  "type": {
4087
4296
  "kind": "struct",
4088
4297
  "fields": [
4089
4298
  {
4090
- "name": "entries",
4299
+ "name": "vote_account",
4300
+ "docs": [
4301
+ "Vote account this transient tracking belongs to"
4302
+ ],
4303
+ "type": "pubkey"
4304
+ },
4305
+ {
4306
+ "name": "bump",
4307
+ "docs": [
4308
+ "Bump seed for PDA"
4309
+ ],
4310
+ "type": "u8"
4311
+ },
4312
+ {
4313
+ "name": "_padding",
4314
+ "docs": [
4315
+ "Padding for alignment"
4316
+ ],
4091
4317
  "type": {
4092
- "vec": {
4093
- "defined": {
4094
- "name": "TransientStakeEntry"
4095
- }
4096
- }
4318
+ "array": [
4319
+ "u8",
4320
+ 7
4321
+ ]
4097
4322
  }
4098
4323
  },
4099
4324
  {
4100
- "name": "count",
4325
+ "name": "max_resolved_epoch_deactivations",
4326
+ "docs": [
4327
+ "The epoch number for which we have resolved the deactivating stakes",
4328
+ "(resolved = deactivated and merged into the stake pool reserve)"
4329
+ ],
4101
4330
  "type": "u16"
4102
4331
  },
4103
4332
  {
4104
- "name": "bump",
4105
- "type": "u8"
4333
+ "name": "max_resolved_activating_stake",
4334
+ "docs": [
4335
+ "The epoch number for which we have resolved the activating stakes",
4336
+ "(resolved = fully activated and merged into the main stake account)"
4337
+ ],
4338
+ "type": "u16"
4339
+ },
4340
+ {
4341
+ "name": "last_updated_epoch_activations",
4342
+ "docs": [
4343
+ "When did we last check if there are pending activated transient stakes that need to be merged in"
4344
+ ],
4345
+ "type": "u16"
4346
+ },
4347
+ {
4348
+ "name": "last_updated_epoch_deactivations",
4349
+ "docs": [
4350
+ "When did we last check if there were pending deactivated stakes that need to be merged into the reserve pool"
4351
+ ],
4352
+ "type": "u16"
4106
4353
  }
4107
4354
  ]
4108
4355
  }
@@ -4181,13 +4428,6 @@
4181
4428
  ],
4182
4429
  "type": "u64"
4183
4430
  },
4184
- {
4185
- "name": "locked",
4186
- "docs": [
4187
- "True when WireReceipt is locked by an active bond (prevents withdrawals)"
4188
- ],
4189
- "type": "bool"
4190
- },
4191
4431
  {
4192
4432
  "name": "bump",
4193
4433
  "type": "u8"