@wireio/stake 2.7.3 → 2.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/stake.m.js CHANGED
@@ -717,6 +717,10 @@ var instructions$7 = [
717
717
  name: "epoch_state",
718
718
  writable: true
719
719
  },
720
+ {
721
+ name: "withdraw_global",
722
+ writable: true
723
+ },
720
724
  {
721
725
  name: "active_list"
722
726
  },
@@ -1910,6 +1914,7 @@ var instructions$7 = [
1910
1914
  },
1911
1915
  {
1912
1916
  name: "cranky",
1917
+ writable: true,
1913
1918
  signer: true
1914
1919
  },
1915
1920
  {
@@ -1981,6 +1986,78 @@ var instructions$7 = [
1981
1986
  }
1982
1987
  ]
1983
1988
  },
1989
+ {
1990
+ name: "migrate_batch_orchestrator",
1991
+ docs: [
1992
+ "One-shot migration: realloc BatchOrchestrator for the four per-op",
1993
+ "`*_started_epoch: u16` fields + restored `_reserved` buffer.",
1994
+ "Idempotent, ungated. `payer` covers the rent delta."
1995
+ ],
1996
+ discriminator: [
1997
+ 130,
1998
+ 240,
1999
+ 40,
2000
+ 175,
2001
+ 53,
2002
+ 209,
2003
+ 232,
2004
+ 11
2005
+ ],
2006
+ accounts: [
2007
+ {
2008
+ name: "payer",
2009
+ writable: true,
2010
+ signer: true
2011
+ },
2012
+ {
2013
+ name: "batch_orchestrator",
2014
+ docs: [
2015
+ "is the only authorization needed; the op is idempotent."
2016
+ ],
2017
+ writable: true
2018
+ },
2019
+ {
2020
+ name: "system_program"
2021
+ }
2022
+ ],
2023
+ args: [
2024
+ ]
2025
+ },
2026
+ {
2027
+ name: "migrate_stake_metrics",
2028
+ docs: [
2029
+ "One-shot migration: realloc StakeMetrics for new fields (mev_reward + _reserved)"
2030
+ ],
2031
+ discriminator: [
2032
+ 183,
2033
+ 154,
2034
+ 168,
2035
+ 221,
2036
+ 78,
2037
+ 179,
2038
+ 112,
2039
+ 165
2040
+ ],
2041
+ accounts: [
2042
+ {
2043
+ name: "global_config"
2044
+ },
2045
+ {
2046
+ name: "admin",
2047
+ writable: true,
2048
+ signer: true
2049
+ },
2050
+ {
2051
+ name: "stake_metrics",
2052
+ writable: true
2053
+ },
2054
+ {
2055
+ name: "system_program"
2056
+ }
2057
+ ],
2058
+ args: [
2059
+ ]
2060
+ },
1984
2061
  {
1985
2062
  name: "migrate_user_record",
1986
2063
  discriminator: [
@@ -2019,6 +2096,38 @@ var instructions$7 = [
2019
2096
  args: [
2020
2097
  ]
2021
2098
  },
2099
+ {
2100
+ name: "migrate_validator_info_batch",
2101
+ docs: [
2102
+ "One-shot migration: realloc ValidatorInfoAccounts for new fields (mev + _reserved)",
2103
+ "Pass validator_info PDAs via remaining_accounts"
2104
+ ],
2105
+ discriminator: [
2106
+ 250,
2107
+ 77,
2108
+ 53,
2109
+ 116,
2110
+ 38,
2111
+ 22,
2112
+ 12,
2113
+ 100
2114
+ ],
2115
+ accounts: [
2116
+ {
2117
+ name: "global_config"
2118
+ },
2119
+ {
2120
+ name: "admin",
2121
+ writable: true,
2122
+ signer: true
2123
+ },
2124
+ {
2125
+ name: "system_program"
2126
+ }
2127
+ ],
2128
+ args: [
2129
+ ]
2130
+ },
2022
2131
  {
2023
2132
  name: "process_graveyard_validators_batch",
2024
2133
  docs: [
@@ -3491,6 +3600,20 @@ var instructions$7 = [
3491
3600
  },
3492
3601
  {
3493
3602
  name: "stake_history"
3603
+ },
3604
+ {
3605
+ name: "vault",
3606
+ writable: true
3607
+ },
3608
+ {
3609
+ name: "reserve_pool",
3610
+ writable: true
3611
+ },
3612
+ {
3613
+ name: "stake_program"
3614
+ },
3615
+ {
3616
+ name: "clock"
3494
3617
  }
3495
3618
  ],
3496
3619
  args: [
@@ -4564,12 +4687,61 @@ var types$9 = [
4564
4687
  ],
4565
4688
  type: "u64"
4566
4689
  },
4690
+ {
4691
+ name: "mev_claims_next_index",
4692
+ docs: [
4693
+ "Next active_list index to process for MEV tip claims"
4694
+ ],
4695
+ type: "u16"
4696
+ },
4697
+ {
4698
+ name: "temp_total_mev_reward",
4699
+ docs: [
4700
+ "Temporary accumulator for MEV rewards across batches"
4701
+ ],
4702
+ type: "u64"
4703
+ },
4704
+ {
4705
+ name: "temp_total_outstanding_amount_to_unstake",
4706
+ docs: [
4707
+ "Temporary accumulator for sum of validators' amount_to_unstake across batches"
4708
+ ],
4709
+ type: "u64"
4710
+ },
4711
+ {
4712
+ name: "validators_sync_started_epoch",
4713
+ docs: [
4714
+ "Owns validators_sync_processed_this_epoch."
4715
+ ],
4716
+ type: "u16"
4717
+ },
4718
+ {
4719
+ name: "leaderboard_scores_started_epoch",
4720
+ docs: [
4721
+ "Owns leaderboard_scores_next_index."
4722
+ ],
4723
+ type: "u16"
4724
+ },
4725
+ {
4726
+ name: "graveyard_cleanup_started_epoch",
4727
+ docs: [
4728
+ "Owns graveyard_cleanup_next_index."
4729
+ ],
4730
+ type: "u16"
4731
+ },
4732
+ {
4733
+ name: "addition_started_epoch",
4734
+ docs: [
4735
+ "Owns addition_next_rank + addition_target_rank."
4736
+ ],
4737
+ type: "u16"
4738
+ },
4567
4739
  {
4568
4740
  name: "_reserved",
4569
4741
  type: {
4570
4742
  array: [
4571
4743
  "u8",
4572
- 23
4744
+ 64
4573
4745
  ]
4574
4746
  }
4575
4747
  }
@@ -4913,7 +5085,9 @@ var types$9 = [
4913
5085
  {
4914
5086
  name: "transient_threshold",
4915
5087
  docs: [
4916
- "Minimum transient stake to include in effective stake calculations"
5088
+ "DEPRECATED (WNS-33): no longer read. Kept for account layout stability.",
5089
+ "Rebalance now counts all transient stake on both sides of the delta equation,",
5090
+ "so the per-validator threshold gate was removed."
4917
5091
  ],
4918
5092
  type: "u64"
4919
5093
  },
@@ -5059,6 +5233,15 @@ var types$9 = [
5059
5233
  1
5060
5234
  ]
5061
5235
  }
5236
+ },
5237
+ {
5238
+ name: "_reserved_trailing",
5239
+ type: {
5240
+ array: [
5241
+ "u8",
5242
+ 32
5243
+ ]
5244
+ }
5062
5245
  }
5063
5246
  ]
5064
5247
  }
