Skip to content

Commit 6259ee4

Browse files
committed
Merge branch 'cmoyes/elfmismatch' of https://github.com/firedancer-io/firedancer into cmoyes/elfmismatch
2 parents 2bd2125 + 9c9a143 commit 6259ee4

File tree

12 files changed

+57
-59
lines changed

12 files changed

+57
-59
lines changed

src/flamenco/runtime/context/fd_exec_instr_ctx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ fd_exec_instr_ctx_try_borrow_instr_account_with_key( fd_exec_instr_ctx_t const *
108108
/* Return a NotEnoughAccountKeys error if the account is not found
109109
in the instruction context to match the error code returned by
110110
fd_exec_instr_ctx_try_borrow_instr_account. */
111-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
111+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
112112
}
113113

114114
int

src/flamenco/runtime/context/fd_exec_instr_ctx.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ FD_PROTOTYPES_BEGIN
4141
4242
Assert that enough accounts were supplied to this instruction. Returns
4343
FD_EXECUTOR_INSTR_SUCCESS if the number of accounts is as expected and
44-
FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS otherwise.
44+
FD_EXECUTOR_INSTR_ERR_MISSING_ACC otherwise.
4545
4646
https://github.com/anza-xyz/agave/blob/v2.1.14/sdk/src/transaction_context.rs#L490 */
4747

@@ -50,7 +50,7 @@ fd_exec_instr_ctx_check_num_insn_accounts( fd_exec_instr_ctx_t const * ctx,
5050
uint expected_accounts ) {
5151

5252
if( FD_UNLIKELY( ctx->instr->acct_cnt<expected_accounts ) ) {
53-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
53+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
5454
}
5555
return FD_EXECUTOR_INSTR_SUCCESS;
5656
}
@@ -82,7 +82,7 @@ fd_exec_instr_ctx_get_index_of_instr_account_in_transaction( fd_exec_instr_ctx_t
8282
/* Return a NotEnoughAccountKeys error if the idx is out of bounds.
8383
https://github.com/anza-xyz/agave/blob/v2.1.14/sdk/src/transaction_context.rs#L559 */
8484
if( FD_UNLIKELY( idx_in_instr>=ctx->instr->acct_cnt ) ) {
85-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
85+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
8686
}
8787

8888
*idx_in_txn = ctx->instr->accounts[ idx_in_instr ].index_in_transaction;

src/flamenco/runtime/context/fd_exec_txn_ctx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ fd_exec_txn_ctx_get_key_of_account_at_index( fd_exec_txn_ctx_t * ctx,
160160
/* Return a NotEnoughAccountKeys error if idx is out of bounds.
161161
https://github.com/anza-xyz/agave/blob/v2.1.14/sdk/src/transaction_context.rs#L218 */
162162
if( FD_UNLIKELY( idx>=ctx->accounts_cnt ) ) {
163-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
163+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
164164
}
165165

166166
*key = &ctx->account_keys[ idx ];

src/flamenco/runtime/fd_executor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ fd_txn_ctx_push( fd_exec_txn_ctx_t * txn_ctx,
11231123
fd_txn_account_t * sysvar_instructions_account = NULL;
11241124
err = fd_exec_txn_ctx_get_account_at_index( txn_ctx, (ushort)idx, &sysvar_instructions_account, NULL );
11251125
if( FD_UNLIKELY( err ) ) {
1126-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
1126+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
11271127
}
11281128

11291129
/* https://github.com/anza-xyz/agave/blob/v2.2.12/transaction-context/src/lib.rs#L401-L402 */

src/flamenco/runtime/fd_executor_err.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#define FD_EXECUTOR_INSTR_ERR_DUPLICATE_ACCOUNT_IDX ( -17 ) /* An account was referenced more than once in a single instruction. Deprecated. */
3232
#define FD_EXECUTOR_INSTR_ERR_EXECUTABLE_MODIFIED ( -18 ) /* Executable bit on account changed, but shouldn't have */
3333
#define FD_EXECUTOR_INSTR_ERR_RENT_EPOCH_MODIFIED ( -19 ) /* Rent_epoch account changed, but shouldn't have */
34+
#define FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS ( -20 ) /* The instruction expected additional account keys */
3435
#define FD_EXECUTOR_INSTR_ERR_ACC_DATA_SIZE_CHANGED ( -21 ) /* Program other than the account's owner changed the size of the account data */
3536
#define FD_EXECUTOR_INSTR_ERR_ACC_NOT_EXECUTABLE ( -22 ) /* The instruction expected an executable account */
3637
#define FD_EXECUTOR_INSTR_ERR_ACC_BORROW_FAILED ( -23 ) /* Failed to borrow a reference to account data, already borrowed */
@@ -44,9 +45,6 @@
4445
#define FD_EXECUTOR_INSTR_ERR_UNSUPPORTED_PROGRAM_ID ( -31 ) /* Unsupported program id */
4546
#define FD_EXECUTOR_INSTR_ERR_CALL_DEPTH ( -32 ) /* Cross-program invocation call depth too deep */
4647
#define FD_EXECUTOR_INSTR_ERR_MISSING_ACC ( -33 ) /* An account required by the instruction is missing */
47-
48-
/* Legacy alias maintained for compatibility with older semantics */
49-
#define FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS FD_EXECUTOR_INSTR_ERR_MISSING_ACC
5048
#define FD_EXECUTOR_INSTR_ERR_REENTRANCY_NOT_ALLOWED ( -34 ) /* Cross-program invocation reentrancy not allowed for this instruction */
5149
#define FD_EXECUTOR_INSTR_ERR_MAX_SEED_LENGTH_EXCEEDED ( -35 ) /* Length of the seed is too long for address generation */
5250
#define FD_EXECUTOR_INSTR_ERR_INVALID_SEEDS ( -36 ) /* Provided seeds do not result in a valid address */

src/flamenco/runtime/program/fd_bpf_loader_program.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
955955
/* https://github.com/anza-xyz/agave/blob/574bae8fefc0ed256b55340b9d87b7689bcdf222/programs/bpf_loader/src/lib.rs#L476-L493 */
956956
case fd_bpf_upgradeable_loader_program_instruction_enum_initialize_buffer: {
957957
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 2U ) ) ) {
958-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
958+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
959959
}
960960

961961
/* https://github.com/anza-xyz/agave/blob/v2.1.4/programs/bpf_loader/src/lib.rs#L479 */
@@ -996,7 +996,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
996996
/* https://github.com/anza-xyz/agave/blob/574bae8fefc0ed256b55340b9d87b7689bcdf222/programs/bpf_loader/src/lib.rs#L494-L525 */
997997
case fd_bpf_upgradeable_loader_program_instruction_enum_write: {
998998
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 2U ) ) ) {
999-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
999+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
10001000
}
10011001

