Skip to content

Commit

Permalink
flamenco: update builtin logic for enable_secp256r1_precompile
Browse files Browse the repository at this point in the history
  • Loading branch information
kbhargava-jump committed Nov 15, 2024
1 parent 90f96df commit 1385a0e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
15 changes: 15 additions & 0 deletions contrib/test/test-vectors-fixtures/txn-fixtures/program-tests.list
Original file line number Diff line number Diff line change
Expand Up @@ -2745,3 +2745,18 @@ dump/test-vectors/txn/fixtures/programs/e75142d356abf68b6df0310b387da6faf9201fdd
dump/test-vectors/txn/fixtures/programs/e8fbf185dc68efcef012fea41848763e707cc413_3201250.fix
dump/test-vectors/txn/fixtures/programs/f59d49be39cccb052188429a81b3013b5c960f33_3196736.fix
dump/test-vectors/txn/fixtures/programs/fd42a56a6850891739af1503e826c79968aabb20_3197837.fix
dump/test-vectors/txn/fixtures/programs/1a729174d141352354cb70c0e74bd0521c17888e_1656878.fix
dump/test-vectors/txn/fixtures/programs/1e296967e4466e7fd2cad5cdfa1edf19d2d2a51c_1657210.fix
dump/test-vectors/txn/fixtures/programs/31e2a70b427c1a6e67517cf32544b1db35136cd4_1657055.fix
dump/test-vectors/txn/fixtures/programs/32d4706a43f924be73d7ccdc95ed81f34890d4fa_1658108.fix
dump/test-vectors/txn/fixtures/programs/379bd5bb77daf578b8dee828576e33da83dc2d45_1657787.fix
dump/test-vectors/txn/fixtures/programs/4a99575ae83d56c332e93ef088f6005c3427e5d4_1656216.fix
dump/test-vectors/txn/fixtures/programs/5437d131b3154411601b75389fcbc7cfcabb2eb3_1657312.fix
dump/test-vectors/txn/fixtures/programs/55b9b95d1d6ce9783d3ed11f9f53695363a9c701_1655830.fix
dump/test-vectors/txn/fixtures/programs/5e0ae2999c7f6b6771e1afdd74dac699d29ac837_1657889.fix
dump/test-vectors/txn/fixtures/programs/682ff12213d60d72034785d21b5b5ab91e7cf7b5_1657606.fix
dump/test-vectors/txn/fixtures/programs/83a49bb0eac78125acde7388bae0d435d24ee760_1656088.fix
dump/test-vectors/txn/fixtures/programs/9be1ddb02934e8c8876427e2b074a5051f713a32_1656662.fix
dump/test-vectors/txn/fixtures/programs/a45037de050ba8834d20ea95b380eccddefd6e7f_1655663.fix
dump/test-vectors/txn/fixtures/programs/e2caaa961ea02c52430d673e0a6f2de8a126784a_1658208.fix
dump/test-vectors/txn/fixtures/programs/fb1305b2e30e46cc2a321004c061888e84953432_1657414.fix
6 changes: 4 additions & 2 deletions src/flamenco/runtime/program/fd_builtin_programs.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,13 @@ void fd_builtin_programs_init( fd_exec_slot_ctx_t * slot_ctx ) {
char data[1] = {1};
fd_write_builtin_bogus_account( slot_ctx, fd_solana_keccak_secp_256k_program_id.key, data, 1 );
fd_write_builtin_bogus_account( slot_ctx, fd_solana_ed25519_sig_verify_program_id.key, data, 1 );
fd_write_builtin_bogus_account( slot_ctx, fd_solana_secp256r1_program_id.key, data, 1 );
if (FD_FEATURE_ACTIVE( slot_ctx, enable_secp256r1_precompile ))
fd_write_builtin_bogus_account( slot_ctx, fd_solana_secp256r1_program_id.key, data, 1 );
} else {
fd_write_builtin_bogus_account( slot_ctx, fd_solana_keccak_secp_256k_program_id.key, "", 0 );
fd_write_builtin_bogus_account( slot_ctx, fd_solana_ed25519_sig_verify_program_id.key, "", 0 );
fd_write_builtin_bogus_account( slot_ctx, fd_solana_secp256r1_program_id.key, "", 0 );
if (FD_FEATURE_ACTIVE( slot_ctx, enable_secp256r1_precompile ))
fd_write_builtin_bogus_account( slot_ctx, fd_solana_secp256r1_program_id.key, "", 0 );
}

/* Inline SPL token mint program ("inlined to avoid an external dependency on the spl-token crate") */
Expand Down

0 comments on commit 1385a0e

Please sign in to comment.