diff --git a/src/lib.rs b/src/lib.rs index 1ee04f8..1f220d5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -581,6 +581,22 @@ fn load_builtins(cache: &mut ProgramCacheForTxBatch) -> HashSet { } fn execute_instr(mut input: InstrContext) -> Option { + #[cfg(feature = "core-bpf-conformance")] + // The BPF version of some builtin programs are built with the assumption + // that certain features will be active at the time of their deployment. + // Some of these features are already active on all clusters. + // + // As a result, they must be activated when testing for conformance. + { + if &input.instruction.program_id == &solana_sdk::address_lookup_table::program::id() { + // The BPF version of Address Lookup Table depends on `SolGetSysvar` + // to read slot hash data. + input + .feature_set + .activate(&get_sysvar_syscall_enabled::id(), 0); + } + } + #[cfg(feature = "core-bpf-conformance")] // If the fixture declares `cu_avail` to be less than the builtin version's // `DEFAULT_COMPUTE_UNITS`, the program should fail on compute meter