10021002
/* https://github.com/anza-xyz/agave/blob/v2.1.4/programs/bpf_loader/src/lib.rs#L497 */
@@ -1056,7 +1056,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
10561056
case fd_bpf_upgradeable_loader_program_instruction_enum_deploy_with_max_data_len: {
10571057
/* https://github.com/anza-xyz/agave/blob/574bae8fefc0ed256b55340b9d87b7689bcdf222/programs/bpf_loader/src/lib.rs#L527-L541 */
10581058
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 4U ) ) ) {
1059-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
1059+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
10601060
}
10611061

10621062
/* https://github.com/anza-xyz/agave/blob/v2.1.4/programs/bpf_loader/src/lib.rs#L529-L534 */
@@ -1093,7 +1093,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
10931093

10941094
/* https://github.com/anza-xyz/agave/blob/v2.1.14/programs/bpf_loader/src/lib.rs#L538 */
10951095
if( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 8U ) ) {
1096-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
1096+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
10971097
}
10981098

10991099
/* https://github.com/anza-xyz/agave/blob/v2.1.14/programs/bpf_loader/src/lib.rs#L539-L541 */
@@ -1396,7 +1396,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
13961396
case fd_bpf_upgradeable_loader_program_instruction_enum_upgrade: {
13971397
/* https://github.com/anza-xyz/agave/blob/574bae8fefc0ed256b55340b9d87b7689bcdf222/programs/bpf_loader/src/lib.rs#L704-L714 */
13981398
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 3U ) ) ) {
1399-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
1399+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
14001400
}
14011401

14021402
/* https://github.com/anza-xyz/agave/blob/v2.1.14/programs/bpf_loader/src/lib.rs#L706-L708 */
@@ -1419,7 +1419,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
14191419
}
14201420

14211421
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 7U ) ) ) {
1422-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
1422+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
14231423
}
14241424

14251425
/* https://github.com/anza-xyz/agave/blob/v2.1.14/programs/bpf_loader/src/lib.rs#L713-L715 */
@@ -1680,7 +1680,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
16801680
case fd_bpf_upgradeable_loader_program_instruction_enum_set_authority: {
16811681
int err;
16821682
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 2U ) ) ) {
1683-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
1683+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
16841684
}
16851685

16861686
/* https://github.com/anza-xyz/agave/blob/v2.1.4/programs/bpf_loader/src/lib.rs#L896-L897 */
@@ -1787,7 +1787,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
17871787
}
17881788

