@arcium-hq/client 0.9.6 → 0.10.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.
package/build/index.cjs CHANGED
@@ -4,7 +4,7 @@ var crypto = require('crypto');
4
4
  var ed25519 = require('@noble/curves/ed25519');
5
5
  var sha3 = require('@noble/hashes/sha3');
6
6
  var modular = require('@noble/curves/abstract/modular');
7
- var anchor = require('@coral-xyz/anchor');
7
+ var anchor = require('@anchor-lang/core');
8
8
  var utils = require('@noble/hashes/utils');
9
9
  var edwards = require('@noble/curves/abstract/edwards');
10
10
  var fs = require('fs');
@@ -1884,7 +1884,7 @@ function createPacker(fields, typeName = 'Packer') {
1884
1884
  var address = "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
1885
1885
  var metadata = {
1886
1886
  name: "arcium",
1887
- version: "0.9.6",
1887
+ version: "0.10.0",
1888
1888
  spec: "0.1.0",
1889
1889
  description: "The Arcium program"
1890
1890
  };
@@ -2331,7 +2331,7 @@ var instructions = [
2331
2331
  },
2332
2332
  {
2333
2333
  kind: "account",
2334
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2334
+ path: "mxe.cluster",
2335
2335
  account: "MXEAccount"
2336
2336
  }
2337
2337
  ]
@@ -2367,7 +2367,7 @@ var instructions = [
2367
2367
  },
2368
2368
  {
2369
2369
  kind: "account",
2370
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2370
+ path: "mxe.cluster",
2371
2371
  account: "MXEAccount"
2372
2372
  },
2373
2373
  {
@@ -2396,7 +2396,7 @@ var instructions = [
2396
2396
  },
2397
2397
  {
2398
2398
  kind: "account",
2399
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2399
+ path: "mxe.cluster",
2400
2400
  account: "MXEAccount"
2401
2401
  }
2402
2402
  ]
@@ -2422,7 +2422,7 @@ var instructions = [
2422
2422
  },
2423
2423
  {
2424
2424
  kind: "account",
2425
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2425
+ path: "mxe.cluster",
2426
2426
  account: "MXEAccount"
2427
2427
  }
2428
2428
  ]
@@ -2752,7 +2752,7 @@ var instructions = [
2752
2752
  },
2753
2753
  {
2754
2754
  kind: "account",
2755
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2755
+ path: "mxe.cluster",
2756
2756
  account: "MXEAccount"
2757
2757
  }
2758
2758
  ]
@@ -2777,7 +2777,7 @@ var instructions = [
2777
2777
  },
2778
2778
  {
2779
2779
  kind: "account",
2780
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2780
+ path: "mxe.cluster",
2781
2781
  account: "MXEAccount"
2782
2782
  }
2783
2783
  ]
@@ -2813,7 +2813,7 @@ var instructions = [
2813
2813
  },
2814
2814
  {
2815
2815
  kind: "account",
2816
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2816
+ path: "mxe.cluster",
2817
2817
  account: "MXEAccount"
2818
2818
  },
2819
2819
  {
@@ -2868,7 +2868,7 @@ var instructions = [
2868
2868
  },
2869
2869
  {
2870
2870
  kind: "account",
2871
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2871
+ path: "mxe.cluster",
2872
2872
  account: "MXEAccount"
2873
2873
  }
2874
2874
  ]
@@ -2986,7 +2986,7 @@ var instructions = [
2986
2986
  },
2987
2987
  {
2988
2988
  kind: "account",
2989
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
2989
+ path: "mxe.cluster",
2990
2990
  account: "MXEAccount"
2991
2991
  },
2992
2992
  {
@@ -3015,7 +3015,7 @@ var instructions = [
3015
3015
  },
3016
3016
  {
3017
3017
  kind: "account",
3018
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
3018
+ path: "mxe.cluster",
3019
3019
  account: "MXEAccount"
3020
3020
  }
3021
3021
  ]
@@ -3242,28 +3242,29 @@ var instructions = [
3242
3242
  ]
3243
3243
  },
