Skip to content

Commit 75b9988

Browse files
committed
Add missing log for conformance
exclude built-ins Update src/flamenco/runtime/program/fd_bpf_loader_program.c Co-authored-by: ripatel-fd <[email protected]> PR feedback Update comment
1 parent 84c3759 commit 75b9988

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
67e30036a4b3b448dfcf73649974d60c55a10bea
1+
992587f50c425b90de4be92bae17578e0e9037c5

src/flamenco/runtime/program/fd_bpf_loader_program.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "../../../ballet/sbpf/fd_sbpf_loader.h"
77
#include "../sysvar/fd_sysvar.h"
88
#include "fd_bpf_loader_serialization.h"
9+
#include "fd_builtin_programs.h"
910
#include "fd_native_cpi.h"
1011
#include "../fd_borrowed_account.h"
1112

@@ -2478,6 +2479,14 @@ fd_bpf_loader_program_execute( fd_exec_instr_ctx_t * ctx ) {
24782479
Program account and program data account discriminants get checked when loading in program accounts
24792480
into the program cache. If the discriminants are incorrect, the program is marked as closed. */
24802481
if( FD_UNLIKELY( !fd_bpf_upgradeable_loader_state_is_program( program_account_state ) ) ) {
2482+
/* https://github.com/anza-xyz/agave/tree/v3.0.5/programs/bpf_loader/src/lib.rs#L424-L433
2483+
Agave's program cache will add any non-migrating built-ins as built-in
2484+
accounts, even though they might be owned by the BPF loader. In these
2485+
cases, Agave does not log this message. Meanwhile, non-migrating
2486+
built-in programs do not use the BPF loader, by definition. */
2487+
if( !fd_is_non_migrating_builtin_program( program_id ) ) {
2488+
fd_log_collector_msg_literal( ctx, "Program is not deployed" );
2489+
}
24812490
if( FD_FEATURE_ACTIVE_BANK( ctx->txn_ctx->bank, remove_accounts_executable_flag_checks ) ) {
24822491
return FD_EXECUTOR_INSTR_ERR_UNSUPPORTED_PROGRAM_ID;
24832492
}

0 commit comments

Comments
 (0)