17891789
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 3U ) ) ) {
1790-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
1790+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
17911791
}
17921792

17931793
/* https://github.com/anza-xyz/agave/blob/v2.1.4/programs/bpf_loader/src/lib.rs#L968-L969 */
@@ -1885,7 +1885,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
18851885
int err;
18861886
/* https://github.com/anza-xyz/agave/blob/574bae8fefc0ed256b55340b9d87b7689bcdf222/programs/bpf_loader/src/lib.rs#L1032-L1046 */
18871887
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 2U ) ) ) {
1888-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
1888+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
18891889
}
18901890

18911891
/* It's safe to directly access the instruction accounts because we already checked for two
@@ -1939,7 +1939,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
19391939
fd_borrowed_account_drop( &close_account );
19401940

19411941
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 3U ) ) ) {
1942-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
1942+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
19431943
}
19441944

19451945
fd_bpf_upgradeable_loader_state_buffer_t * state_buf = &close_account_state->inner.buffer;
@@ -1957,7 +1957,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
19571957
} else if( fd_bpf_upgradeable_loader_state_is_program_data( close_account_state ) ) {
19581958
int err;
19591959
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 4U ) ) ) {
1960-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
1960+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
19611961
}
19621962

19631963
/* https://github.com/anza-xyz/agave/blob/v2.1.4/programs/bpf_loader/src/lib.rs#L1074 */
@@ -2067,7 +2067,7 @@ process_loader_upgradeable_instruction( fd_exec_instr_ctx_t * instr_ctx ) {
20672067

20682068
/* https://github.com/anza-xyz/agave/blob/v2.2.6/programs/bpf_loader/src/lib.rs#L1346 */
20692069
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( instr_ctx, 3U ) ) ) {
2070-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
2070+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
20712071
}
20722072

20732073
/* https://github.com/anza-xyz/agave/blob/v2.2.6/programs/bpf_loader/src/lib.rs#L1347-L1349 */

src/flamenco/runtime/program/fd_stake_program.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2649,7 +2649,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
26492649
if( FD_UNLIKELY( !clock ) ) return FD_EXECUTOR_INSTR_ERR_UNSUPPORTED_SYSVAR;
26502650
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L94
26512651
if( FD_UNLIKELY( ctx->instr->acct_cnt<3 ) )
2652-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
2652+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
26532653
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L95
26542654
fd_pubkey_t const * custodian_pubkey = NULL;
26552655
rc = get_optional_pubkey( ctx, 3, 0, &custodian_pubkey );
@@ -2686,7 +2686,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
26862686

26872687
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L109
26882688
if( ctx->instr->acct_cnt<2 )
2689-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
2689+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
26902690
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L110
26912691
rc = fd_sysvar_instr_acct_check( ctx, 2, &fd_sysvar_clock_id );
26922692
if( FD_UNLIKELY( rc ) ) return rc;
@@ -2729,7 +2729,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
27292729
if( FD_UNLIKELY( rc ) ) return rc;
27302730
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L130
27312731
if( FD_UNLIKELY( ctx->instr->acct_cnt<2 ) )
2732-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
2732+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
27332733
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L131
27342734
rc = fd_sysvar_instr_acct_check( ctx, 2, &fd_sysvar_clock_id );
27352735
if( FD_UNLIKELY( rc ) ) return rc;
@@ -2744,7 +2744,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
27442744
}
27452745
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L138
27462746
if( FD_UNLIKELY( ctx->instr->acct_cnt<5 ) )
2747-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
2747+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
27482748

27492749
/* https://github.com/anza-xyz/agave/blob/v2.1.14/programs/stake/src/stake_instruction.rs#L138 */
27502750
fd_borrowed_account_drop( &me );
@@ -2778,7 +2778,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
27782778
if( FD_UNLIKELY( rc ) ) return rc;
27792779
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L154
27802780
if( FD_UNLIKELY( ctx->instr->acct_cnt<2 ) )
2781-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
2781+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
27822782