@@ -5279,16 +5462,32 @@ var types$9 = [
5279
5462
  type: "u8"
5280
5463
  },
5281
5464
  {
5282
- name: "_padding",
5465
+ name: "_align",
5283
5466
  docs: [
5284
- "Reserved space for future upgrades"
5467
+ "Alignment byte (keeps u16 fields below properly aligned)"
5285
5468
  ],
5286
- type: {
5287
- array: [
5288
- "u8",
5289
- 5
5290
- ]
5291
- }
5469
+ type: "u8"
5470
+ },
5471
+ {
5472
+ name: "crank_next_index",
5473
+ docs: [
5474
+ "Next validator index to process during crank_update_scores"
5475
+ ],
5476
+ type: "u16"
5477
+ },
5478
+ {
5479
+ name: "last_crank_epoch",
5480
+ docs: [
5481
+ "Last epoch when crank_update_scores completed all validators"
5482
+ ],
5483
+ type: "u16"
5484
+ },
5485
+ {
5486
+ name: "crank_started_epoch",
5487
+ docs: [
5488
+ "Epoch when start_crank was called (signals an active crank cycle)"
5489
+ ],
5490
+ type: "u16"
5292
5491
  }
5293
5492
  ]
5294
5493
  }
@@ -5948,9 +6147,13 @@ var types$9 = [
5948
6147
  type: "bool"
5949
6148
  },
