@wireio/stake 0.1.3 → 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.
@@ -5,7 +5,7 @@
5
5
  * IDL can be found at `target/idl/liqsol_core.json`.
6
6
  */
7
7
  export type LiqsolCore = {
8
- "address": "BsxpwvCaoerUPdY4CgPFgHMmgN939ogDd8MMvH7Zdpgr",
8
+ "address": "HR3t8mA25TdJpwLph2h2L7KhK7ynWoAByYYzgUAfd5rk",
9
9
  "metadata": {
10
10
  "name": "liqsolCore",
11
11
  "version": "0.1.0",
@@ -14,98 +14,110 @@ export type LiqsolCore = {
14
14
  },
15
15
  "instructions": [
16
16
  {
17
- "name": "addBondLevel",
17
+ "name": "accumulateUnstakeRequest",
18
+ "docs": [
19
+ "Accumulate unstake requests to be processed in next allocation cycle",
20
+ "Multiple requests can be accumulated before calculating allocations",
21
+ "Returns the target epoch when this unstake request will be processed"
22
+ ],
18
23
  "discriminator": [
19
- 102,
24
+ 24,
25
+ 73,
26
+ 69,
27
+ 139,
20
28
  36,
21
- 12,
22
- 245,
23
- 60,
24
- 124,
25
- 92,
26
- 74
29
+ 209,
30
+ 105,
31
+ 252
27
32
  ],
28
33
  "accounts": [
29
34
  {
30
- "name": "authority",
35
+ "name": "admin",
31
36
  "writable": true,
32
37
  "signer": true
33
38
  },
34
39
  {
35
- "name": "barConfig"
36
- },
37
- {
38
- "name": "bondLevel",
40
+ "name": "stakeAllocationState",
41
+ "docs": [
42
+ "Stake allocation state - to accumulate pending unstake requests"
43
+ ],
39
44
  "writable": true
40
45
  },
41
46
  {
42
- "name": "systemProgram"
43
- }
44
- ],
45
- "args": [
46
- {
47
- "name": "bondId",
48
- "type": {
49
- "array": [
50
- "u8",
51
- 32
52
- ]
53
- }
47
+ "name": "stakeMetrics",
48
+ "docs": [
49
+ "Stake metrics - to validate total unstake amount is available"
50
+ ]
54
51
  },
55
52
  {
56
- "name": "warmupPeriod",
57
- "type": "u64"
53
+ "name": "maintenanceLedger",
54
+ "docs": [
55
+ "Maintenance ledger - to determine target processing epoch"
56
+ ]
58
57
  },
59
58
  {
60
- "name": "cooldownPeriod",
61
- "type": "u64"
62
- },
59
+ "name": "clock"
60
+ }
61
+ ],
62
+ "args": [
63
63
  {
64
- "name": "minReceiptPrincipal",
64
+ "name": "amount",
65
65
  "type": "u64"
66
- },
67
- {
68
- "name": "roles",
69
- "type": {
70
- "array": [
71
- {
72
- "defined": {
73
- "name": "role"
74
- }
75
- },
76
- 4
77
- ]
78
- }
79
66
  }
80
- ]
67
+ ],
68
+ "returns": "u64"
81
69
  },
82
70
  {
83
- "name": "addValidator",
71
+ "name": "addValidatorV2",
84
72
  "docs": [
85
- "Done///"
73
+ "Add a new validator"
86
74
  ],
87
75
  "discriminator": [
88
- 250,
89
- 113,
90
- 53,
91
- 54,
92
- 141,
93
- 117,
94
- 215,
95
- 185
76
+ 217,
77
+ 158,
78
+ 30,
79
+ 19,
80
+ 123,
81
+ 99,
82
+ 110,
83
+ 30
96
84
  ],
97
85
  "accounts": [
98
86
  {
99
87
  "name": "authority",
88
+ "writable": true,
100
89
  "signer": true
101
90
  },
102
91
  {
103
- "name": "validatorRegistry",
92
+ "name": "activeList",
93
+ "docs": [
94
+ "Active list - will add the validator here"
95
+ ],
96
+ "writable": true
97
+ },
98
+ {
99
+ "name": "validatorInfo",
100
+ "docs": [
101
+ "Create the validator info account"
102
+ ],
103
+ "writable": true
104
+ },
105
+ {
106
+ "name": "validatorTransient",
107
+ "docs": [
108
+ "Create the validator transient account"
109
+ ],
104
110
  "writable": true
105
111
  },
106
112
  {
107
- "name": "transientsTracking",
113
+ "name": "stakeAllocationState",
114
+ "docs": [
115
+ "Stake allocation state - to update total_active_vpp when adding validator"
116
+ ],
108
117
  "writable": true
118
+ },
119
+ {
120
+ "name": "systemProgram"
109
121
  }
110
122
  ],
111
123
  "args": [
@@ -155,110 +167,199 @@ export type LiqsolCore = {
155
167
  ]
156
168
  },
157
169
  {
158
- "name": "bondWireReceipt",
170
+ "name": "aggregateStakeMetrics",
171
+ "docs": [
172
+ "V2: Aggregate stake metrics across all validators using PDA architecture"
173
+ ],
159
174
  "discriminator": [
160
- 56,
161
- 121,
162
- 67,
163
- 27,
164
- 75,
165
- 101,
166
- 114,
167
- 5
175
+ 13,
176
+ 245,
177
+ 47,
178
+ 202,
179
+ 170,
180
+ 73,
181
+ 98,
182
+ 207
168
183
  ],
169
184
  "accounts": [
170
185
  {
171
- "name": "payer",
172
- "writable": true,
186
+ "name": "admin",
173
187
  "signer": true
174
188
  },
175
189
  {
176
- "name": "bondLevel",
190
+ "name": "stakeMetrics",
177
191
  "writable": true
178
192
  },
179
193
  {
180
- "name": "actor",
181
- "docs": [
182
- "Actor being bonded/flagged"
183
- ]
194
+ "name": "epochState",
195
+ "writable": true
196
+ },
197
+ {
198
+ "name": "payoutState",
199
+ "writable": true
200
+ },
201
+ {
202
+ "name": "processingState",
203
+ "writable": true
184
204
  },
185
205
  {
186
- "name": "bondedActor",
206
+ "name": "activeList"
207
+ }
208
+ ],
209
+ "args": []
210
+ },
211
+ {
212
+ "name": "blacklistValidator",
213
+ "docs": [
214
+ "Blacklist a validator (user-facing, maintenance will handle graveyard movement)",
215
+ "UnderPerforming is set automatically when score is updated",
216
+ "Another serious emergency stop function"
217
+ ],
218
+ "discriminator": [
219
+ 125,
220
+ 42,
221
+ 36,
222
+ 229,
223
+ 27,
224
+ 38,
225
+ 226,
226
+ 62
227
+ ],
228
+ "accounts": [
229
+ {
230
+ "name": "validatorInfo",
187
231
  "writable": true
188
232
  },
189
233
  {
190
- "name": "bondOwner",
234
+ "name": "stakeAllocationState",
191
235
  "docs": [
192
- "Owner of the WireReceipt bond"
236
+ "Stake allocation state - to update total_active_vpp when VPP changes"
193
237
  ],
238
+ "writable": true
239
+ }
240
+ ],
241
+ "args": [
242
+ {
243
+ "name": "voteAccount",
244
+ "type": "pubkey"
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ "name": "calculateUnstakeAllocations",
250
+ "docs": [
251
+ "Calculate unstake allocations across validators (batched, up to 10 per call)",
252
+ "Distributes the FROZEN processing amount proportionally based on active stake",
253
+ "Call this after accumulating requests via accumulate_unstake_request"
254
+ ],
255
+ "discriminator": [
256
+ 156,
257
+ 232,
258
+ 48,
259
+ 116,
260
+ 107,
261
+ 60,
262
+ 136,
263
+ 140
264
+ ],
265
+ "accounts": [
266
+ {
267
+ "name": "admin",
194
268
  "writable": true,
195
269
  "signer": true
196
270
  },
197
271
  {
198
- "name": "barConfig"
199
- },
200
- {
201
- "name": "wireReceipt",
272
+ "name": "stakeAllocationState",
202
273
  "docs": [
203
- "The WireReceipt account used as the bond; must belong to the bond owner"
274
+ "Stake allocation state - to track unstake allocation batching"
204
275
  ],
205
276
  "writable": true
206
277
  },
207
278
  {
208
- "name": "systemProgram"
279
+ "name": "stakeMetrics",
280
+ "docs": [
281
+ "Stake metrics - to validate total unstake amount is available"
282
+ ]
283
+ },
284
+ {
285
+ "name": "activeList",
286
+ "docs": [
287
+ "Active validator list - to verify validators are in active list"
288
+ ]
289
+ },
290
+ {
291
+ "name": "maintenanceLedger",
292
+ "docs": [
293
+ "Maintenance ledger - to track last unstake allocation epoch"
294
+ ],
295
+ "writable": true
209
296
  }
210
297
  ],
211
298
  "args": []
212
299
  },
213
300
  {
214
- "name": "claimBond",
301
+ "name": "calculateValidatorAllocations",
215
302
  "discriminator": [
216
- 173,
217
- 34,
218
- 157,
219
- 61,
220
- 45,
221
- 120,
222
- 246,
223
- 11
303
+ 48,
304
+ 217,
305
+ 8,
306
+ 168,
307
+ 228,
308
+ 221,
309
+ 140,
310
+ 112
224
311
  ],
225
312
  "accounts": [
226
313
  {
227
- "name": "bondOwner",
314
+ "name": "admin",
228
315
  "writable": true,
229
316
  "signer": true
230
317
  },
231
318
  {
232
- "name": "barConfig",
319
+ "name": "stakeAllocationState",
233
320
  "docs": [
234
- "Reserved for future OPP assertions"
235
- ]
321
+ "Stake allocation state - to track rebalancing progress"
322
+ ],
323
+ "writable": true
236
324
  },
237
325
  {
238
- "name": "bondLevel"
326
+ "name": "stakeMetrics",
327
+ "docs": [
328
+ "Stake metrics - to get current total active stake"
329
+ ]
239
330
  },
240
331
  {
241
- "name": "actor",
332
+ "name": "activeList",
242
333
  "docs": [
243
- "Actor whose bond is being claimed/cleared"
334
+ "Active validator list - to verify validators are in active list"
244
335
  ]
245
336
  },
246
337
  {
247
- "name": "bondedActor",
338
+ "name": "reservePool",
339
+ "docs": [
340
+ "Reserve pool - to read current balance"
341
+ ],
248
342
  "writable": true
249
343
  },
250
344
  {
251
- "name": "wireReceipt",
345
+ "name": "maintenanceLedger",
252
346
  "docs": [
253
- "The WireReceipt to unlock after claiming bond"
347
+ "Maintenance ledger - to track last rebalance epoch"
254
348
  ],
255
349
  "writable": true
350
+ },
351
+ {
352
+ "name": "clock"
256
353
  }
257
354
  ],
258
355
  "args": [
259
356
  {
260
- "name": "reclaimStorage",
261
- "type": "bool"
357
+ "name": "encumberedFunds",
358
+ "type": "u64"
359
+ },
360
+ {
361
+ "name": "validatorsCount",
362
+ "type": "u8"
262
363
  }
263
364
  ]
264
365
  },
@@ -317,6 +418,67 @@ export type LiqsolCore = {
317
418
  ],
318
419
  "args": []
319
420
  },
421
+ {
422
+ "name": "cleanupFromGraveyard",
423
+ "docs": [
424
+ "Cleanup a validator from graveyard after cooldown expires, get him outta here//"
425
+ ],
426
+ "discriminator": [
427
+ 154,
428
+ 168,
429
+ 171,
430
+ 22,
431
+ 38,
432
+ 14,
433
+ 26,
434
+ 229
435
+ ],
436
+ "accounts": [
437
+ {
438
+ "name": "authority",
439
+ "writable": true,
440
+ "signer": true
441
+ },
442
+ {
443
+ "name": "graveyardList",
444
+ "docs": [
445
+ "Graveyard list - will remove from here"
446
+ ],
447
+ "writable": true
448
+ },
449
+ {
450
+ "name": "validatorInfo",
451
+ "docs": [
452
+ "Validator info - check cooldown, optionally close"
453
+ ],
454
+ "writable": true
455
+ },
456
+ {
457
+ "name": "validatorTransient",
458
+ "docs": [
459
+ "Validator transient - close and refund rent"
460
+ ],
461
+ "writable": true
462
+ },
463
+ {
464
+ "name": "stakeAllocationState",
465
+ "docs": [
466
+ "Stake allocation state - DO NOT update (validator not going back to active list during cleanup)",
467
+ "This is here for consistency but won't be used in cleanup_from_graveyard"
468
+ ],
469
+ "writable": true
470
+ },
471
+ {
472
+ "name": "systemProgram"
473
+ }
474
+ ],
475
+ "args": [
476
+ {
477
+ "name": "voteAccount",
478
+ "type": "pubkey"
479
+ }
480
+ ]
481
+ },
320
482
  {
321
483
  "name": "deposit",
322
484
  "discriminator": [
@@ -430,152 +592,69 @@ export type LiqsolCore = {
430
592
  ]
431
593
  },
432
594
  {
433
- "name": "depositToReserve",
595
+ "name": "forceValidatorUnstake",
434
596
  "docs": [
435
- "Done///",
436
- "/// TODO: delete after development or put in that flag thing"
597
+ "A function you can call to directly influence the amount to unstake from a particular validator",
598
+ "Tbh this is a bypass of the system and should not be called unless you know what you are doing"
437
599
  ],
438
600
  "discriminator": [
439
- 8,
440
- 79,
441
- 123,
442
- 129,
601
+ 7,
602
+ 208,
443
603
  146,
444
- 140,
445
- 178,
446
- 128
604
+ 241,
605
+ 10,
606
+ 219,
607
+ 109,
608
+ 30
447
609
  ],
448
610
  "accounts": [
449
611
  {
450
- "name": "depositor",
612
+ "name": "admin",
451
613
  "writable": true,
452
614
  "signer": true
453
615
  },
454
616
  {
455
- "name": "reservePool",
456
- "writable": true
457
- },
458
- {
459
- "name": "vault"
460
- },
461
- {
462
- "name": "ephemeralStake",
617
+ "name": "validatorInfo",
618
+ "docs": [
619
+ "Validator info account to update"
620
+ ],
463
621
  "writable": true
464
- },
465
- {
466
- "name": "controllerState"
467
- },
468
- {
469
- "name": "stakeProgram"
470
- },
471
- {
472
- "name": "systemProgram"
473
- },
474
- {
475
- "name": "clock"
476
- },
477
- {
478
- "name": "stakeHistory"
479
- },
480
- {
481
- "name": "rent"
482
622
  }
483
623
  ],
484
624
  "args": [
485
625
  {
486
- "name": "amount",
487
- "type": "u64"
626
+ "name": "voteAccount",
627
+ "type": "pubkey"
488
628
  },
489
629
  {
490
- "name": "seed",
491
- "type": "u32"
630
+ "name": "amount",
631
+ "type": "u64"
492
632
  }
493
633
  ]
494
634
  },
495
635
  {
496
- "name": "distributeFromReserve",
636
+ "name": "getMinMaxResolvedEpochDeactivations",
497
637
  "docs": [
498
- "Done///"
499
- ],
500
- "discriminator": [
501
- 204,
502
- 157,
503
- 72,
504
- 30,
505
- 26,
506
- 149,
507
- 166,
508
- 166
509
- ],
510
- "accounts": [
511
- {
512
- "name": "reservePool",
513
- "writable": true
514
- },
515
- {
516
- "name": "vault"
517
- },
518
- {
519
- "name": "epochState",
520
- "writable": true
521
- },
522
- {
523
- "name": "processingState",
524
- "writable": true
525
- },
526
- {
527
- "name": "validatorRegistry",
528
- "writable": true
529
- },
530
- {
531
- "name": "stakeProgram"
532
- },
533
- {
534
- "name": "systemProgram"
535
- },
536
- {
537
- "name": "clock"
538
- },
539
- {
540
- "name": "stakeHistory"
541
- },
542
- {
543
- "name": "stakeConfig"
544
- },
545
- {
546
- "name": "rent"
547
- }
638
+ "Get minimum max_resolved_epoch_deactivations from MaintenanceLedger",
639
+ "This is designed to be called via CPI from other programs"
548
640
  ],
549
- "args": [
550
- {
551
- "name": "validatorsCount",
552
- "type": "u8"
553
- }
554
- ]
555
- },
556
- {
557
- "name": "getTransientValues",
558
641
  "discriminator": [
559
- 13,
560
- 139,
561
- 204,
562
- 177,
563
- 30,
564
- 98,
565
- 185,
566
- 246
642
+ 171,
643
+ 169,
644
+ 39,
645
+ 207,
646
+ 181,
647
+ 67,
648
+ 86,
649
+ 73
567
650
  ],
568
651
  "accounts": [
569
652
  {
570
- "name": "validatorRegistry"
653
+ "name": "epochState"
571
654
  }
572
655
  ],
573
- "args": [
574
- {
575
- "name": "voteAccount",
576
- "type": "pubkey"
577
- }
578
- ]
656
+ "args": [],
657
+ "returns": "u16"
579
658
  },
580
659
  {
581
660
  "name": "initBucket",
@@ -658,16 +737,19 @@ export type LiqsolCore = {
658
737
  "args": []
659
738
  },
660
739
  {
661
- "name": "initializeBar",
740
+ "name": "initializeActiveList",
741
+ "docs": [
742
+ "Initialize the active validator list (zero-copy)"
743
+ ],
662
744
  "discriminator": [
663
- 35,
664
- 177,
665
- 162,
666
- 209,
667
- 1,
668
- 193,
669
- 155,
670
- 110
745
+ 222,
746
+ 123,
747
+ 57,
748
+ 119,
749
+ 223,
750
+ 4,
751
+ 150,
752
+ 36
671
753
  ],
672
754
  "accounts": [
673
755
  {
@@ -676,7 +758,7 @@ export type LiqsolCore = {
676
758
  "signer": true
677
759
  },
678
760
  {
679
- "name": "barConfig",
761
+ "name": "activeList",
680
762
  "writable": true
681
763
  },
682
764
  {
@@ -717,28 +799,28 @@ export type LiqsolCore = {
717
799
  "args": []
718
800
  },
719
801
  {
720
- "name": "initializePayCycle",
802
+ "name": "initializeGraveyardList",
721
803
  "docs": [
722
- "Done///"
804
+ "Initialize the graveyard validator list (zero-copy)"
723
805
  ],
724
806
  "discriminator": [
725
- 1,
726
- 184,
727
- 249,
807
+ 178,
808
+ 8,
728
809
  179,
729
- 11,
730
- 182,
731
- 239,
732
- 224
810
+ 111,
811
+ 75,
812
+ 19,
813
+ 130,
814
+ 176
733
815
  ],
734
816
  "accounts": [
735
817
  {
736
- "name": "admin",
818
+ "name": "payer",
737
819
  "writable": true,
738
820
  "signer": true
739
821
  },
740
822
  {
741
- "name": "payCycle",
823
+ "name": "graveyardList",
742
824
  "writable": true
743
825
  },
744
826
  {
@@ -884,6 +966,37 @@ export type LiqsolCore = {
884
966
  ],
885
967
  "args": []
886
968
  },
969
+ {
970
+ "name": "initializeStakeAllocationState",
971
+ "discriminator": [
972
+ 159,
973
+ 99,
974
+ 175,
975
+ 136,
976
+ 251,
977
+ 241,
978
+ 88,
979
+ 82
980
+ ],
981
+ "accounts": [
982
+ {
983
+ "name": "admin",
984
+ "writable": true,
985
+ "signer": true
986
+ },
987
+ {
988
+ "name": "stakeAllocationState",
989
+ "writable": true
990
+ },
991
+ {
992
+ "name": "clock"
993
+ },
994
+ {
995
+ "name": "systemProgram"
996
+ }
997
+ ],
998
+ "args": []
999
+ },
887
1000
  {
888
1001
  "name": "initializeStakeControllerState",
889
1002
  "docs": [
@@ -984,73 +1097,6 @@ export type LiqsolCore = {
984
1097
  ],
985
1098
  "args": []
986
1099
  },
987
- {
988
- "name": "initializeTransientsTracking",
989
- "docs": [
990
- "Done///"
991
- ],
992
- "discriminator": [
993
- 45,
994
- 17,
995
- 111,
996
- 28,
997
- 248,
998
- 238,
999
- 237,
1000
- 30
1001
- ],
1002
- "accounts": [
1003
- {
1004
- "name": "payer",
1005
- "writable": true,
1006
- "signer": true
1007
- },
1008
- {
1009
- "name": "transientsTracking",
1010
- "writable": true
1011
- },
1012
- {
1013
- "name": "systemProgram"
1014
- }
1015
- ],
1016
- "args": []
1017
- },
1018
- {
1019
- "name": "initializeValidatorRegistry",
1020
- "docs": [
1021
- "Done///"
1022
- ],
1023
- "discriminator": [
1024
- 168,
1025
- 49,
1026
- 128,
1027
- 236,
1028
- 25,
1029
- 7,
1030
- 168,
1031
- 85
1032
- ],
1033
- "accounts": [
1034
- {
1035
- "name": "payer",
1036
- "writable": true,
1037
- "signer": true
1038
- },
1039
- {
1040
- "name": "validatorRegistry",
1041
- "writable": true
1042
- },
1043
- {
1044
- "name": "systemProgram"
1045
- }
1046
- ],
1047
- "args": [
1048
- {
1049
- "name": "authority",
1050
- "type": "pubkey"
1051
- }
1052
- ]
1053
- },
1054
1100
  {
1055
1101
  "name": "initializeVault",
1056
1102
  "docs": [
@@ -1115,19 +1161,20 @@ export type LiqsolCore = {
1115
1161
  "args": []
1116
1162
  },
1117
1163
  {
1118
- "name": "maintenanceMergeTransients",
1164
+ "name": "mergeActivatingStakes",
1119
1165
  "docs": [
1120
- "Done///"
1166
+ "V2: Merge activating transient stakes using PDA architecture",
1167
+ "Returns the number of epochs successfully merged"
1121
1168
  ],
1122
1169
  "discriminator": [
1123
- 171,
1124
- 33,
1125
- 27,
1126
- 133,
1127
- 97,
1128
- 62,
1129
- 213,
1130
- 96
1170
+ 181,
1171
+ 183,
1172
+ 76,
1173
+ 92,
1174
+ 57,
1175
+ 11,
1176
+ 212,
1177
+ 189
1131
1178
  ],
1132
1179
  "accounts": [
1133
1180
  {
@@ -1139,16 +1186,34 @@ export type LiqsolCore = {
1139
1186
  "writable": true
1140
1187
  },
1141
1188
  {
1142
- "name": "validatorRegistry",
1143
- "writable": true
1189
+ "name": "activeList",
1190
+ "docs": [
1191
+ "Active validators list (zero-copy)"
1192
+ ]
1144
1193
  },
1145
1194
  {
1146
- "name": "transientsTracking",
1147
- "writable": true
1195
+ "name": "graveyardList",
1196
+ "docs": [
1197
+ "Graveyard validators list (zero-copy) - needed to check validators in cooldown"
1198
+ ]
1148
1199
  },
1149
1200
  {
1150
- "name": "stakeProgram"
1151
- },
1201
+ "name": "validatorInfo",
1202
+ "docs": [
1203
+ "Validator info PDA for the validator being processed"
1204
+ ],
1205
+ "writable": true
1206
+ },
1207
+ {
1208
+ "name": "validatorTransient",
1209
+ "docs": [
1210
+ "Validator transient tracking PDA for the validator being processed"
1211
+ ],
1212
+ "writable": true
1213
+ },
1214
+ {
1215
+ "name": "stakeProgram"
1216
+ },
1152
1217
  {
1153
1218
  "name": "systemProgram"
1154
1219
  },
@@ -1179,24 +1244,143 @@ export type LiqsolCore = {
1179
1244
  "name": "startEpoch",
1180
1245
  "type": "u64"
1181
1246
  }
1247
+ ],
1248
+ "returns": "u16"
1249
+ },
1250
+ {
1251
+ "name": "mergeDeactivatedStakes",
1252
+ "docs": [
1253
+ "V2: Merge fully deactivated stakes back to reserve"
1254
+ ],
1255
+ "discriminator": [
1256
+ 160,
1257
+ 255,
1258
+ 180,
1259
+ 104,
1260
+ 216,
1261
+ 98,
1262
+ 248,
1263
+ 73
1264
+ ],
1265
+ "accounts": [
1266
+ {
1267
+ "name": "admin",
1268
+ "writable": true,
1269
+ "signer": true
1270
+ },
1271
+ {
1272
+ "name": "vault",
1273
+ "writable": true
1274
+ },
1275
+ {
1276
+ "name": "activeList",
1277
+ "docs": [
1278
+ "Active validators list (zero-copy)"
1279
+ ]
1280
+ },
1281
+ {
1282
+ "name": "graveyardList",
1283
+ "docs": [
1284
+ "Graveyard validators list (zero-copy) - needed to check validators in cooldown"
1285
+ ]
1286
+ },
1287
+ {
1288
+ "name": "validatorInfo",
1289
+ "docs": [
1290
+ "Validator info PDA for the validator being processed"
1291
+ ],
1292
+ "writable": true
1293
+ },
1294
+ {
1295
+ "name": "validatorTransient",
1296
+ "docs": [
1297
+ "Validator transient tracking PDA for the validator being processed"
1298
+ ],
1299
+ "writable": true
1300
+ },
1301
+ {
1302
+ "name": "stakeProgram"
1303
+ },
1304
+ {
1305
+ "name": "systemProgram"
1306
+ },
1307
+ {
1308
+ "name": "clock"
1309
+ },
1310
+ {
1311
+ "name": "stakeHistory"
1312
+ },
1313
+ {
1314
+ "name": "rent"
1315
+ },
1316
+ {
1317
+ "name": "epochState",
1318
+ "writable": true
1319
+ },
1320
+ {
1321
+ "name": "processingState",
1322
+ "writable": true
1323
+ }
1324
+ ],
1325
+ "args": [
1326
+ {
1327
+ "name": "voteAccount",
1328
+ "type": "pubkey"
1329
+ }
1182
1330
  ]
1183
1331
  },
1184
1332
  {
1185
- "name": "moveTransientToActive",
1333
+ "name": "moveToGraveyard",
1334
+ "docs": [
1335
+ "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",
1336
+ "and our system would be too late to catch it"
1337
+ ],
1186
1338
  "discriminator": [
1187
- 140,
1188
- 99,
1189
- 170,
1190
- 186,
1191
- 84,
1339
+ 171,
1192
1340
  61,
1193
- 184,
1194
- 75
1341
+ 145,
1342
+ 127,
1343
+ 189,
1344
+ 218,
1345
+ 221,
1346
+ 199
1195
1347
  ],
1196
1348
  "accounts": [
1197
1349
  {
1198
- "name": "validatorRegistry",
1350
+ "name": "authority",
1351
+ "writable": true,
1352
+ "signer": true
1353
+ },
1354
+ {
1355
+ "name": "activeList",
1356
+ "docs": [
1357
+ "Active list - will remove from here"
1358
+ ],
1199
1359
  "writable": true
1360
+ },
1361
+ {
1362
+ "name": "graveyardList",
1363
+ "docs": [
1364
+ "Graveyard list - will add here"
1365
+ ],
1366
+ "writable": true
1367
+ },
1368
+ {
1369
+ "name": "validatorInfo",
1370
+ "docs": [
1371
+ "Update the validator info to mark as blacklisted/underperforming"
1372
+ ],
1373
+ "writable": true
1374
+ },
1375
+ {
1376
+ "name": "stakeAllocationState",
1377
+ "docs": [
1378
+ "Stake allocation state - to update total_active_vpp when removing validator"
1379
+ ],
1380
+ "writable": true
1381
+ },
1382
+ {
1383
+ "name": "systemProgram"
1200
1384
  }
1201
1385
  ],
1202
1386
  "args": [
@@ -1205,8 +1389,12 @@ export type LiqsolCore = {
1205
1389
  "type": "pubkey"
1206
1390
  },
1207
1391
  {
1208
- "name": "amount",
1209
- "type": "u64"
1392
+ "name": "reason",
1393
+ "type": {
1394
+ "defined": {
1395
+ "name": "validatorStateChangeReason"
1396
+ }
1397
+ }
1210
1398
  }
1211
1399
  ]
1212
1400
  },
@@ -1230,10 +1418,6 @@ export type LiqsolCore = {
1230
1418
  "name": "admin",
1231
1419
  "signer": true
1232
1420
  },
1233
- {
1234
- "name": "payCycle",
1235
- "writable": true
1236
- },
1237
1421
  {
1238
1422
  "name": "stakeMetrics",
1239
1423
  "writable": true
@@ -1247,7 +1431,8 @@ export type LiqsolCore = {
1247
1431
  "writable": true
1248
1432
  },
1249
1433
  {
1250
- "name": "distributionState"
1434
+ "name": "distributionState",
1435
+ "writable": true
1251
1436
  },
1252
1437
  {
1253
1438
  "name": "liqsolMint",
@@ -1276,6 +1461,151 @@ export type LiqsolCore = {
1276
1461
  ],
1277
1462
  "args": []
1278
1463
  },
1464
+ {
1465
+ "name": "processStakeOrders",
1466
+ "docs": [
1467
+ "V2: Process stake orders using PDA architecture with pre-calculated allocations"
1468
+ ],
1469
+ "discriminator": [
1470
+ 92,
1471
+ 161,
1472
+ 223,
1473
+ 219,
1474
+ 54,
1475
+ 232,
1476
+ 40,
1477
+ 16
1478
+ ],
1479
+ "accounts": [
1480
+ {
1481
+ "name": "admin",
1482
+ "writable": true,
1483
+ "signer": true
1484
+ },
1485
+ {
1486
+ "name": "reservePool",
1487
+ "writable": true
1488
+ },
1489
+ {
1490
+ "name": "vault"
1491
+ },
1492
+ {
1493
+ "name": "epochState",
1494
+ "writable": true
1495
+ },
1496
+ {
1497
+ "name": "processingState",
1498
+ "writable": true
1499
+ },
1500
+ {
1501
+ "name": "activeList",
1502
+ "docs": [
1503
+ "Active validator list - used to get total validator count"
1504
+ ]
1505
+ },
1506
+ {
1507
+ "name": "stakeAllocationState",
1508
+ "docs": [
1509
+ "Stake allocation state - to verify allocations have been calculated for current epoch"
1510
+ ],
1511
+ "writable": true
1512
+ },
1513
+ {
1514
+ "name": "stakeProgram"
1515
+ },
1516
+ {
1517
+ "name": "systemProgram"
1518
+ },
1519
+ {
1520
+ "name": "clock"
1521
+ },
1522
+ {
1523
+ "name": "stakeHistory"
1524
+ },
1525
+ {
1526
+ "name": "stakeConfig"
1527
+ },
1528
+ {
1529
+ "name": "rent"
1530
+ }
1531
+ ],
1532
+ "args": [
1533
+ {
1534
+ "name": "validatorsCount",
1535
+ "type": "u8"
1536
+ }
1537
+ ]
1538
+ },
1539
+ {
1540
+ "name": "processUnstakeOrders",
1541
+ "docs": [
1542
+ "V2: Process unstake orders by splitting and deactivating stakes"
1543
+ ],
1544
+ "discriminator": [
1545
+ 44,
1546
+ 122,
1547
+ 251,
1548
+ 185,
1549
+ 253,
1550
+ 193,
1551
+ 250,
1552
+ 191
1553
+ ],
1554
+ "accounts": [
1555
+ {
1556
+ "name": "admin",
1557
+ "signer": true
1558
+ },
1559
+ {
1560
+ "name": "vault",
1561
+ "writable": true
1562
+ },
1563
+ {
1564
+ "name": "epochState",
1565
+ "writable": true
1566
+ },
1567
+ {
1568
+ "name": "processingState",
1569
+ "writable": true
1570
+ },
1571
+ {
1572
+ "name": "activeList",
1573
+ "docs": [
1574
+ "Active validator list - used to get total validator count"
1575
+ ]
1576
+ },
1577
+ {
1578
+ "name": "graveyardList",
1579
+ "docs": [
1580
+ "Graveyard validator list - allows unstaking from graveyard validators"
1581
+ ]
1582
+ },
1583
+ {
1584
+ "name": "clock"
1585
+ },
1586
+ {
1587
+ "name": "stakeHistory"
1588
+ },
1589
+ {
1590
+ "name": "stakeConfig"
1591
+ },
1592
+ {
1593
+ "name": "rent"
1594
+ },
1595
+ {
1596
+ "name": "systemProgram"
1597
+ },
1598
+ {
1599
+ "name": "stakeProgram"
1600
+ }
1601
+ ],
1602
+ "args": [
1603
+ {
1604
+ "name": "validatorsCount",
1605
+ "type": "u8"
1606
+ }
1607
+ ]
1608
+ },
1279
1609
  {
1280
1610
  "name": "purchaseWarrantsFromYield",
1281
1611
  "discriminator": [
@@ -1786,23 +2116,84 @@ export type LiqsolCore = {
1786
2116
  ],
1787
2117
  "accounts": [
1788
2118
  {
1789
- "name": "admin",
2119
+ "name": "admin",
2120
+ "writable": true,
2121
+ "signer": true
2122
+ },
2123
+ {
2124
+ "name": "trancheState",
2125
+ "writable": true
2126
+ },
2127
+ {
2128
+ "name": "priceHistory",
2129
+ "writable": true
2130
+ },
2131
+ {
2132
+ "name": "systemProgram"
2133
+ }
2134
+ ],
2135
+ "args": []
2136
+ },
2137
+ {
2138
+ "name": "restoreFromGraveyard",
2139
+ "docs": [
2140
+ "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",
2141
+ "decision to put the validator in the graveyard"
2142
+ ],
2143
+ "discriminator": [
2144
+ 13,
2145
+ 118,
2146
+ 10,
2147
+ 220,
2148
+ 199,
2149
+ 124,
2150
+ 142,
2151
+ 248
2152
+ ],
2153
+ "accounts": [
2154
+ {
2155
+ "name": "authority",
1790
2156
  "writable": true,
1791
2157
  "signer": true
1792
2158
  },
1793
2159
  {
1794
- "name": "trancheState",
2160
+ "name": "activeList",
2161
+ "docs": [
2162
+ "Active list - will remove from here"
2163
+ ],
1795
2164
  "writable": true
1796
2165
  },
1797
2166
  {
1798
- "name": "priceHistory",
2167
+ "name": "graveyardList",
2168
+ "docs": [
2169
+ "Graveyard list - will add here"
2170
+ ],
2171
+ "writable": true
2172
+ },
2173
+ {
2174
+ "name": "validatorInfo",
2175
+ "docs": [
2176
+ "Update the validator info to mark as blacklisted/underperforming"
2177
+ ],
2178
+ "writable": true
2179
+ },
2180
+ {
2181
+ "name": "stakeAllocationState",
2182
+ "docs": [
2183
+ "Stake allocation state - to update total_active_vpp when removing validator"
2184
+ ],
1799
2185
  "writable": true
1800
2186
  },
1801
2187
  {
1802
2188
  "name": "systemProgram"
1803
2189
  }
1804
2190
  ],
1805
- "args": []
2191
+ "args": [
2192
+ {
2193
+ "name": "voteAccount",
2194
+ "type": "pubkey"
2195
+ }
2196
+ ]
1806
2197
  },
1807
2198
  {
1808
2199
  "name": "setDDay",
@@ -1834,31 +2225,41 @@ export type LiqsolCore = {
1834
2225
  ]
1835
2226
  },
1836
2227
  {
1837
- "name": "setMinWarmupCooldown",
2228
+ "name": "setLastStateChangeEpoch",
2229
+ "docs": [
2230
+ "Admin function to directly set last_state_change_epoch (useful for testing cooldowns)"
2231
+ ],
1838
2232
  "discriminator": [
1839
- 68,
1840
- 204,
1841
- 32,
1842
- 34,
1843
- 89,
1844
- 181,
1845
- 12,
1846
- 5
2233
+ 94,
2234
+ 57,
2235
+ 139,
2236
+ 195,
2237
+ 123,
2238
+ 224,
2239
+ 227,
2240
+ 106
1847
2241
  ],
1848
2242
  "accounts": [
1849
2243
  {
1850
- "name": "authority",
1851
- "signer": true
2244
+ "name": "validatorInfo",
2245
+ "writable": true
1852
2246
  },
1853
2247
  {
1854
- "name": "barConfig",
2248
+ "name": "stakeAllocationState",
2249
+ "docs": [
2250
+ "Stake allocation state - to update total_active_vpp when VPP changes"
2251
+ ],
1855
2252
  "writable": true
1856
2253
  }
1857
2254
  ],
1858
2255
  "args": [
1859
2256
  {
1860
- "name": "minWarmupCooldown",
1861
- "type": "u64"
2257
+ "name": "voteAccount",
2258
+ "type": "pubkey"
2259
+ },
2260
+ {
2261
+ "name": "epoch",
2262
+ "type": "u16"
1862
2263
  }
1863
2264
  ]
1864
2265
  },
@@ -1920,47 +2321,6 @@ export type LiqsolCore = {
1920
2321
  }
1921
2322
  ]
1922
2323
  },
1923
- {
1924
- "name": "slashBond",
1925
- "discriminator": [
1926
- 143,
1927
- 246,
1928
- 51,
1929
- 243,
1930
- 88,
1931
- 198,
1932
- 217,
1933
- 48
1934
- ],
1935
- "accounts": [
1936
- {
1937
- "name": "authority",
1938
- "writable": true,
1939
- "signer": true
1940
- },
1941
- {
1942
- "name": "barConfig"
1943
- },
1944
- {
1945
- "name": "actor",
1946
- "docs": [
1947
- "Actor being slashed"
1948
- ]
1949
- },
1950
- {
1951
- "name": "bondedActor",
1952
- "writable": true
1953
- },
1954
- {
1955
- "name": "wireReceipt",
1956
- "docs": [
1957
- "The WireReceipt used as collateral - will be zeroed"
1958
- ],
1959
- "writable": true
1960
- }
1961
- ],
1962
- "args": []
1963
- },
1964
2324
  {
1965
2325
  "name": "stakeLiqsol",
1966
2326
  "discriminator": [
@@ -2047,62 +2407,20 @@ export type LiqsolCore = {
2047
2407
  ]
2048
2408
  },
2049
2409
  {
2050
- "name": "syncValidatorScores",
2051
- "discriminator": [
2052
- 10,
2053
- 26,
2054
- 245,
2055
- 222,
2056
- 183,
2057
- 46,
2058
- 70,
2059
- 181
2060
- ],
2061
- "accounts": [
2062
- {
2063
- "name": "authority",
2064
- "signer": true
2065
- },
2066
- {
2067
- "name": "validatorRegistry",
2068
- "writable": true
2069
- },
2070
- {
2071
- "name": "stakeControllerProgram"
2072
- }
2073
- ],
2074
- "args": [
2075
- {
2076
- "name": "voteAccounts",
2077
- "type": {
2078
- "vec": "pubkey"
2079
- }
2080
- },
2081
- {
2082
- "name": "validatorMetrics",
2083
- "type": {
2084
- "vec": {
2085
- "defined": {
2086
- "name": "validatorMetrics"
2087
- }
2088
- }
2089
- }
2090
- }
2091
- ]
2092
- },
2093
- {
2094
- "name": "syncValidatorStakes",
2410
+ "name": "syncMainStakeAccounts",
2095
2411
  "docs": [
2096
- "Done///"
2412
+ "V2: Sync main stake accounts using PDA architecture (batched)",
2413
+ "Processes up to 10 validators per transaction via remaining_accounts",
2414
+ "Note: Only syncs primary delegated stakes, not transient stakes"
2097
2415
  ],
2098
2416
  "discriminator": [
2099
- 40,
2100
- 56,
2101
- 118,
2102
- 52,
2103
- 20,
2104
- 213,
2105
- 229,
2417
+ 159,
2418
+ 17,
2419
+ 201,
2420
+ 39,
2421
+ 89,
2422
+ 62,
2423
+ 65,
2106
2424
  135
2107
2425
  ],
2108
2426
  "accounts": [
@@ -2111,119 +2429,37 @@ export type LiqsolCore = {
2111
2429
  "signer": true
2112
2430
  },
2113
2431
  {
2114
- "name": "mainValidatorStake"
2115
- },
2116
- {
2117
- "name": "validatorRegistry",
2432
+ "name": "processingState",
2433
+ "docs": [
2434
+ "Processing state for tracking batch progress"
2435
+ ],
2118
2436
  "writable": true
2119
2437
  },
2120
2438
  {
2121
- "name": "stakeHistory"
2122
- }
2123
- ],
2124
- "args": [
2125
- {
2126
- "name": "validator",
2127
- "type": "pubkey"
2128
- }
2129
- ]
2130
- },
2131
- {
2132
- "name": "unbond",
2133
- "discriminator": [
2134
- 151,
2135
- 129,
2136
- 36,
2137
- 46,
2138
- 102,
2139
- 195,
2140
- 111,
2141
- 122
2142
- ],
2143
- "accounts": [
2144
- {
2145
- "name": "bondOwner",
2146
- "signer": true
2439
+ "name": "epochState",
2440
+ "docs": [
2441
+ "Epoch state to mark completion"
2442
+ ],
2443
+ "writable": true
2147
2444
  },
2148
2445
  {
2149
- "name": "barConfig",
2446
+ "name": "activeList",
2150
2447
  "docs": [
2151
- "Reserved for future OPP assertions"
2448
+ "Active validator list - to check validator counts"
2152
2449
  ]
2153
2450
  },
2154
2451
  {
2155
- "name": "bondLevel"
2156
- },
2157
- {
2158
- "name": "actor",
2452
+ "name": "graveyardList",
2159
2453
  "docs": [
2160
- "Actor whose bond is being released"
2454
+ "Graveyard validator list - to check validator counts"
2161
2455
  ]
2162
2456
  },
2163
2457
  {
2164
- "name": "bondedActor",
2165
- "writable": true
2458
+ "name": "stakeHistory"
2166
2459
  }
2167
2460
  ],
2168
2461
  "args": []
2169
2462
  },
2170
- {
2171
- "name": "updateBondLevel",
2172
- "discriminator": [
2173
- 48,
2174
- 233,
2175
- 159,
2176
- 234,
2177
- 230,
2178
- 200,
2179
- 171,
2180
- 205
2181
- ],
2182
- "accounts": [
2183
- {
2184
- "name": "authority",
2185
- "signer": true
2186
- },
2187
- {
2188
- "name": "barConfig"
2189
- },
2190
- {
2191
- "name": "bondLevel",
2192
- "writable": true
2193
- }
2194
- ],
2195
- "args": [
2196
- {
2197
- "name": "warmupPeriod",
2198
- "type": "u64"
2199
- },
2200
- {
2201
- "name": "cooldownPeriod",
2202
- "type": "u64"
2203
- },
2204
- {
2205
- "name": "minReceiptPrincipal",
2206
- "type": "u64"
2207
- },
2208
- {
2209
- "name": "roles",
2210
- "type": {
2211
- "array": [
2212
- {
2213
- "defined": {
2214
- "name": "role"
2215
- }
2216
- },
2217
- 4
2218
- ]
2219
- }
2220
- },
2221
- {
2222
- "name": "enabled",
2223
- "type": "bool"
2224
- }
2225
- ]
2226
- },
2227
2463
  {
2228
2464
  "name": "updateGrowthParameters",
2229
2465
  "discriminator": [
@@ -2238,87 +2474,29 @@ export type LiqsolCore = {
2238
2474
  ],
2239
2475
  "accounts": [
2240
2476
  {
2241
- "name": "admin",
2242
- "writable": true,
2243
- "signer": true
2244
- },
2245
- {
2246
- "name": "trancheState",
2247
- "writable": true
2248
- },
2249
- {
2250
- "name": "priceHistory",
2251
- "writable": true
2252
- },
2253
- {
2254
- "name": "systemProgram"
2255
- }
2256
- ],
2257
- "args": [
2258
- {
2259
- "name": "supplyGrowthBps",
2260
- "type": "u16"
2261
- },
2262
- {
2263
- "name": "priceGrowthBps",
2264
- "type": "u16"
2265
- }
2266
- ]
2267
- },
2268
- {
2269
- "name": "updateMaxResolvedDeactivations",
2270
- "discriminator": [
2271
- 231,
2272
- 111,
2273
- 22,
2274
- 0,
2275
- 70,
2276
- 141,
2277
- 42,
2278
- 204
2279
- ],
2280
- "accounts": [
2281
- {
2282
- "name": "transientsTracking",
2283
- "writable": true
2284
- }
2285
- ],
2286
- "args": [
2287
- {
2288
- "name": "voteAccount",
2289
- "type": "pubkey"
2477
+ "name": "admin",
2478
+ "writable": true,
2479
+ "signer": true
2290
2480
  },
2291
2481
  {
2292
- "name": "newValue",
2293
- "type": "u16"
2294
- }
2295
- ]
2296
- },
2297
- {
2298
- "name": "updateMaxResolvedStake",
2299
- "discriminator": [
2300
- 241,
2301
- 21,
2302
- 28,
2303
- 14,
2304
- 58,
2305
- 11,
2306
- 76,
2307
- 44
2308
- ],
2309
- "accounts": [
2482
+ "name": "trancheState",
2483
+ "writable": true
2484
+ },
2310
2485
  {
2311
- "name": "transientsTracking",
2486
+ "name": "priceHistory",
2312
2487
  "writable": true
2488
+ },
2489
+ {
2490
+ "name": "systemProgram"
2313
2491
  }
2314
2492
  ],
2315
2493
  "args": [
2316
2494
  {
2317
- "name": "voteAccount",
2318
- "type": "pubkey"
2495
+ "name": "supplyGrowthBps",
2496
+ "type": "u16"
2319
2497
  },
2320
2498
  {
2321
- "name": "newValue",
2499
+ "name": "priceGrowthBps",
2322
2500
  "type": "u16"
2323
2501
  }
2324
2502
  ]
@@ -2368,86 +2546,6 @@ export type LiqsolCore = {
2368
2546
  }
2369
2547
  ]
2370
2548
  },
2371
- {
2372
- "name": "updateStakeStateOnSync",
2373
- "docs": [
2374
- "Done///"
2375
- ],
2376
- "discriminator": [
2377
- 146,
2378
- 155,
2379
- 114,
2380
- 27,
2381
- 121,
2382
- 60,
2383
- 159,
2384
- 234
2385
- ],
2386
- "accounts": [
2387
- {
2388
- "name": "admin",
2389
- "signer": true
2390
- },
2391
- {
2392
- "name": "stakeMetrics",
2393
- "writable": true
2394
- },
2395
- {
2396
- "name": "epochState",
2397
- "writable": true
2398
- },
2399
- {
2400
- "name": "payoutState",
2401
- "writable": true
2402
- },
2403
- {
2404
- "name": "processingState",
2405
- "writable": true
2406
- },
2407
- {
2408
- "name": "validatorRegistry",
2409
- "writable": true
2410
- },
2411
- {
2412
- "name": "payCycle",
2413
- "writable": true
2414
- }
2415
- ],
2416
- "args": []
2417
- },
2418
- {
2419
- "name": "updateTransientsTracking",
2420
- "discriminator": [
2421
- 146,
2422
- 77,
2423
- 164,
2424
- 79,
2425
- 174,
2426
- 67,
2427
- 108,
2428
- 106
2429
- ],
2430
- "accounts": [
2431
- {
2432
- "name": "transientsTracking",
2433
- "writable": true
2434
- }
2435
- ],
2436
- "args": [
2437
- {
2438
- "name": "voteAccount",
2439
- "type": "pubkey"
2440
- },
2441
- {
2442
- "name": "params",
2443
- "type": {
2444
- "defined": {
2445
- "name": "transientUpdateParams"
2446
- }
2447
- }
2448
- }
2449
- ]
2450
- },
2451
2549
  {
2452
2550
  "name": "updateUser",
2453
2551
  "discriminator": [
@@ -2522,6 +2620,112 @@ export type LiqsolCore = {
2522
2620
  ],
2523
2621
  "args": []
2524
2622
  },
2623
+ {
2624
+ "name": "updateValidatorInfoV2",
2625
+ "docs": [
2626
+ "Update validator info fields (V2), function to force update a validator's info, should not be used unless in development for testing"
2627
+ ],
2628
+ "discriminator": [
2629
+ 123,
2630
+ 47,
2631
+ 0,
2632
+ 192,
2633
+ 74,
2634
+ 132,
2635
+ 84,
2636
+ 46
2637
+ ],
2638
+ "accounts": [
2639
+ {
2640
+ "name": "validatorInfo",
2641
+ "writable": true
2642
+ },
2643
+ {
2644
+ "name": "stakeAllocationState",
2645
+ "docs": [
2646
+ "Stake allocation state - to update total_active_vpp when VPP changes"
2647
+ ],
2648
+ "writable": true
2649
+ }
2650
+ ],
2651
+ "args": [
2652
+ {
2653
+ "name": "voteAccount",
2654
+ "type": "pubkey"
2655
+ },
2656
+ {
2657
+ "name": "currentActiveStakeAmount",
2658
+ "type": {
2659
+ "option": "u64"
2660
+ }
2661
+ },
2662
+ {
2663
+ "name": "epochRewardAmount",
2664
+ "type": {
2665
+ "option": "u64"
2666
+ }
2667
+ },
2668
+ {
2669
+ "name": "transientActiveStakeAmount",
2670
+ "type": {
2671
+ "option": "u64"
2672
+ }
2673
+ },
2674
+ {
2675
+ "name": "epoch",
2676
+ "type": {
2677
+ "option": "u64"
2678
+ }
2679
+ },
2680
+ {
2681
+ "name": "performanceScore",
2682
+ "type": {
2683
+ "option": "u8"
2684
+ }
2685
+ }
2686
+ ]
2687
+ },
2688
+ {
2689
+ "name": "updateValidatorTransient",
2690
+ "docs": [
2691
+ "Update validator transient tracking (V2), another function not to be really used in production except for testing//",
2692
+ "TODO: discuss wether to let this function be ?"
2693
+ ],
2694
+ "discriminator": [
2695
+ 124,
2696
+ 36,
2697
+ 28,
2698
+ 172,
2699
+ 25,
2700
+ 233,
2701
+ 39,
2702
+ 219
2703
+ ],
2704
+ "accounts": [
2705
+ {
2706
+ "name": "validatorTransient",
2707
+ "writable": true
2708
+ }
2709
+ ],
2710
+ "args": [
2711
+ {
2712
+ "name": "voteAccount",
2713
+ "type": "pubkey"
2714
+ },
2715
+ {
2716
+ "name": "maxResolvedEpochDeactivations",
2717
+ "type": {
2718
+ "option": "u16"
2719
+ }
2720
+ },
2721
+ {
2722
+ "name": "maxResolvedActivatingStake",
2723
+ "type": {
2724
+ "option": "u16"
2725
+ }
2726
+ }
2727
+ ]
2728
+ },
2525
2729
  {
2526
2730
  "name": "withdrawStake",
2527
2731
  "discriminator": [
@@ -2610,42 +2814,16 @@ export type LiqsolCore = {
2610
2814
  ],
2611
2815
  "accounts": [
2612
2816
  {
2613
- "name": "barConfig",
2614
- "discriminator": [
2615
- 172,
2616
- 166,
2617
- 67,
2618
- 186,
2619
- 146,
2620
- 5,
2621
- 198,
2622
- 67
2623
- ]
2624
- },
2625
- {
2626
- "name": "bondLevel",
2627
- "discriminator": [
2628
- 103,
2629
- 61,
2630
- 221,
2631
- 129,
2632
- 28,
2633
- 118,
2634
- 201,
2635
- 85
2636
- ]
2637
- },
2638
- {
2639
- "name": "bondedActor",
2817
+ "name": "batchOrchestrator",
2640
2818
  "discriminator": [
2641
- 127,
2642
- 148,
2643
2819
  70,
2644
- 241,
2645
- 91,
2646
- 0,
2647
- 3,
2648
- 233
2820
+ 163,
2821
+ 206,
2822
+ 225,
2823
+ 7,
2824
+ 189,
2825
+ 73,
2826
+ 94
2649
2827
  ]
2650
2828
  },
2651
2829
  {
@@ -2661,19 +2839,6 @@ export type LiqsolCore = {
2661
2839
  103
2662
2840
  ]
2663
2841
  },
2664
- {
2665
- "name": "epochState",
2666
- "discriminator": [
2667
- 191,
2668
- 63,
2669
- 139,
2670
- 237,
2671
- 144,
2672
- 12,
2673
- 223,
2674
- 210
2675
- ]
2676
- },
2677
2842
  {
2678
2843
  "name": "global",
2679
2844
  "discriminator": [
@@ -2714,16 +2879,16 @@ export type LiqsolCore = {
2714
2879
  ]
2715
2880
  },
2716
2881
  {
2717
- "name": "payCycle",
2882
+ "name": "maintenanceLedger",
2718
2883
  "discriminator": [
2719
- 119,
2720
- 127,
2721
- 39,
2722
- 70,
2723
- 134,
2884
+ 140,
2885
+ 250,
2886
+ 92,
2724
2887
  173,
2725
- 90,
2726
- 225
2888
+ 147,
2889
+ 65,
2890
+ 26,
2891
+ 39
2727
2892
  ]
2728
2893
  },
2729
2894
  {
@@ -2766,16 +2931,16 @@ export type LiqsolCore = {
2766
2931
  ]
2767
2932
  },
2768
2933
  {
2769
- "name": "processingState",
2934
+ "name": "stakeAllocationState",
2770
2935
  "discriminator": [
2771
- 47,
2772
- 15,
2773
- 142,
2774
- 130,
2775
- 245,
2776
- 250,
2936
+ 23,
2937
+ 238,
2938
+ 120,
2777
2939
  198,
2778
- 161
2940
+ 156,
2941
+ 165,
2942
+ 151,
2943
+ 119
2779
2944
  ]
2780
2945
  },
2781
2946
  {
@@ -2870,29 +3035,42 @@ export type LiqsolCore = {
2870
3035
  ]
2871
3036
  },
2872
3037
  {
2873
- "name": "validatorRegistry",
3038
+ "name": "validatorInfoAccount",
3039
+ "discriminator": [
3040
+ 195,
3041
+ 243,
3042
+ 81,
3043
+ 187,
3044
+ 172,
3045
+ 232,
3046
+ 57,
3047
+ 59
3048
+ ]
3049
+ },
3050
+ {
3051
+ "name": "validatorList",
2874
3052
  "discriminator": [
2875
- 168,
2876
- 113,
2877
- 195,
2878
- 186,
2879
- 62,
2880
- 121,
2881
- 163,
2882
- 230
3053
+ 131,
3054
+ 181,
3055
+ 125,
3056
+ 127,
3057
+ 46,
3058
+ 36,
3059
+ 40,
3060
+ 167
2883
3061
  ]
2884
3062
  },
2885
3063
  {
2886
- "name": "validatorTransientsTracking",
3064
+ "name": "validatorTransientAccount",
2887
3065
  "discriminator": [
2888
- 120,
2889
- 82,
2890
- 6,
2891
- 162,
2892
- 246,
2893
- 129,
2894
- 133,
2895
- 63
3066
+ 97,
3067
+ 207,
3068
+ 155,
3069
+ 142,
3070
+ 86,
3071
+ 170,
3072
+ 118,
3073
+ 161
2896
3074
  ]
2897
3075
  },
2898
3076
  {
@@ -2979,230 +3157,121 @@ export type LiqsolCore = {
2979
3157
  "errors": [
2980
3158
  {
2981
3159
  "code": 6000,
2982
- "name": "destinationAccountDoesNotExist",
2983
- "msg": "Destination stake account does not exist"
3160
+ "name": "noRewardsToClaim",
3161
+ "msg": "No rewards to claim"
2984
3162
  },
2985
3163
  {
2986
3164
  "code": 6001,
2987
- "name": "sourceAccountDoesNotExist",
2988
- "msg": "Source stake account does not exist"
3165
+ "name": "insufficientBalance",
3166
+ "msg": "Insufficient balance"
2989
3167
  },
2990
3168
  {
2991
3169
  "code": 6002,
2992
- "name": "invalidDestinationOwner",
2993
- "msg": "Destination account not owned by stake program"
3170
+ "name": "insufficientFunds",
3171
+ "msg": "Insufficient funds"
2994
3172
  },
2995
3173
  {
2996
3174
  "code": 6003,
2997
- "name": "invalidSourceOwner",
2998
- "msg": "Source account not owned by stake program"
3175
+ "name": "unauthorized",
3176
+ "msg": "Unauthorized - caller is not the distribution authority"
2999
3177
  },
3000
3178
  {
3001
3179
  "code": 6004,
3002
- "name": "clockBorrowFailed",
3003
- "msg": "Failed to borrow clock data"
3180
+ "name": "invalidMint",
3181
+ "msg": "Invalid mint"
3004
3182
  },
3005
3183
  {
3006
3184
  "code": 6005,
3007
- "name": "clockDeserializeFailed",
3008
- "msg": "Failed to deserialize clock"
3185
+ "name": "invalidOwner",
3186
+ "msg": "Invalid owner"
3009
3187
  },
3010
3188
  {
3011
3189
  "code": 6006,
3012
- "name": "destinationAnalysisFailed",
3013
- "msg": "Failed to analyze destination stake account"
3190
+ "name": "invalidUserRecord",
3191
+ "msg": "Invalid user record"
3014
3192
  },
3015
3193
  {
3016
3194
  "code": 6007,
3017
- "name": "sourceAnalysisFailed",
3018
- "msg": "Failed to analyze source stake account"
3195
+ "name": "invalidWithdrawal",
3196
+ "msg": "Invalid withdrawal - balance increased instead of decreased"
3019
3197
  },
3020
3198
  {
3021
3199
  "code": 6008,
3022
- "name": "destinationStillActivating",
3023
- "msg": "Destination stake is still activating"
3200
+ "name": "invalidProgramId",
3201
+ "msg": "Invalid program ID"
3024
3202
  },
3025
3203
  {
3026
3204
  "code": 6009,
3027
- "name": "destinationDeactivating",
3028
- "msg": "Destination stake is deactivating"
3205
+ "name": "instructionIntrospectionFailed",
3206
+ "msg": "Instruction introspection failed"
3029
3207
  },
3030
3208
  {
3031
3209
  "code": 6010,
3032
- "name": "sourceStillActivating",
3033
- "msg": "Source stake is still activating"
3034
- },
3035
- {
3036
- "code": 6011,
3037
- "name": "sourceDeactivating",
3038
- "msg": "Source stake is deactivating"
3039
- },
3040
- {
3041
- "code": 6012,
3042
- "name": "destinationBorrowFailed",
3043
- "msg": "Failed to borrow destination account data"
3044
- },
3045
- {
3046
- "code": 6013,
3047
- "name": "destinationParseFailed",
3048
- "msg": "Failed to parse destination stake state"
3049
- },
3050
- {
3051
- "code": 6014,
3052
- "name": "sourceBorrowFailed",
3053
- "msg": "Failed to borrow source account data"
3054
- },
3055
- {
3056
- "code": 6015,
3057
- "name": "sourceParseFailed",
3058
- "msg": "Failed to parse source stake state"
3059
- },
3060
- {
3061
- "code": 6016,
3062
- "name": "differentValidators",
3063
- "msg": "Stakes are delegated to different validators"
3064
- },
3065
- {
3066
- "code": 6017,
3067
- "name": "differentStakers",
3068
- "msg": "Stakes have different staker authorities"
3069
- },
3070
- {
3071
- "code": 6018,
3072
- "name": "differentWithdrawers",
3073
- "msg": "Stakes have different withdrawer authorities"
3074
- },
3075
- {
3076
- "code": 6019,
3077
- "name": "authoritiesNotFound",
3078
- "msg": "Could not extract authorities from accounts"
3079
- },
3080
- {
3081
- "code": 6020,
3082
- "name": "mergeInstructionFailed",
3083
- "msg": "Merge instruction failed"
3084
- },
3085
- {
3086
- "code": 6021,
3087
- "name": "epochRewardsActive",
3088
- "msg": "Epoch rewards distribution is active - stake operations blocked"
3089
- },
3090
- {
3091
- "code": 6022,
3092
- "name": "differentCreditsObserved",
3093
- "msg": "Stakes have different credits_observed - cannot merge until both earn same rewards"
3210
+ "name": "receiptFulfilled",
3211
+ "msg": "Receipt already fulfilled"
3094
3212
  }
3095
3213
  ],
3096
3214
  "types": [
3097
3215
  {
3098
- "name": "barConfig",
3216
+ "name": "batchOrchestrator",
3099
3217
  "type": {
3100
3218
  "kind": "struct",
3101
3219
  "fields": [
3102
3220
  {
3103
- "name": "authority",
3104
- "type": "pubkey"
3221
+ "name": "validatorsProcessedThisEpoch",
3222
+ "type": "u8"
3105
3223
  },
3106
3224
  {
3107
- "name": "minWarmupCooldown",
3225
+ "name": "currentMergeProcessingEpoch",
3226
+ "docs": [
3227
+ "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",
3228
+ "between the current_merge_processing_epoch and the actual current epoch//"
3229
+ ],
3108
3230
  "type": "u64"
3109
3231
  },
3110
3232
  {
3111
- "name": "bump",
3233
+ "name": "validatorsMergeProcessedThisEpoch",
3112
3234
  "type": "u8"
3113
- }
3114
- ]
3115
- }
3116
- },
3117
- {
3118
- "name": "bondLevel",
3119
- "type": {
3120
- "kind": "struct",
3121
- "fields": [
3122
- {
3123
- "name": "id",
3124
- "type": {
3125
- "array": [
3126
- "u8",
3127
- 32
3128
- ]
3129
- }
3130
3235
  },
3131
3236
  {
3132
- "name": "warmupPeriod",
3237
+ "name": "currentDeactivatingMergeEpoch",
3133
3238
  "type": "u64"
3134
3239
  },
3135
3240
  {
3136
- "name": "cooldownPeriod",
3137
- "type": "u64"
3241
+ "name": "validatorsDeactivatingMergeProcessed",
3242
+ "type": "u8"
3138
3243
  },
3139
3244
  {
3140
- "name": "minReceiptPrincipal",
3141
- "docs": [
3142
- "Minimum principal across WireReceipt buckets (staked + purchased + purchased_with_sol)"
3143
- ],
3144
- "type": "u64"
3245
+ "name": "validatorsSyncProcessedThisEpoch",
3246
+ "type": "u8"
3145
3247
  },
3146
3248
  {
3147
- "name": "roles",
3148
- "docs": [
3149
- "Roles granted when bonding at this level"
3150
- ],
3151
- "type": {
3152
- "array": [
3153
- {
3154
- "defined": {
3155
- "name": "role"
3156
- }
3157
- },
3158
- 4
3159
- ]
3160
- }
3249
+ "name": "validatorsUnstakeProcessedThisEpoch",
3250
+ "type": "u8"
3161
3251
  },
3162
3252
  {
3163
- "name": "enabled",
3253
+ "name": "distributionInProgress",
3164
3254
  "type": "bool"
3165
3255
  },
3166
3256
  {
3167
- "name": "bump",
3257
+ "name": "validatorsAggregateProcessedThisEpoch",
3168
3258
  "type": "u8"
3169
- }
3170
- ]
3171
- }
3172
- },
3173
- {
3174
- "name": "bondedActor",
3175
- "type": {
3176
- "kind": "struct",
3177
- "fields": [
3178
- {
3179
- "name": "actor",
3180
- "type": "pubkey"
3181
- },
3182
- {
3183
- "name": "bondOwner",
3184
- "type": "pubkey"
3185
3259
  },
3186
3260
  {
3187
- "name": "wireReceipt",
3188
- "type": "pubkey"
3261
+ "name": "tempTotalActiveStake",
3262
+ "type": "u64"
3189
3263
  },
3190
3264
  {
3191
- "name": "bondLevelId",
3192
- "type": {
3193
- "array": [
3194
- "u8",
3195
- 32
3196
- ]
3197
- }
3265
+ "name": "tempTotalTransientStake",
3266
+ "type": "u64"
3198
3267
  },
3199
3268
  {
3200
- "name": "bondedAt",
3201
- "type": "i64"
3269
+ "name": "tempTotalReward",
3270
+ "type": "u64"
3202
3271
  },
3203
3272
  {
3204
- "name": "unbondedAt",
3205
- "type": "i64"
3273
+ "name": "tempTotalUnstakeableStake",
3274
+ "type": "u64"
3206
3275
  },
3207
3276
  {
3208
3277
  "name": "bump",
@@ -3259,50 +3328,6 @@ export type LiqsolCore = {
3259
3328
  ]
3260
3329
  }
3261
3330
  },
3262
- {
3263
- "name": "epochState",
3264
- "type": {
3265
- "kind": "struct",
3266
- "fields": [
3267
- {
3268
- "name": "lastUpdatedGlobalEpoch",
3269
- "type": "u64"
3270
- },
3271
- {
3272
- "name": "lastDistributionEpoch",
3273
- "type": {
3274
- "option": "u64"
3275
- }
3276
- },
3277
- {
3278
- "name": "lastDistributionSlot",
3279
- "type": {
3280
- "option": "u64"
3281
- }
3282
- },
3283
- {
3284
- "name": "lastDeactivationEpoch",
3285
- "type": "u64"
3286
- },
3287
- {
3288
- "name": "lastRebalanceEpoch",
3289
- "type": "u64"
3290
- },
3291
- {
3292
- "name": "lastMergeTransientsEpoch",
3293
- "type": "u64"
3294
- },
3295
- {
3296
- "name": "currentMergeProcessingEpoch",
3297
- "type": "u64"
3298
- },
3299
- {
3300
- "name": "bump",
3301
- "type": "u8"
3302
- }
3303
- ]
3304
- }
3305
- },
3306
3331
  {
3307
3332
  "name": "global",
3308
3333
  "docs": [
@@ -3459,30 +3484,56 @@ export type LiqsolCore = {
3459
3484
  }
3460
3485
  },
3461
3486
  {
3462
- "name": "payCycle",
3487
+ "name": "maintenanceLedger",
3463
3488
  "type": {
3464
3489
  "kind": "struct",
3465
3490
  "fields": [
3466
3491
  {
3467
- "name": "epoch",
3492
+ "name": "lastSyncEpoch",
3493
+ "type": "u16"
3494
+ },
3495
+ {
3496
+ "name": "lastUpdatedStakeMetricsEpoch",
3497
+ "type": "u64"
3498
+ },
3499
+ {
3500
+ "name": "lastDistributionEpoch",
3501
+ "type": {
3502
+ "option": "u64"
3503
+ }
3504
+ },
3505
+ {
3506
+ "name": "lastDistributionSlot",
3507
+ "type": {
3508
+ "option": "u64"
3509
+ }
3510
+ },
3511
+ {
3512
+ "name": "lastMergeDeactivatingTransientsEpoch",
3468
3513
  "type": "u64"
3469
3514
  },
3470
3515
  {
3471
- "name": "totalYield",
3516
+ "name": "lastRebalanceAllocationEpoch",
3472
3517
  "type": "u64"
3473
3518
  },
3474
3519
  {
3475
- "name": "timestamp",
3476
- "type": "i64"
3520
+ "name": "lastMergeActivatingTransientsEpoch",
3521
+ "type": "u64"
3477
3522
  },
3478
3523
  {
3479
- "name": "fulfilled",
3480
- "type": "bool"
3524
+ "name": "lastUnstakeEpoch",
3525
+ "type": {
3526
+ "option": "u64"
3527
+ }
3481
3528
  },
3482
3529
  {
3483
- "name": "lastSlotPaidFor",
3530
+ "name": "lastUnstakeAllocationEpoch",
3484
3531
  "type": "u64"
3485
3532
  },
3533
+ {
3534
+ "name": "minMaxResolvedEpochDeactivations",
3535
+ "type": "u16"
3536
+ },
3486
3537
  {
3487
3538
  "name": "bump",
3488
3539
  "type": "u8"
@@ -3546,29 +3597,33 @@ export type LiqsolCore = {
3546
3597
  "kind": "struct",
3547
3598
  "fields": [
3548
3599
  {
3549
- "name": "totalPaidOutThisEpoch",
3600
+ "name": "totalYieldPaidOutEpoch",
3550
3601
  "type": "u64"
3551
3602
  },
3552
- {
3553
- "name": "epochPayoutDelta",
3554
- "type": "i64"
3555
- },
3556
3603
  {
3557
3604
  "name": "feesRemainingToDistribute",
3558
3605
  "type": "u64"
3559
3606
  },
3560
3607
  {
3561
- "name": "feePayoutPerPc",
3608
+ "name": "totalFeesDeposited",
3562
3609
  "type": "u64"
3563
3610
  },
3564
3611
  {
3565
- "name": "totalFeesDeposited",
3566
- "type": "u64"
3612
+ "name": "totalCumulativePayoutAlltime",
3613
+ "type": "u128"
3567
3614
  },
3568
3615
  {
3569
- "name": "totalCumulativePayout",
3616
+ "name": "totalCumulativePayoutEpoch",
3570
3617
  "type": "u64"
3571
3618
  },
3619
+ {
3620
+ "name": "timestamp",
3621
+ "type": "i64"
3622
+ },
3623
+ {
3624
+ "name": "epoch",
3625
+ "type": "u16"
3626
+ },
3572
3627
  {
3573
3628
  "name": "bump",
3574
3629
  "type": "u8"
@@ -3623,47 +3678,86 @@ export type LiqsolCore = {
3623
3678
  }
3624
3679
  },
3625
3680
  {
3626
- "name": "processingState",
3681
+ "name": "stakeAllocationState",
3682
+ "docs": [
3683
+ "Stake allocation state tracking for validator stake distribution and unstake orders",
3684
+ "Tracks both staking allocations (VPP-based) and unstake order batching"
3685
+ ],
3627
3686
  "type": {
3628
3687
  "kind": "struct",
3629
3688
  "fields": [
3630
3689
  {
3631
- "name": "validatorsProcessedThisEpoch",
3632
- "type": "u8"
3690
+ "name": "totalActiveVpp",
3691
+ "docs": [
3692
+ "Sum of all VPP scores for Trusted validators in the active list"
3693
+ ],
3694
+ "type": "u64"
3633
3695
  },
3634
3696
  {
3635
- "name": "validatorsMergeProcessedThisEpoch",
3697
+ "name": "bump",
3698
+ "docs": [
3699
+ "Bump seed for PDA"
3700
+ ],
3636
3701
  "type": "u8"
3637
3702
  },
3638
3703
  {
3639
- "name": "distributionInProgress",
3704
+ "name": "initialReserveBalance",
3705
+ "docs": [
3706
+ "Initial reserve balance when distribution cycle started (for batched distribution)"
3707
+ ],
3708
+ "type": "u64"
3709
+ },
3710
+ {
3711
+ "name": "pendingUnstakeAmountThisEpoch",
3712
+ "docs": [
3713
+ "Accumulates unstake requests during the epoch (before allocation starts)",
3714
+ "Resets to 0 when allocation cycle begins"
3715
+ ],
3716
+ "type": "u64"
3717
+ },
3718
+ {
3719
+ "name": "unstakeAllocationInProgress",
3720
+ "docs": [
3721
+ "Whether unstake allocation is currently in progress (batched processing)"
3722
+ ],
3640
3723
  "type": "bool"
3641
3724
  },
3642
3725
  {
3643
- "name": "bump",
3644
- "type": "u8"
3645
- }
3646
- ]
3647
- }
3648
- },
3649
- {
3650
- "name": "role",
3651
- "docs": [
3652
- "Role granted by a bond level"
3653
- ],
3654
- "type": {
3655
- "kind": "struct",
3656
- "fields": [
3726
+ "name": "validatorsProcessedThisUnstakeAllocation",
3727
+ "docs": [
3728
+ "Number of validators processed in the current unstake allocation batch"
3729
+ ],
3730
+ "type": "u16"
3731
+ },
3657
3732
  {
3658
- "name": "roleId",
3733
+ "name": "processingUnstakeAmountThisAllocation",
3734
+ "docs": [
3735
+ "FROZEN amount being allocated across all batches this cycle",
3736
+ "Set at start of allocation, prevents race conditions with new requests"
3737
+ ],
3659
3738
  "type": "u64"
3660
3739
  },
3661
3740
  {
3662
- "name": "executionDelay",
3741
+ "name": "rebalanceInProgress",
3742
+ "docs": [
3743
+ "Whether rebalancing is currently in progress (batched processing)"
3744
+ ],
3745
+ "type": "bool"
3746
+ },
3747
+ {
3748
+ "name": "validatorsProcessedThisRebalance",
3749
+ "docs": [
3750
+ "Number of validators processed in the current rebalance cycle"
3751
+ ],
3752
+ "type": "u16"
3753
+ },
3754
+ {
3755
+ "name": "totalAmountToDistributeThisRebalance",
3663
3756
  "docs": [
3664
- "Delay in seconds before role becomes active (for time-locked operations)"
3757
+ "Total amount to distribute for this rebalance cycle (after subtracting encumbered funds and buffer)",
3758
+ "Saved at the start to ensure consistency across all batches"
3665
3759
  ],
3666
- "type": "u32"
3760
+ "type": "u64"
3667
3761
  }
3668
3762
  ]
3669
3763
  }
@@ -3713,6 +3807,10 @@ export type LiqsolCore = {
3713
3807
  "name": "solSystemPayRate",
3714
3808
  "type": "u64"
3715
3809
  },
3810
+ {
3811
+ "name": "unstakeableStake",
3812
+ "type": "u64"
3813
+ },
3716
3814
  {
3717
3815
  "name": "bump",
3718
3816
  "type": "u8"
@@ -3857,74 +3955,6 @@ export type LiqsolCore = {
3857
3955
  ]
3858
3956
  }
3859
3957
  },
3860
- {
3861
- "name": "transientStakeEntry",
3862
- "type": {
3863
- "kind": "struct",
3864
- "fields": [
3865
- {
3866
- "name": "voteAccount",
3867
- "type": "pubkey"
3868
- },
3869
- {
3870
- "name": "maxResolvedEpochDeactivations",
3871
- "type": "u16"
3872
- },
3873
- {
3874
- "name": "maxResolvedActivatingStake",
3875
- "type": "u16"
3876
- },
3877
- {
3878
- "name": "lastUpdatedEpochActivations",
3879
- "type": "u16"
3880
- },
3881
- {
3882
- "name": "lastUpdatedEpochDeactivationsRebalancing",
3883
- "type": "u16"
3884
- },
3885
- {
3886
- "name": "lastUpdatedEpochDeactivationsWithdrawals",
3887
- "type": "u16"
3888
- },
3889
- {
3890
- "name": "totalDeactivationAmountForEpoch",
3891
- "type": "u64"
3892
- }
3893
- ]
3894
- }
3895
- },
3896
- {
3897
- "name": "transientUpdateParams",
3898
- "type": {
3899
- "kind": "struct",
3900
- "fields": [
3901
- {
3902
- "name": "maxResolvedEpochDeactivations",
3903
- "type": {
3904
- "option": "u16"
3905
- }
3906
- },
3907
- {
3908
- "name": "maxResolvedActivatingStake",
3909
- "type": {
3910
- "option": "u16"
3911
- }
3912
- },
3913
- {
3914
- "name": "lastUpdatedEpochActivations",
3915
- "type": {
3916
- "option": "u16"
3917
- }
3918
- },
3919
- {
3920
- "name": "lastUpdatedEpochDeactivations",
3921
- "type": {
3922
- "option": "u16"
3923
- }
3924
- }
3925
- ]
3926
- }
3927
- },
3928
3958
  {
3929
3959
  "name": "userRecord",
3930
3960
  "type": {
@@ -4002,113 +4032,330 @@ export type LiqsolCore = {
4002
4032
  }
4003
4033
  },
4004
4034
  {
4005
- "name": "validatorInfo",
4035
+ "name": "validatorInfoAccount",
4036
+ "docs": [
4037
+ "Per-validator information account",
4038
+ "Seed: [\"validator_info\", vote_account]"
4039
+ ],
4006
4040
  "type": {
4007
4041
  "kind": "struct",
4008
4042
  "fields": [
4009
4043
  {
4010
4044
  "name": "voteAccount",
4045
+ "docs": [
4046
+ "Vote account this info belongs to"
4047
+ ],
4011
4048
  "type": "pubkey"
4012
4049
  },
4013
4050
  {
4014
4051
  "name": "vpp",
4052
+ "docs": [
4053
+ "Validator Performance Points (0-100 score)"
4054
+ ],
4055
+ "type": "u8"
4056
+ },
4057
+ {
4058
+ "name": "bump",
4059
+ "docs": [
4060
+ "Bump seed for PDA"
4061
+ ],
4015
4062
  "type": "u8"
4016
4063
  },
4017
4064
  {
4018
4065
  "name": "currentActiveStake",
4066
+ "docs": [
4067
+ "Fully active stake earning rewards"
4068
+ ],
4019
4069
  "type": "u64"
4020
4070
  },
4021
4071
  {
4022
4072
  "name": "epochReward",
4073
+ "docs": [
4074
+ "Rewards earned in the last epoch",
4075
+ "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",
4076
+ "no worries"
4077
+ ],
4023
4078
  "type": "u64"
4024
4079
  },
4025
4080
  {
4026
4081
  "name": "transientActiveStake",
4082
+ "docs": [
4083
+ "Stake warming up (activating), not fully active yet"
4084
+ ],
4085
+ "type": "u64"
4086
+ },
4087
+ {
4088
+ "name": "transientDeactivatingStake",
4089
+ "docs": [
4090
+ "Stake cooling down (deactivating), no longer earning rewards"
4091
+ ],
4027
4092
  "type": "u64"
4028
4093
  },
4029
4094
  {
4030
4095
  "name": "lastChainSyncEpoch",
4096
+ "docs": [
4097
+ "When was this entry last updated from the chain?",
4098
+ "This is update in the function: sync_validator_stakes_v2"
4099
+ ],
4100
+ "type": "u16"
4101
+ },
4102
+ {
4103
+ "name": "lastScoreSyncEpoch",
4104
+ "docs": [
4105
+ "When was this VPP score last updated from our Validator Leaderboard program?"
4106
+ ],
4107
+ "type": "u16"
4108
+ },
4109
+ {
4110
+ "name": "lastStateChangeEpoch",
4111
+ "docs": [
4112
+ "When was the validator state last changed? (helps determine cooldowns)"
4113
+ ],
4031
4114
  "type": "u16"
4115
+ },
4116
+ {
4117
+ "name": "amountToStake",
4118
+ "docs": [
4119
+ "The amount of stake to stake"
4120
+ ],
4121
+ "type": "u64"
4122
+ },
4123
+ {
4124
+ "name": "amountToUnstake",
4125
+ "docs": [
4126
+ "The amount of stake to unstake"
4127
+ ],
4128
+ "type": "u64"
4129
+ },
4130
+ {
4131
+ "name": "validatorRepute",
4132
+ "docs": [
4133
+ "State of the validator"
4134
+ ],
4135
+ "type": {
4136
+ "defined": {
4137
+ "name": "validatorReputation"
4138
+ }
4139
+ }
4140
+ },
4141
+ {
4142
+ "name": "validatorState",
4143
+ "type": {
4144
+ "defined": {
4145
+ "name": "validatorState"
4146
+ }
4147
+ }
4148
+ },
4149
+ {
4150
+ "name": "stateTransitionTriggerStakeAmount",
4151
+ "type": "u64"
4032
4152
  }
4033
4153
  ]
4034
4154
  }
4035
4155
  },
4036
4156
  {
4037
- "name": "validatorMetrics",
4157
+ "name": "validatorList",
4158
+ "docs": [
4159
+ "Zero-copy validator list account",
4160
+ "Stores a fixed-capacity array of validator vote account pubkeys"
4161
+ ],
4162
+ "serialization": "bytemuckunsafe",
4163
+ "repr": {
4164
+ "kind": "c"
4165
+ },
4038
4166
  "type": {
4039
4167
  "kind": "struct",
4040
4168
  "fields": [
4041
4169
  {
4042
- "name": "commission",
4043
- "type": "u8"
4170
+ "name": "count",
4171
+ "docs": [
4172
+ "Current number of validators in the list"
4173
+ ],
4174
+ "type": "u32"
4044
4175
  },
4045
4176
  {
4046
- "name": "skipRateBps",
4177
+ "name": "capacity",
4178
+ "docs": [
4179
+ "Maximum capacity of the list"
4180
+ ],
4047
4181
  "type": "u32"
4048
4182
  },
4049
4183
  {
4050
- "name": "isDelinquent",
4051
- "type": "bool"
4184
+ "name": "bump",
4185
+ "docs": [
4186
+ "PDA bump seed"
4187
+ ],
4188
+ "type": "u8"
4052
4189
  },
4053
4190
  {
4054
- "name": "activatedStake",
4055
- "type": "u64"
4191
+ "name": "padding",
4192
+ "docs": [
4193
+ "Padding for alignment"
4194
+ ],
4195
+ "type": {
4196
+ "array": [
4197
+ "u8",
4198
+ 7
4199
+ ]
4200
+ }
4201
+ },
4202
+ {
4203
+ "name": "validators",
4204
+ "docs": [
4205
+ "Fixed array of validator vote account pubkeys",
4206
+ "Using Option to allow for empty slots (None = empty)"
4207
+ ],
4208
+ "type": {
4209
+ "array": [
4210
+ {
4211
+ "defined": {
4212
+ "name": "validatorListEntry"
4213
+ }
4214
+ },
4215
+ 256
4216
+ ]
4217
+ }
4056
4218
  }
4057
4219
  ]
4058
4220
  }
4059
4221
  },
4060
4222
  {
4061
- "name": "validatorRegistry",
4223
+ "name": "validatorListEntry",
4224
+ "serialization": "bytemuckunsafe",
4225
+ "repr": {
4226
+ "kind": "c"
4227
+ },
4062
4228
  "type": {
4063
4229
  "kind": "struct",
4064
4230
  "fields": [
4065
4231
  {
4066
- "name": "authority",
4232
+ "name": "voteAccount",
4233
+ "docs": [
4234
+ "Vote account pubkey (all zeros = empty slot)"
4235
+ ],
4067
4236
  "type": "pubkey"
4237
+ }
4238
+ ]
4239
+ }
4240
+ },
4241
+ {
4242
+ "name": "validatorReputation",
4243
+ "type": {
4244
+ "kind": "enum",
4245
+ "variants": [
4246
+ {
4247
+ "name": "trusted"
4068
4248
  },
4069
4249
  {
4070
- "name": "validators",
4071
- "type": {
4072
- "vec": {
4073
- "defined": {
4074
- "name": "validatorInfo"
4075
- }
4076
- }
4077
- }
4250
+ "name": "blacklisted"
4078
4251
  },
4079
4252
  {
4080
- "name": "lastUpdateEpoch",
4081
- "type": "u64"
4253
+ "name": "underPerforming"
4254
+ }
4255
+ ]
4256
+ }
4257
+ },
4258
+ {
4259
+ "name": "validatorState",
4260
+ "type": {
4261
+ "kind": "enum",
4262
+ "variants": [
4263
+ {
4264
+ "name": "warming"
4082
4265
  },
4083
4266
  {
4084
- "name": "bump",
4085
- "type": "u8"
4267
+ "name": "notDelegated"
4268
+ },
4269
+ {
4270
+ "name": "cooling"
4271
+ },
4272
+ {
4273
+ "name": "warm"
4274
+ }
4275
+ ]
4276
+ }
4277
+ },
4278
+ {
4279
+ "name": "validatorStateChangeReason",
4280
+ "type": {
4281
+ "kind": "enum",
4282
+ "variants": [
4283
+ {
4284
+ "name": "blacklisted"
4285
+ },
4286
+ {
4287
+ "name": "underPerforming"
4086
4288
  }
4087
4289
  ]
4088
4290
  }
4089
4291
  },
4090
4292
  {
4091
- "name": "validatorTransientsTracking",
4293
+ "name": "validatorTransientAccount",
4294
+ "docs": [
4295
+ "Per-validator transient stake tracking account",
4296
+ "Seed: [\"validator_transient\", vote_account]",
4297
+ "",
4298
+ "This account tracks the resolution status of transient stake accounts",
4299
+ "(both activating and deactivating) for a specific validator."
4300
+ ],
4092
4301
  "type": {
4093
4302
  "kind": "struct",
4094
4303
  "fields": [
4095
4304
  {
4096
- "name": "entries",
4305
+ "name": "voteAccount",
4306
+ "docs": [
4307
+ "Vote account this transient tracking belongs to"
4308
+ ],
4309
+ "type": "pubkey"
4310
+ },
4311
+ {
4312
+ "name": "bump",
4313
+ "docs": [
4314
+ "Bump seed for PDA"
4315
+ ],
4316
+ "type": "u8"
4317
+ },
4318
+ {
4319
+ "name": "padding",
4320
+ "docs": [
4321
+ "Padding for alignment"
4322
+ ],
4097
4323
  "type": {
4098
- "vec": {
4099
- "defined": {
4100
- "name": "transientStakeEntry"
4101
- }
4102
- }
4324
+ "array": [
4325
+ "u8",
4326
+ 7
4327
+ ]
4103
4328
  }
4104
4329
  },
4105
4330
  {
4106
- "name": "count",
4331
+ "name": "maxResolvedEpochDeactivations",
4332
+ "docs": [
4333
+ "The epoch number for which we have resolved the deactivating stakes",
4334
+ "(resolved = deactivated and merged into the stake pool reserve)"
4335
+ ],
4107
4336
  "type": "u16"
4108
4337
  },
4109
4338
  {
4110
- "name": "bump",
4111
- "type": "u8"
4339
+ "name": "maxResolvedActivatingStake",
4340
+ "docs": [
4341
+ "The epoch number for which we have resolved the activating stakes",
4342
+ "(resolved = fully activated and merged into the main stake account)"
4343
+ ],
4344
+ "type": "u16"
4345
+ },
4346
+ {
4347
+ "name": "lastUpdatedEpochActivations",
4348
+ "docs": [
4349
+ "When did we last check if there are pending activated transient stakes that need to be merged in"
4350
+ ],
4351
+ "type": "u16"
4352
+ },
4353
+ {
4354
+ "name": "lastUpdatedEpochDeactivations",
4355
+ "docs": [
4356
+ "When did we last check if there were pending deactivated stakes that need to be merged into the reserve pool"
4357
+ ],
4358
+ "type": "u16"
4112
4359
  }
4113
4360
  ]
4114
4361
  }
@@ -4187,13 +4434,6 @@ export type LiqsolCore = {
4187
4434
  ],
4188
4435
  "type": "u64"
4189
4436
  },
4190
- {
4191
- "name": "locked",
4192
- "docs": [
4193
- "True when WireReceipt is locked by an active bond (prevents withdrawals)"
4194
- ],
4195
- "type": "bool"
4196
- },
4197
4437
  {
4198
4438
  "name": "bump",
4199
4439
  "type": "u8"