27832783
/* https://github.com/anza-xyz/agave/blob/v2.1.14/programs/stake/src/stake_instruction.rs#L154 */
27842784
fd_borrowed_account_drop( &me );
@@ -2803,7 +2803,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
28032803
if( FD_UNLIKELY( rc ) ) return rc;
28042804
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L168
28052805
if( FD_UNLIKELY( ctx->instr->acct_cnt<2 ) )
2806-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
2806+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
28072807
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L169
28082808
rc = fd_sysvar_instr_acct_check( ctx, 2, &fd_sysvar_clock_id );
28092809
if( FD_UNLIKELY( rc ) ) return rc;
@@ -2844,7 +2844,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
28442844
if( FD_UNLIKELY( rc ) ) return rc;
28452845
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L190
28462846
if( FD_UNLIKELY( ctx->instr->acct_cnt<2 ) )
2847-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
2847+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
28482848
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L191
28492849
rc = fd_sysvar_instr_acct_check( ctx, 2, &fd_sysvar_clock_id );
28502850
if( FD_UNLIKELY( rc ) ) return rc;
@@ -2859,7 +2859,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
28592859
}
28602860
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L198
28612861
if( FD_UNLIKELY( ctx->instr->acct_cnt<5 ) )
2862-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
2862+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
28632863

28642864
/* https://github.com/anza-xyz/agave/blob/v2.1.14/programs/stake/src/stake_instruction.rs#L198 */
28652865
fd_borrowed_account_drop( &me );
@@ -3019,7 +3019,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
30193019
if( FD_UNLIKELY( !clock ) ) return FD_EXECUTOR_INSTR_ERR_UNSUPPORTED_SYSVAR;
30203020
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L253
30213021
if( FD_UNLIKELY( ctx->instr->acct_cnt<4 ) )
3022-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
3022+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
30233023

30243024
// https://github.com/anza-xyz/agave/blob/v2.1.14/programs/stake/src/stake_instruction.rs#L253
30253025
fd_pubkey_t const * authorized_pubkey = NULL;
@@ -3064,7 +3064,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
30643064

30653065
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L274
30663066
if( FD_UNLIKELY( ctx->instr->acct_cnt<2 ) )
3067-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
3067+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
30683068
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L276
30693069
rc = fd_sysvar_instr_acct_check( ctx, 2, &fd_sysvar_clock_id );
30703070
if( FD_UNLIKELY( rc ) ) return rc;
@@ -3073,7 +3073,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
30733073
if( FD_UNLIKELY( !clock ) ) return FD_EXECUTOR_INSTR_ERR_UNSUPPORTED_SYSVAR;
30743074
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L277
30753075
if( FD_UNLIKELY( fd_exec_instr_ctx_check_num_insn_accounts( ctx, 4U) ) )
3076-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
3076+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
30773077

30783078
// https://github.com/anza-xyz/agave/blob/v2.1.14/programs/stake/src/stake_instruction.rs#L277-L280
30793079
fd_pubkey_t const * authorized_pubkey = NULL;
@@ -3168,7 +3168,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
31683168
if( FD_UNLIKELY( rc ) ) return rc;
31693169
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L323
31703170
if( FD_UNLIKELY( ctx->instr->acct_cnt<3 ) )
3171-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
3171+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
31723172
// https://github.com/anza-xyz/agave/blob/c8685ce0e1bb9b26014f1024de2cd2b8c308cbde/programs/stake/src/stake_instruction.rs#L325
31733173
fd_sol_sysvar_clock_t clock_;
31743174
fd_sol_sysvar_clock_t const * clock = fd_sysvar_cache_clock_read( ctx->sysvar_cache, &clock_ );
@@ -3202,7 +3202,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
32023202
case fd_stake_instruction_enum_move_stake: {
32033203
// https://github.com/anza-xyz/agave/blob/cdff19c7807b006dd63429114fb1d9573bf74172/programs/stake/src/stake_instruction.rs#L361
32043204
if( FD_UNLIKELY( ctx->instr->acct_cnt<3 ) )
3205-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
3205+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
32063206

32073207
ulong lamports = instruction->inner.move_stake;
32083208
// https://github.com/anza-xyz/agave/blob/cdff19c7807b006dd63429114fb1d9573bf74172/programs/stake/src/stake_instruction.rs#L362
@@ -3226,7 +3226,7 @@ fd_stake_program_execute( fd_exec_instr_ctx_t * ctx ) {
32263226
case fd_stake_instruction_enum_move_lamports: {
32273227
// https://github.com/anza-xyz/agave/blob/cdff19c7807b006dd63429114fb1d9573bf74172/programs/stake/src/stake_instruction.rs#L380
32283228
if( FD_UNLIKELY( ctx->instr->acct_cnt<3 ) )
3229-
return FD_EXECUTOR_INSTR_ERR_NOT_ENOUGH_ACC_KEYS;
3229+
return FD_EXECUTOR_INSTR_ERR_MISSING_ACC;
32303230

32313231
// https://github.com/anza-xyz/agave/blob/cdff19c7807b006dd63429114fb1d9573bf74172/programs/stake/src/stake_instruction.rs#L381
32323232
ulong lamports = instruction->inner.move_lamports;

0 commit comments

Comments
 (0)