@arcium-hq/client 0.10.4 → 0.11.1

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.
@@ -8,7 +8,7 @@ export type Arcium = {
8
8
  "address": "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
9
9
  "metadata": {
10
10
  "name": "arcium";
11
- "version": "0.10.4";
11
+ "version": "0.11.1";
12
12
  "spec": "0.1.0";
13
13
  "description": "The Arcium program";
14
14
  };
@@ -299,6 +299,84 @@ export type Arcium = {
299
299
  }
300
300
  ];
301
301
  },
302
+ {
303
+ "name": "bindRecoveryPeerMigration";
304
+ "discriminator": [
305
+ 30,
306
+ 148,
307
+ 4,
308
+ 206,
309
+ 139,
310
+ 2,
311
+ 55,
312
+ 156
313
+ ];
314
+ "accounts": [
315
+ {
316
+ "name": "authority";
317
+ "docs": [
318
+ "The recovery peer's `authority` — same dual role as in `MigrateArxNode`: it authorizes the",
319
+ "bind and is the owner of `primary_stake_account`."
320
+ ];
321
+ "signer": true;
322
+ },
323
+ {
324
+ "name": "recoveryPeerAccount";
325
+ "docs": [
326
+ "Must already be layout-migrated (`migrate_recovery_peer`) so the appended",
327
+ "`primary_stake_account` field exists; otherwise the zero-copy load fails on the short",
328
+ "account. Bundle `migrate_recovery_peer` ahead of this instruction in the same transaction."
329
+ ];
330
+ "writable": true;
331
+ "pda": {
332
+ "seeds": [
333
+ {
334
+ "kind": "const";
335
+ "value": [
336
+ 82,
337
+ 101,
338
+ 99,
339
+ 111,
340
+ 118,
341
+ 101,
342
+ 114,
343
+ 121,
344
+ 80,
345
+ 101,
346
+ 101,
347
+ 114,
348
+ 65,
349
+ 99,
350
+ 99,
351
+ 111,
352
+ 117,
353
+ 110,
354
+ 116
355
+ ];
356
+ },
357
+ {
358
+ "kind": "arg";
359
+ "path": "peerOffset";
360
+ }
361
+ ];
362
+ };
363
+ },
364
+ {
365
+ "name": "primaryStakeAccount";
366
+ "writable": true;
367
+ },
368
+ {
369
+ "name": "arciumStakingProgram";
370
+ "address": "ArcStnN9zZZVB5WjgPhLHjYpY7Gb29mzb96ySsb1kxgq";
371
+ }
372
+ ];
373
+ "args": [
374
+ {
375
+ "name": "peerOffset";
376
+ "type": "u32";
377
+ }
378
+ ];
379
+ },
302
380
  {
303
381
  "name": "bumpEpochCluster";
304
382
  "discriminator": [
@@ -412,6 +490,7 @@ export type Arcium = {
412
490
  },
413
491
  {
414
492
  "name": "mxe";
493
+ "writable": true;
415
494
  "pda": {
416
495
  "seeds": [
417
496
  {
@@ -949,6 +1028,7 @@ export type Arcium = {
949
1028
  },
950
1029
  {
951
1030
  "name": "mxe";
1031
+ "writable": true;
952
1032
  "pda": {
953
1033
  "seeds": [
954
1034
  {
@@ -1278,13 +1358,88 @@ export type Arcium = {
1278
1358
  ];
1279
1359
  "accounts": [
1280
1360
  {
1281
- "name": "nodeAuthority";
1361
+ "name": "stakingPoolSigner";
1362
+ "docs": [
1363
+ "The `arcium_staking::state::StakingPoolAccount` PDA, signing via CPI. Also the destination",
1364
+ "for the settled lamports (so the staking program immediately owns them for later",
1365
+ "proportional distribution). The `seeds`/`bump` constraint verifies it's the canonical pool",
1366
+ "PDA under `ARCIUM_STAKING_ID` (so only the staking program can call this); `Signer`",
1367
+ "enforces it actually signed."
1368
+ ];
1282
1369
  "writable": true;
1283
1370
  "signer": true;
1371
+ "pda": {
1372
+ "seeds": [
1373
+ {
1374
+ "kind": "const";
1375
+ "value": [
1376
+ 83,
1377
+ 116,
1378
+ 97,
1379
+ 107,
1380
+ 105,
1381
+ 110,
1382
+ 103,
1383
+ 80,
1384
+ 111,
1385
+ 111,
1386
+ 108,
1387
+ 65,
1388
+ 99,
1389
+ 99,
1390
+ 111,
1391
+ 117,
1392
+ 110,
1393
+ 116
1394
+ ];
1395
+ }
1396
+ ];
1397
+ "program": {
1398
+ "kind": "const";
1399
+ "value": [
1400
+ 146,
1401
+ 110,
1402
+ 184,
1403
+ 172,
1404
+ 179,
1405
+ 131,
1406
+ 118,
1407
+ 35,
1408
+ 207,
1409
+ 122,
1410
+ 30,
1411
+ 190,
1412
+ 228,
1413
+ 134,
1414
+ 232,
1415
+ 140,
1416
+ 222,
1417
+ 89,
1418
+ 53,
1419
+ 150,
1420
+ 174,
1421
+ 187,
1422
+ 151,
1423
+ 58,
1424
+ 208,
1425
+ 108,
1426
+ 237,
1427
+ 119,
1428
+ 97,
1429
+ 204,
1430
+ 184,
1431
+ 186
1432
+ ];
1433
+ };
1434
+ };
1284
1435
  },
1285
1436
  {
1286
- "name": "recipient";
1287
- "writable": true;
1437
+ "name": "primaryStakeAccount";
1438
+ "docs": [
1439
+ "The `PrimaryStakingAccount` bound to this node. Passed so the handler can verify",
1440
+ "`node.primary_staking_account == primary_stake_account.key()` — i.e. the staking account",
1441
+ "that's about to claim the fees is the one this node was initialized with."
1442
+ ];
1288
1443
  },
1289
1444
  {
1290
1445
  "name": "cluster";
@@ -1364,39 +1519,121 @@ export type Arcium = {
1364
1519
  "type": "u32";
1365
1520
  }
1366
1521
  ];
1522
+ "returns": "u64";
1367
1523
  },
1368
1524
  {
1369
- "name": "closeComputationDefinition";
1370
- "docs": [
1371
- "Closes a computation definition after TTL wait and verifying no active computations."
1372
- ];
1525
+ "name": "claimRecoveryPeerFees";
1373
1526
  "discriminator": [
1374
- 175,
1375
- 224,
1376
- 148,
1377
- 1,
1378
- 107,
1379
- 74,
1380
- 70,
1381
- 110
1527
+ 132,
1528
+ 120,
1529
+ 187,
1530
+ 164,
1531
+ 106,
1532
+ 57,
1533
+ 202,
1534
+ 8
1382
1535
  ];
1383
1536
  "accounts": [
1384
1537
  {
1385
- "name": "signer";
1538
+ "name": "stakingPoolSigner";
1539
+ "docs": [
1540
+ "`arcium_staking::StakingPoolAccount` PDA, signing via CPI and receiving the drained",
1541
+ "lamports. The `seeds`/`bump` constraint verifies it's the canonical pool PDA under",
1542
+ "`ARCIUM_STAKING_ID`; `Signer` enforces `is_signer`."
1543
+ ];
1386
1544
  "writable": true;
1387
1545
  "signer": true;
1546
+ "pda": {
1547
+ "seeds": [
1548
+ {
1549
+ "kind": "const";
1550
+ "value": [
1551
+ 83,
1552
+ 116,
1553
+ 97,
1554
+ 107,
1555
+ 105,
1556
+ 110,
1557
+ 103,
1558
+ 80,
1559
+ 111,
1560
+ 111,
1561
+ 108,
1562
+ 65,
1563
+ 99,
1564
+ 99,
1565
+ 111,
1566
+ 117,
1567
+ 110,
1568
+ 116
1569
+ ];
1570
+ }
1571
+ ];
1572
+ "program": {
1573
+ "kind": "const";
1574
+ "value": [
1575
+ 146,
1576
+ 110,
1577
+ 184,
1578
+ 172,
1579
+ 179,
1580
+ 131,
1581
+ 118,
1582
+ 35,
1583
+ 207,
1584
+ 122,
1585
+ 30,
1586
+ 190,
1587
+ 228,
1588
+ 134,
1589
+ 232,
1590
+ 140,
1591
+ 222,
1592
+ 89,
1593
+ 53,
1594
+ 150,
1595
+ 174,
1596
+ 187,
1597
+ 151,
1598
+ 58,
1599
+ 208,
1600
+ 108,
1601
+ 237,
1602
+ 119,
1603
+ 97,
1604
+ 204,
1605
+ 184,
1606
+ 186
1607
+ ];
1608
+ };
1609
+ };
1388
1610
  },
1389
1611
  {
1390
- "name": "mxe";
1391
- "writable": true;
1612
+ "name": "primaryStakeAccount";
1613
+ "docs": [
1614
+ "`PrimaryStakingAccount` the claiming peer is bound to. Only the key is compared",
1615
+ "against `recovery_peer.primary_stake_account`; the staking program owns the struct."
1616
+ ];
1617
+ },
1618
+ {
1619
+ "name": "recoveryPeer";
1392
1620
  "pda": {
1393
1621
  "seeds": [
1394
1622
  {
1395
1623
  "kind": "const";
1396
1624
  "value": [
1397
- 77,
1398
- 88,
1399
- 69,
1625
+ 82,
1626
+ 101,
1627
+ 99,
1628
+ 111,
1629
+ 118,
1630
+ 101,
1631
+ 114,
1632
+ 121,
1633
+ 80,
1634
+ 101,
1635
+ 101,
1636
+ 114,
1400
1637
  65,
1401
1638
  99,
1402
1639
  99,
@@ -1408,40 +1645,22 @@ export type Arcium = {
1408
1645
  },
1409
1646
  {
1410
1647
  "kind": "arg";
1411
- "path": "mxeProgram";
1648
+ "path": "peerOffset";
1412
1649
  }
1413
1650
  ];
1414
1651
  };
1415
1652
  },
1416
1653
  {
1417
- "name": "compDefAcc";
1654
+ "name": "mxe";
1418
1655
  "writable": true;
1419
1656
  "pda": {
1420
1657
  "seeds": [
1421
1658
  {
1422
1659
  "kind": "const";
1423
1660
  "value": [
1424
- 67,
1425
- 111,
1426
- 109,
1427
- 112,
1428
- 117,
1429
- 116,
1430
- 97,
1431
- 116,
1432
- 105,
1433
- 111,
1434
- 110,
1435
- 68,
1436
- 101,
1437
- 102,
1438
- 105,
1439
- 110,
1440
- 105,
1441
- 116,
1442
- 105,
1443
- 111,
1444
- 110,
1661
+ 77,
1662
+ 88,
1663
+ 69,
1445
1664
  65,
1446
1665
  99,
1447
1666
  99,
@@ -1454,65 +1673,191 @@ export type Arcium = {
1454
1673
  {
1455
1674
  "kind": "arg";
1456
1675
  "path": "mxeProgram";
1457
- },
1458
- {
1459
- "kind": "arg";
1460
- "path": "compOffset";
1461
1676
  }
1462
1677
  ];
1463
1678
  };
1464
1679
  },
1465
1680
  {
1466
- "name": "executingPool";
1681
+ "name": "pool";
1682
+ "writable": true;
1467
1683
  "pda": {
1468
1684
  "seeds": [
1469
1685
  {
1470
1686
  "kind": "const";
1471
1687
  "value": [
1472
- 69,
1473
- 120,
1688
+ 70,
1474
1689
  101,
1475
- 99,
1476
- 112,
1690
+ 101,
1691
+ 80,
1477
1692
  111,
1478
1693
  111,
1479
1694
  108
1480
1695
  ];
1481
- },
1482
- {
1483
- "kind": "arg";
1484
- "path": "clusterOffset";
1485
1696
  }
1486
1697
  ];
1487
1698
  };
1488
- },
1489
- {
1490
- "name": "systemProgram";
1491
- "docs": [
1492
- "System program account."
1493
- ];
1494
- "address": "11111111111111111111111111111111";
1495
1699
  }
1496
1700
  ];
1497
1701
  "args": [
1498
- {
1499
- "name": "compOffset";
1500
- "type": "u32";
1501
- },
1502
1702
  {
1503
1703
  "name": "mxeProgram";
1504
1704
  "type": "pubkey";
1505
1705
  },
1506
1706
  {
1507
- "name": "clusterOffset";
1707
+ "name": "peerOffset";
1508
1708
  "type": "u32";
1509
1709
  }
1510
1710
  ];
1711
+ "returns": "u64";
1511
1712
  },
1512
1713
  {
1513
- "name": "closeComputationDefinitionBuffers";
1714
+ "name": "closeComputationDefinition";
1514
1715
  "docs": [
1515
- "Closes the raw circuit buffer account for a computation definition."
1716
+ "Closes a computation definition after TTL wait and verifying no active computations."
1717
+ ];
1718
+ "discriminator": [
1719
+ 175,
1720
+ 224,
1721
+ 148,
1722
+ 1,
1723
+ 107,
1724
+ 74,
1725
+ 70,
1726
+ 110
1727
+ ];
1728
+ "accounts": [
1729
+ {
1730
+ "name": "signer";
1731
+ "writable": true;
1732
+ "signer": true;
1733
+ },
1734
+ {
1735
+ "name": "mxe";
1736
+ "writable": true;
1737
+ "pda": {
1738
+ "seeds": [
1739
+ {
1740
+ "kind": "const";
1741
+ "value": [
1742
+ 77,
1743
+ 88,
1744
+ 69,
1745
+ 65,
1746
+ 99,
1747
+ 99,
1748
+ 111,
1749
+ 117,
1750
+ 110,
1751
+ 116
1752
+ ];
1753
+ },
1754
+ {
1755
+ "kind": "arg";
1756
+ "path": "mxeProgram";
1757
+ }
1758
+ ];
1759
+ };
1760
+ },
1761
+ {
1762
+ "name": "compDefAcc";
1763
+ "writable": true;
1764
+ "pda": {
1765
+ "seeds": [
1766
+ {
1767
+ "kind": "const";
1768
+ "value": [
1769
+ 67,
1770
+ 111,
1771
+ 109,
1772
+ 112,
1773
+ 117,
1774
+ 116,
1775
+ 97,
1776
+ 116,
1777
+ 105,
1778
+ 111,
1779
+ 110,
1780
+ 68,
1781
+ 101,
1782
+ 102,
1783
+ 105,
1784
+ 110,
1785
+ 105,
1786
+ 116,
1787
+ 105,
1788
+ 111,
1789
+ 110,
1790
+ 65,
1791
+ 99,
1792
+ 99,
1793
+ 111,
1794
+ 117,
1795
+ 110,
1796
+ 116
1797
+ ];
1798
+ },
1799
+ {
1800
+ "kind": "arg";
1801
+ "path": "mxeProgram";
1802
+ },
1803
+ {
1804
+ "kind": "arg";
1805
+ "path": "compOffset";
1806
+ }
1807
+ ];
1808
+ };
1809
+ },
1810
+ {
1811
+ "name": "executingPool";
1812
+ "pda": {
1813
+ "seeds": [
1814
+ {
1815
+ "kind": "const";
1816
+ "value": [
1817
+ 69,
1818
+ 120,
1819
+ 101,
1820
+ 99,
1821
+ 112,
1822
+ 111,
1823
+ 111,
1824
+ 108
1825
+ ];
1826
+ },
1827
+ {
1828
+ "kind": "arg";
1829
+ "path": "clusterOffset";
1830
+ }
1831
+ ];
1832
+ };
1833
+ },
1834
+ {
1835
+ "name": "systemProgram";
1836
+ "docs": [
1837
+ "System program account."
1838
+ ];
1839
+ "address": "11111111111111111111111111111111";
1840
+ }
1841
+ ];
1842
+ "args": [
1843
+ {
1844
+ "name": "compOffset";
1845
+ "type": "u32";
1846
+ },
1847
+ {
1848
+ "name": "mxeProgram";
1849
+ "type": "pubkey";
1850
+ },
1851
+ {
1852
+ "name": "clusterOffset";
1853
+ "type": "u32";
1854
+ }
1855
+ ];
1856
+ },
1857
+ {
1858
+ "name": "closeComputationDefinitionBuffers";
1859
+ "docs": [
1860
+ "Closes the raw circuit buffer account for a computation definition."
1516
1861
  ];
1517
1862
  "discriminator": [
1518
1863
  98,
@@ -2668,7 +3013,16 @@ export type Arcium = {
2668
3013
  "name": "largeExecpool";
2669
3014
  }
2670
3015
  ];
2671
- "args": [];
3016
+ "args": [
3017
+ {
3018
+ "name": "selector";
3019
+ "type": {
3020
+ "defined": {
3021
+ "name": "leaderSelector";
3022
+ };
3023
+ };
3024
+ }
3025
+ ];
2672
3026
  },
2673
3027
  {
2674
3028
  "name": "embiggenRawCircuitAcc";
@@ -4279,6 +4633,31 @@ export type Arcium = {
4279
4633
  ];
4280
4634
  };
4281
4635
  },
4636
+ {
4637
+ "name": "primaryStakeAccount";
4638
+ "docs": [
4639
+ "The `PrimaryStakingAccount` (owned by the `arcium_staking` program) that this node will be",
4640
+ "bound to for the rest of its life. Reward settlement requires this linkage: fees accrued",
4641
+ "under this node can only be drained via a CPI signed by the staking program's pool PDA",
4642
+ "after matching on this key.",
4643
+ "the staking program's responsibility — if the staker binds garbage they lock themselves",
4644
+ "out of rewards, which is their own problem."
4645
+ ];
4646
+ "writable": true;
4647
+ },
4648
+ {
4649
+ "name": "staker";
4650
+ "docs": [
4651
+ "Authority of `primary_stake_account`. Required as a second signer so we can CPI into",
4652
+ "`arcium_staking::bind_primary_stake` and commit the stake to this node. The staking",
4653
+ "program re-derives the stake PDA from this key and rejects the call if it mismatches."
4654
+ ];
4655
+ "signer": true;
4656
+ },
4657
+ {
4658
+ "name": "arciumStakingProgram";
4659
+ "address": "ArcStnN9zZZVB5WjgPhLHjYpY7Gb29mzb96ySsb1kxgq";
4660
+ },
4282
4661
  {
4283
4662
  "name": "systemProgram";
4284
4663
  "address": "11111111111111111111111111111111";
@@ -5145,7 +5524,17 @@ export type Arcium = {
5145
5524
  "address": "11111111111111111111111111111111";
5146
5525
  }
5147
5526
  ];
5148
- "args": [];
5527
+ "args": [
5528
+ {
5529
+ "name": "recoveryPeers";
5530
+ "type": {
5531
+ "array": [
5532
+ "u32",
5533
+ 100
5534
+ ];
5535
+ };
5536
+ }
5537
+ ];
5149
5538
  },
5150
5539
  {
5151
5540
  "name": "initMxePart2";
@@ -5259,7 +5648,7 @@ export type Arcium = {
5259
5648
  ];
5260
5649
  },
5261
5650
  {
5262
- "kind": "arg";
5651
+ "kind": "account";
5263
5652
  "path": "mxeProgram";
5264
5653
  }
5265
5654
  ];
@@ -5560,6 +5949,17 @@ export type Arcium = {
5560
5949
  ];
5561
5950
  };
5562
5951
  },
5952
+ {
5953
+ "name": "instructionsSysvar";
5954
+ "docs": [
5955
+ "Instructions sysvar — used in the handler to verify the **next** instruction in this",
5956
+ "transaction is `arcium_staking::init_mxe_recovery_stake_state` with the same",
5957
+ "`mxe_program`. This mirrors the reverse check on the staking side and is what",
5958
+ "guarantees that every MXE is created alongside its recovery stake state (replacement",
5959
+ "for the CPI we couldn't do because of the 4KB stack limit on `try_accounts`)."
5960
+ ];
5961
+ "address": "Sysvar1nstructions1111111111111111111111111";
5962
+ },
5563
5963
  {
5564
5964
  "name": "systemProgram";
5565
5965
  "address": "11111111111111111111111111111111";
@@ -5570,19 +5970,6 @@ export type Arcium = {
5570
5970
  "name": "clusterOffset";
5571
5971
  "type": "u32";
5572
5972
  },
5573
- {
5574
- "name": "mxeProgram";
5575
- "type": "pubkey";
5576
- },
5577
- {
5578
- "name": "recoveryPeers";
5579
- "type": {
5580
- "array": [
5581
- "u32",
5582
- 100
5583
- ];
5584
- };
5585
- },
5586
5973
  {
5587
5974
  "name": "keygenOffset";
5588
5975
  "type": "u64";
@@ -6039,6 +6426,31 @@ export type Arcium = {
6039
6426
  ];
6040
6427
  };
6041
6428
  },
6429
+ {
6430
+ "name": "primaryStakeAccount";
6431
+ "docs": [
6432
+ "The `PrimaryStakingAccount` (owned by `arcium_staking`) that the recovery peer is",
6433
+ "binding itself to. Mirrors the stake-first requirement on `InitArxNode`: every",
6434
+ "recovery peer has to point at a real staking account so we have someone to slash",
6435
+ "(or dock rewards from) if the peer misbehaves. Full account-structure validation",
6436
+ "is the staking program's job — here we just make sure the account is owned by it.",
6437
+ "point at any primary stake account they have authority over."
6438
+ ];
6439
+ "writable": true;
6440
+ },
6441
+ {
6442
+ "name": "staker";
6443
+ "docs": [
6444
+ "Authority of `primary_stake_account`. Required as a second signer so we can CPI into",
6445
+ "`arcium_staking::bind_primary_stake` and commit the stake to this recovery peer. The",
6446
+ "staking program re-derives the stake PDA from this key and rejects on mismatch."
6447
+ ];
6448
+ "signer": true;
6449
+ },
6450
+ {
6451
+ "name": "arciumStakingProgram";
6452
+ "address": "ArcStnN9zZZVB5WjgPhLHjYpY7Gb29mzb96ySsb1kxgq";
6453
+ },
6042
6454
  {
6043
6455
  "name": "systemProgram";
6044
6456
  "address": "11111111111111111111111111111111";
@@ -6176,49 +6588,30 @@ export type Arcium = {
6176
6588
  ];
6177
6589
  },
6178
6590
  {
6179
- "name": "proposeFee";
6591
+ "name": "migrateArxNode";
6180
6592
  "discriminator": [
6593
+ 26,
6594
+ 223,
6181
6595
  103,
6182
- 204,
6183
- 172,
6184
- 134,
6185
- 248,
6186
- 252,
6187
- 27,
6188
- 170
6596
+ 52,
6597
+ 241,
6598
+ 117,
6599
+ 229,
6600
+ 143
6189
6601
  ];
6190
6602
  "accounts": [
6191
6603
  {
6192
- "name": "nodeAuthority";
6193
- "writable": true;
6604
+ "name": "authority";
6605
+ "docs": [
6606
+ "The node's `config.authority`, which both *authorizes* the bind (only the node's own admin",
6607
+ "may link a stake account to it — otherwise anyone could divert a node's rewards to their",
6608
+ "own stake) and doubles as the `staker` (owner of `primary_stake_account`) for the CPI."
6609
+ ];
6194
6610
  "signer": true;
6195
6611
  },
6196
- {
6197
- "name": "clusterAcc";
6198
- "writable": true;
6199
- "pda": {
6200
- "seeds": [
6201
- {
6202
- "kind": "const";
6203
- "value": [
6204
- 67,
6205
- 108,
6206
- 117,
6207
- 115,
6208
- 116,
6209
- 101,
6210
- 114
6211
- ];
6212
- },
6213
- {
6214
- "kind": "arg";
6215
- "path": "clusterOffset";
6216
- }
6217
- ];
6218
- };
6219
- },
6220
6612
  {
6221
6613
  "name": "arxNodeAcc";
6614
+ "writable": true;
6222
6615
  "pda": {
6223
6616
  "seeds": [
6224
6617
  {
@@ -6241,8 +6634,189 @@ export type Arcium = {
6241
6634
  };
6242
6635
  },
6243
6636
  {
6244
- "name": "clock";
6245
- "writable": true;
6637
+ "name": "primaryStakeAccount";
6638
+ "docs": [
6639
+ "The `PrimaryStakingAccount` (created beforehand via",
6640
+ "`arcium_staking::add_primary_stake_to_legacy_acc`) to bind. Owner-checked here; the staking",
6641
+ "program re-derives `[SEED, authority]` and rejects a mismatch during the bind CPI."
6642
+ ];
6643
+ "writable": true;
6644
+ },
6645
+ {
6646
+ "name": "arciumStakingProgram";
6647
+ "address": "ArcStnN9zZZVB5WjgPhLHjYpY7Gb29mzb96ySsb1kxgq";
6648
+ }
6649
+ ];
6650
+ "args": [
6651
+ {
6652
+ "name": "nodeOffset";
6653
+ "type": "u32";
6654
+ }
6655
+ ];
6656
+ },
6657
+ {
6658
+ "name": "migrateCluster";
6659
+ "docs": [
6660
+ "One-shot layout migrations for the staking upgrade. Each grows one already-deployed",
6661
+ "account to the current (append-only) layout; idempotent and permissionless. See",
6662
+ "`instructions::migration`."
6663
+ ];
6664
+ "discriminator": [
6665
+ 158,
6666
+ 61,
6667
+ 104,
6668
+ 161,
6669
+ 253,
6670
+ 138,
6671
+ 0,
6672
+ 17
6673
+ ];
6674
+ "accounts": [
6675
+ {
6676
+ "name": "payer";
6677
+ "writable": true;
6678
+ "signer": true;
6679
+ },
6680
+ {
6681
+ "name": "cluster";
6682
+ "docs": [
6683
+ "because the new program cannot deserialize the old (short) layout via `Account<Cluster>`."
6684
+ ];
6685
+ "writable": true;
6686
+ },
6687
+ {
6688
+ "name": "systemProgram";
6689
+ "address": "11111111111111111111111111111111";
6690
+ }
6691
+ ];
6692
+ "args": [];
6693
+ },
6694
+ {
6695
+ "name": "migrateMxeAccount";
6696
+ "discriminator": [
6697
+ 96,
6698
+ 162,
6699
+ 117,
6700
+ 100,
6701
+ 242,
6702
+ 143,
6703
+ 16,
6704
+ 80
6705
+ ];
6706
+ "accounts": [
6707
+ {
6708
+ "name": "payer";
6709
+ "writable": true;
6710
+ "signer": true;
6711
+ },
6712
+ {
6713
+ "name": "mxe";
6714
+ "writable": true;
6715
+ },
6716
+ {
6717
+ "name": "systemProgram";
6718
+ "address": "11111111111111111111111111111111";
6719
+ }
6720
+ ];
6721
+ "args": [];
6722
+ },
6723
+ {
6724
+ "name": "migrateRecoveryPeer";
6725
+ "discriminator": [
6726
+ 58,
6727
+ 226,
6728
+ 37,
6729
+ 60,
6730
+ 200,
6731
+ 31,
6732
+ 251,
6733
+ 245
6734
+ ];
6735
+ "accounts": [
6736
+ {
6737
+ "name": "payer";
6738
+ "writable": true;
6739
+ "signer": true;
6740
+ },
6741
+ {
6742
+ "name": "recoveryPeer";
6743
+ "writable": true;
6744
+ },
6745
+ {
6746
+ "name": "systemProgram";
6747
+ "address": "11111111111111111111111111111111";
6748
+ }
6749
+ ];
6750
+ "args": [];
6751
+ },
6752
+ {
6753
+ "name": "proposeFee";
6754
+ "discriminator": [
6755
+ 103,
6756
+ 204,
6757
+ 172,
6758
+ 134,
6759
+ 248,
6760
+ 252,
6761
+ 27,
6762
+ 170
6763
+ ];
6764
+ "accounts": [
6765
+ {
6766
+ "name": "nodeAuthority";
6767
+ "writable": true;
6768
+ "signer": true;
6769
+ },
6770
+ {
6771
+ "name": "clusterAcc";
6772
+ "writable": true;
6773
+ "pda": {
6774
+ "seeds": [
6775
+ {
6776
+ "kind": "const";
6777
+ "value": [
6778
+ 67,
6779
+ 108,
6780
+ 117,
6781
+ 115,
6782
+ 116,
6783
+ 101,
6784
+ 114
6785
+ ];
6786
+ },
6787
+ {
6788
+ "kind": "arg";
6789
+ "path": "clusterOffset";
6790
+ }
6791
+ ];
6792
+ };
6793
+ },
6794
+ {
6795
+ "name": "arxNodeAcc";
6796
+ "pda": {
6797
+ "seeds": [
6798
+ {
6799
+ "kind": "const";
6800
+ "value": [
6801
+ 65,
6802
+ 114,
6803
+ 120,
6804
+ 78,
6805
+ 111,
6806
+ 100,
6807
+ 101
6808
+ ];
6809
+ },
6810
+ {
6811
+ "kind": "arg";
6812
+ "path": "nodeOffset";
6813
+ }
6814
+ ];
6815
+ };
6816
+ },
6817
+ {
6818
+ "name": "clock";
6819
+ "writable": true;
6246
6820
  "pda": {
6247
6821
  "seeds": [
6248
6822
  {
@@ -6347,6 +6921,42 @@ export type Arcium = {
6347
6921
  ];
6348
6922
  };
6349
6923
  },
6924
+ {
6925
+ "name": "mempool";
6926
+ "docs": [
6927
+ "The cluster's mempool account, used only to read its size (from the discriminator) so we",
6928
+ "know the minimum primary stake the invited node must hold.",
6929
+ "`mempool_size_of`."
6930
+ ];
6931
+ "pda": {
6932
+ "seeds": [
6933
+ {
6934
+ "kind": "const";
6935
+ "value": [
6936
+ 77,
6937
+ 101,
6938
+ 109,
6939
+ 112,
6940
+ 111,
6941
+ 111,
6942
+ 108
6943
+ ];
6944
+ },
6945
+ {
6946
+ "kind": "arg";
6947
+ "path": "clusterOffset";
6948
+ }
6949
+ ];
6950
+ };
6951
+ },
6952
+ {
6953
+ "name": "primaryStakeAccount";
6954
+ "docs": [
6955
+ "The `PrimaryStakingAccount` (owned by `arcium_staking`) bound to the invited node. We read",
6956
+ "its `primary_stake` (first field) to enforce the per-mempool-size minimum. Verified to be",
6957
+ "owned by the staking program and to match the node's recorded `primary_staking_account`."
6958
+ ];
6959
+ },
6350
6960
  {
6351
6961
  "name": "clock";
6352
6962
  "writable": true;
@@ -6393,7 +7003,12 @@ export type Arcium = {
6393
7003
  "docs": [
6394
7004
  "Queues a computation.",
6395
7005
  "cu_price_micro: The priority price of a CU, in micro-lamports. Used",
6396
- "to calculate the priority fee and rounded down."
7006
+ "to calculate the priority fee and rounded down.",
7007
+ "callback_cu_limit: The compute unit limit to request for the callback transaction(s)",
7008
+ "via set_compute_unit_limit. 0 means unset (the node uses the default compute budget).",
7009
+ "A non-zero value incurs an additional priority fee of callback_cu_limit * cu_price_micro.",
7010
+ "callback_cu_limit + padding together occupy the 8 bytes that previously held the",
7011
+ "(always-zero) output_delivery_fee: u64, so the instruction layout is unchanged."
6397
7012
  ];
6398
7013
  "discriminator": [
6399
7014
  1,
@@ -6726,8 +7341,12 @@ export type Arcium = {
6726
7341
  "type": "u8";
6727
7342
  },
6728
7343
  {
6729
- "name": "outputDeliveryFee";
6730
- "type": "u64";
7344
+ "name": "callbackCuLimit";
7345
+ "type": "u32";
7346
+ },
7347
+ {
7348
+ "name": "padding";
7349
+ "type": "u32";
6731
7350
  },
6732
7351
  {
6733
7352
  "name": "cuPriceMicro";
@@ -8106,6 +8725,114 @@ export type Arcium = {
8106
8725
  }
8107
8726
  ];
8108
8727
  },
8728
+ {
8729
+ "name": "setLeaderChoice";
8730
+ "discriminator": [
8731
+ 42,
8732
+ 7,
8733
+ 112,
8734
+ 255,
8735
+ 254,
8736
+ 186,
8737
+ 135,
8738
+ 133
8739
+ ];
8740
+ "accounts": [
8741
+ {
8742
+ "name": "nodeAuthority";
8743
+ "writable": true;
8744
+ "signer": true;
8745
+ },
8746
+ {
8747
+ "name": "clusterAcc";
8748
+ "writable": true;
8749
+ "pda": {
8750
+ "seeds": [
8751
+ {
8752
+ "kind": "const";
8753
+ "value": [
8754
+ 67,
8755
+ 108,
8756
+ 117,
8757
+ 115,
8758
+ 116,
8759
+ 101,
8760
+ 114
8761
+ ];
8762
+ },
8763
+ {
8764
+ "kind": "arg";
8765
+ "path": "clusterOffset";
8766
+ }
8767
+ ];
8768
+ };
8769
+ },
8770
+ {
8771
+ "name": "arxNodeAcc";
8772
+ "pda": {
8773
+ "seeds": [
8774
+ {
8775
+ "kind": "const";
8776
+ "value": [
8777
+ 65,
8778
+ 114,
8779
+ 120,
8780
+ 78,
8781
+ 111,
8782
+ 100,
8783
+ 101
8784
+ ];
8785
+ },
8786
+ {
8787
+ "kind": "arg";
8788
+ "path": "nodeOffset";
8789
+ }
8790
+ ];
8791
+ };
8792
+ },
8793
+ {
8794
+ "name": "mempool";
8795
+ "pda": {
8796
+ "seeds": [
8797
+ {
8798
+ "kind": "const";
8799
+ "value": [
8800
+ 77,
8801
+ 101,
8802
+ 109,
8803
+ 112,
8804
+ 111,
8805
+ 111,
8806
+ 108
8807
+ ];
8808
+ },
8809
+ {
8810
+ "kind": "arg";
8811
+ "path": "clusterOffset";
8812
+ }
8813
+ ];
8814
+ };
8815
+ }
8816
+ ];
8817
+ "args": [
8818
+ {
8819
+ "name": "clusterOffset";
8820
+ "type": "u32";
8821
+ },
8822
+ {
8823
+ "name": "nodeOffset";
8824
+ "type": "u32";
8825
+ },
8826
+ {
8827
+ "name": "choice";
8828
+ "type": {
8829
+ "defined": {
8830
+ "name": "leaderChoice";
8831
+ };
8832
+ };
8833
+ }
8834
+ ];
8835
+ },
8109
8836
  {
8110
8837
  "name": "setMxeKeys";
8111
8838
  "discriminator": [
@@ -8316,47 +9043,234 @@ export type Arcium = {
8316
9043
  };
8317
9044
  },
8318
9045
  {
8319
- "name": "recoveryClusterAcc";
9046
+ "name": "recoveryClusterAcc";
9047
+ "writable": true;
9048
+ "pda": {
9049
+ "seeds": [
9050
+ {
9051
+ "kind": "const";
9052
+ "value": [
9053
+ 82,
9054
+ 101,
9055
+ 99,
9056
+ 111,
9057
+ 118,
9058
+ 101,
9059
+ 114,
9060
+ 121,
9061
+ 67,
9062
+ 108,
9063
+ 117,
9064
+ 115,
9065
+ 116,
9066
+ 101,
9067
+ 114,
9068
+ 65,
9069
+ 99,
9070
+ 99,
9071
+ 111,
9072
+ 117,
9073
+ 110,
9074
+ 116
9075
+ ];
9076
+ },
9077
+ {
9078
+ "kind": "arg";
9079
+ "path": "mxeProgram";
9080
+ }
9081
+ ];
9082
+ };
9083
+ },
9084
+ {
9085
+ "name": "clusterAcc";
9086
+ "writable": true;
9087
+ "pda": {
9088
+ "seeds": [
9089
+ {
9090
+ "kind": "const";
9091
+ "value": [
9092
+ 67,
9093
+ 108,
9094
+ 117,
9095
+ 115,
9096
+ 116,
9097
+ 101,
9098
+ 114
9099
+ ];
9100
+ },
9101
+ {
9102
+ "kind": "account";
9103
+ "path": "mxe.cluster";
9104
+ "account": "mxeAccount";
9105
+ }
9106
+ ];
9107
+ };
9108
+ }
9109
+ ];
9110
+ "args": [
9111
+ {
9112
+ "name": "nodeOffset";
9113
+ "type": "u32";
9114
+ },
9115
+ {
9116
+ "name": "mxeProgram";
9117
+ "type": "pubkey";
9118
+ },
9119
+ {
9120
+ "name": "nonce";
9121
+ "type": {
9122
+ "array": [
9123
+ "u8",
9124
+ 16
9125
+ ];
9126
+ };
9127
+ },
9128
+ {
9129
+ "name": "encryptedMxeKeys";
9130
+ "type": {
9131
+ "array": [
9132
+ {
9133
+ "array": [
9134
+ "u8",
9135
+ 32
9136
+ ];
9137
+ },
9138
+ 13
9139
+ ];
9140
+ };
9141
+ },
9142
+ {
9143
+ "name": "keyMaterialHash";
9144
+ "type": {
9145
+ "array": [
9146
+ "u8",
9147
+ 32
9148
+ ];
9149
+ };
9150
+ },
9151
+ {
9152
+ "name": "blsSig";
9153
+ "type": {
9154
+ "array": [
9155
+ "u8",
9156
+ 64
9157
+ ];
9158
+ };
9159
+ }
9160
+ ];
9161
+ },
9162
+ {
9163
+ "name": "setNodeStaking";
9164
+ "discriminator": [
9165
+ 158,
9166
+ 40,
9167
+ 109,
9168
+ 244,
9169
+ 217,
9170
+ 195,
9171
+ 35,
9172
+ 140
9173
+ ];
9174
+ "accounts": [
9175
+ {
9176
+ "name": "stakingPoolSigner";
9177
+ "docs": [
9178
+ "The `arcium_staking::state::StakingPoolAccount` PDA, signing via CPI. The `seeds`/`bump`",
9179
+ "constraint verifies it's the canonical pool PDA under `ARCIUM_STAKING_ID` (so only the",
9180
+ "staking program can call this)"
9181
+ ];
9182
+ "signer": true;
9183
+ "pda": {
9184
+ "seeds": [
9185
+ {
9186
+ "kind": "const";
9187
+ "value": [
9188
+ 83,
9189
+ 116,
9190
+ 97,
9191
+ 107,
9192
+ 105,
9193
+ 110,
9194
+ 103,
9195
+ 80,
9196
+ 111,
9197
+ 111,
9198
+ 108,
9199
+ 65,
9200
+ 99,
9201
+ 99,
9202
+ 111,
9203
+ 117,
9204
+ 110,
9205
+ 116
9206
+ ];
9207
+ }
9208
+ ];
9209
+ "program": {
9210
+ "kind": "const";
9211
+ "value": [
9212
+ 146,
9213
+ 110,
9214
+ 184,
9215
+ 172,
9216
+ 179,
9217
+ 131,
9218
+ 118,
9219
+ 35,
9220
+ 207,
9221
+ 122,
9222
+ 30,
9223
+ 190,
9224
+ 228,
9225
+ 134,
9226
+ 232,
9227
+ 140,
9228
+ 222,
9229
+ 89,
9230
+ 53,
9231
+ 150,
9232
+ 174,
9233
+ 187,
9234
+ 151,
9235
+ 58,
9236
+ 208,
9237
+ 108,
9238
+ 237,
9239
+ 119,
9240
+ 97,
9241
+ 204,
9242
+ 184,
9243
+ 186
9244
+ ];
9245
+ };
9246
+ };
9247
+ },
9248
+ {
9249
+ "name": "cluster";
8320
9250
  "writable": true;
8321
9251
  "pda": {
8322
9252
  "seeds": [
8323
9253
  {
8324
9254
  "kind": "const";
8325
9255
  "value": [
8326
- 82,
8327
- 101,
8328
- 99,
8329
- 111,
8330
- 118,
8331
- 101,
8332
- 114,
8333
- 121,
8334
9256
  67,
8335
9257
  108,
8336
9258
  117,
8337
9259
  115,
8338
9260
  116,
8339
9261
  101,
8340
- 114,
8341
- 65,
8342
- 99,
8343
- 99,
8344
- 111,
8345
- 117,
8346
- 110,
8347
- 116
9262
+ 114
8348
9263
  ];
8349
9264
  },
8350
9265
  {
8351
9266
  "kind": "arg";
8352
- "path": "mxeProgram";
9267
+ "path": "clusterOffset";
8353
9268
  }
8354
9269
  ];
8355
9270
  };
8356
9271
  },
8357
9272
  {
8358
- "name": "clusterAcc";
8359
- "writable": true;
9273
+ "name": "clock";
8360
9274
  "pda": {
8361
9275
  "seeds": [
8362
9276
  {
@@ -8364,17 +9278,17 @@ export type Arcium = {
8364
9278
  "value": [
8365
9279
  67,
8366
9280
  108,
9281
+ 111,
9282
+ 99,
9283
+ 107,
9284
+ 65,
9285
+ 99,
9286
+ 99,
9287
+ 111,
8367
9288
  117,
8368
- 115,
8369
- 116,
8370
- 101,
8371
- 114
9289
+ 110,
9290
+ 116
8372
9291
  ];
8373
- },
8374
- {
8375
- "kind": "account";
8376
- "path": "mxe.cluster";
8377
- "account": "mxeAccount";
8378
9292
  }
8379
9293
  ];
8380
9294
  };
@@ -8382,53 +9296,16 @@ export type Arcium = {
8382
9296
  ];
8383
9297
  "args": [
8384
9298
  {
8385
- "name": "nodeOffset";
9299
+ "name": "clusterOffset";
8386
9300
  "type": "u32";
8387
9301
  },
8388
9302
  {
8389
- "name": "mxeProgram";
8390
- "type": "pubkey";
8391
- },
8392
- {
8393
- "name": "nonce";
8394
- "type": {
8395
- "array": [
8396
- "u8",
8397
- 16
8398
- ];
8399
- };
8400
- },
8401
- {
8402
- "name": "encryptedMxeKeys";
8403
- "type": {
8404
- "array": [
8405
- {
8406
- "array": [
8407
- "u8",
8408
- 32
8409
- ];
8410
- },
8411
- 13
8412
- ];
8413
- };
8414
- },
8415
- {
8416
- "name": "keyMaterialHash";
8417
- "type": {
8418
- "array": [
8419
- "u8",
8420
- 32
8421
- ];
8422
- };
9303
+ "name": "nodeOffset";
9304
+ "type": "u32";
8423
9305
  },
8424
9306
  {
8425
- "name": "blsSig";
8426
- "type": {
8427
- "array": [
8428
- "u8",
8429
- 64
8430
- ];
8431
- };
9307
+ "name": "stake";
9308
+ "type": "u64";
8432
9309
  }
8433
9310
  ];
8434
9311
  },
@@ -9760,6 +10637,11 @@ export type Arcium = {
9760
10637
  "name": "maxParallelismReached";
9761
10638
  "msg": "Max parallelism reached";
9762
10639
  },
10640
+ {
10641
+ "code": 6104;
10642
+ "name": "mempoolAlreadyFullSize";
10643
+ "msg": "Mempool is already at its full allocated size";
10644
+ },
9763
10645
  {
9764
10646
  "code": 6200;
9765
10647
  "name": "invalidComputationOffset";
@@ -9935,6 +10817,16 @@ export type Arcium = {
9935
10817
  "name": "invalidNodeOffset";
9936
10818
  "msg": "Node offset is invalid";
9937
10819
  },
10820
+ {
10821
+ "code": 6411;
10822
+ "name": "invalidStakingPoolSigner";
10823
+ "msg": "The provided staking pool signer is not the staking program's StakingPoolAccount PDA";
10824
+ },
10825
+ {
10826
+ "code": 6412;
10827
+ "name": "invalidStakingAccount";
10828
+ "msg": "The provided primary stake account is not owned by the staking program or does not match the node's bound staking account";
10829
+ },
9938
10830
  {
9939
10831
  "code": 6500;
9940
10832
  "name": "clusterFull";
@@ -9993,7 +10885,7 @@ export type Arcium = {
9993
10885
  {
9994
10886
  "code": 6602;
9995
10887
  "name": "heapFull";
9996
- "msg": "Heap is full";
10888
+ "msg": "Mempool capacity for the current slot reached - retry next slot or reduce queue rate";
9997
10889
  },
9998
10890
  {
9999
10891
  "code": 6603;
@@ -10110,6 +11002,11 @@ export type Arcium = {
10110
11002
  "name": "recoveryInitAlreadyInitialized";
10111
11003
  "msg": "Recovery already initialized";
10112
11004
  },
11005
+ {
11006
+ "code": 6626;
11007
+ "name": "invalidSubsequentIx";
11008
+ "msg": "Subsequent instruction in this transaction is not the expected one";
11009
+ },
10113
11010
  {
10114
11011
  "code": 6700;
10115
11012
  "name": "mxeNotInMigrationState";
@@ -10234,6 +11131,16 @@ export type Arcium = {
10234
11131
  "code": 6725;
10235
11132
  "name": "cannotCloseMxeDuringMigration";
10236
11133
  "msg": "MXE is in migration state, cannot close MXE";
11134
+ },
11135
+ {
11136
+ "code": 6726;
11137
+ "name": "invalidMigrationAccount";
11138
+ "msg": "Account is not a valid target for this migration (wrong owner or discriminator)";
11139
+ },
11140
+ {
11141
+ "code": 6727;
11142
+ "name": "insufficientPrimaryStake";
11143
+ "msg": "Node's primary stake is below the minimum for this cluster's mempool size";
10237
11144
  }
10238
11145
  ];
10239
11146
  "types": [
@@ -11057,7 +11964,48 @@ export type Arcium = {
11057
11964
  },
11058
11965
  {
11059
11966
  "name": "bump";
11967
+ "docs": [
11968
+ "PDA bump. Declared by hand rather than via the `#[bump]` macro (which appends the bump",
11969
+ "as the *final* struct field) so it keeps its original offset right after",
11970
+ "`bls_public_key`. Everything below is appended *after* the bump, which means the byte",
11971
+ "layout of every field up to and including `bump` is identical to the pre-staking",
11972
+ "`Cluster` — old deserializers (including external user programs that read this account)",
11973
+ "decode the original prefix and harmlessly ignore the trailing staking fields."
11974
+ ];
11060
11975
  "type": "u8";
11976
+ },
11977
+ {
11978
+ "name": "currentEpochTotalRewards";
11979
+ "docs": [
11980
+ "Running total of computation rewards accrued during `rewards_epoch`. Drained to zero",
11981
+ "by `claim_node_fees` when nodes settle via `finalize_epoch_rewards`."
11982
+ ];
11983
+ "type": "u64";
11984
+ },
11985
+ {
11986
+ "name": "rewardsEpoch";
11987
+ "docs": [
11988
+ "The epoch that `current_epoch_total_rewards` belongs to. If the clock has advanced",
11989
+ "past this epoch and `current_epoch_total_rewards > 0`, the rewards are stale",
11990
+ "(nodes didn't settle in time) — new accruals are silently skipped until nodes",
11991
+ "finalize, which punishes lazy operators."
11992
+ ];
11993
+ "type": {
11994
+ "defined": {
11995
+ "name": "epoch";
11996
+ };
11997
+ };
11998
+ },
11999
+ {
12000
+ "name": "leaderSelector";
12001
+ "docs": [
12002
+ "The selector for leader."
12003
+ ];
12004
+ "type": {
12005
+ "defined": {
12006
+ "name": "leaderSelector";
12007
+ };
12008
+ };
11061
12009
  }
11062
12010
  ];
11063
12011
  };
@@ -11591,16 +12539,28 @@ export type Arcium = {
11591
12539
  {
11592
12540
  "name": "priorityFee";
11593
12541
  "docs": [
11594
- "The additional fee to enforce priortized execution in the mempool."
12542
+ "The additional fee to enforce prioritized execution in the mempool."
11595
12543
  ];
11596
12544
  "type": "u64";
11597
12545
  },
11598
12546
  {
11599
- "name": "outputDeliveryFee";
12547
+ "name": "callbackCuLimit";
11600
12548
  "docs": [
11601
- "A fee for output delivery fees (i.e. tx fees)."
12549
+ "The compute unit limit to request for the callback transaction(s), i.e. how many CUs the",
12550
+ "node should request via set_compute_unit_limit. 0 means unset, in which case the node uses",
12551
+ "the default compute budget.",
12552
+ "",
12553
+ "This reuses the low 4 bytes of what was previously `output_delivery_fee: u64` (which was",
12554
+ "always 0), so the serialized layout of ExecutionFee is unchanged."
11602
12555
  ];
11603
- "type": "u64";
12556
+ "type": "u32";
12557
+ },
12558
+ {
12559
+ "name": "padding";
12560
+ "docs": [
12561
+ "Padding preserving the original 8-byte (u64) layout of the former `output_delivery_fee`."
12562
+ ];
12563
+ "type": "u32";
11604
12564
  }
11605
12565
  ];
11606
12566
  };
@@ -11966,6 +12926,113 @@ export type Arcium = {
11966
12926
  ];
11967
12927
  };
11968
12928
  },
12929
+ {
12930
+ "name": "leaderChoice";
12931
+ "docs": [
12932
+ "The computation chosen by a node to be executed when the node is leader."
12933
+ ];
12934
+ "type": {
12935
+ "kind": "struct";
12936
+ "fields": [
12937
+ {
12938
+ "name": "offset";
12939
+ "docs": [
12940
+ "Computation_offset of the chosen computation."
12941
+ ];
12942
+ "type": "u64";
12943
+ },
12944
+ {
12945
+ "name": "slotIdx";
12946
+ "docs": [
12947
+ "The index of the max_heap the computation is in inside the MemPool's Circular Buffer.",
12948
+ "This is the physical index, not the logical one."
12949
+ ];
12950
+ "type": "u16";
12951
+ }
12952
+ ];
12953
+ };
12954
+ },
12955
+ {
12956
+ "name": "leaderInfo";
12957
+ "docs": [
12958
+ "The information about a node."
12959
+ ];
12960
+ "type": {
12961
+ "kind": "struct";
12962
+ "fields": [
12963
+ {
12964
+ "name": "stake";
12965
+ "docs": [
12966
+ "The node's stake."
12967
+ ];
12968
+ "type": "u64";
12969
+ },
12970
+ {
12971
+ "name": "count";
12972
+ "docs": [
12973
+ "The number + 1 of times the node has been chosen as leader in this cycle.",
12974
+ "0 if the stake is unset.",
12975
+ "This way works well for performance."
12976
+ ];
12977
+ "type": "u64";
12978
+ },
12979
+ {
12980
+ "name": "lastCounterPlusOne";
12981
+ "docs": [
12982
+ "The last time the node has been chosen as leader."
12983
+ ];
12984
+ "type": "u64";
12985
+ },
12986
+ {
12987
+ "name": "choice";
12988
+ "docs": [
12989
+ "The choice of that node."
12990
+ ];
12991
+ "type": {
12992
+ "defined": {
12993
+ "name": "leaderChoice";
12994
+ };
12995
+ };
12996
+ }
12997
+ ];
12998
+ };
12999
+ },
13000
+ {
13001
+ "name": "leaderSelector";
13002
+ "docs": [
13003
+ "To select a Leader.",
13004
+ "Uses the greatest divisors method: https://en.wikipedia.org/wiki/D%27Hondt_method"
13005
+ ];
13006
+ "type": {
13007
+ "kind": "struct";
13008
+ "fields": [
13009
+ {
13010
+ "name": "stakingEpoch";
13011
+ "docs": [
13012
+ "The last epoch the staking was set."
13013
+ ];
13014
+ "type": {
13015
+ "defined": {
13016
+ "name": "epoch";
13017
+ };
13018
+ };
13019
+ },
13020
+ {
13021
+ "name": "info";
13022
+ "docs": [
13023
+ "The information about each node."
13024
+ ];
13025
+ "type": {
13026
+ "vec": {
13027
+ "defined": {
13028
+ "name": "leaderInfo";
13029
+ };
13030
+ };
13031
+ };
13032
+ }
13033
+ ];
13034
+ };
13035
+ },
11969
13036
  {
11970
13037
  "name": "localCircuitSource";
11971
13038
  "type": {
@@ -12090,7 +13157,40 @@ export type Arcium = {
12090
13157
  },
12091
13158
  {
12092
13159
  "name": "bump";
13160
+ "docs": [
13161
+ "PDA bump. Declared by hand rather than via the `#[bump]` macro (which appends the bump",
13162
+ "as the *final* struct field) so it keeps its original offset right after `status`.",
13163
+ "The recovery-reward fields below are appended *after* the bump, leaving the byte layout",
13164
+ "of every field up to and including `bump` identical to the pre-staking `MXEAccount` —",
13165
+ "old deserializers (including external user programs) decode the original prefix and",
13166
+ "harmlessly ignore the trailing fields."
13167
+ ];
12093
13168
  "type": "u8";
13169
+ },
13170
+ {
13171
+ "name": "currentEpochRecoveryRewards";
13172
+ "docs": [
13173
+ "Running total of recovery-peer rewards accrued during `recovery_rewards_epoch`.",
13174
+ "Fed by the 20% slice of every computation/failure fee processed on this MXE;",
13175
+ "drained to zero by `claim_recovery_peer_fees` when recovery peers settle via",
13176
+ "`arcium_staking::finalize_recovery_epoch_rewards`. Same stale-epoch guard as",
13177
+ "`Cluster::current_epoch_total_rewards` — if peers don't settle before the epoch",
13178
+ "rolls over, new accruals are silently skipped until the pot is drained."
13179
+ ];
13180
+ "type": "u64";
13181
+ },
13182
+ {
13183
+ "name": "recoveryRewardsEpoch";
13184
+ "docs": [
13185
+ "Epoch that `current_epoch_recovery_rewards` is attributed to. Compared against the",
13186
+ "executing cluster's `last_updated_epoch` (the same proxy used by cluster rewards) to",
13187
+ "decide whether a new accrual is for the current round or a stale one."
13188
+ ];
13189
+ "type": {
13190
+ "defined": {
13191
+ "name": "epoch";
13192
+ };
13193
+ };
12094
13194
  }
12095
13195
  ];
12096
13196
  };
@@ -12425,9 +13525,7 @@ export type Arcium = {
12425
13525
  "name": "nodeRef";
12426
13526
  "docs": [
12427
13527
  "A reference to a node in the cluster.",
12428
- "The offset is to derive the Node Account.",
12429
- "The current_total_rewards is the total rewards the node has received so far in the current",
12430
- "epoch."
13528
+ "The offset is to derive the Node Account."
12431
13529
  ];
12432
13530
  "type": {
12433
13531
  "kind": "struct";
@@ -12437,11 +13535,22 @@ export type Arcium = {
12437
13535
  "type": "u32";
12438
13536
  },
12439
13537
  {
12440
- "name": "currentTotalRewards";
13538
+ "name": "padding";
12441
13539
  "docs": [
12442
- "Current total rewards the node has received in the current epoch in lamports."
13540
+ "Reserved padding occupying the 8 bytes that previously held `current_total_rewards: u64`",
13541
+ "(per-node reward tracking, now superseded by the cluster-level",
13542
+ "`current_epoch_total_rewards`). We keep these bytes rather than shrinking `NodeRef`",
13543
+ "because `nodes: Vec<NodeRef>` sits in the *middle* of the `Cluster` struct: removing the",
13544
+ "field would change the encoded element size and desync the borsh decode of every field",
13545
+ "after `nodes` for already-deployed accounts and external deserializers. Do not repurpose",
13546
+ "without a full account migration."
12443
13547
  ];
12444
- "type": "u64";
13548
+ "type": {
13549
+ "array": [
13550
+ "u8",
13551
+ 8
13552
+ ];
13553
+ };
12445
13554
  },
12446
13555
  {
12447
13556
  "name": "vote";
@@ -12879,7 +13988,27 @@ export type Arcium = {
12879
13988
  },
12880
13989
  {
12881
13990
  "name": "bump";
13991
+ "docs": [
13992
+ "PDA bump. Declared by hand rather than via the `#[bump]` macro (which appends the bump",
13993
+ "as the *final* struct field) so it keeps its original offset (76) right after",
13994
+ "`peer_offset`. `primary_stake_account` is appended *after* the bump, leaving the byte",
13995
+ "layout of every field up to and including `bump` identical to the pre-staking",
13996
+ "`RecoveryPeerAccount` — old deserializers decode the original prefix and harmlessly",
13997
+ "ignore the trailing field."
13998
+ ];
12882
13999
  "type": "u8";
14000
+ },
14001
+ {
14002
+ "name": "primaryStakeAccount";
14003
+ "docs": [
14004
+ "The `PrimaryStakingAccount` (owned by `arcium_staking`) this recovery peer is bound",
14005
+ "to. Enforced at init time via an owner check so every recovery peer has skin in the",
14006
+ "game — the same stake-first model we already apply to `ArxNode`. Stored here so",
14007
+ "downstream instructions (and off-chain consumers) can look up the backing stake",
14008
+ "without re-validating the chain of accounts. Appended after `bump` to preserve the",
14009
+ "legacy on-chain layout (see the `bump` field comment)."
14010
+ ];
14011
+ "type": "pubkey";
12883
14012
  }
12884
14013
  ];
12885
14014
  };