5950
6149
  {
5951
- name: "addition_next_rank",
6150
+ name: "unstake_allocation_started_epoch",
5952
6151
  docs: [
5953
- "DEPRECATED see BatchOrchestrator.addition_next_rank. Always 0."
6152
+ "Epoch in which the current unstake allocation cycle was started.",
6153
+ "Used to detect stale cycles that span epoch boundaries — if the epoch",
6154
+ "has advanced, the cycle is reset and restarted to avoid resuming",
6155
+ "against a mutated validator active list.",
6156
+ "(Repurposed from the deprecated addition_next_rank field — verified 0 on the mainnet.)"
5954
6157
  ],
5955
6158
  type: "u16"
5956
6159
  },
@@ -6051,6 +6254,34 @@ var types$9 = [
6051
6254
  {
6052
6255
  name: "bump",
6053
6256
  type: "u8"
6257
+ },
6258
+ {
6259
+ name: "mev_reward",
6260
+ docs: [
6261
+ "MEV rewards swept from main stake accounts this epoch (accumulated, reset after pay cycle)"
6262
+ ],
6263
+ type: "u64"
6264
+ },
6265
+ {
6266
+ name: "total_outstanding_amount_to_unstake",
6267
+ docs: [
6268
+ "WNS-16: total amount_to_unstake across all validators at last metrics refresh.",
6269
+ "Represents allocated-but-not-yet-deactivated unstake obligations.",
6270
+ "Subtracted from unstakeable_stake in admission control to prevent double-promising."
6271
+ ],
6272
+ type: "u64"
6273
+ },
6274
+ {
6275
+ name: "_reserved",
6276
+ docs: [
6277
+ "Reserved space for future use"
6278
+ ],
6279
+ type: {
6280
+ array: [
6281
+ "u8",
6282
+ 24
6283
+ ]
6284
+ }
6054
6285
  }
6055
6286
  ]
6056
6287
  }
@@ -6377,6 +6608,25 @@ var types$9 = [
6377
6608
  {
6378
6609
  name: "state_transition_trigger_stake_amount",
6379
6610
  type: "u64"
6611
+ },
6612
+ {
6613
+ name: "mev_earned",
6614
+ docs: [
6615
+ "MEV reward swept for this validator in the current epoch"
6616
+ ],
6617
+ type: "u64"
6618
+ },
6619
+ {
6620
+ name: "_reserved",
6621
+ docs: [
6622
+ "Reserved space for future use"
6623
+ ],
6624
+ type: {
6625
+ array: [
6626
+ "u8",
6627
+ 24
6628
+ ]
6629
+ }
6380
6630
  }
6381
6631
  ]
6382
6632
  }
@@ -6974,6 +7224,27 @@ var metadata$5 = {
6974
7224
  description: "Created with Anchor"
6975
7225
  };