3244
3244
  {
3245
- name: "close_key_recovery",
3245
+ name: "close_computation_definition",
3246
3246
  docs: [
3247
- "Closes all recovery-related accounts."
3247
+ "Closes a computation definition after TTL wait and verifying no active computations."
3248
3248
  ],
3249
3249
  discriminator: [
3250
- 249,
3251
- 127,
3252
- 56,
3253
- 116,
3254
- 125,
3255
- 136,
3256
- 84,
3257
- 184
3250
+ 175,
3251
+ 224,
3252
+ 148,
3253
+ 1,
3254
+ 107,
3255
+ 74,
3256
+ 70,
3257
+ 110
3258
3258
  ],
3259
3259
  accounts: [
3260
3260
  {
3261
- name: "authority",
3261
+ name: "signer",
3262
3262
  writable: true,
3263
3263
  signer: true
3264
3264
  },
3265
3265
  {
3266
- name: "original_mxe",
3266
+ name: "mxe",
3267
+ writable: true,
3267
3268
  pda: {
3268
3269
  seeds: [
3269
3270
  {
@@ -3283,22 +3284,40 @@ var instructions = [
3283
3284
  },
3284
3285
  {
3285
3286
  kind: "arg",
3286
- path: "_original_mxe_program"
3287
+ path: "_mxe_program"
3287
3288
  }
3288
3289
  ]
3289
3290
  }
3290
3291
  },
3291
3292
  {
3292
- name: "backup_mxe",
3293
+ name: "comp_def_acc",
3293
3294
  writable: true,
3294
3295
  pda: {
3295
3296
  seeds: [
3296
3297
  {
3297
3298
  kind: "const",
3298
3299
  value: [
3299
- 77,
3300
- 88,
3301
- 69,
3300
+ 67,
3301
+ 111,
3302
+ 109,
3303
+ 112,
3304
+ 117,
3305
+ 116,
3306
+ 97,
3307
+ 116,
3308
+ 105,
3309
+ 111,
3310
+ 110,
3311
+ 68,
3312
+ 101,
3313
+ 102,
3314
+ 105,
3315
+ 110,
3316
+ 105,
3317
+ 116,
3318
+ 105,
3319
+ 111,
3320
+ 110,
3302
3321
  65,
3303
3322
  99,
3304
3323
  99,
@@ -3310,30 +3329,93 @@ var instructions = [
3310
3329
  },
3311
3330
  {
3312
3331
  kind: "arg",
3313
- path: "_backup_mxe_program"
3332
+ path: "_mxe_program"
3333
+ },
3334
+ {
3335
+ kind: "arg",
3336
+ path: "comp_offset"
3314
3337
  }
3315
3338
  ]
3316
3339
  }
3317
3340
  },
3318
3341
  {
3319
- name: "mxe_recovery_account",
3320
- writable: true,
3342
+ name: "executing_pool",
3321
3343
  pda: {
3322
3344
  seeds: [
3323
3345
  {
3324
3346
  kind: "const",
3325
3347
  value: [
3326
- 77,
3348
+ 69,
3327
3349
  120,
3328
3350
  101,
3329
- 82,
3330
- 101,
3331
3351
  99,
3352
+ 112,
3332
3353
  111,
3333
- 118,
3334
- 101,
3335
- 114,
3336
- 121,
3354
+ 111,
3355
+ 108
3356
+ ]
3357
+ },
3358
+ {
3359
+ kind: "arg",
3360
+ path: "_cluster_offset"
3361
+ }
3362
+ ]
3363
+ }
3364
+ },
3365
+ {
3366
+ name: "system_program",
3367
+ docs: [
3368
+ "System program account."
3369
+ ],
3370
+ address: "11111111111111111111111111111111"
3371
+ }
3372
+ ],
3373
+ args: [
3374
+ {
3375
+ name: "comp_offset",
3376
+ type: "u32"
3377
+ },
3378
+ {
3379
+ name: "mxe_program",
3380
+ type: "pubkey"
3381
+ },
3382
+ {
3383
+ name: "cluster_offset",
3384
+ type: "u32"
3385
+ }
3386
+ ]
3387
+ },
3388
+ {
3389
+ name: "close_computation_definition_buffers",
3390
+ docs: [
3391
+ "Closes the raw circuit buffer account for a computation definition."
3392
+ ],
3393
+ discriminator: [
3394
+ 98,
3395
+ 101,
3396
+ 140,
3397
+ 112,
3398
+ 8,
3399
+ 211,
3400
+ 211,
3401
+ 1
3402
+ ],
3403
+ accounts: [
3404
+ {
3405
+ name: "signer",
3406
+ writable: true,
3407
+ signer: true
3408
+ },
3409
+ {
3410
+ name: "mxe",
3411
+ pda: {
3412
+ seeds: [
3413
+ {
3414
+ kind: "const",
3415
+ value: [
3416
+ 77,
3417
+ 88,
3418
+ 69,
3337
3419
  65,
3338
3420
  99,
3339
3421
  99,
@@ -3344,19 +3426,14 @@ var instructions = [
3344
3426
  ]
3345
3427
  },
3346
3428
  {
3347
- kind: "account",
3348
- path: "backup_mxe_program"
3349
- },
3350
- {
3351
- kind: "account",
3352
- path: "original_mxe_program"
3429
+ kind: "arg",
3430
+ path: "_mxe_program"
3353
3431
  }
3354
3432
  ]
3355
3433
  }
3356
3434
  },
3357
3435
  {
3358
- name: "key_recovery_finalize_comp_def",
3359
- writable: true,
3436
+ name: "comp_def_acc",
3360
3437
  pda: {
3361
3438
  seeds: [
3362
3439
  {
@@ -3393,90 +3470,645 @@ var instructions = [
3393
3470
  ]
3394
3471
  },
3395
3472
  {
3396
- kind: "account",
3397
- path: "backup_mxe_program"
3473
+ kind: "arg",
3474
+ path: "_mxe_program"
3398
3475
  },
3476
+ {
3477
+ kind: "arg",
3478
+ path: "_comp_offset"
3479
+ }
3480
+ ]
3481
+ }
3482
+ },
3483
+ {
3484
+ name: "comp_def_raw",
3485
+ writable: true,
3486
+ pda: {
3487
+ seeds: [
3399
3488
  {
3400
3489
  kind: "const",
3401
3490
  value: [
3402
- 3,
3403
- 0,
3404
- 0,
3405
- 0
3491
+ 67,
3492
+ 111,
3493
+ 109,
3494
+ 112,
3495
+ 117,
3496
+ 116,
3497
+ 97,
3498
+ 116,
3499
+ 105,
3500
+ 111,
3501
+ 110,
3502
+ 68,
3503
+ 101,
3504
+ 102,
3505
+ 105,
3506
+ 110,
3507
+ 105,
3508
+ 116,
3509
+ 105,
3510
+ 111,
3511
+ 110,
3512
+ 82,
3513
+ 97,
3514
+ 119
3406
3515
  ]
3516
+ },
3517
+ {
3518
+ kind: "account",
3519
+ path: "comp_def_acc"
3520
+ },
3521
+ {
3522
+ kind: "arg",
3523
+ path: "_raw_circuit_index"
3407
3524
  }
3408
3525
  ]
3409
3526
  }
3410
- },
3411
- {
3412
- name: "original_mxe_program"
3413
- },
3414
- {
3415
- name: "backup_mxe_program"
3416
3527
  }
3417
3528
  ],
3418
3529
  args: [
3419
3530
  {
3420
- name: "original_mxe_program",
3421
- type: "pubkey"
3531
+ name: "comp_offset",
3532
+ type: "u32"
3422
3533
  },
3423
3534
  {
3424
- name: "backup_mxe_program",
3535
+ name: "mxe_program",
3425
3536
  type: "pubkey"
3537
+ },
3538
+ {
3539
+ name: "raw_circuit_index",
3540
+ type: "u8"
3426
3541
  }
3427
3542
  ]
3428
3543
  },
3429
3544
  {
3430
- name: "close_permissioned_recovery_peers_account",
3545
+ name: "close_key_recovery",
3431
3546
  docs: [
3432
- "Close the permissioned recovery peers account"
3547
+ "Closes all recovery-related accounts in the success path."
3433
3548
  ],
3434
3549
  discriminator: [
3435
- 55,
3436
- 55,
3437
- 184,
3438
- 150,
3439
- 82,
3440
- 190,
3441
- 205,
3442
- 92
3550
+ 249,
3551
+ 127,
3552
+ 56,
3553
+ 116,
3554
+ 125,
3555
+ 136,
3556
+ 84,
3557
+ 184
3443
3558
  ],
3444
3559
  accounts: [
3445
3560
  {
3446
- name: "signer",
3561
+ name: "authority",
3447
3562
  writable: true,
3448
3563
  signer: true
3449
3564
  },
3450
3565
  {
3451
- name: "permissioned_recovery_peers_acc",
3452
- writable: true,
3566
+ name: "original_mxe",
3453
3567
  pda: {
3454
3568
  seeds: [
3455
3569
  {
3456
3570
  kind: "const",
3457
3571
  value: [
3458
- 80,
3459
- 101,
3460
- 114,
3461
- 109,
3462
- 105,
3463
- 115,
3464
- 115,
3465
- 105,
3466
- 111,
3467
- 110,
3468
- 101,
3469
- 100,
3470
- 82,
3471
- 101,
3572
+ 77,
3573
+ 88,
3574
+ 69,
3575
+ 65,
3576
+ 99,
3472
3577
  99,
3473
3578
  111,
3474
- 118,
3475
- 101,
3476
- 114,
3477
- 121,
3478
- 80,
3479
- 101,
3579
+ 117,
3580
+ 110,
3581
+ 116
3582
+ ]
3583
+ },
3584
+ {
3585
+ kind: "arg",
3586
+ path: "_original_mxe_program"
3587
+ }
3588
+ ]
3589
+ }
3590
+ },
3591
+ {
3592
+ name: "backup_mxe",
3593
+ writable: true,
3594
+ pda: {
3595
+ seeds: [
3596
+ {
3597
+ kind: "const",
3598
+ value: [
3599
+ 77,
3600
+ 88,
3601
+ 69,
3602
+ 65,
3603
+ 99,
3604
+ 99,
3605
+ 111,
3606
+ 117,
3607
+ 110,
3608
+ 116
3609
+ ]
3610
+ },
3611
+ {
3612
+ kind: "account",
3613
+ path: "mxe_recovery_account"
3614
+ }
3615
+ ]
3616
+ }
3617
+ },
3618
+ {
3619
+ name: "mxe_recovery_account",
3620
+ writable: true,
3621
+ pda: {
3622
+ seeds: [
3623
+ {
3624
+ kind: "const",
3625
+ value: [
3626
+ 77,
3627
+ 120,
3628
+ 101,
3629
+ 82,
3630
+ 101,
3631
+ 99,
3632
+ 111,
3633
+ 118,
3634
+ 101,
3635
+ 114,
3636
+ 121,
3637
+ 65,
3638
+ 99,
3639
+ 99,
3640
+ 111,
3641
+ 117,
3642
+ 110,
3643
+ 116
3644
+ ]
3645
+ },
3646
+ {
3647
+ kind: "arg",
3648
+ path: "_original_mxe_program"
3649
+ }
3650
+ ]
3651
+ }
3652
+ },
3653
+ {
3654
+ name: "key_recovery_finalize_comp_def",
3655
+ writable: true,
3656
+ pda: {
3657
+ seeds: [
3658
+ {
3659
+ kind: "const",
3660
+ value: [
3661
+ 67,
3662
+ 111,
3663
+ 109,
3664
+ 112,
3665
+ 117,
3666
+ 116,
3667
+ 97,
3668
+ 116,
3669
+ 105,
3670
+ 111,
3671
+ 110,
3672
+ 68,
3673
+ 101,
3674
+ 102,
3675
+ 105,
3676
+ 110,
3677
+ 105,
3678
+ 116,
3679
+ 105,
3680
+ 111,
3681
+ 110,
3682
+ 65,
3683
+ 99,
3684
+ 99,
3685
+ 111,
3686
+ 117,
3687
+ 110,
3688
+ 116
3689
+ ]
3690
+ },
3691
+ {
3692
+ kind: "account",
3693
+ path: "mxe_recovery_account"
3694
+ },
3695
+ {
3696
+ kind: "const",
3697
+ value: [
3698
+ 3,
3699
+ 0,
3700
+ 0,
3701
+ 0
3702
+ ]
3703
+ }
3704
+ ]
3705
+ }
3706
+ },
3707
+ {
3708
+ name: "key_recovery_finalize_computation",
3709
+ writable: true,
3710
+ pda: {
3711
+ seeds: [
3712
+ {
3713
+ kind: "const",
3714
+ value: [
3715
+ 67,
3716
+ 111,
3717
+ 109,
3718
+ 112,
3719
+ 117,
3720
+ 116,
3721
+ 97,
3722
+ 116,
3723
+ 105,
3724
+ 111,
3725
+ 110,
3726
+ 65,
3727
+ 99,
3728
+ 99,
3729
+ 111,
3730
+ 117,
3731
+ 110,
3732
+ 116
3733
+ ]
3734
+ },
3735
+ {
3736
+ kind: "arg",
3737
+ path: "backup_cluster_offset"
3738
+ },
3739
+ {
3740
+ kind: "account",
3741
+ path: "mxe_recovery_account"
3742
+ }
3743
+ ]
3744
+ }
3745
+ },
3746
+ {
3747
+ name: "original_mxe_program"
3748
+ },
3749
+ {
3750
+ name: "backup_mxe_program"
3751
+ }
3752
+ ],
3753
+ args: [
3754
+ {
3755
+ name: "original_mxe_program",
3756
+ type: "pubkey"
3757
+ },
3758
+ {
3759
+ name: "backup_cluster_offset",
3760
+ type: "u32"
3761
+ }
3762
+ ]
3763
+ },
3764
+ {
3765
+ name: "close_mxe",
3766
+ docs: [
3767
+ "Closes an MXE account and auto-closes the keygen computation definition."
3768
+ ],
3769
+ discriminator: [
3770
+ 121,
3771
+ 143,
3772
+ 242,
3773
+ 246,
3774
+ 169,
3775
+ 45,
3776
+ 13,
3777
+ 97
3778
+ ],
3779
+ accounts: [
3780
+ {
3781
+ name: "signer",
3782
+ writable: true,
3783
+ signer: true
3784
+ },
3785
+ {
3786
+ name: "mxe_program",
3787
+ docs: [
3788
+ "constraint in tests because setting it would require us to deploy a program each time."
3789
+ ]
3790
+ },
3791
+ {
3792
+ name: "mxe",
3793
+ writable: true,
3794
+ pda: {
3795
+ seeds: [
3796
+ {
3797
+ kind: "const",
3798
+ value: [
3799
+ 77,
3800
+ 88,
3801
+ 69,
3802
+ 65,
3803
+ 99,
3804
+ 99,
3805
+ 111,
3806
+ 117,
3807
+ 110,
3808
+ 116
3809
+ ]
3810
+ },
3811
+ {
3812
+ kind: "account",
3813
+ path: "mxe_program"
3814
+ }
3815
+ ]
3816
+ }
3817
+ },
3818
+ {
3819
+ name: "mxe_keygen_computation",
3820
+ writable: true,
3821
+ pda: {
3822
+ seeds: [
3823
+ {
3824
+ kind: "const",
3825
+ value: [
3826
+ 67,
3827
+ 111,
3828
+ 109,
3829
+ 112,
3830
+ 117,
3831
+ 116,
3832
+ 97,
3833
+ 116,
3834
+ 105,
3835
+ 111,
3836
+ 110,
3837
+ 65,
3838
+ 99,
3839
+ 99,
3840
+ 111,
3841
+ 117,
3842
+ 110,
3843
+ 116
3844
+ ]
3845
+ },
3846
+ {
3847
+ kind: "arg",
3848
+ path: "_cluster_offset"
3849
+ },
3850
+ {
3851
+ kind: "arg",
3852
+ path: "_keygen_offset"
3853
+ }
3854
+ ]
3855
+ }
3856
+ },
3857
+ {
3858
+ name: "mxe_keygen_comp_def",
3859
+ writable: true,
3860
+ pda: {
3861
+ seeds: [
3862
+ {
3863
+ kind: "const",
3864
+ value: [
3865
+ 67,
3866
+ 111,
3867
+ 109,
3868
+ 112,
3869
+ 117,
3870
+ 116,
3871
+ 97,
3872
+ 116,
3873
+ 105,
3874
+ 111,
3875
+ 110,
3876
+ 68,
3877
+ 101,
3878
+ 102,
3879
+ 105,
3880
+ 110,
3881
+ 105,
3882
+ 116,
3883
+ 105,
3884
+ 111,
3885
+ 110,
3886
+ 65,
3887
+ 99,
3888
+ 99,
3889
+ 111,
3890
+ 117,
3891
+ 110,
3892
+ 116
3893
+ ]
3894
+ },
3895
+ {
3896
+ kind: "account",
3897
+ path: "mxe_program"
3898
+ },
3899
+ {
3900
+ kind: "const",
3901
+ value: [
3902
+ 1,
3903
+ 0,
3904
+ 0,
3905
+ 0
3906
+ ]
3907
+ }
3908
+ ]
3909
+ }
3910
+ },
3911
+ {
3912
+ name: "mxe_key_recovery_init_comp_def",
3913
+ docs: [
3914
+ "Optional: only exists if key recovery was initiated."
3915
+ ],
3916
+ writable: true,
3917
+ optional: true,
3918
+ pda: {
3919
+ seeds: [
3920
+ {
3921
+ kind: "const",
3922
+ value: [
3923
+ 67,
3924
+ 111,
3925
+ 109,
3926
+ 112,
3927
+ 117,
3928
+ 116,
3929
+ 97,
3930
+ 116,
3931
+ 105,
3932
+ 111,
3933
+ 110,
3934
+ 68,
3935
+ 101,
3936
+ 102,
3937
+ 105,
3938
+ 110,
3939
+ 105,
3940
+ 116,
3941
+ 105,
3942
+ 111,
3943
+ 110,
3944
+ 65,
3945
+ 99,
3946
+ 99,
3947
+ 111,
3948
+ 117,
3949
+ 110,
3950
+ 116
3951
+ ]
3952
+ },
3953
+ {
3954
+ kind: "account",
3955
+ path: "mxe_program"
3956
+ },
3957
+ {
3958
+ kind: "const",
3959
+ value: [
3960
+ 2,
3961
+ 0,
3962
+ 0,
3963
+ 0
3964
+ ]
3965
+ }
3966
+ ]
3967
+ }
3968
+ },
3969
+ {
3970
+ name: "key_recovery_init_computation",
3971
+ writable: true,
3972
+ optional: true,
3973
+ pda: {
3974
+ seeds: [
3975
+ {
3976
+ kind: "const",
3977
+ value: [
3978
+ 67,
3979
+ 111,
3980
+ 109,
3981
+ 112,
3982
+ 117,
3983
+ 116,
3984
+ 97,
3985
+ 116,
3986
+ 105,
3987
+ 111,
3988
+ 110,
3989
+ 65,
3990
+ 99,
3991
+ 99,
3992
+ 111,
3993
+ 117,
3994
+ 110,
3995
+ 116
3996
+ ]
3997
+ },
3998
+ {
3999
+ kind: "arg",
4000
+ path: "_cluster_offset"
4001
+ },
4002
+ {
4003
+ kind: "account",
4004
+ path: "mxe.key_recovery_init_offset",
4005
+ account: "MXEAccount"
4006
+ }
4007
+ ]
4008
+ }
4009
+ },
4010
+ {
4011
+ name: "recovery_cluster_acc",
4012
+ writable: true,
4013
+ pda: {
4014
+ seeds: [
4015
+ {
4016
+ kind: "const",
4017
+ value: [
4018
+ 82,
4019
+ 101,
4020
+ 99,
4021
+ 111,
4022
+ 118,
4023
+ 101,
4024
+ 114,
4025
+ 121,
4026
+ 67,
4027
+ 108,
4028
+ 117,
4029
+ 115,
4030
+ 116,
4031
+ 101,
4032
+ 114,
4033
+ 65,
4034
+ 99,
4035
+ 99,
4036
+ 111,
4037
+ 117,
4038
+ 110,
4039
+ 116
4040
+ ]
4041
+ },
4042
+ {
4043
+ kind: "account",
4044
+ path: "mxe_program"
4045
+ }
4046
+ ]
4047
+ }
4048
+ }
4049
+ ],
4050
+ args: [
4051
+ {
4052
+ name: "cluster_offset",
4053
+ type: "u32"
4054
+ },
4055
+ {
4056
+ name: "keygen_offset",
4057
+ type: "u64"
4058
+ }
4059
+ ]
4060
+ },
4061
+ {
4062
+ name: "close_permissioned_recovery_peers_account",
4063
+ docs: [
4064
+ "Close the permissioned recovery peers account"
4065
+ ],
4066
+ discriminator: [
4067
+ 55,
4068
+ 55,
4069
+ 184,
4070
+ 150,
4071
+ 82,
4072
+ 190,
4073
+ 205,
4074
+ 92
4075
+ ],
4076
+ accounts: [
4077
+ {
4078
+ name: "signer",
4079
+ writable: true,
4080
+ signer: true
4081
+ },
4082
+ {
4083
+ name: "permissioned_recovery_peers_acc",
4084
+ writable: true,
4085
+ pda: {
4086
+ seeds: [
4087
+ {
4088
+ kind: "const",
4089
+ value: [
4090
+ 80,
4091
+ 101,
4092
+ 114,
4093
+ 109,
4094
+ 105,
4095
+ 115,
4096
+ 115,
4097
+ 105,
4098
+ 111,
4099
+ 110,
4100
+ 101,
4101
+ 100,
4102
+ 82,
4103
+ 101,
4104
+ 99,
4105
+ 111,
4106
+ 118,
4107
+ 101,
4108
+ 114,
4109
+ 121,
4110
+ 80,
4111
+ 101,
3480
4112
  101,
3481
4113
  114,
3482
4114
  115,
@@ -3733,8 +4365,112 @@ var instructions = [
3733
4365
  67,
3734
4366
  108,
3735
4367
  111,
3736
- 99,
3737
- 107,
4368
+ 99,
4369
+ 107,
4370
+ 65,
4371
+ 99,
4372
+ 99,
4373
+ 111,
4374
+ 117,
4375
+ 110,
4376
+ 116
4377
+ ]
4378
+ }
4379
+ ]
4380
+ }
4381
+ }
4382
+ ],
4383
+ args: [
4384
+ {
4385
+ name: "cluster_id",
4386
+ type: "u32"
4387
+ },
4388
+ {
4389
+ name: "deactivation_epoch",
4390
+ type: {
4391
+ defined: {
4392
+ name: "Epoch"
4393
+ }
4394
+ }
4395
+ }
4396
+ ]
4397
+ },
4398
+ {
4399
+ name: "deactivate_computation_definition",
4400
+ docs: [
4401
+ "Deactivates a computation definition, preventing new computations from being queued."
4402
+ ],
4403
+ discriminator: [
4404
+ 170,
4405
+ 212,
4406
+ 226,
4407
+ 44,
4408
+ 43,
4409
+ 226,
4410
+ 117,
4411
+ 162
4412
+ ],
4413
+ accounts: [
4414
+ {
4415
+ name: "signer",
4416
+ writable: true,
4417
+ signer: true
4418
+ },
4419
+ {
4420
+ name: "mxe",
4421
+ pda: {
4422
+ seeds: [
4423
+ {
4424
+ kind: "const",
4425
+ value: [
4426
+ 77,
4427
+ 88,
4428
+ 69,
4429
+ 65,
4430
+ 99,
4431
+ 99,
4432
+ 111,
4433
+ 117,
4434
+ 110,
4435
+ 116
4436
+ ]
4437
+ },
4438
+ {
4439
+ kind: "arg",
4440
+ path: "_mxe_program"
4441
+ }
4442
+ ]
4443
+ }
4444
+ },
4445
+ {
4446
+ name: "comp_def_acc",
4447
+ writable: true,
4448
+ pda: {
4449
+ seeds: [
4450
+ {
4451
+ kind: "const",
4452
+ value: [
4453
+ 67,
4454
+ 111,
4455
+ 109,
4456
+ 112,
4457
+ 117,
4458
+ 116,
4459
+ 97,
4460
+ 116,
4461
+ 105,
4462
+ 111,
4463
+ 110,
4464
+ 68,
4465
+ 101,
4466
+ 102,
4467
+ 105,
4468
+ 110,
4469
+ 105,
4470
+ 116,
4471
+ 105,
4472
+ 111,
4473
+ 110,
3738
4474
  65,
3739
4475
  99,
3740
4476
  99,
@@ -3743,6 +4479,14 @@ var instructions = [
3743
4479
  110,
3744
4480
  116
3745
4481
  ]
4482
+ },
4483
+ {
4484
+ kind: "arg",
4485
+ path: "_mxe_program"
4486
+ },
4487
+ {
4488
+ kind: "arg",
4489
+ path: "comp_offset"
3746
4490
  }
3747
4491
  ]
3748
4492
  }
@@ -3750,16 +4494,12 @@ var instructions = [
3750
4494
  ],
3751
4495
  args: [
3752
4496
  {
3753
- name: "cluster_id",
4497
+ name: "comp_offset",
3754
4498
  type: "u32"
3755
4499
  },
3756
4500
  {
3757
- name: "deactivation_epoch",
3758
- type: {
3759
- defined: {
3760
- name: "Epoch"
3761
- }
3762
- }
4501
+ name: "mxe_program",
4502
+ type: "pubkey"
3763
4503
  }
3764
4504
  ]
3765
4505
  },
@@ -4063,7 +4803,7 @@ var instructions = [
4063
4803
  },
4064
4804
  {
4065
4805
  kind: "account",
4066
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
4806
+ path: "mxe.cluster",
4067
4807
  account: "MXEAccount"
4068
4808
  }
4069
4809
  ]
@@ -4330,10 +5070,6 @@ var instructions = [
4330
5070
  116
4331
5071
  ]
4332
5072
  },
4333
- {
4334
- kind: "account",
4335
- path: "backup_mxe_program"
4336
- },
4337
5073
  {
4338
5074
  kind: "account",
4339
5075
  path: "original_mxe_program"
@@ -4586,7 +5322,7 @@ var instructions = [
4586
5322
  {
4587
5323
  name: "finalize_key_recovery_execution",
4588
5324
  docs: [
4589
- "Finalizes the key recovery execution after threshold is met and queues the computation."
5325
+ "Queues the key_recovery_finalize computation after threshold is met."
4590
5326
  ],
4591
5327
  discriminator: [
4592
5328
  211,
@@ -4701,7 +5437,6 @@ var instructions = [
4701
5437
  },
4702
5438
  {
4703
5439
  name: "mxe_recovery_account",
4704
- writable: true,
4705
5440
  pda: {
4706
5441
  seeds: [
4707
5442
  {
@@ -4727,10 +5462,6 @@ var instructions = [
4727
5462
  116
4728
5463
  ]
4729
5464
  },
4730
- {
4731
- kind: "account",
4732
- path: "backup_mxe_program"
4733
- },
4734
5465
  {
4735
5466
  kind: "account",
4736
5467
  path: "original_mxe_program"
@@ -5083,7 +5814,7 @@ var instructions = [
5083
5814
  },
5084
5815
  {
5085
5816
  kind: "account",
5086
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
5817
+ path: "mxe.cluster",
5087
5818
  account: "MXEAccount"
5088
5819
  }
5089
5820
  ]
@@ -5118,7 +5849,7 @@ var instructions = [
5118
5849
  },
5119
5850
  {
5120
5851
  kind: "account",
5121
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
5852
+ path: "mxe.cluster",
5122
5853
  account: "MXEAccount"
5123
5854
  },
5124
5855
  {
@@ -5208,7 +5939,7 @@ var instructions = [
5208
5939
  },
5209
5940
  {
5210
5941
  kind: "account",
5211
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
5942
+ path: "mxe.cluster",
5212
5943
  account: "MXEAccount"
5213
5944
  }
5214
5945
  ]
@@ -5812,12 +6543,6 @@ var instructions = [
5812
6543
  {
5813
6544
  name: "cu_amount",
5814
6545
  type: "u64"
5815
- },
5816
- {
5817
- name: "finalization_authority",
5818
- type: {
5819
- option: "pubkey"
5820
- }
5821
6546
  }
5822
6547
  ]
5823
6548
  },
@@ -5906,10 +6631,6 @@ var instructions = [
5906
6631
  116
5907
6632
  ]
5908
6633
  },
5909
- {
5910
- kind: "account",
5911
- path: "backup_mxe_program"
5912
- },
5913
6634
  {
5914
6635
  kind: "account",
5915
6636
  path: "original_mxe_program"
@@ -6085,10 +6806,6 @@ var instructions = [
6085
6806
  116
6086
6807
  ]
6087
6808
  },
6088
- {
6089
- kind: "account",
6090
- path: "backup_mxe_program"
6091
- },
6092
6809
  {
6093
6810
  kind: "account",
6094
6811
  path: "original_mxe_program"
@@ -6153,6 +6870,46 @@ var instructions = [
6153
6870
  ]
6154
6871
  }
6155
6872
  },
6873
+ {
6874
+ name: "key_recovery_finalize_computation",
6875
+ writable: true,
6876
+ pda: {
6877
+ seeds: [
6878
+ {
6879
+ kind: "const",
6880
+ value: [
6881
+ 67,
6882
+ 111,
6883
+ 109,
6884
+ 112,
6885
+ 117,
6886
+ 116,
6887
+ 97,
6888
+ 116,
6889
+ 105,
6890
+ 111,
6891
+ 110,
6892
+ 65,
6893
+ 99,
6894
+ 99,
6895
+ 111,
6896
+ 117,
6897
+ 110,
6898
+ 116
6899
+ ]
6900
+ },
6901
+ {
6902
+ kind: "account",
6903
+ path: "backup_mxe.cluster",
6904
+ account: "MXEAccount"
6905
+ },
6906
+ {
6907
+ kind: "arg",
6908
+ path: "key_recovery_finalize_offset"
6909
+ }
6910
+ ]
6911
+ }
6912
+ },
6156
6913
  {
6157
6914
  name: "original_mxe_program"
6158
6915
  },
@@ -6172,6 +6929,14 @@ var instructions = [
6172
6929
  {
6173
6930
  name: "backup_mxe_program",
6174
6931
  type: "pubkey"
6932
+ },
6933
+ {
6934
+ name: "cluster_offset",
6935
+ type: "u32"
6936
+ },
6937
+ {
6938
+ name: "key_recovery_finalize_offset",
6939
+ type: "u64"
6175
6940
  }
6176
6941
  ]
6177
6942
  },
@@ -6706,7 +7471,7 @@ var instructions = [
6706
7471
  type: "u64"
6707
7472
  },
6708
7473
  {
6709
- name: "recent_offset",
7474
+ name: "recent_slot",
6710
7475
  type: "u64"
6711
7476
  }
6712
7477
  ]
@@ -7595,7 +8360,7 @@ var instructions = [
7595
8360
  },
7596
8361
  {
7597
8362
  kind: "account",
7598
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
8363
+ path: "mxe.cluster",
7599
8364
  account: "MXEAccount"
7600
8365
  },
7601
8366
  {
@@ -7651,7 +8416,7 @@ var instructions = [
7651
8416
  },
7652
8417
  {
7653
8418
  kind: "account",
7654
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
8419
+ path: "mxe.cluster",
7655
8420
  account: "MXEAccount"
7656
8421
  }
7657
8422
  ]
@@ -7676,7 +8441,7 @@ var instructions = [
7676
8441
  },
7677
8442
  {
7678
8443
  kind: "account",
7679
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
8444
+ path: "mxe.cluster",
7680
8445
  account: "MXEAccount"
7681
8446
  }
7682
8447
  ]
@@ -7749,7 +8514,7 @@ var instructions = [
7749
8514
  },
7750
8515
  {
7751
8516
  kind: "account",
7752
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
8517
+ path: "mxe.cluster",
7753
8518
  account: "MXEAccount"
7754
8519
  }
7755
8520
  ]
@@ -7854,7 +8619,7 @@ var instructions = [
7854
8619
  name: "queue_key_recovery_init",
7855
8620
  docs: [
7856
8621
  "Queues the key recovery init computation for the MXE.",
7857
- "Can only be called once after MXE keys are set."
8622
+ "Can only be called after MXE keys are set."
7858
8623
  ],
7859
8624
  discriminator: [
7860
8625
  76,
@@ -8196,7 +8961,7 @@ var instructions = [
8196
8961
  },
8197
8962
  {
8198
8963
  kind: "account",
8199
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
8964
+ path: "mxe.cluster",
8200
8965
  account: "MXEAccount"
8201
8966
  },
8202
8967
  {
@@ -8226,7 +8991,7 @@ var instructions = [
8226
8991
  },
8227
8992
  {
8228
8993
  kind: "account",
8229
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
8994
+ path: "mxe.cluster",
8230
8995
  account: "MXEAccount"
8231
8996
  }
8232
8997
  ]
@@ -8315,7 +9080,7 @@ var instructions = [
8315
9080
  {
8316
9081
  name: "recover_mxe",
8317
9082
  docs: [
8318
- "Sets an MXE to the Recovery state, enabling the recovery process to begin."
9083
+ "Sets an MXE to the `Migration` state, enabling the recovery process to begin."
8319
9084
  ],
8320
9085
  discriminator: [
8321
9086
  65,
@@ -8684,192 +9449,41 @@ var instructions = [
8684
9449
  type: {
8685
9450
  vec: "pubkey"
8686
9451
  }
8687
- }
8688
- ]
8689
- },
8690
- {
8691
- name: "requeue_key_recovery_finalize",
8692
- docs: [
8693
- "Re-queues the key_recovery_finalize computation after a failed execution."
8694
- ],
8695
- discriminator: [
8696
- 131,
8697
- 109,
8698
- 226,
8699
- 183,
8700
- 90,
8701
- 203,
8702
- 17,
8703
- 191
8704
- ],
8705
- accounts: [
8706
- {
8707
- name: "authority",
8708
- writable: true,
8709
- signer: true
8710
- },
8711
- {
8712
- name: "payer",
8713
- writable: true,
8714
- signer: true
8715
- },
8716
- {
8717
- name: "original_mxe",
8718
- pda: {
8719
- seeds: [
8720
- {
8721
- kind: "const",
8722
- value: [
8723
- 77,
8724
- 88,
8725
- 69,
8726
- 65,
8727
- 99,
8728
- 99,
8729
- 111,
8730
- 117,
8731
- 110,
8732
- 116
8733
- ]
8734
- },
8735
- {
8736
- kind: "arg",
8737
- path: "_original_mxe_program"
8738
- }
8739
- ]
8740
- }
8741
- },
8742
- {
8743
- name: "backup_mxe",
8744
- pda: {
8745
- seeds: [
8746
- {
8747
- kind: "const",
8748
- value: [
8749
- 77,
8750
- 88,
8751
- 69,
8752
- 65,
8753
- 99,
8754
- 99,
8755
- 111,
8756
- 117,
8757
- 110,
8758
- 116
8759
- ]
8760
- },
8761
- {
8762
- kind: "arg",
8763
- path: "_backup_mxe_program"
8764
- }
8765
- ]
8766
- }
8767
- },
8768
- {
8769
- name: "recovery_cluster_acc",
8770
- pda: {
8771
- seeds: [
8772
- {
8773
- kind: "const",
8774
- value: [
8775
- 82,
8776
- 101,
8777
- 99,
8778
- 111,
8779
- 118,
8780
- 101,
8781
- 114,
8782
- 121,
8783
- 67,
8784
- 108,
8785
- 117,
8786
- 115,
8787
- 116,
8788
- 101,
8789
- 114,
8790
- 65,
8791
- 99,
8792
- 99,
8793
- 111,
8794
- 117,
8795
- 110,
8796
- 116
8797
- ]
8798
- },
8799
- {
8800
- kind: "arg",
8801
- path: "_original_mxe_program"
8802
- }
8803
- ]
8804
- }
8805
- },
8806
- {
8807
- name: "mxe_recovery_account",
8808
- writable: true,
8809
- pda: {
8810
- seeds: [
8811
- {
8812
- kind: "const",
8813
- value: [
8814
- 77,
8815
- 120,
8816
- 101,
8817
- 82,
8818
- 101,
8819
- 99,
8820
- 111,
8821
- 118,
8822
- 101,
8823
- 114,
8824
- 121,
8825
- 65,
8826
- 99,
8827
- 99,
8828
- 111,
8829
- 117,
8830
- 110,
8831
- 116
8832
- ]
8833
- },
8834
- {
8835
- kind: "account",
8836
- path: "backup_mxe_program"
8837
- },
8838
- {
8839
- kind: "account",
8840
- path: "original_mxe_program"
8841
- }
8842
- ]
8843
- }
9452
+ }
9453
+ ]
9454
+ },
9455
+ {
9456
+ name: "requeue_mxe_keygen",
9457
+ docs: [
9458
+ "Re-queues the MXE keygen computation if it has expired from the mempool.",
9459
+ "This allows retrying the keygen if it wasn't processed in time."
9460
+ ],
9461
+ discriminator: [
9462
+ 90,
9463
+ 98,
9464
+ 117,
9465
+ 181,
9466
+ 88,
9467
+ 71,
9468
+ 135,
9469
+ 30
9470
+ ],
9471
+ accounts: [
9472
+ {
9473
+ name: "signer",
9474
+ writable: true,
9475
+ signer: true
8844
9476
  },
8845
9477
  {
8846
- name: "key_recovery_finalize_comp_def",
9478
+ name: "mxe",
8847
9479
  pda: {
8848
9480
  seeds: [
8849
9481
  {
8850
9482
  kind: "const",
8851
9483
  value: [
8852
- 67,
8853
- 111,
8854
- 109,
8855
- 112,
8856
- 117,
8857
- 116,
8858
- 97,
8859
- 116,
8860
- 105,
8861
- 111,
8862
- 110,
8863
- 68,
8864
- 101,
8865
- 102,
8866
- 105,
8867
- 110,
8868
- 105,
8869
- 116,
8870
- 105,
8871
- 111,
8872
- 110,
9484
+ 77,
9485
+ 88,
9486
+ 69,
8873
9487
  65,
8874
9488
  99,
8875
9489
  99,
@@ -8881,116 +9495,74 @@ var instructions = [
8881
9495
  },
8882
9496
  {
8883
9497
  kind: "account",
8884
- path: "backup_mxe_program"
8885
- },
8886
- {
8887
- kind: "const",
8888
- value: [
8889
- 3,
8890
- 0,
8891
- 0,
8892
- 0
8893
- ]
9498
+ path: "mxe_program"
8894
9499
  }
8895
9500
  ]
8896
9501
  }
8897
9502
  },
8898
9503
  {
8899
- name: "previous_computation",
8900
- docs: [
8901
- "The previous failed computation account"
8902
- ],
9504
+ name: "executing_pool",
9505
+ writable: true,
8903
9506
  pda: {
8904
9507
  seeds: [
8905
9508
  {
8906
9509
  kind: "const",
8907
9510
  value: [
8908
- 67,
8909
- 111,
8910
- 109,
9511
+ 69,
9512
+ 120,
9513
+ 101,
9514
+ 99,
8911
9515
  112,
8912
- 117,
8913
- 116,
8914
- 97,
8915
- 116,
8916
- 105,
8917
9516
  111,
8918
- 110,
8919
- 65,
8920
- 99,
8921
- 99,
8922
9517
  111,
8923
- 117,
8924
- 110,
8925
- 116
9518
+ 108
8926
9519
  ]
8927
9520
  },
8928
9521
  {
8929
9522
  kind: "arg",
8930
9523
  path: "cluster_offset"
8931
- },
8932
- {
8933
- kind: "account",
8934
- path: "mxe_recovery_account"
8935
9524
  }
8936
9525
  ]
8937
9526
  }
8938
9527
  },
8939
9528
  {
8940
- name: "new_computation",
9529
+ name: "mempool",
8941
9530
  writable: true,
8942
9531
  pda: {
8943
9532
  seeds: [
8944
9533
  {
8945
9534
  kind: "const",
8946
9535
  value: [
8947
- 67,
8948
- 111,
9536
+ 77,
9537
+ 101,
8949
9538
  109,
8950
9539
  112,
8951
- 117,
8952
- 116,
8953
- 97,
8954
- 116,
8955
- 105,
8956
9540
  111,
8957
- 110,
8958
- 65,
8959
- 99,
8960
- 99,
8961
9541
  111,
8962
- 117,
8963
- 110,
8964
- 116
9542
+ 108
8965
9543
  ]
8966
9544
  },
8967
9545
  {
8968
9546
  kind: "arg",
8969
9547
  path: "cluster_offset"
8970
- },
8971
- {
8972
- kind: "arg",
8973
- path: "new_key_recovery_finalize_offset"
8974
9548
  }
8975
9549
  ]
8976
9550
  }
8977
9551
  },
8978
9552
  {
8979
- name: "executing_pool",
8980
- writable: true,
9553
+ name: "cluster",
8981
9554
  pda: {
8982
9555
  seeds: [
8983
9556
  {
8984
9557
  kind: "const",
8985
9558
  value: [
8986
- 69,
8987
- 120,
9559
+ 67,
9560
+ 108,
9561
+ 117,
9562
+ 115,
9563
+ 116,
8988
9564
  101,
8989
- 99,
8990
- 112,
8991
- 111,
8992
- 111,
8993
- 108
9565
+ 114
8994
9566
  ]
8995
9567
  },
8996
9568
  {
@@ -9001,94 +9573,70 @@ var instructions = [
9001
9573
  }
9002
9574
  },
9003
9575
  {
9004
- name: "mempool",
9576
+ name: "mxe_keygen_computation",
9005
9577
  writable: true,
9006
9578
  pda: {
9007
9579
  seeds: [
9008
9580
  {
9009
9581
  kind: "const",
9010
9582
  value: [
9011
- 77,
9012
- 101,
9583
+ 67,
9584
+ 111,
9013
9585
  109,
9014
9586
  112,
9587
+ 117,
9588
+ 116,
9589
+ 97,
9590
+ 116,
9591
+ 105,
9015
9592
  111,
9593
+ 110,
9594
+ 65,
9595
+ 99,
9596
+ 99,
9016
9597
  111,
9017
- 108
9598
+ 117,
9599
+ 110,
9600
+ 116
9018
9601
  ]
9019
9602
  },
9020
9603
  {
9021
9604
  kind: "arg",
9022
9605
  path: "cluster_offset"
9023
- }
9024
- ]
9025
- }
9026
- },
9027
- {
9028
- name: "pool_account",
9029
- writable: true,
9030
- pda: {
9031
- seeds: [
9606
+ },
9032
9607
  {
9033
- kind: "const",
9034
- value: [
9035
- 70,
9036
- 101,
9037
- 101,
9038
- 80,
9039
- 111,
9040
- 111,
9041
- 108
9042
- ]
9608
+ kind: "account",
9609
+ path: "mxe.keygen_offset",
9610
+ account: "MXEAccount"
9043
9611
  }
9044
9612
  ]
9045
9613
  }
9046
9614
  },
9047
9615
  {
9048
- name: "original_mxe_program"
9049
- },
9050
- {
9051
- name: "backup_mxe_program"
9052
- },
9053
- {
9054
- name: "system_program",
9055
- address: "11111111111111111111111111111111"
9616
+ name: "mxe_program"
9056
9617
  }
9057
9618
  ],
9058
9619
  args: [
9059
- {
9060
- name: "original_mxe_program",
9061
- type: "pubkey"
9062
- },
9063
- {
9064
- name: "backup_mxe_program",
9065
- type: "pubkey"
9066
- },
9067
9620
  {
9068
9621
  name: "cluster_offset",
9069
9622
  type: "u32"
9070
- },
9071
- {
9072
- name: "new_key_recovery_finalize_offset",
9073
- type: "u64"
9074
9623
  }
9075
9624
  ]
9076
9625
  },
9077
9626
  {
9078
- name: "requeue_mxe_keygen",
9627
+ name: "set_active",
9079
9628
  docs: [
9080
- "Re-queues the MXE keygen computation if it has expired from the mempool.",
9081
- "This allows retrying the keygen if it wasn't processed in time."
9629
+ "Sets an MXE to `Active`."
9082
9630
  ],
9083
9631
  discriminator: [
9084
- 90,
9085
- 98,
9086
- 117,
9087
- 181,
9088
- 88,
9089
- 71,
9090
- 135,
9091
- 30
9632
+ 29,
9633
+ 16,
9634
+ 225,
9635
+ 132,
9636
+ 38,
9637
+ 216,
9638
+ 206,
9639
+ 33
9092
9640
  ],
9093
9641
  accounts: [
9094
9642
  {
@@ -9098,57 +9646,6 @@ var instructions = [
9098
9646
  },
9099
9647
  {
9100
9648
  name: "mxe",
9101
- pda: {
9102
- seeds: [
9103
- {
9104
- kind: "const",
9105
- value: [
9106
- 77,
9107
- 88,
9108
- 69,
9109
- 65,
9110
- 99,
9111
- 99,
9112
- 111,
9113
- 117,
9114
- 110,
9115
- 116
9116
- ]
9117
- },
9118
- {
9119
- kind: "account",
9120
- path: "mxe_program"
9121
- }
9122
- ]
9123
- }
9124
- },
9125
- {
9126
- name: "executing_pool",
9127
- writable: true,
9128
- pda: {
9129
- seeds: [
9130
- {
9131
- kind: "const",
9132
- value: [
9133
- 69,
9134
- 120,
9135
- 101,
9136
- 99,
9137
- 112,
9138
- 111,
9139
- 111,
9140
- 108
9141
- ]
9142
- },
9143
- {
9144
- kind: "arg",
9145
- path: "cluster_offset"
9146
- }
9147
- ]
9148
- }
9149
- },
9150
- {
9151
- name: "mempool",
9152
9649
  writable: true,
9153
9650
  pda: {
9154
9651
  seeds: [
@@ -9156,63 +9653,80 @@ var instructions = [
9156
9653
  kind: "const",
9157
9654
  value: [
9158
9655
  77,
9159
- 101,
9160
- 109,
9161
- 112,
9162
- 111,
9656
+ 88,
9657
+ 69,
9658
+ 65,
9659
+ 99,
9660
+ 99,
9163
9661
  111,
9164
- 108
9662
+ 117,
9663
+ 110,
9664
+ 116
9165
9665
  ]
9166
9666
  },
9167
9667
  {
9168
9668
  kind: "arg",
9169
- path: "cluster_offset"
9669
+ path: "_mxe_program"
9170
9670
  }
9171
9671
  ]
9172
9672
  }
9173
9673
  },
9174
9674
  {
9175
- name: "cluster",
9675
+ name: "recovery_cluster_acc",
9176
9676
  pda: {
9177
9677
  seeds: [
9178
9678
  {
9179
9679
  kind: "const",
9180
9680
  value: [
9681
+ 82,
9682
+ 101,
9683
+ 99,
9684
+ 111,
9685
+ 118,
9686
+ 101,
9687
+ 114,
9688
+ 121,
9181
9689
  67,
9182
9690
  108,
9183
9691
  117,
9184
9692
  115,
9185
9693
  116,
9186
9694
  101,
9187
- 114
9695
+ 114,
9696
+ 65,
9697
+ 99,
9698
+ 99,
9699
+ 111,
9700
+ 117,
9701
+ 110,
9702
+ 116
9188
9703
  ]
9189
9704
  },
9190
9705
  {
9191
9706
  kind: "arg",
9192
- path: "cluster_offset"
9707
+ path: "_mxe_program"
9193
9708
  }
9194
9709
  ]
9195
9710
  }
9196
9711
  },
9197
9712
  {
9198
- name: "mxe_keygen_computation",
9199
- writable: true,
9713
+ name: "mxe_recovery_account",
9200
9714
  pda: {
9201
9715
  seeds: [
9202
9716
  {
9203
9717
  kind: "const",
9204
9718
  value: [
9205
- 67,
9206
- 111,
9207
- 109,
9208
- 112,
9209
- 117,
9210
- 116,
9211
- 97,
9212
- 116,
9213
- 105,
9719
+ 77,
9720
+ 120,
9721
+ 101,
9722
+ 82,
9723
+ 101,
9724
+ 99,
9214
9725
  111,
9215
- 110,
9726
+ 118,
9727
+ 101,
9728
+ 114,
9729
+ 121,
9216
9730
  65,
9217
9731
  99,
9218
9732
  99,
@@ -9224,12 +9738,7 @@ var instructions = [
9224
9738
  },
9225
9739
  {
9226
9740
  kind: "arg",
9227
- path: "cluster_offset"
9228
- },
9229
- {
9230
- kind: "account",
9231
- path: "mxe.keygen_offset",
9232
- account: "MXEAccount"
9741
+ path: "_mxe_program"
9233
9742
  }
9234
9743
  ]
9235
9744
  }
@@ -9240,8 +9749,8 @@ var instructions = [
9240
9749
  ],
9241
9750
  args: [
9242
9751
  {
9243
- name: "cluster_offset",
9244
- type: "u32"
9752
+ name: "mxe_program",
9753
+ type: "pubkey"
9245
9754
  }
9246
9755
  ]
9247
9756
  },
@@ -9362,60 +9871,25 @@ var instructions = [
9362
9871
  ]
9363
9872
  },
9364
9873
  {
9365
- name: "set_cluster",
9874
+ name: "set_cluster_authority",
9366
9875
  discriminator: [
9367
- 140,
9368
- 96,
9876
+ 94,
9877
+ 172,
9878
+ 32,
9879
+ 75,
9369
9880
  38,
9370
- 83,
9371
- 225,
9372
- 128,
9373
- 25,
9374
- 176
9881
+ 40,
9882
+ 31,
9883
+ 106
9375
9884
  ],
9376
9885
  accounts: [
9377
9886
  {
9378
- name: "signer",
9379
- docs: [
9380
- "Signer of the transaction."
9381
- ],
9887
+ name: "current_authority",
9382
9888
  writable: true,
9383
9889
  signer: true
9384
9890
  },
9385
9891
  {
9386
- name: "mxe",
9387
- docs: [
9388
- "MXE account to set the cluster for."
9389
- ],
9390
- pda: {
9391
- seeds: [
9392
- {
9393
- kind: "const",
9394
- value: [
9395
- 77,
9396
- 88,
9397
- 69,
9398
- 65,
9399
- 99,
9400
- 99,
9401
- 111,
9402
- 117,
9403
- 110,
9404
- 116
9405
- ]
9406
- },
9407
- {
9408
- kind: "account",
9409
- path: "mxe_program"
9410
- }
9411
- ]
9412
- }
9413
- },
9414
- {
9415
- name: "cluster",
9416
- docs: [
9417
- "Cluster to set for the MXE."
9418
- ],
9892
+ name: "cluster_acc",
9419
9893
  writable: true,
9420
9894
  pda: {
9421
9895
  seeds: [
@@ -9433,35 +9907,7 @@ var instructions = [
9433
9907
  },
9434
9908
  {
9435
9909
  kind: "arg",
9436
- path: "cluster_offset"
9437
- }
9438
- ]
9439
- }
9440
- },
9441
- {
9442
- name: "mxe_program"
9443
- },
9444
- {
9445
- name: "clock",
9446
- writable: true,
9447
- pda: {
9448
- seeds: [
9449
- {
9450
- kind: "const",
9451
- value: [
9452
- 67,
9453
- 108,
9454
- 111,
9455
- 99,
9456
- 107,
9457
- 65,
9458
- 99,
9459
- 99,
9460
- 111,
9461
- 117,
9462
- 110,
9463
- 116
9464
- ]
9910
+ path: "_id"
9465
9911
  }
9466
9912
  ]
9467
9913
  }
@@ -9469,26 +9915,32 @@ var instructions = [
9469
9915
  ],
9470
9916
  args: [
9471
9917
  {
9472
- name: "cluster_offset",
9918
+ name: "cluster_id",
9473
9919
  type: "u32"
9920
+ },
9921
+ {
9922
+ name: "new_authority",
9923
+ type: {
9924
+ option: "pubkey"
9925
+ }
9474
9926
  }
9475
9927
  ]
9476
9928
  },
9477
9929
  {
9478
- name: "set_cluster_authority",
9930
+ name: "set_cluster_td_info",
9479
9931
  discriminator: [
9480
- 94,
9481
- 172,
9482
- 32,
9483
- 75,
9484
- 38,
9485
- 40,
9486
- 31,
9487
- 106
9932
+ 182,
9933
+ 126,
9934
+ 92,
9935
+ 101,
9936
+ 25,
9937
+ 252,
9938
+ 84,
9939
+ 180
9488
9940
  ],
9489
9941
  accounts: [
9490
9942
  {
9491
- name: "current_authority",
9943
+ name: "authority",
9492
9944
  writable: true,
9493
9945
  signer: true
9494
9946
  },
@@ -9523,30 +9975,84 @@ var instructions = [
9523
9975
  type: "u32"
9524
9976
  },
9525
9977
  {
9526
- name: "new_authority",
9978
+ name: "td_info",
9527
9979
  type: {
9528
- option: "pubkey"
9980
+ option: {
9981
+ defined: {
9982
+ name: "NodeMetadata"
9983
+ }
9984
+ }
9985
+ }
9986
+ }
9987
+ ]
9988
+ },
9989
+ {
9990
+ name: "set_mxe_keys",
9991
+ discriminator: [
9992
+ 156,
9993
+ 205,
9994
+ 125,
9995
+ 215,
9996
+ 134,
9997
+ 88,
9998
+ 62,
9999
+ 144
10000
+ ],
10001
+ accounts: [
10002
+ {
10003
+ name: "signer",
10004
+ writable: true,
10005
+ signer: true
10006
+ },
10007
+ {
10008
+ name: "node",
10009
+ pda: {
10010
+ seeds: [
10011
+ {
10012
+ kind: "const",
10013
+ value: [
10014
+ 65,
10015
+ 114,
10016
+ 120,
10017
+ 78,
10018
+ 111,
10019
+ 100,
10020
+ 101
10021
+ ]
10022
+ },
10023
+ {
10024
+ kind: "arg",
10025
+ path: "node_offset"
10026
+ }
10027
+ ]
10028
+ }
10029
+ },
10030
+ {
10031
+ name: "mxe",
10032
+ writable: true,
10033
+ pda: {
10034
+ seeds: [
10035
+ {
10036
+ kind: "const",
10037
+ value: [
10038
+ 77,
10039
+ 88,
10040
+ 69,
10041
+ 65,
10042
+ 99,
10043
+ 99,
10044
+ 111,
10045
+ 117,
10046
+ 110,
10047
+ 116
10048
+ ]
10049
+ },
10050
+ {
10051
+ kind: "arg",
10052
+ path: "_mxe_program"
10053
+ }
10054
+ ]
9529
10055
  }
9530
- }
9531
- ]
9532
- },
9533
- {
9534
- name: "set_cluster_td_info",
9535
- discriminator: [
9536
- 182,
9537
- 126,
9538
- 92,
9539
- 101,
9540
- 25,
9541
- 252,
9542
- 84,
9543
- 180
9544
- ],
9545
- accounts: [
9546
- {
9547
- name: "authority",
9548
- writable: true,
9549
- signer: true
9550
10056
  },
9551
10057
  {
9552
10058
  name: "cluster_acc",
@@ -9566,8 +10072,9 @@ var instructions = [
9566
10072
  ]
9567
10073
  },
9568
10074
  {
9569
- kind: "arg",
9570
- path: "_id"
10075
+ kind: "account",
10076
+ path: "mxe.cluster",
10077
+ account: "MXEAccount"
9571
10078
  }
9572
10079
  ]
9573
10080
  }
@@ -9575,32 +10082,62 @@ var instructions = [
9575
10082
  ],
9576
10083
  args: [
9577
10084
  {
9578
- name: "cluster_id",
10085
+ name: "node_offset",
9579
10086
  type: "u32"
9580
10087
  },
9581
10088
  {
9582
- name: "td_info",
10089
+ name: "_mxe_program",
10090
+ type: "pubkey"
10091
+ },
10092
+ {
10093
+ name: "mxe_x25519_pubkey",
9583
10094
  type: {
9584
- option: {
9585
- defined: {
9586
- name: "NodeMetadata"
9587
- }
9588
- }
10095
+ array: [
10096
+ "u8",
10097
+ 32
10098
+ ]
10099
+ }
10100
+ },
10101
+ {
10102
+ name: "mxe_ed25519_verifying_key",
10103
+ type: {
10104
+ array: [
10105
+ "u8",
10106
+ 32
10107
+ ]
10108
+ }
10109
+ },
10110
+ {
10111
+ name: "mxe_elgamal_pubkey",
10112
+ type: {
10113
+ array: [
10114
+ "u8",
10115
+ 32
10116
+ ]
10117
+ }
10118
+ },
10119
+ {
10120
+ name: "mxe_pubkey_validity_proof",
10121
+ type: {
10122
+ array: [
10123
+ "u8",
10124
+ 64
10125
+ ]
9589
10126
  }
9590
10127
  }
9591
10128
  ]
9592
10129
  },
9593
10130
  {
9594
- name: "set_mxe_keys",
10131
+ name: "set_mxe_recovery_keys_init",
9595
10132
  discriminator: [
9596
- 156,
9597
- 205,
9598
- 125,
9599
- 215,
9600
- 134,
9601
- 88,
9602
- 62,
9603
- 144
10133
+ 49,
10134
+ 89,
10135
+ 116,
10136
+ 64,
10137
+ 81,
10138
+ 250,
10139
+ 112,
10140
+ 64
9604
10141
  ],
9605
10142
  accounts: [
9606
10143
  {
@@ -9658,6 +10195,45 @@ var instructions = [
9658
10195
  ]
9659
10196
  }
9660
10197
  },
10198
+ {
10199
+ name: "recovery_cluster_acc",
10200
+ writable: true,
10201
+ pda: {
10202
+ seeds: [
10203
+ {
10204
+ kind: "const",
10205
+ value: [
10206
+ 82,
10207
+ 101,
10208
+ 99,
10209
+ 111,
10210
+ 118,
10211
+ 101,
10212
+ 114,
10213
+ 121,
10214
+ 67,
10215
+ 108,
10216
+ 117,
10217
+ 115,
10218
+ 116,
10219
+ 101,
10220
+ 114,
10221
+ 65,
10222
+ 99,
10223
+ 99,
10224
+ 111,
10225
+ 117,
10226
+ 110,
10227
+ 116
10228
+ ]
10229
+ },
10230
+ {
10231
+ kind: "arg",
10232
+ path: "_mxe_program"
10233
+ }
10234
+ ]
10235
+ }
10236
+ },
9661
10237
  {
9662
10238
  name: "cluster_acc",
9663
10239
  writable: true,
@@ -9677,7 +10253,7 @@ var instructions = [
9677
10253
  },
9678
10254
  {
9679
10255
  kind: "account",
9680
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
10256
+ path: "mxe.cluster",
9681
10257
  account: "MXEAccount"
9682
10258
  }
9683
10259
  ]
@@ -9694,25 +10270,30 @@ var instructions = [
9694
10270
  type: "pubkey"
9695
10271
  },
9696
10272
  {
9697
- name: "mxe_x25519_pubkey",
10273
+ name: "nonce",
9698
10274
  type: {
9699
10275
  array: [
9700
10276
  "u8",
9701
- 32
10277
+ 16
9702
10278
  ]
9703
10279
  }
9704
10280
  },
9705
10281
  {
9706
- name: "mxe_ed25519_verifying_key",
10282
+ name: "encrypted_mxe_keys",
9707
10283
  type: {
9708
10284
  array: [
9709
- "u8",
9710
- 32
10285
+ {
10286
+ array: [
10287
+ "u8",
10288
+ 32
10289
+ ]
10290
+ },
10291
+ 13
9711
10292
  ]
9712
10293
  }
9713
10294
  },
9714
10295
  {
9715
- name: "mxe_elgamal_pubkey",
10296
+ name: "key_material_hash",
9716
10297
  type: {
9717
10298
  array: [
9718
10299
  "u8",
@@ -9721,7 +10302,7 @@ var instructions = [
9721
10302
  }
9722
10303
  },
9723
10304
  {
9724
- name: "mxe_pubkey_validity_proof",
10305
+ name: "bls_sig",
9725
10306
  type: {
9726
10307
  array: [
9727
10308
  "u8",
@@ -9732,25 +10313,49 @@ var instructions = [
9732
10313
  ]
9733
10314
  },
9734
10315
  {
9735
- name: "set_mxe_recovery_keys_init",
10316
+ name: "submit_aggregated_bls_pubkey",
9736
10317
  discriminator: [
9737
- 49,
9738
- 89,
9739
- 116,
9740
- 64,
9741
- 81,
9742
- 250,
9743
- 112,
9744
- 64
10318
+ 192,
10319
+ 135,
10320
+ 47,
10321
+ 120,
10322
+ 63,
10323
+ 18,
10324
+ 232,
10325
+ 164
9745
10326
  ],
9746
10327
  accounts: [
9747
10328
  {
9748
- name: "signer",
10329
+ name: "node_authority",
9749
10330
  writable: true,
9750
10331
  signer: true
9751
10332
  },
9752
10333
  {
9753
- name: "node",
10334
+ name: "cluster_acc",
10335
+ writable: true,
10336
+ pda: {
10337
+ seeds: [
10338
+ {
10339
+ kind: "const",
10340
+ value: [
10341
+ 67,
10342
+ 108,
10343
+ 117,
10344
+ 115,
10345
+ 116,
10346
+ 101,
10347
+ 114
10348
+ ]
10349
+ },
10350
+ {
10351
+ kind: "arg",
10352
+ path: "cluster_offset"
10353
+ }
10354
+ ]
10355
+ }
10356
+ },
10357
+ {
10358
+ name: "arx_node_acc",
9754
10359
  pda: {
9755
10360
  seeds: [
9756
10361
  {
@@ -9758,23 +10363,99 @@ var instructions = [
9758
10363
  value: [
9759
10364
  65,
9760
10365
  114,
9761
- 120,
9762
- 78,
10366
+ 120,
10367
+ 78,
10368
+ 111,
10369
+ 100,
10370
+ 101
10371
+ ]
10372
+ },
10373
+ {
10374
+ kind: "arg",
10375
+ path: "node_offset"
10376
+ }
10377
+ ]
10378
+ }
10379
+ }
10380
+ ],
10381
+ args: [
10382
+ {
10383
+ name: "cluster_id",
10384
+ type: "u32"
10385
+ },
10386
+ {
10387
+ name: "node_bump",
10388
+ type: "u32"
10389
+ },
10390
+ {
10391
+ name: "aggregated_bls_pubkey",
10392
+ type: {
10393
+ defined: {
10394
+ name: "BN254G2BLSPublicKey"
10395
+ }
10396
+ }
10397
+ }
10398
+ ]
10399
+ },
10400
+ {
10401
+ name: "submit_key_recovery_share",
10402
+ docs: [
10403
+ "Submits a recovery share from a recovery peer.",
10404
+ "Each share contains RESCUE_KEY_COUNT (5) field elements of 32 bytes each."
10405
+ ],
10406
+ discriminator: [
10407
+ 108,
10408
+ 74,
10409
+ 123,
10410
+ 253,
10411
+ 76,
10412
+ 98,
10413
+ 190,
10414
+ 164
10415
+ ],
10416
+ accounts: [
10417
+ {
10418
+ name: "signer",
10419
+ writable: true,
10420
+ signer: true
10421
+ },
10422
+ {
10423
+ name: "recovery_peer_account",
10424
+ pda: {
10425
+ seeds: [
10426
+ {
10427
+ kind: "const",
10428
+ value: [
10429
+ 82,
10430
+ 101,
10431
+ 99,
10432
+ 111,
10433
+ 118,
10434
+ 101,
10435
+ 114,
10436
+ 121,
10437
+ 80,
10438
+ 101,
10439
+ 101,
10440
+ 114,
10441
+ 65,
10442
+ 99,
10443
+ 99,
9763
10444
  111,
9764
- 100,
9765
- 101
10445
+ 117,
10446
+ 110,
10447
+ 116
9766
10448
  ]
9767
10449
  },
9768
10450
  {
9769
10451
  kind: "arg",
9770
- path: "node_offset"
10452
+ path: "peer_offset"
9771
10453
  }
9772
10454
  ]
9773
10455
  }
9774
10456
  },
9775
10457
  {
9776
- name: "mxe",
9777
- writable: true,
10458
+ name: "original_mxe",
9778
10459
  pda: {
9779
10460
  seeds: [
9780
10461
  {
@@ -9794,14 +10475,13 @@ var instructions = [
9794
10475
  },
9795
10476
  {
9796
10477
  kind: "arg",
9797
- path: "_mxe_program"
10478
+ path: "_original_mxe_program"
9798
10479
  }
9799
10480
  ]
9800
10481
  }
9801
10482
  },
9802
10483
  {
9803
10484
  name: "recovery_cluster_acc",
9804
- writable: true,
9805
10485
  pda: {
9806
10486
  seeds: [
9807
10487
  {
@@ -9833,57 +10513,72 @@ var instructions = [
9833
10513
  },
9834
10514
  {
9835
10515
  kind: "arg",
9836
- path: "_mxe_program"
10516
+ path: "_original_mxe_program"
9837
10517
  }
9838
10518
  ]
9839
10519
  }
9840
10520
  },
9841
10521
  {
9842
- name: "cluster_acc",
10522
+ name: "mxe_recovery_account",
9843
10523
  writable: true,
9844
10524
  pda: {
9845
10525
  seeds: [
9846
10526
  {
9847
10527
  kind: "const",
9848
10528
  value: [
9849
- 67,
9850
- 108,
9851
- 117,
9852
- 115,
9853
- 116,
10529
+ 77,
10530
+ 120,
9854
10531
  101,
9855
- 114
10532
+ 82,
10533
+ 101,
10534
+ 99,
10535
+ 111,
10536
+ 118,
10537
+ 101,
10538
+ 114,
10539
+ 121,
10540
+ 65,
10541
+ 99,
10542
+ 99,
10543
+ 111,
10544
+ 117,
10545
+ 110,
10546
+ 116
9856
10547
  ]
9857
10548
  },
9858
10549
  {
9859
10550
  kind: "account",
9860
- path: "mxe.cluster.ok_or(ArciumError :: ClusterNotSet) ? ",
9861
- account: "MXEAccount"
10551
+ path: "original_mxe_program"
9862
10552
  }
9863
10553
  ]
9864
10554
  }
10555
+ },
10556
+ {
10557
+ name: "original_mxe_program"
10558
+ },
10559
+ {
10560
+ name: "backup_mxe_program"
9865
10561
  }
9866
10562
  ],
9867
10563
  args: [
9868
10564
  {
9869
- name: "node_offset",
9870
- type: "u32"
10565
+ name: "original_mxe_program",
10566
+ type: "pubkey"
9871
10567
  },
9872
10568
  {
9873
- name: "_mxe_program",
10569
+ name: "backup_mxe_program",
9874
10570
  type: "pubkey"
9875
10571
  },
9876
10572
  {
9877
- name: "nonce",
9878
- type: {
9879
- array: [
9880
- "u8",
9881
- 16
9882
- ]
9883
- }
10573
+ name: "peer_offset",
10574
+ type: "u32"
9884
10575
  },
9885
10576
  {
9886
- name: "encrypted_mxe_keys",
10577
+ name: "peer_index",
10578
+ type: "u32"
10579
+ },
10580
+ {
10581
+ name: "share",
9887
10582
  type: {
9888
10583
  array: [
9889
10584
  {
@@ -9892,41 +10587,209 @@ var instructions = [
9892
10587
  32
9893
10588
  ]
9894
10589
  },
9895
- 13
10590
+ 5
10591
+ ]
10592
+ }
10593
+ }
10594
+ ]
10595
+ },
10596
+ {
10597
+ name: "update_current_epoch_idempotent",
10598
+ discriminator: [
10599
+ 47,
10600
+ 73,
10601
+ 68,
10602
+ 127,
10603
+ 116,
10604
+ 74,
10605
+ 89,
10606
+ 62
10607
+ ],
10608
+ accounts: [
10609
+ {
10610
+ name: "clock",
10611
+ writable: true,
10612
+ pda: {
10613
+ seeds: [
10614
+ {
10615
+ kind: "const",
10616
+ value: [
10617
+ 67,
10618
+ 108,
10619
+ 111,
10620
+ 99,
10621
+ 107,
10622
+ 65,
10623
+ 99,
10624
+ 99,
10625
+ 111,
10626
+ 117,
10627
+ 110,
10628
+ 116
10629
+ ]
10630
+ }
10631
+ ]
10632
+ }
10633
+ }
10634
+ ],
10635
+ args: [
10636
+ ]
10637
+ },
10638
+ {
10639
+ name: "upload_circuit",
10640
+ discriminator: [
10641
+ 86,
10642
+ 238,
10643
+ 214,
10644
+ 111,
10645
+ 30,
10646
+ 23,
10647
+ 168,
10648
+ 100
10649
+ ],
10650
+ accounts: [
10651
+ {
10652
+ name: "signer",
10653
+ writable: true,
10654
+ signer: true
10655
+ },
10656
+ {
10657
+ name: "comp_def_acc",
10658
+ pda: {
10659
+ seeds: [
10660
+ {
10661
+ kind: "const",
10662
+ value: [
10663
+ 67,
10664
+ 111,
10665
+ 109,
10666
+ 112,
10667
+ 117,
10668
+ 116,
10669
+ 97,
10670
+ 116,
10671
+ 105,
10672
+ 111,
10673
+ 110,
10674
+ 68,
10675
+ 101,
10676
+ 102,
10677
+ 105,
10678
+ 110,
10679
+ 105,
10680
+ 116,
10681
+ 105,
10682
+ 111,
10683
+ 110,
10684
+ 65,
10685
+ 99,
10686
+ 99,
10687
+ 111,
10688
+ 117,
10689
+ 110,
10690
+ 116
10691
+ ]
10692
+ },
10693
+ {
10694
+ kind: "arg",
10695
+ path: "_mxe_program"
10696
+ },
10697
+ {
10698
+ kind: "arg",
10699
+ path: "_comp_offset"
10700
+ }
9896
10701
  ]
9897
10702
  }
9898
10703
  },
9899
10704
  {
9900
- name: "key_material_hash",
9901
- type: {
9902
- array: [
9903
- "u8",
9904
- 32
10705
+ name: "comp_def_raw",
10706
+ writable: true,
10707
+ pda: {
10708
+ seeds: [
10709
+ {
10710
+ kind: "const",
10711
+ value: [
10712
+ 67,
10713
+ 111,
10714
+ 109,
10715
+ 112,
10716
+ 117,
10717
+ 116,
10718
+ 97,
10719
+ 116,
10720
+ 105,
10721
+ 111,
10722
+ 110,
10723
+ 68,
10724
+ 101,
10725
+ 102,
10726
+ 105,
10727
+ 110,
10728
+ 105,
10729
+ 116,
10730
+ 105,
10731
+ 111,
10732
+ 110,
10733
+ 82,
10734
+ 97,
10735
+ 119
10736
+ ]
10737
+ },
10738
+ {
10739
+ kind: "account",
10740
+ path: "comp_def_acc"
10741
+ },
10742
+ {
10743
+ kind: "arg",
10744
+ path: "raw_circuit_index"
10745
+ }
9905
10746
  ]
9906
10747
  }
9907
10748
  },
9908
10749
  {
9909
- name: "bls_sig",
10750
+ name: "system_program",
10751
+ address: "11111111111111111111111111111111"
10752
+ }
10753
+ ],
10754
+ args: [
10755
+ {
10756
+ name: "comp_offset",
10757
+ type: "u32"
10758
+ },
10759
+ {
10760
+ name: "mxe_program",
10761
+ type: "pubkey"
10762
+ },
10763
+ {
10764
+ name: "raw_circuit_index",
10765
+ type: "u8"
10766
+ },
10767
+ {
10768
+ name: "upload_data",
9910
10769
  type: {
9911
10770
  array: [
9912
10771
  "u8",
9913
- 64
10772
+ 814
9914
10773
  ]
9915
10774
  }
10775
+ },
10776
+ {
10777
+ name: "offset",
10778
+ type: "u32"
9916
10779
  }
9917
10780
  ]
9918
10781
  },
9919
10782
  {
9920
- name: "submit_aggregated_bls_pubkey",
10783
+ name: "vote_fee",
9921
10784
  discriminator: [
9922
- 192,
9923
- 135,
9924
- 47,
9925
- 120,
9926
- 63,
9927
- 18,
9928
- 232,
9929
- 164
10785
+ 39,
10786
+ 118,
10787
+ 79,
10788
+ 185,
10789
+ 118,
10790
+ 12,
10791
+ 71,
10792
+ 84
9930
10793
  ],
9931
10794
  accounts: [
9932
10795
  {
@@ -9953,7 +10816,7 @@ var instructions = [
9953
10816
  },
9954
10817
  {
9955
10818
  kind: "arg",
9956
- path: "cluster_offset"
10819
+ path: "_cluster_offset"
9957
10820
  }
9958
10821
  ]
9959
10822
  }
@@ -9980,84 +10843,70 @@ var instructions = [
9980
10843
  }
9981
10844
  ]
9982
10845
  }
10846
+ },
10847
+ {
10848
+ name: "clock",
10849
+ writable: true,
10850
+ pda: {
10851
+ seeds: [
10852
+ {
10853
+ kind: "const",
10854
+ value: [
10855
+ 67,
10856
+ 108,
10857
+ 111,
10858
+ 99,
10859
+ 107,
10860
+ 65,
10861
+ 99,
10862
+ 99,
10863
+ 111,
10864
+ 117,
10865
+ 110,
10866
+ 116
10867
+ ]
10868
+ }
10869
+ ]
10870
+ }
9983
10871
  }
9984
10872
  ],
9985
10873
  args: [
9986
10874
  {
9987
- name: "cluster_id",
10875
+ name: "cluster_offset",
9988
10876
  type: "u32"
9989
10877
  },
9990
10878
  {
9991
- name: "node_bump",
10879
+ name: "node_offset",
9992
10880
  type: "u32"
9993
10881
  },
9994
10882
  {
9995
- name: "aggregated_bls_pubkey",
9996
- type: {
9997
- defined: {
9998
- name: "BN254G2BLSPublicKey"
9999
- }
10000
- }
10883
+ name: "fee_vote",
10884
+ type: "u64"
10001
10885
  }
10002
10886
  ]
10003
10887
  },
10004
10888
  {
10005
- name: "submit_key_recovery_share",
10889
+ name: "z_close_aborted_key_recovery",
10006
10890
  docs: [
10007
- "Submits a recovery share from a recovery peer.",
10008
- "Each share contains RESCUE_KEY_COUNT (5) field elements of 32 bytes each."
10891
+ "Closes all recovery-related accounts in the cancel path.",
10892
+ "Instruction name starts with 'Z' to append to the idls."
10009
10893
  ],
10010
10894
  discriminator: [
10011
- 108,
10012
- 74,
10013
- 123,
10014
- 253,
10015
- 76,
10016
- 98,
10017
- 190,
10018
- 164
10895
+ 28,
10896
+ 29,
10897
+ 32,
10898
+ 130,
10899
+ 111,
10900
+ 5,
10901
+ 244,
10902
+ 101
10019
10903
  ],
10020
10904
  accounts: [
10021
10905
  {
10022
- name: "signer",
10906
+ name: "authority",
10023
10907
  writable: true,
10024
10908
  signer: true
10025
10909
  },
10026
- {
10027
- name: "recovery_peer_account",
10028
- pda: {
10029
- seeds: [
10030
- {
10031
- kind: "const",
10032
- value: [
10033
- 82,
10034
- 101,
10035
- 99,
10036
- 111,
10037
- 118,
10038
- 101,
10039
- 114,
10040
- 121,
10041
- 80,
10042
- 101,
10043
- 101,
10044
- 114,
10045
- 65,
10046
- 99,
10047
- 99,
10048
- 111,
10049
- 117,
10050
- 110,
10051
- 116
10052
- ]
10053
- },
10054
- {
10055
- kind: "arg",
10056
- path: "peer_offset"
10057
- }
10058
- ]
10059
- }
10060
- },
10061
10910
  {
10062
10911
  name: "original_mxe",
10063
10912
  pda: {
@@ -10082,151 +10931,19 @@ var instructions = [
10082
10931
  path: "_original_mxe_program"
10083
10932
  }
10084
10933
  ]
10085
- }
10086
- },
10087
- {
10088
- name: "recovery_cluster_acc",
10089
- pda: {
10090
- seeds: [
10091
- {
10092
- kind: "const",
10093
- value: [
10094
- 82,
10095
- 101,
10096
- 99,
10097
- 111,
10098
- 118,
10099
- 101,
10100
- 114,
10101
- 121,
10102
- 67,
10103
- 108,
10104
- 117,
10105
- 115,
10106
- 116,
10107
- 101,
10108
- 114,
10109
- 65,
10110
- 99,
10111
- 99,
10112
- 111,
10113
- 117,
10114
- 110,
10115
- 116
10116
- ]
10117
- },
10118
- {
10119
- kind: "arg",
10120
- path: "_original_mxe_program"
10121
- }
10122
- ]
10123
- }
10124
- },
10125
- {
10126
- name: "mxe_recovery_account",
10127
- writable: true,
10128
- pda: {
10129
- seeds: [
10130
- {
10131
- kind: "const",
10132
- value: [
10133
- 77,
10134
- 120,
10135
- 101,
10136
- 82,
10137
- 101,
10138
- 99,
10139
- 111,
10140
- 118,
10141
- 101,
10142
- 114,
10143
- 121,
10144
- 65,
10145
- 99,
10146
- 99,
10147
- 111,
10148
- 117,
10149
- 110,
10150
- 116
10151
- ]
10152
- },
10153
- {
10154
- kind: "account",
10155
- path: "backup_mxe_program"
10156
- },
10157
- {
10158
- kind: "account",
10159
- path: "original_mxe_program"
10160
- }
10161
- ]
10162
- }
10163
- },
10164
- {
10165
- name: "original_mxe_program"
10166
- },
10167
- {
10168
- name: "backup_mxe_program"
10169
- }
10170
- ],
10171
- args: [
10172
- {
10173
- name: "original_mxe_program",
10174
- type: "pubkey"
10175
- },
10176
- {
10177
- name: "backup_mxe_program",
10178
- type: "pubkey"
10179
- },
10180
- {
10181
- name: "peer_offset",
10182
- type: "u32"
10183
- },
10184
- {
10185
- name: "peer_index",
10186
- type: "u32"
10187
- },
10188
- {
10189
- name: "share",
10190
- type: {
10191
- array: [
10192
- {
10193
- array: [
10194
- "u8",
10195
- 32
10196
- ]
10197
- },
10198
- 5
10199
- ]
10200
- }
10201
- }
10202
- ]
10203
- },
10204
- {
10205
- name: "update_current_epoch_idempotent",
10206
- discriminator: [
10207
- 47,
10208
- 73,
10209
- 68,
10210
- 127,
10211
- 116,
10212
- 74,
10213
- 89,
10214
- 62
10215
- ],
10216
- accounts: [
10934
+ }
10935
+ },
10217
10936
  {
10218
- name: "clock",
10937
+ name: "backup_mxe",
10219
10938
  writable: true,
10220
10939
  pda: {
10221
10940
  seeds: [
10222
10941
  {
10223
10942
  kind: "const",
10224
10943
  value: [
10225
- 67,
10226
- 108,
10227
- 111,
10228
- 99,
10229
- 107,
10944
+ 77,
10945
+ 88,
10946
+ 69,
10230
10947
  65,
10231
10948
  99,
10232
10949
  99,
@@ -10235,60 +10952,33 @@ var instructions = [
10235
10952
  110,
10236
10953
  116
10237
10954
  ]
10955
+ },
10956
+ {
10957
+ kind: "account",
10958
+ path: "mxe_recovery_account"
10238
10959
  }
10239
10960
  ]
10240
10961
  }
10241
- }
10242
- ],
10243
- args: [
10244
- ]
10245
- },
10246
- {
10247
- name: "upload_circuit",
10248
- discriminator: [
10249
- 86,
10250
- 238,
10251
- 214,
10252
- 111,
10253
- 30,
10254
- 23,
10255
- 168,
10256
- 100
10257
- ],
10258
- accounts: [
10259
- {
10260
- name: "signer",
10261
- writable: true,
10262
- signer: true
10263
10962
  },
10264
10963
  {
10265
- name: "comp_def_acc",
10964
+ name: "mxe_recovery_account",
10965
+ writable: true,
10266
10966
  pda: {
10267
10967
  seeds: [
10268
10968
  {
10269
10969
  kind: "const",
10270
10970
  value: [
10271
- 67,
10272
- 111,
10273
- 109,
10274
- 112,
10275
- 117,
10276
- 116,
10277
- 97,
10278
- 116,
10279
- 105,
10280
- 111,
10281
- 110,
10282
- 68,
10971
+ 77,
10972
+ 120,
10283
10973
  101,
10284
- 102,
10285
- 105,
10286
- 110,
10287
- 105,
10288
- 116,
10289
- 105,
10974
+ 82,
10975
+ 101,
10976
+ 99,
10290
10977
  111,
10291
- 110,
10978
+ 118,
10979
+ 101,
10980
+ 114,
10981
+ 121,
10292
10982
  65,
10293
10983
  99,
10294
10984
  99,
@@ -10300,17 +10990,13 @@ var instructions = [
10300
10990
  },
10301
10991
  {
10302
10992
  kind: "arg",
10303
- path: "_mxe_program"
10304
- },
10305
- {
10306
- kind: "arg",
10307
- path: "_comp_offset"
10993
+ path: "_original_mxe_program"
10308
10994
  }
10309
10995
  ]
10310
10996
  }
10311
10997
  },
10312
10998
  {
10313
- name: "comp_def_raw",
10999
+ name: "key_recovery_finalize_comp_def",
10314
11000
  writable: true,
10315
11001
  pda: {
10316
11002
  seeds: [
@@ -10338,75 +11024,33 @@ var instructions = [
10338
11024
  105,
10339
11025
  111,
10340
11026
  110,
10341
- 82,
10342
- 97,
10343
- 119
11027
+ 65,
11028
+ 99,
11029
+ 99,
11030
+ 111,
11031
+ 117,
11032
+ 110,
11033
+ 116
10344
11034
  ]
10345
11035
  },
10346
11036
  {
10347
11037
  kind: "account",
10348
- path: "comp_def_acc"
11038
+ path: "mxe_recovery_account"
10349
11039
  },
10350
11040
  {
10351
- kind: "arg",
10352
- path: "raw_circuit_index"
11041
+ kind: "const",
11042
+ value: [
11043
+ 3,
11044
+ 0,
11045
+ 0,
11046
+ 0
11047
+ ]
10353
11048
  }
10354
11049
  ]
10355
11050
  }
10356
11051
  },
10357
11052
  {
10358
- name: "system_program",
10359
- address: "11111111111111111111111111111111"
10360
- }
10361
- ],
10362
- args: [
10363
- {
10364
- name: "comp_offset",
10365
- type: "u32"
10366
- },
10367
- {
10368
- name: "mxe_program",
10369
- type: "pubkey"
10370
- },
10371
- {
10372
- name: "raw_circuit_index",
10373
- type: "u8"
10374
- },
10375
- {
10376
- name: "upload_data",
10377
- type: {
10378
- array: [
10379
- "u8",
10380
- 814
10381
- ]
10382
- }
10383
- },
10384
- {
10385
- name: "offset",
10386
- type: "u32"
10387
- }
10388
- ]
10389
- },
10390
- {
10391
- name: "vote_fee",
10392
- discriminator: [
10393
- 39,
10394
- 118,
10395
- 79,
10396
- 185,
10397
- 118,
10398
- 12,
10399
- 71,
10400
- 84
10401
- ],
10402
- accounts: [
10403
- {
10404
- name: "node_authority",
10405
- writable: true,
10406
- signer: true
10407
- },
10408
- {
10409
- name: "cluster_acc",
11053
+ name: "key_recovery_finalize_computation",
10410
11054
  writable: true,
10411
11055
  pda: {
10412
11056
  seeds: [
@@ -10414,82 +11058,76 @@ var instructions = [
10414
11058
  kind: "const",
10415
11059
  value: [
10416
11060
  67,
10417
- 108,
11061
+ 111,
11062
+ 109,
11063
+ 112,
10418
11064
  117,
10419
- 115,
10420
11065
  116,
10421
- 101,
10422
- 114
11066
+ 97,
11067
+ 116,
11068
+ 105,
11069
+ 111,
11070
+ 110,
11071
+ 65,
11072
+ 99,
11073
+ 99,
11074
+ 111,
11075
+ 117,
11076
+ 110,
11077
+ 116
10423
11078
  ]
10424
11079
  },
10425
11080
  {
10426
11081
  kind: "arg",
10427
- path: "_cluster_offset"
11082
+ path: "backup_cluster_offset"
11083
+ },
11084
+ {
11085
+ kind: "account",
11086
+ path: "mxe_recovery_account"
10428
11087
  }
10429
11088
  ]
10430
11089
  }
10431
11090
  },
10432
11091
  {
10433
- name: "arx_node_acc",
11092
+ name: "executing_pool",
11093
+ writable: true,
10434
11094
  pda: {
10435
11095
  seeds: [
10436
11096
  {
10437
11097
  kind: "const",
10438
11098
  value: [
10439
- 65,
10440
- 114,
11099
+ 69,
10441
11100
  120,
10442
- 78,
11101
+ 101,
11102
+ 99,
11103
+ 112,
10443
11104
  111,
10444
- 100,
10445
- 101
11105
+ 111,
11106
+ 108
10446
11107
  ]
10447
11108
  },
10448
11109
  {
10449
11110
  kind: "arg",
10450
- path: "node_offset"
11111
+ path: "backup_cluster_offset"
10451
11112
  }
10452
11113
  ]
10453
11114
  }
10454
11115
  },
10455
11116
  {
10456
- name: "clock",
10457
- writable: true,
10458
- pda: {
10459
- seeds: [
10460
- {
10461
- kind: "const",
10462
- value: [
10463
- 67,
10464
- 108,
10465
- 111,
10466
- 99,
10467
- 107,
10468
- 65,
10469
- 99,
10470
- 99,
10471
- 111,
10472
- 117,
10473
- 110,
10474
- 116
10475
- ]
10476
- }
10477
- ]
10478
- }
11117
+ name: "original_mxe_program"
11118
+ },
11119
+ {
11120
+ name: "backup_mxe_program"
10479
11121
  }
10480
11122
  ],
10481
11123
  args: [
10482
11124
  {
10483
- name: "cluster_offset",
10484
- type: "u32"
11125
+ name: "original_mxe_program",
11126
+ type: "pubkey"
10485
11127
  },
10486
11128
  {
10487
- name: "node_offset",
11129
+ name: "backup_cluster_offset",
10488
11130
  type: "u32"
10489
- },
10490
- {
10491
- name: "fee_vote",
10492
- type: "u64"
10493
11131
  }
10494
11132
  ]
10495
11133
  }
@@ -10806,7 +11444,59 @@ var events = [
10806
11444
  72,
10807
11445
  218,
10808
11446
  87,
10809
- 145
11447
+ 145
11448
+ ]
11449
+ },
11450
+ {
11451
+ name: "CloseComputationDefinitionBuffersEvent",
11452
+ discriminator: [
11453
+ 24,
11454
+ 85,
11455
+ 55,
11456
+ 5,
11457
+ 223,
11458
+ 56,
11459
+ 125,
11460
+ 30
11461
+ ]
11462
+ },
11463
+ {
11464
+ name: "CloseComputationDefinitionEvent",
11465
+ discriminator: [
11466
+ 157,
11467
+ 140,
11468
+ 179,
11469
+ 138,
11470
+ 201,
11471
+ 132,
11472
+ 108,
11473
+ 37
11474
+ ]
11475
+ },
11476
+ {
11477
+ name: "CloseMxeEvent",
11478
+ discriminator: [
11479
+ 71,
11480
+ 207,
11481
+ 152,
11482
+ 87,
11483
+ 123,
11484
+ 254,
11485
+ 179,
11486
+ 226
11487
+ ]
11488
+ },
11489
+ {
11490
+ name: "DeactivateComputationDefinitionEvent",
11491
+ discriminator: [
11492
+ 139,
11493
+ 142,
11494
+ 249,
11495
+ 251,
11496
+ 50,
11497
+ 65,
11498
+ 58,
11499
+ 168
10810
11500
  ]
10811
11501
  },
10812
11502
  {
@@ -10921,6 +11611,16 @@ var errors = [
10921
11611
  name: "CantFindMempoolID",
10922
11612
  msg: "Couldn't find a mempool ID for the computation"
10923
11613
  },
11614
+ {
11615
+ code: 6009,
11616
+ name: "MxeHasComputationDefinitions",
11617
+ msg: "MXE has unclosed computation definitions"
11618
+ },
11619
+ {
11620
+ code: 6010,
11621
+ name: "MxeKeygenNotFinalized",
11622
+ msg: "MXE keygen is not finalized"
11623
+ },
10924
11624
  {
10925
11625
  code: 6100,
10926
11626
  name: "InvalidMempoolDiscriminator",
@@ -11036,6 +11736,31 @@ var errors = [
11036
11736
  name: "InvalidOffset",
11037
11737
  msg: "Offset is invalid"
11038
11738
  },
11739
+ {
11740
+ code: 6306,
11741
+ name: "ComputationDefinitionDeactivated",
11742
+ msg: "Computation definition is deactivated"
11743
+ },
11744
+ {
11745
+ code: 6307,
11746
+ name: "ComputationDefinitionNotDeactivated",
11747
+ msg: "Computation definition is not deactivated"
11748
+ },
11749
+ {
11750
+ code: 6308,
11751
+ name: "ComputationDefinitionHasActiveComputations",
11752
+ msg: "Computation definition has active computations"
11753
+ },
11754
+ {
11755
+ code: 6309,
11756
+ name: "ComputationDefinitionTtlNotPassed",
11757
+ msg: "Computation definition TTL not passed"
11758
+ },
11759
+ {
11760
+ code: 6310,
11761
+ name: "CannotCloseReservedComputationDefinition",
11762
+ msg: "Cannot close a reserved computation definition"
11763
+ },
11039
11764
  {
11040
11765
  code: 6400,
11041
11766
  name: "InvalidNode",
@@ -11261,15 +11986,20 @@ var errors = [
11261
11986
  name: "InvalidDomainSeparator",
11262
11987
  msg: "Invalid domain separator"
11263
11988
  },
11989
+ {
11990
+ code: 6625,
11991
+ name: "RecoveryInitAlreadyInitialized",
11992
+ msg: "Recovery already initialized"
11993
+ },
11264
11994
  {
11265
11995
  code: 6700,
11266
11996
  name: "MxeNotInMigrationState",
11267
- msg: "MXE is not in migration state"
11997
+ msg: "MXE is not in `Migration` state"
11268
11998
  },
11269
11999
  {
11270
12000
  code: 6701,
11271
12001
  name: "MxeAlreadyInMigration",
11272
- msg: "MXE is already in migration state"
12002
+ msg: "MXE is already in `Migration` state"
11273
12003
  },
11274
12004
  {
11275
12005
  code: 6702,
@@ -11339,7 +12069,7 @@ var errors = [
11339
12069
  {
11340
12070
  code: 6716,
11341
12071
  name: "MxeInMigrationState",
11342
- msg: "MXE is in migration state, cannot queue new computations"
12072
+ msg: "MXE is in `Migration` state, cannot queue new computations"
11343
12073
  },
11344
12074
  {
11345
12075
  code: 6717,
@@ -11365,6 +12095,26 @@ var errors = [
11365
12095
  code: 6721,
11366
12096
  name: "CompilationWithoutMainnetFeatureFlag",
11367
12097
  msg: "Program must be compiled with the \\mainnet\\ feature flag."
12098
+ },
12099
+ {
12100
+ code: 6722,
12101
+ name: "MxeInActiveState",
12102
+ msg: "MXE is in `Active` state"
12103
+ },
12104
+ {
12105
+ code: 6723,
12106
+ name: "MxeNotInActiveState",
12107
+ msg: "MXE is not in `Active` state"
12108
+ },
12109
+ {
12110
+ code: 6724,
12111
+ name: "MxeRecoveryAccountDataNotEmpty",
12112
+ msg: "Mxe recovery account data is not empty"
12113
+ },
12114
+ {
12115
+ code: 6725,
12116
+ name: "CannotCloseMxeDuringMigration",
12117
+ msg: "MXE is in migration state, cannot close MXE"
11368
12118
  }
11369
12119
  ];
11370
12120
  var types = [
@@ -11423,6 +12173,9 @@ var types = [
11423
12173
  },
11424
12174
  {
11425
12175
  name: "TimeoutElapsed"
12176
+ },
12177
+ {
12178
+ name: "KeyRecoveryError"
11426
12179
  }
11427
12180
  ]
11428
12181
  }
@@ -11902,6 +12655,35 @@ var types = [
11902
12655
  ]
11903
12656
  }
11904
12657
  },
12658
+ {
12659
+ name: "CircuitFailureReason",
12660
+ type: {
12661
+ kind: "enum",
12662
+ variants: [
12663
+ {
12664
+ name: "OnChainCircuitNotReady"
12665
+ },
12666
+ {
12667
+ name: "OffChainCircuitFetchFailed"
12668
+ },
12669
+ {
12670
+ name: "OffChainCircuitHashMismatch"
12671
+ },
12672
+ {
12673
+ name: "CircuitCUMismatch"
12674
+ },
12675
+ {
12676
+ name: "LocalCircuitFetchFailed"
12677
+ },
12678
+ {
12679
+ name: "CircuitSerialization"
12680
+ },
12681
+ {
12682
+ name: "OtherArxError"
12683
+ }
12684
+ ]
12685
+ }
12686
+ },
11905
12687
  {
11906
12688
  name: "CircuitSource",
11907
12689
  type: {
@@ -11995,6 +12777,58 @@ var types = [
11995
12777
  ]
11996
12778
  }
11997
12779
  },
12780
+ {
12781
+ name: "CloseComputationDefinitionBuffersEvent",
12782
+ type: {
12783
+ kind: "struct",
12784
+ fields: [
12785
+ {
12786
+ name: "comp_def_offset",
12787
+ type: "u32"
12788
+ },
12789
+ {
12790
+ name: "mxe_program_id",
12791
+ type: "pubkey"
12792
+ },
12793
+ {
12794
+ name: "raw_circuit_index",
12795
+ type: "u8"
12796
+ }
12797
+ ]
12798
+ }
12799
+ },
12800
+ {
12801
+ name: "CloseComputationDefinitionEvent",
12802
+ type: {
12803
+ kind: "struct",
12804
+ fields: [
12805
+ {
12806
+ name: "comp_def_offset",
12807
+ type: "u32"
12808
+ },
12809
+ {
12810
+ name: "mxe_program_id",
12811
+ type: "pubkey"
12812
+ }
12813
+ ]
12814
+ }
12815
+ },
12816
+ {
12817
+ name: "CloseMxeEvent",
12818
+ type: {
12819
+ kind: "struct",
12820
+ fields: [
12821
+ {
12822
+ name: "mxe_program_id",
12823
+ type: "pubkey"
12824
+ },
12825
+ {
12826
+ name: "cluster_offset",
12827
+ type: "u32"
12828
+ }
12829
+ ]
12830
+ }
12831
+ },
11998
12832
  {
11999
12833
  name: "Cluster",
12000
12834
  type: {
@@ -12227,15 +13061,27 @@ var types = [
12227
13061
  kind: "struct",
12228
13062
  fields: [
12229
13063
  {
12230
- name: "finalization_authority",
13064
+ name: "deactivation_slot",
12231
13065
  docs: [
12232
- "The authority that is allowed to finalize a computation execution (callback).",
12233
- "This is distinct from `upload_auth` (in `OnChainCircuitSource`) which controls the",
12234
- "computation definition lifecycle (uploading/finalizing the definition itself).",
12235
- "If set to None, anyone can finalize the computation execution."
13066
+ "Slot at which the computation definition was deactivated, or `None` while active.",
13067
+ "An OnChain circuit with `OnChainCircuitSource.is_completed == false` is not yet",
13068
+ "queueable even when `deactivation_slot == None`; use `is_ready_to_queue()` to combine",
13069
+ "both conditions."
12236
13070
  ],
12237
13071
  type: {
12238
- option: "pubkey"
13072
+ option: "u64"
13073
+ }
13074
+ },
13075
+ {
13076
+ name: "padding",
13077
+ docs: [
13078
+ "Padding to avoid breaking change since the above used to be Option<Pubkey>"
13079
+ ],
13080
+ type: {
13081
+ array: [
13082
+ "u8",
13083
+ 24
13084
+ ]
12239
13085
  }
12240
13086
  },
12241
13087
  {
@@ -12325,6 +13171,35 @@ var types = [
12325
13171
  ]
12326
13172
  }
12327
13173
  },
13174
+ {
13175
+ name: "ComputationMeta",
13176
+ docs: [
13177
+ "Metadata for each computation slot in the execpool."
13178
+ ],
13179
+ serialization: "bytemuck",
13180
+ repr: {
13181
+ kind: "c"
13182
+ },
13183
+ type: {
13184
+ kind: "struct",
13185
+ fields: [
13186
+ {
13187
+ name: "index",
13188
+ type: "u64"
13189
+ },
13190
+ {
13191
+ name: "queued_slot",
13192
+ docs: [
13193
+ "Slot at which the computation was originally queued (derived from mempool buffer",
13194
+ "position at promotion time). Preserves the original queue time so lifecycle checks",
13195
+ "like `all_computations_newer_than` compare against the real queue slot, not the",
13196
+ "promotion slot."
13197
+ ],
13198
+ type: "u64"
13199
+ }
13200
+ ]
13201
+ }
13202
+ },
12328
13203
  {
12329
13204
  name: "ComputationReference",
12330
13205
  serialization: "bytemuck",
@@ -12418,6 +13293,26 @@ var types = [
12418
13293
  ]
12419
13294
  }
12420
13295
  },
13296
+ {
13297
+ name: "DeactivateComputationDefinitionEvent",
13298
+ type: {
13299
+ kind: "struct",
13300
+ fields: [
13301
+ {
13302
+ name: "comp_def_offset",
13303
+ type: "u32"
13304
+ },
13305
+ {
13306
+ name: "mxe_program_id",
13307
+ type: "pubkey"
13308
+ },
13309
+ {
13310
+ name: "deactivation_slot",
13311
+ type: "u64"
13312
+ }
13313
+ ]
13314
+ }
13315
+ },
12421
13316
  {
12422
13317
  name: "Epoch",
12423
13318
  docs: [
@@ -12464,10 +13359,14 @@ var types = [
12464
13359
  type: "u64"
12465
13360
  },
12466
13361
  {
12467
- name: "execpool_index",
13362
+ name: "meta",
12468
13363
  type: {
12469
13364
  array: [
12470
- "u64",
13365
+ {
13366
+ defined: {
13367
+ name: "ComputationMeta"
13368
+ }
13369
+ },
12471
13370
  {
12472
13371
  generic: "MAX_PARRALLEL_COMPUTATIONS"
12473
13372
  }
@@ -12540,6 +13439,16 @@ var types = [
12540
13439
  },
12541
13440
  {
12542
13441
  name: "OutputTooLarge"
13442
+ },
13443
+ {
13444
+ name: "CircuitFailure",
13445
+ fields: [
13446
+ {
13447
+ defined: {
13448
+ name: "CircuitFailureReason"
13449
+ }
13450
+ }
13451
+ ]
12543
13452
  }
12544
13453
  ]
12545
13454
  }
@@ -12959,14 +13868,20 @@ var types = [
12959
13868
  type: {
12960
13869
  kind: "struct",
12961
13870
  fields: [
13871
+ {
13872
+ name: "_padding",
13873
+ docs: [
13874
+ "`cluster` used to be Option<u32>, so we need to add a padding byte for backwards",
13875
+ "compatibility."
13876
+ ],
13877
+ type: "u8"
13878
+ },
12962
13879
  {
12963
13880
  name: "cluster",
12964
13881
  docs: [
12965
13882
  "The cluster executing the MXE."
12966
13883
  ],
12967
- type: {
12968
- option: "u32"
12969
- }
13884
+ type: "u32"
12970
13885
  },
12971
13886
  {
12972
13887
  name: "keygen_offset",
@@ -13042,7 +13957,7 @@ var types = [
13042
13957
  {
13043
13958
  name: "status",
13044
13959
  docs: [
13045
- "The status of this MXE (Active or Migration)."
13960
+ "The status of this MXE (`Active` or `Migration`)."
13046
13961
  ],
13047
13962
  type: {
13048
13963
  defined: {
@@ -13261,7 +14176,7 @@ var types = [
13261
14176
  name: "MxeRecoveryAccount",
13262
14177
  docs: [
13263
14178
  "Account for tracking key recovery execution state.",
13264
- "PDA seeds: [\"mxe_recovery\", backup_mxe_pubkey, original_mxe_pubkey]"
14179
+ "PDA seeds: [MxeRecoveryAccount::SEED, original_mxe_pubkey]"
13265
14180
  ],
13266
14181
  serialization: "bytemuck",
13267
14182
  repr: {
@@ -13309,21 +14224,14 @@ var types = [
13309
14224
  type: "pubkey"
13310
14225
  },
13311
14226
  {
13312
- name: "is_finalized",
13313
- docs: [
13314
- "Whether the recovery has been finalized (threshold met and marked ready)."
13315
- ],
13316
- type: "u8"
13317
- },
13318
- {
13319
- name: "_padding2",
14227
+ name: "_padding",
13320
14228
  docs: [
13321
- "Padding to ensure struct size is u64 aligned (6 bytes)"
14229
+ "Padding to ensure struct size is u64 aligned"
13322
14230
  ],
13323
14231
  type: {
13324
14232
  array: [
13325
14233
  "u8",
13326
- 6
14234
+ 7
13327
14235
  ]
13328
14236
  }
13329
14237
  },
@@ -14882,27 +15790,6 @@ async function uploadCircuit(provider, circuitName, mxeProgramId, rawCircuit, lo
14882
15790
  sigs.push(await signAndSendWithBlockhash(provider, finalizeCompDefTx, await provider.connection.getLatestBlockhash({ commitment: confirmOptions?.commitment || 'confirmed' }), confirmOptions));
14883
15791
  return sigs;
14884
15792
  }
14885
- /**
14886
- * Queue a key recovery initialization for an MXE on a given cluster.
14887
- * @param provider - Anchor provider for signing and sending.
14888
- * @param clusterOffset - Cluster offset to recover keys from.
14889
- * @param mxeProgramId - Public key of the MXE program.
14890
- * @param confirmOptions - Transaction confirmation options.
14891
- * @returns Array of transaction signatures.
14892
- */
14893
- async function queueKeyRecoveryInit(provider, clusterOffset, mxeProgramId, confirmOptions) {
14894
- const program = getArciumProgram(provider);
14895
- const sigs = [];
14896
- const queueKeyRecoveryInitTx = await program.methods
14897
- .queueKeyRecoveryInit(clusterOffset, mxeProgramId)
14898
- .accounts({
14899
- signer: provider.publicKey,
14900
- mxeProgram: mxeProgramId,
14901
- })
14902
- .transaction();
14903
- sigs.push(await signAndSendWithBlockhash(provider, queueKeyRecoveryInitTx, await provider.connection.getLatestBlockhash({ commitment: confirmOptions?.commitment || "confirmed" }), confirmOptions));
14904
- return sigs;
14905
- }
14906
15793
  /**
14907
15794
  * Build a transaction to finalize a computation definition.
14908
15795
  * @param provider - Anchor provider to use for transactions.
@@ -15007,7 +15894,9 @@ async function buildUploadCircuitTx(program, signerPubkey, compDefAccInfo, mxePr
15007
15894
  }
15008
15895
  let bytesInner = bytes;
15009
15896
  if (bytesInner.length < MAX_UPLOAD_PER_TX_BYTES) {
15010
- const paddedBytes = Buffer.allocUnsafe(MAX_UPLOAD_PER_TX_BYTES);
15897
+ // Zero-fill the padding; allocUnsafe would leak prior process heap
15898
+ // (tx bytes, keys) into public ledger history (R-01).
15899
+ const paddedBytes = Buffer.alloc(MAX_UPLOAD_PER_TX_BYTES);
15011
15900
  paddedBytes.set(bytesInner);
15012
15901
  bytesInner = paddedBytes;
15013
15902
  }
@@ -15071,120 +15960,6 @@ function getCompDefAccInfo(circuitName, mxeProgramId) {
15071
15960
  function getCompDefAccPDA(arciumProgramId, mxeProgramId, offset) {
15072
15961
  return anchor__namespace.web3.PublicKey.findProgramAddressSync([Buffer.from(COMP_DEF_ACC_SEED, 'utf-8'), mxeProgramId.toBuffer(), offset], arciumProgramId)[0];
15073
15962
  }
15074
- /**
15075
- * Set an MXE to Recovery status, initiating the key recovery process.
15076
- * @param provider - Anchor provider to use for transactions.
15077
- * @param mxeProgramId - Public key of the MXE program to recover.
15078
- * @param confirmOptions - Transaction confirmation options.
15079
- * @returns Transaction signature.
15080
- */
15081
- async function recoverMxe(provider, mxeProgramId, confirmOptions) {
15082
- const program = getArciumProgram(provider);
15083
- const tx = await program.methods
15084
- .recoverMxe(mxeProgramId)
15085
- .accountsPartial({
15086
- authority: provider.publicKey,
15087
- mxeProgram: mxeProgramId,
15088
- })
15089
- .transaction();
15090
- return signAndSendWithBlockhash(provider, tx, await provider.connection.getLatestBlockhash({ commitment: confirmOptions?.commitment || 'confirmed' }), confirmOptions);
15091
- }
15092
- /**
15093
- * Initialize key recovery execution by creating the MxeRecoveryAccount and
15094
- * registering the key_recovery_final computation definition on the backup MXE.
15095
- * This is split into two parts due to Solana's 10KB per-instruction allocation limit.
15096
- * @param provider - Anchor provider to use for transactions.
15097
- * @param originalMxeProgramId - Public key of the original MXE program being recovered.
15098
- * @param backupMxeProgramId - Public key of the backup MXE program that will take over.
15099
- * @param confirmOptions - Transaction confirmation options.
15100
- * @returns Transaction signature from part2.
15101
- */
15102
- async function initKeyRecoveryExecution(provider, originalMxeProgramId, backupMxeProgramId, confirmOptions) {
15103
- // Part 1: Create MxeRecoveryAccount with partial size
15104
- const program = getArciumProgram(provider);
15105
- const tx1 = await program.methods
15106
- .initKeyRecoveryExecutionPart1(originalMxeProgramId, backupMxeProgramId)
15107
- .accountsPartial({
15108
- payer: provider.publicKey,
15109
- originalMxeProgram: originalMxeProgramId,
15110
- backupMxeProgram: backupMxeProgramId,
15111
- })
15112
- .transaction();
15113
- await signAndSendWithBlockhash(provider, tx1, await provider.connection.getLatestBlockhash({ commitment: confirmOptions?.commitment || 'confirmed' }), confirmOptions);
15114
- // Part 2: Reallocate to full size and create computation definition
15115
- const tx2 = await program.methods
15116
- .initKeyRecoveryExecutionPart2(originalMxeProgramId, backupMxeProgramId)
15117
- .accountsPartial({
15118
- authority: provider.publicKey,
15119
- payer: provider.publicKey,
15120
- originalMxeProgram: originalMxeProgramId,
15121
- backupMxeProgram: backupMxeProgramId,
15122
- })
15123
- .transaction();
15124
- return signAndSendWithBlockhash(provider, tx2, await provider.connection.getLatestBlockhash({ commitment: confirmOptions?.commitment || 'confirmed' }), confirmOptions);
15125
- }
15126
- /**
15127
- * Submit a re-encrypted key recovery share from a recovery peer.
15128
- * Recovery peers must decrypt shares using their x25519 private key and re-encrypt
15129
- * them for the backup MXE before submission.
15130
- * @param provider - Anchor provider to use for transactions.
15131
- * @param originalMxeProgramId - Public key of the original MXE program being recovered.
15132
- * @param backupMxeProgramId - Public key of the backup MXE program.
15133
- * @param peerOffset - Offset of the recovery peer.
15134
- * @param peerIndex - Index of this peer in the recovery peers list.
15135
- * @param share - Re-encrypted share: 5 field elements of 32 bytes each (160 bytes total).
15136
- * @param confirmOptions - Transaction confirmation options.
15137
- * @returns Transaction signature.
15138
- */
15139
- async function submitKeyRecoveryShare(provider, originalMxeProgramId, backupMxeProgramId, peerOffset, peerIndex, share, confirmOptions) {
15140
- const program = getArciumProgram(provider);
15141
- // Convert to array of 5 elements, each 32 bytes
15142
- const shareArrays = share.map(elem => Array.from(elem));
15143
- if (shareArrays.length !== 5) {
15144
- throw new Error(`Share must contain exactly 5 elements, got ${shareArrays.length}`);
15145
- }
15146
- for (let i = 0; i < 5; i++) {
15147
- if (shareArrays[i].length !== 32) {
15148
- throw new Error(`Share element ${i} must be exactly 32 bytes, got ${shareArrays[i].length}`);
15149
- }
15150
- }
15151
- const tx = await program.methods
15152
- .submitKeyRecoveryShare(originalMxeProgramId, backupMxeProgramId, peerOffset, peerIndex, shareArrays)
15153
- .accountsPartial({
15154
- signer: provider.publicKey,
15155
- originalMxeProgram: originalMxeProgramId,
15156
- backupMxeProgram: backupMxeProgramId,
15157
- })
15158
- .transaction();
15159
- return signAndSendWithBlockhash(provider, tx, await provider.connection.getLatestBlockhash({ commitment: confirmOptions?.commitment || 'confirmed' }), confirmOptions);
15160
- }
15161
- /**
15162
- * Finalize key recovery execution after the submission threshold is met.
15163
- * This queues the key_recovery_finalize MPC computation on the backup cluster.
15164
- * @param provider - Anchor provider to use for transactions.
15165
- * @param originalMxeProgramId - Public key of the original MXE program being recovered.
15166
- * @param backupMxeProgramId - Public key of the backup MXE program.
15167
- * @param clusterOffset - Cluster offset where the backup MXE is deployed.
15168
- * @param keyRecoveryFinalizeOffset - Computation offset for the key_recovery_finalize computation.
15169
- * @param confirmOptions - Transaction confirmation options.
15170
- * @returns Transaction signature.
15171
- */
15172
- async function finalizeKeyRecoveryExecution(provider, originalMxeProgramId, backupMxeProgramId, clusterOffset, keyRecoveryFinalizeOffset, confirmOptions) {
15173
- const program = getArciumProgram(provider);
15174
- const tx = await program.methods
15175
- .finalizeKeyRecoveryExecution(originalMxeProgramId, backupMxeProgramId, clusterOffset)
15176
- .accountsPartial({
15177
- authority: provider.publicKey,
15178
- payer: provider.publicKey,
15179
- keyRecoveryFinalizeComputation: getComputationAccAddress(clusterOffset, keyRecoveryFinalizeOffset),
15180
- executingPool: getExecutingPoolAccAddress(clusterOffset),
15181
- mempool: getMempoolAccAddress(clusterOffset),
15182
- originalMxeProgram: originalMxeProgramId,
15183
- backupMxeProgram: backupMxeProgramId,
15184
- })
15185
- .transaction();
15186
- return signAndSendWithBlockhash(provider, tx, await provider.connection.getLatestBlockhash({ commitment: confirmOptions?.commitment || 'confirmed' }), confirmOptions);
15187
- }
15188
15963
  /**
15189
15964
  * Initialize an MXE (part 1). Due to Solana's 10KB per-instruction allocation limit,
15190
15965
  * this only partially allocates recovery_cluster_acc.
@@ -15220,7 +15995,7 @@ async function initMxePart1(provider, mxeProgramId, confirmOptions) {
15220
15995
  * @param confirmOptions - Transaction confirmation options.
15221
15996
  * @returns Transaction signature.
15222
15997
  */
15223
- async function initMxePart2(provider, clusterOffset, mxeProgramId, recoveryPeers, keygenOffset, keyRecoveryInitOffset, lutOffset, mxeAuthority, confirmOptions) {
15998
+ async function initMxePart2(provider, clusterOffset, mxeProgramId, keygenOffset, keyRecoveryInitOffset, recoveryPeers, lutOffset, mxeAuthority, confirmOptions) {
15224
15999
  const program = getArciumProgram(provider);
15225
16000
  // Ensure recoveryPeers has exactly 100 elements
15226
16001
  const paddedRecoveryPeers = [...recoveryPeers];
@@ -15385,7 +16160,6 @@ exports.buildFinalizeCompDefTx = buildFinalizeCompDefTx;
15385
16160
  exports.claimComputationRent = claimComputationRent;
15386
16161
  exports.createPacker = createPacker;
15387
16162
  exports.deserializeLE = deserializeLE;
15388
- exports.finalizeKeyRecoveryExecution = finalizeKeyRecoveryExecution;
15389
16163
  exports.generateRandomFieldElem = generateRandomFieldElem;
15390
16164
  exports.getArciumAccountBaseSeed = getArciumAccountBaseSeed;
15391
16165
  exports.getArciumEnv = getArciumEnv;
@@ -15412,16 +16186,12 @@ exports.getMempoolPriorityFeeStats = getMempoolPriorityFeeStats;
15412
16186
  exports.getMxeRecoveryAccAddress = getMxeRecoveryAccAddress;
15413
16187
  exports.getRawCircuitAccAddress = getRawCircuitAccAddress;
15414
16188
  exports.getRecoveryClusterAccAddress = getRecoveryClusterAccAddress;
15415
- exports.initKeyRecoveryExecution = initKeyRecoveryExecution;
15416
16189
  exports.initMxePart1 = initMxePart1;
15417
16190
  exports.initMxePart2 = initMxePart2;
15418
16191
  exports.isNullRef = isNullRef;
15419
16192
  exports.positiveModulo = positiveModulo;
15420
- exports.queueKeyRecoveryInit = queueKeyRecoveryInit;
15421
16193
  exports.randMatrix = randMatrix;
15422
- exports.recoverMxe = recoverMxe;
15423
16194
  exports.serializeLE = serializeLE;
15424
16195
  exports.sha256 = sha256;
15425
- exports.submitKeyRecoveryShare = submitKeyRecoveryShare;
15426
16196
  exports.toVec = toVec;
15427
16197
  exports.uploadCircuit = uploadCircuit;