6976
7226
  var instructions$5 = [
7227
+ {
7228
+ name: "crank_update_scores",
7229
+ discriminator: [
7230
+ 163,
7231
+ 247,
7232
+ 66,
7233
+ 109,
7234
+ 22,
7235
+ 206,
7236
+ 61,
7237
+ 95
7238
+ ],
7239
+ accounts: [
7240
+ {
7241
+ name: "leaderboard_state",
7242
+ writable: true
7243
+ }
7244
+ ],
7245
+ args: [
7246
+ ]
7247
+ },
6977
7248
  {
6978
7249
  name: "initialize_leaderboard",
6979
7250
  discriminator: [
@@ -7004,27 +7275,27 @@ var instructions$5 = [
7004
7275
  ]
7005
7276
  },
7006
7277
  {
7007
- name: "realloc_leaderboard",
7278
+ name: "migrate_v1_4",
7008
7279
  discriminator: [
7009
- 2,
7010
- 70,
7011
- 106,
7012
- 94,
7013
- 81,
7014
- 225,
7015
- 113,
7016
- 152
7280
+ 41,
7281
+ 152,
7282
+ 69,
7283
+ 58,
7284
+ 215,
7285
+ 119,
7286
+ 255,
7287
+ 189
7017
7288
  ],
7018
7289
  accounts: [
7019
7290
  {
7020
- name: "leaderboard_state",
7021
- writable: true
7022
- },
7023
- {
7024
- name: "payer",
7291
+ name: "authority",
7025
7292
  writable: true,
7026
7293
  signer: true
7027
7294
  },
7295
+ {
7296
+ name: "leaderboard_state",
7297
+ writable: true
7298
+ },
7028
7299
  {
7029
7300
  name: "system_program"
7030
7301
  }
@@ -7033,29 +7304,26 @@ var instructions$5 = [
7033
7304
  ]
7034
7305
  },
7035
7306
  {
7036
- name: "update_commission",
7307
+ name: "realloc_leaderboard",
7037
7308
  discriminator: [
7038
7309
  2,
7039
- 202,
7040
- 72,
7041
- 156,
7042
- 19,
7043
- 253,
7044
- 91,
7045
- 174
7310
+ 70,
7311
+ 106,
7312
+ 94,
7313
+ 81,
7314
+ 225,
7315
+ 113,
7316
+ 152
7046
7317
  ],
7047
7318
  accounts: [
7048
7319
  {
7049
- name: "registrant",
7050
- writable: true,
7051
- signer: true
7052
- },
7053
- {
7054
- name: "vote_account"
7320
+ name: "leaderboard_state",
7321
+ writable: true
7055
7322
  },
7056
7323
  {
7057
- name: "validator_record",
7058
- writable: true
7324
+ name: "payer",
7325
+ writable: true,
7326
+ signer: true
7059
7327
  },
7060
7328
  {
7061
7329
  name: "system_program"
@@ -7065,28 +7333,25 @@ var instructions$5 = [
7065
7333
  ]
7066
7334
  },
7067
7335
  {
7068
- name: "update_mev_commission",
7336
+ name: "start_crank",
7069
7337
  discriminator: [
7070
- 107,
7071
- 65,
7072
- 238,
7073
- 108,
7074
- 183,
7075
- 47,
7076
- 236,
7077
- 203
7338
+ 31,
7339
+ 83,
7340
+ 66,
7341
+ 14,
7342
+ 249,
7343
+ 131,
7344
+ 221,
7345
+ 67
7078
7346
  ],
7079
7347
  accounts: [
7080
7348
  {
7081
- name: "signer",
7349
+ name: "cranker",
7082
7350
  signer: true
7083
7351
  },
7084
7352
  {
7085
- name: "validator_record",
7353
+ name: "leaderboard_state",
7086
7354
  writable: true
7087
- },
7088
- {
7089
- name: "tip_distribution_account"
7090
7355
  }
7091
7356
  ],
7092
7357
  args: [
@@ -7111,7 +7376,10 @@ var instructions$5 = [
7111
7376
  signer: true
7112
7377
  },
7113
7378
  {
7114
- name: "vote_account"
7379
+ name: "vote_account",
7380
+ docs: [
7381
+ "If no longer owned by the vote program (closed/reclaimed), score is set to 0."
7382
+ ]
7115
7383
  },
7116
7384
  {
7117
7385
  name: "validator_record",
@@ -7126,14 +7394,6 @@ var instructions$5 = [
7126
7394
  }
7127
7395
  ],
7128
7396
  args: [
7129
- {
7130
- name: "vpp",
7131
- type: "u8"
7132
- },
7133
- {
7134
- name: "proposed_rank",
7135
- type: "u16"
7136
- }
7137
7397
  ]
7138
7398
  }
7139
7399
  ];
@@ -7381,16 +7641,32 @@ var types$7 = [
7381
7641
  type: "u8"
7382
7642
  },
7383
7643
  {
7384
- name: "_padding",
7644
+ name: "_align",
7385
7645
  docs: [
7386
- "Reserved space for future upgrades"
7646
+ "Alignment byte (keeps u16 fields below properly aligned)"
7387
7647
  ],
7388
- type: {
7389
- array: [
7390
- "u8",
7391
- 5
7392
- ]
7393
- }
7648
+ type: "u8"
7649
+ },
7650
+ {
7651
+ name: "crank_next_index",
7652
+ docs: [
7653
+ "Next validator index to process during crank_update_scores"
7654
+ ],
7655
+ type: "u16"
7656
+ },
7657
+ {
7658
+ name: "last_crank_epoch",
7659
+ docs: [
7660
+ "Last epoch when crank_update_scores completed all validators"
7661
+ ],
7662
+ type: "u16"
7663
+ },
7664
+ {
7665
+ name: "crank_started_epoch",
7666
+ docs: [
7667
+ "Epoch when start_crank was called (signals an active crank cycle)"
7668
+ ],
7669
+ type: "u16"
7394
7670
  }
7395
7671
  ]
7396
7672
  }
@@ -7501,15 +7777,13 @@ var types$7 = [
7501
7777
  {
7502
7778
  name: "mev_commission",
7503
7779
  docs: [
7504
- "Current MEV commission in basis points"
7780
+ "DEPRECATED: MEV commission fields are no longer written or read by any instruction.",
7781
+ "Retained to preserve account layout (removing would require migration)."
7505
7782
  ],
7506
7783
  type: "u16"
7507
7784
  },
7508
7785
  {
7509
7786
  name: "mev_commission_history",
7510
- docs: [
7511
- "Circular buffer of past 10 MEV commission values"
7512
- ],
7513
7787
  type: {
7514
7788
  array: [
7515
7789
  "u16",
@@ -7519,16 +7793,10 @@ var types$7 = [
7519
7793
  },
7520
7794
  {
7521
7795
  name: "mev_commission_index",
7522
- docs: [
7523
- "Current index in mev_commission_history circular buffer (0-9)"
7524
- ],
7525
7796
  type: "u8"
7526
7797
  },
7527
7798
  {
7528
7799
  name: "last_mev_commission_update",
7529
- docs: [
7530
- "Last epoch when MEV commission was updated"
7531
- ],
7532
7800
  type: "u64"
7533
7801
  },
7534
7802
  {
@@ -7879,7 +8147,9 @@ var types$6 = [
7879
8147
  {
7880
8148
  name: "transient_threshold",
7881
8149
  docs: [
7882
- "Minimum transient stake to include in effective stake calculations"
8150
+ "DEPRECATED (WNS-33): no longer read. Kept for account layout stability.",
8151
+ "Rebalance now counts all transient stake on both sides of the delta equation,",
8152
+ "so the per-validator threshold gate was removed."
7883
8153
  ],
7884
8154
  type: "u64"
7885
8155
  },
@@ -8025,6 +8295,15 @@ var types$6 = [
8025
8295
  1
8026
8296
  ]
8027
8297
  }
8298
+ },
8299
+ {
8300
+ name: "_reserved_trailing",
8301
+ type: {
8302
+ array: [
8303
+ "u8",
8304
+ 32
8305
+ ]
8306
+ }
8028
8307
  }
8029
8308
  ]
8030
8309
  }