Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions contrib/test/run_test_vectors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ set -x

OBJDIR=${OBJDIR:-build/native/gcc}

rm -rf $LOG_PATH
mkdir -pv $LOG_PATH
if [ "$LOG_PATH" == "" ]; then
LOG_PATH="`mktemp -d`"
else
rm -rf $LOG_PATH
mkdir -pv $LOG_PATH
fi


mkdir -p dump

Expand All @@ -29,6 +34,7 @@ if [ "$failed" != "0" ]
then
echo 'test vector execution failed'
grep -w FAIL $LOG_PATH/test_vectors_exec
echo $LOG_PATH
exit 1
else
echo 'test vector execution passed'
Expand Down
58 changes: 50 additions & 8 deletions src/flamenco/features/fd_features_generated.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,8 @@ fd_feature_id_t const ids[] = {
.hardcoded = 1 },

{ .index = offsetof(fd_features_t, enable_partitioned_epoch_reward)>>3,
.id = {"\x2c\xcd\x49\xd1\x01\x45\x2d\x2e\x60\xc4\x6e\x4a\xe2\xe3\x4b\x6d\x5f\x33\xdc\x75\x97\x0d\x05\x15\x83\xa4\x96\xa7\x3a\x54\x06\x16"},
/* 41tVp5qR1XwWRt5WifvtSQyuxtqQWJgEK8w91AtBqSwP */
.id = {"\x7f\xc6\x29\x7b\xa9\x98\xf8\x5b\xa2\x48\x57\xc0\xde\x06\x74\x63\x2f\x56\xd9\x5a\x5c\xc5\x54\x31\x39\x41\xb0\x13\xe2\x53\xf6\xf2"},
/* 9bn2vTJUsUcnpiZWbu2woSKtTGW3ErZC9ERv88SDqQjK */
.name = "enable_partitioned_epoch_reward" },

{ .index = offsetof(fd_features_t, spl_token_v3_4_0)>>3,
Expand Down Expand Up @@ -786,12 +786,14 @@ fd_feature_id_t const ids[] = {
{ .index = offsetof(fd_features_t, drop_merkle_shreds)>>3,
.id = {"\x69\x08\x18\x1d\x4f\xdb\x4a\x78\x97\x2f\x1b\x4f\x94\xdf\x81\x2b\x60\x4d\x43\xf8\x92\x98\xa4\xdd\x93\xba\x48\xb5\xac\xb8\x3b\xe0"},
/* 84zy5N23Q9vTZuLc9h1HWUtyM9yCFV2SCmyP9W9C3yHZ */
.name = "drop_merkle_shreds" },
.name = "drop_merkle_shreds",
.hardcoded = 1 },

{ .index = offsetof(fd_features_t, keep_merkle_shreds)>>3,
.id = {"\xfc\x2b\xba\x88\xd2\xa1\xeb\x71\x75\xdf\x3f\x39\x29\x20\x96\x3b\xfe\xc6\x90\x82\xc6\xbb\xc4\x44\xe3\xde\x9b\x5f\xcc\xbc\xb9\xfe"},
/* HyNQzc7TMNmRhpVHXqDGjpsHzeQie82mDQXSF9hj7nAH */
.name = "keep_merkle_shreds" },
.name = "keep_merkle_shreds",
.hardcoded = 1 },
Comment thread
0x0ece marked this conversation as resolved.

{ .index = offsetof(fd_features_t, move_serialized_len_ptr_in_cpi)>>3,
.id = {"\x59\xf8\x35\x62\xdd\x14\x3d\x82\x30\xdc\x4b\x24\x59\xa9\xa8\xa2\xd6\x12\x67\x7c\x1b\x86\x51\xfd\x02\x1d\x47\x6b\xff\xef\x9b\xca"},
Expand Down Expand Up @@ -938,8 +940,8 @@ fd_feature_id_t const ids[] = {
.name = "enable_poseidon_syscall" },

{ .index = offsetof(fd_features_t, timely_vote_credits)>>3,
.id = {"\x1a\xc7\x41\x11\xf0\x44\xfa\x86\x3f\x13\x7e\xa6\x7a\xb2\xd4\x6e\x16\x10\x57\xe6\x96\x23\x5f\x27\xa8\xe5\xf0\x4c\xe8\xf1\x65\x23"},
/* 2oXpeh141pPZCTCFHBsvCwG2BtaHZZAtrVhwaxSy6brS */
.id = {"\x0d\x4d\x3c\x51\x23\x21\xd3\xe9\x47\x3d\xc8\x19\x36\x5e\x45\xf8\x09\x81\x7b\xaf\xff\x69\x17\x9f\x2e\x58\x3d\xf1\x6e\xc8\x10\x6b"},
/* tvcF6b1TRz353zKuhBjinZkKzjmihXmBAHJdjNYw1sQ */
.name = "timely_vote_credits" },

{ .index = offsetof(fd_features_t, remaining_compute_units_syscall_enabled)>>3,
Expand Down Expand Up @@ -970,7 +972,8 @@ fd_feature_id_t const ids[] = {
{ .index = offsetof(fd_features_t, programify_feature_gate_program)>>3,
.id = {"\x6c\x03\x23\xfe\xae\x55\x9b\x6b\x0f\xa5\x65\xc1\x18\x46\x40\xe3\x6a\x92\x67\xe8\x05\xc2\x7d\x8b\x88\x1b\x5e\xca\xa3\xaf\x6e\x77"},
/* 8GdovDzVwWU5edz2G697bbB7GZjrUc6aQZLWyNNAtHdg */
.name = "programify_feature_gate_program" },
.name = "programify_feature_gate_program",
.hardcoded = 1 },
Comment thread
0x0ece marked this conversation as resolved.

{ .index = offsetof(fd_features_t, update_hashes_per_tick2)>>3,
.id = {"\xc8\xc8\x3f\xaf\x32\xd0\x79\xe7\xc9\x8b\x45\x2f\x6c\x6c\xa4\xaf\xeb\x86\xdd\x45\xc7\x5d\xa9\xf3\x0d\x91\xab\x70\x0d\xdc\x41\x23"},
Expand Down Expand Up @@ -1045,7 +1048,8 @@ fd_feature_id_t const ids[] = {
{ .index = offsetof(fd_features_t, deprecate_executable_meta_update_in_bpf_loader)>>3,
.id = {"\x0b\x0a\xa6\x6d\xae\x07\x63\x9b\x6d\x90\xe0\xf3\x1d\xba\x64\x52\xba\x3d\xc3\x44\x31\x30\xdf\x7e\xab\xd4\x1e\xd3\xab\x4d\x33\x47"},
/* k6uR1J9VtKJnTukBV2Eo15BEy434MBg8bT6hHQgmU8v */
.name = "deprecate_executable_meta_update_in_bpf_loader" },
.name = "deprecate_executable_meta_update_in_bpf_loader",
.hardcoded = 1 },

{ .index = offsetof(fd_features_t, enable_zk_proof_from_account)>>3,
.id = {"\x0e\xcb\x88\xd6\xe1\xd4\x23\xf4\x20\x62\xde\xc9\x60\x6c\x5a\x68\xc5\x9e\xcd\x3a\x97\x46\xbd\x14\xc5\x00\x9e\x46\x52\x19\x0c\xd9"},
Expand Down Expand Up @@ -1087,6 +1091,32 @@ fd_feature_id_t const ids[] = {
/* 3opE3EzAKnUftUDURkzMgwpNgimBAypW1mNDYH4x4Zg7 */
.name = "reward_full_priority_fee" },

{ .index = offsetof(fd_features_t, disable_rent_fees_collection)>>3,
.id = {"\xa8\x0c\x7c\x9c\x46\xc9\x15\x1d\x98\x48\x72\x27\x55\x41\x17\x88\x22\xad\x13\x7f\x8c\x63\x6f\x91\xf7\x6d\x86\xac\xdd\xbb\xcc\xf5"},
/* CJzY83ggJHqPGDq8VisV3U91jDJLuEaALZooBrXtnnLU */
.name = "disable_rent_fees_collection" },

{ .index = offsetof(fd_features_t, add_new_reserved_account_keys)>>3,
.id = {"\x6e\xf0\xdf\x34\x81\xac\xed\xb6\x4d\x00\x3d\x88\xc9\x5a\x7a\x25\xa0\xd7\x00\x98\x07\xa8\x51\x37\x06\xb3\x0e\x23\xfb\xce\xa9\xcc"},
/* 8U4skmMVnF6k2kMvrWbQuRUT3qQSiTYpSjqmhmgfthZu */
.name = "add_new_reserved_account_keys" },

{ .index = offsetof(fd_features_t, chained_merkle_conflict_duplicate_proofs)>>3,
.id = {"\x09\x25\x36\xba\xe5\x72\x41\x7e\x11\xa8\xc5\xcd\x87\x81\x90\x62\x5d\x31\x81\xc1\x19\x26\xb7\xab\xec\xb1\x65\x55\xc8\xb0\xc1\xf7"},
/* chaie9S2zVfuxJKNRGkyTDokLwWxx6kD2ZLsqQHaDD8 */
.name = "chained_merkle_conflict_duplicate_proofs" },

{ .index = offsetof(fd_features_t, simplify_alt_bn128_syscall_error_codes)>>3,
.id = {"\xff\xdc\x9f\x8d\x03\xe9\xa9\x8b\x11\x73\xd7\xf4\x57\x73\x30\xb9\x37\xc4\x25\xcd\xa9\xd8\xc1\x3e\xcc\xb7\x16\x4a\x1a\xfd\xf9\xec"},
/* JDn5q3GBeqzvUa7z67BbmVHVdE3EbUAjvFep3weR3jxX */
.name = "simplify_alt_bn128_syscall_error_codes",
.hardcoded = 1 },

{ .index = offsetof(fd_features_t, abort_on_invalid_curve)>>3,
.id = {"\xdd\x72\x21\x65\xad\x48\xe1\xaf\xda\x46\x3f\x70\xf5\xe7\x27\xdf\x99\x16\x8f\xf9\xbb\xcb\x52\x76\xdb\x98\x53\x4e\x33\xf1\xf5\x86"},
/* FuS3FPfJDKSNot99ECLXtp3rueq36hMNStJkPJwWodLh */
.name = "abort_on_invalid_curve" },

{ .index = ULONG_MAX }
};

Expand Down Expand Up @@ -1180,6 +1210,7 @@ fd_feature_id_query( ulong prefix ) {
case 0x2bf29bf13f0e1d5d: return &ids[ 81 ];
case 0x073a0a7d3f570b55: return &ids[ 82 ];
case 0x4d6ae02c256bdf10: return &ids[ 83 ];
case 0x5bf898a97b29c67f: return &ids[ 84 ];
case 0x2e2d4501d149cd2c: return &ids[ 84 ];
case 0xe8f10f26141749dd: return &ids[ 85 ];
case 0xe02ac5f848d395d8: return &ids[ 86 ];
Expand Down Expand Up @@ -1259,6 +1290,7 @@ fd_feature_id_query( ulong prefix ) {
case 0x74b022574093eeec: return &ids[ 160 ];
case 0x81b8fd99bea25f9b: return &ids[ 161 ];
case 0x3cbf822ccb2eebd4: return &ids[ 162 ];
case 0xe9d32123513c4d0d: return &ids[ 163 ];
case 0x86fa44f01141c71a: return &ids[ 163 ];
case 0x64205286d7935342: return &ids[ 164 ];
case 0x97f912be04ecd673: return &ids[ 165 ];
Expand Down Expand Up @@ -1289,6 +1321,11 @@ fd_feature_id_query( ulong prefix ) {
case 0xf711255aedfe2d0d: return &ids[ 190 ];
case 0x81f658d2653a6051: return &ids[ 191 ];
case 0xf1f206f6027db529: return &ids[ 192 ];
case 0x1d15c9469c7c0ca8: return &ids[ 193 ];
case 0xb6edac8134dff06e: return &ids[ 194 ];
case 0x7e4172e5ba362509: return &ids[ 195 ];
case 0x8ba9e9038d9fdcff: return &ids[ 196 ];
case 0xafe148ad652172dd: return &ids[ 197 ];
default: break;
}

Expand Down Expand Up @@ -1490,5 +1527,10 @@ FD_STATIC_ASSERT( offsetof( fd_features_t, remove_rounding_in_fee_calculation
FD_STATIC_ASSERT( offsetof( fd_features_t, enable_tower_sync_ix )>>3==190UL, layout );
FD_STATIC_ASSERT( offsetof( fd_features_t, deprecate_unused_legacy_vote_plumbing )>>3==191UL, layout );
FD_STATIC_ASSERT( offsetof( fd_features_t, reward_full_priority_fee )>>3==192UL, layout );
FD_STATIC_ASSERT( offsetof( fd_features_t, disable_rent_fees_collection )>>3==193UL, layout );
FD_STATIC_ASSERT( offsetof( fd_features_t, add_new_reserved_account_keys )>>3==194UL, layout );
FD_STATIC_ASSERT( offsetof( fd_features_t, chained_merkle_conflict_duplicate_proofs )>>3==195UL, layout );
FD_STATIC_ASSERT( offsetof( fd_features_t, simplify_alt_bn128_syscall_error_codes )>>3==196UL, layout );
FD_STATIC_ASSERT( offsetof( fd_features_t, abort_on_invalid_curve )>>3==197UL, layout );

FD_STATIC_ASSERT( sizeof( fd_features_t )>>3==FD_FEATURE_ID_CNT, layout );
11 changes: 8 additions & 3 deletions src/flamenco/features/fd_features_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/* FEATURE_ID_CNT is the number of features in ids */

#define FD_FEATURE_ID_CNT (193UL)
#define FD_FEATURE_ID_CNT (198UL)

union fd_features {

Expand Down Expand Up @@ -97,7 +97,7 @@ union fd_features {
/* 0x2bf29bf13f0e1d5d */ ulong executables_incur_cpi_data_cost;
/* 0x073a0a7d3f570b55 */ ulong fix_recent_blockhashes;
/* 0x4d6ae02c256bdf10 */ ulong update_rewards_from_cached_accounts;
/* 0x2e2d4501d149cd2c */ ulong enable_partitioned_epoch_reward;
/* 0x5bf898a97b29c67f */ ulong enable_partitioned_epoch_reward;
/* 0xe8f10f26141749dd */ ulong spl_token_v3_4_0;
/* 0xe02ac5f848d395d8 */ ulong spl_associated_token_account_v1_1_0;
/* 0x7b285d0430faf2fc */ ulong default_units_per_instruction;
Expand Down Expand Up @@ -176,7 +176,7 @@ union fd_features {
/* 0x74b022574093eeec */ ulong reduce_stake_warmup_cooldown;
/* 0x81b8fd99bea25f9b */ ulong revise_turbine_epoch_stakes;
/* 0x3cbf822ccb2eebd4 */ ulong enable_poseidon_syscall;
/* 0x86fa44f01141c71a */ ulong timely_vote_credits;
/* 0xe9d32123513c4d0d */ ulong timely_vote_credits;
/* 0x64205286d7935342 */ ulong remaining_compute_units_syscall_enabled;
/* 0x97f912be04ecd673 */ ulong enable_program_runtime_v2_and_loader_v4;
/* 0x4b241cb4c6f3b3b2 */ ulong require_rent_exempt_split_destination;
Expand Down Expand Up @@ -206,6 +206,11 @@ union fd_features {
/* 0xf711255aedfe2d0d */ ulong enable_tower_sync_ix;
/* 0x81f658d2653a6051 */ ulong deprecate_unused_legacy_vote_plumbing;
/* 0xf1f206f6027db529 */ ulong reward_full_priority_fee;
/* 0x1d15c9469c7c0ca8 */ ulong disable_rent_fees_collection;
/* 0xb6edac8134dff06e */ ulong add_new_reserved_account_keys;
/* 0x7e4172e5ba362509 */ ulong chained_merkle_conflict_duplicate_proofs;
/* 0x8ba9e9038d9fdcff */ ulong simplify_alt_bn128_syscall_error_codes;
/* 0xafe148ad652172dd */ ulong abort_on_invalid_curve;
};

};
19 changes: 12 additions & 7 deletions src/flamenco/features/feature_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
{"name":"executables_incur_cpi_data_cost","pubkey": "7GUcYgq4tVtaqNCKT3dho9r4665Qp5TxCZ27Qgjx3829","hardcoded":1},
{"name":"fix_recent_blockhashes","pubkey": "6iyggb5MTcsvdcugX7bEKbHV8c6jdLbpHwkncrgLMhfo","hardcoded":1},
{"name":"update_rewards_from_cached_accounts","pubkey": "28s7i3htzhahXQKqmS2ExzbEoUypg9krwvtK2M9UWXh9","hardcoded":1},
{"name":"enable_partitioned_epoch_reward","pubkey": "41tVp5qR1XwWRt5WifvtSQyuxtqQWJgEK8w91AtBqSwP"},
{"name":"enable_partitioned_epoch_reward","pubkey": "9bn2vTJUsUcnpiZWbu2woSKtTGW3ErZC9ERv88SDqQjK", "old": "41tVp5qR1XwWRt5WifvtSQyuxtqQWJgEK8w91AtBqSwP"},
{"name":"spl_token_v3_4_0","pubkey": "Ftok4njE8b7tDffYkC5bAbCaQv5sL6jispYrprzatUwN","hardcoded":1},
{"name":"spl_associated_token_account_v1_1_0","pubkey": "FaTa17gVKoqbh38HcfiQonPsAaQViyDCCSg71AubYZw8","hardcoded":1},
{"name":"default_units_per_instruction","pubkey": "J2QdYx8crLbTVK8nur1jeLsmc3krDbfjoxoea2V1Uy5Q","hardcoded":1},
Expand Down Expand Up @@ -134,8 +134,8 @@
{"name":"commission_updates_only_allowed_in_first_half_of_epoch","pubkey": "noRuG2kzACwgaY7TVmLRnUNPLKNVQE1fb7X55YWBehp"},
{"name":"enable_turbine_fanout_experiments","pubkey": "D31EFnLgdiysi84Woo3of4JMu7VmasUS3Z7j9HYXCeLY"},
{"name":"disable_turbine_fanout_experiments","pubkey": "Gz1aLrbeQ4Q6PTSafCZcGWZXz91yVRi7ASFzFEr1U4sa"},
{"name":"drop_merkle_shreds","pubkey": "84zy5N23Q9vTZuLc9h1HWUtyM9yCFV2SCmyP9W9C3yHZ"},
{"name":"keep_merkle_shreds","pubkey": "HyNQzc7TMNmRhpVHXqDGjpsHzeQie82mDQXSF9hj7nAH"},
Comment thread
0x0ece marked this conversation as resolved.
{"name":"drop_merkle_shreds","pubkey": "84zy5N23Q9vTZuLc9h1HWUtyM9yCFV2SCmyP9W9C3yHZ","hardcoded":1,"reverted":1},
{"name":"keep_merkle_shreds","pubkey": "HyNQzc7TMNmRhpVHXqDGjpsHzeQie82mDQXSF9hj7nAH","hardcoded":1,"reverted":1},
{"name":"move_serialized_len_ptr_in_cpi","pubkey": "74CoWuBmt3rUVUrCb2JiSTvh6nXyBWUsK4SaMj3CtE3T","hardcoded":1},
{"name":"update_hashes_per_tick","pubkey": "3uFHb9oKdGfgZGJK9EHaAXN4USvnQtAFC13Fh5gGFS5B"},
{"name":"enable_big_mod_exp_syscall","pubkey": "EBq48m8irRKuE7ZnMTLvLg2UuGSqhe8s8oMqnmja1fJw"},
Expand All @@ -162,13 +162,13 @@
{"name":"reduce_stake_warmup_cooldown","pubkey": "GwtDQBghCTBgmX2cpEGNPxTEBUTQRaDMGTr5qychdGMj","hardcoded":1},
{"name":"revise_turbine_epoch_stakes","pubkey": "BTWmtJC8U5ZLMbBUUA1k6As62sYjPEjAiNAT55xYGdJU"},
{"name":"enable_poseidon_syscall","pubkey": "FL9RsQA6TVUoh5xJQ9d936RHSebA1NLQqe3Zv9sXZRpr"},
{"name":"timely_vote_credits","pubkey": "2oXpeh141pPZCTCFHBsvCwG2BtaHZZAtrVhwaxSy6brS"},
{"name":"timely_vote_credits","old": "2oXpeh141pPZCTCFHBsvCwG2BtaHZZAtrVhwaxSy6brS","pubkey":"tvcF6b1TRz353zKuhBjinZkKzjmihXmBAHJdjNYw1sQ"},
{"name":"remaining_compute_units_syscall_enabled","pubkey": "5TuppMutoyzhUSfuYdhgzD47F92GL1g89KpCZQKqedxP"},
{"name":"enable_program_runtime_v2_and_loader_v4","pubkey": "8oBxsYqnCvUTGzgEpxPcnVf7MLbWWPYddE33PftFeBBd"},
{"name":"require_rent_exempt_split_destination","pubkey": "D2aip4BBr8NPWtU9vLrwrBvbuaQ8w1zV38zFLxx4pfBV"},
{"name":"better_error_codes_for_tx_lamport_check","pubkey": "Ffswd3egL3tccB6Rv3XY6oqfdzn913vUcjCSnpvCKpfx"},
{"name":"enable_alt_bn128_compression_syscall","pubkey": "EJJewYSddEEtSZHiqugnvhQHiWyZKjkFDQASd7oKSagn"},
{"name":"programify_feature_gate_program","pubkey": "8GdovDzVwWU5edz2G697bbB7GZjrUc6aQZLWyNNAtHdg"},
{"name":"programify_feature_gate_program","pubkey": "8GdovDzVwWU5edz2G697bbB7GZjrUc6aQZLWyNNAtHdg","hardcoded":1,"reverted":1},
{"name":"update_hashes_per_tick2","pubkey":"EWme9uFqfy1ikK1jhJs8fM5hxWnK336QJpbscNtizkTU"},
{"name":"update_hashes_per_tick3","pubkey":"8C8MCtsab5SsfammbzvYz65HHauuUYdbY2DZ4sznH6h5"},
{"name":"update_hashes_per_tick4","pubkey":"8We4E7DPwF2WfAN8tRTtWQNhi98B99Qpuj7JoZ3Aikgg"},
Expand All @@ -183,13 +183,18 @@
{"name":"allow_commission_decrease_at_any_time","pubkey":"decoMktMcnmiq6t3u7g5BfgcQu91nKZr6RvMYf9z1Jb"},
{"name":"merkle_conflict_duplicate_proofs","pubkey":"mrkPjRg79B2oK2ZLgd7S3AfEJaX9B6gAF3H9aEykRUS"},
{"name":"disable_bpf_loader_instructions","pubkey":"7WeS1vfPRgeeoXArLh7879YcB9mgE9ktjPDtajXeWfXn"},
{"name":"deprecate_executable_meta_update_in_bpf_loader","pubkey":"k6uR1J9VtKJnTukBV2Eo15BEy434MBg8bT6hHQgmU8v"},
Comment thread
0x0ece marked this conversation as resolved.
{"name":"deprecate_executable_meta_update_in_bpf_loader","pubkey":"k6uR1J9VtKJnTukBV2Eo15BEy434MBg8bT6hHQgmU8v","hardcoded":1,"reverted":1},
{"name":"enable_zk_proof_from_account","pubkey":"zkiTNuzBKxrCLMKehzuQeKZyLtX2yvFcEKMML8nExU8"},
{"name":"cost_model_requested_write_lock_cost","pubkey":"wLckV1a64ngtcKPRGU4S4grVTestXjmNjxBjaKZrAcn"},
{"name":"enable_gossip_duplicate_proof_ingestion","pubkey":"FNKCMBzYUdjhHyPdsKG2LSmdzH8TCHXn3ytj8RNBS4nG"},
{"name":"enable_chained_merkle_shreds","pubkey":"7uZBkJXJ1HkuP6R3MJfZs7mLwymBcDbKdqbF51ZWLier"},
{"name":"remove_rounding_in_fee_calculation","pubkey":"BtVN7YjDzNE6Dk7kTT7YTDgMNUZTNgiSJgsdzAeTg2jF"},
{"name":"enable_tower_sync_ix","pubkey":"tSynMCspg4xFiCj1v3TDb4c7crMR5tSBhLz4sF7rrNA"},
{"name":"deprecate_unused_legacy_vote_plumbing","pubkey":"6Uf8S75PVh91MYgPQSHnjRAPQq6an5BDv9vomrCwDqLe"},
{"name":"reward_full_priority_fee","pubkey":"3opE3EzAKnUftUDURkzMgwpNgimBAypW1mNDYH4x4Zg7"}
{"name":"reward_full_priority_fee","pubkey":"3opE3EzAKnUftUDURkzMgwpNgimBAypW1mNDYH4x4Zg7"},
{"name":"disable_rent_fees_collection","pubkey":"CJzY83ggJHqPGDq8VisV3U91jDJLuEaALZooBrXtnnLU"},
{"name":"add_new_reserved_account_keys","pubkey":"8U4skmMVnF6k2kMvrWbQuRUT3qQSiTYpSjqmhmgfthZu"},
{"name":"chained_merkle_conflict_duplicate_proofs","pubkey":"chaie9S2zVfuxJKNRGkyTDokLwWxx6kD2ZLsqQHaDD8"},
{"name":"simplify_alt_bn128_syscall_error_codes","pubkey": "JDn5q3GBeqzvUa7z67BbmVHVdE3EbUAjvFep3weR3jxX","hardcoded":1,"comment":"only impl the activated path"},
{"name":"abort_on_invalid_curve","pubkey":"FuS3FPfJDKSNot99ECLXtp3rueq36hMNStJkPJwWodLh"}
]
18 changes: 10 additions & 8 deletions src/flamenco/features/gen_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def generate(feature_map_path, header_path, body_path):
)
fd_features_t_params.append(f" /* {short_id} */ ulong {x['name']};")
rmap[x["pubkey"]] = x["name"]
if "old" in x:
rmap[x["old"]] = x["name"]
fd_features_t_params = "\n".join(fd_features_t_params)

# Write header file.
Expand Down Expand Up @@ -90,14 +92,14 @@ def pubkey_to_c_array(pubkey):
FD_FN_CONST fd_feature_id_t const *
fd_feature_id_query( ulong prefix ) {{

switch( prefix ) {{
{
chr(0xa).join([
f''' case {"0x%016x" % struct.unpack("<Q", fd58.dec32(x["pubkey"].encode('ascii'))[:8])}: return &ids[{"% 4d" % (i)} ];'''
for i, x in enumerate(fm)
])
}
default: break;
switch( prefix ) {{""",
file=body)
for i, x in enumerate(fm):
print(f''' case {"0x%016x" % struct.unpack("<Q", fd58.dec32(x["pubkey"].encode('ascii'))[:8])}: return &ids[{"% 4d" % (i)} ];''', file=body)
if "old" in x:
print(f''' case {"0x%016x" % struct.unpack("<Q", fd58.dec32(x["old"].encode('ascii'))[:8])}: return &ids[{"% 4d" % (i)} ];''', file=body)
print(
f""" default: break;
}}

return NULL;
Expand Down
1 change: 1 addition & 0 deletions src/flamenco/runtime/fd_system_ids.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const fd_pubkey_t fd_solana_zk_token_proof_program_id = { .uc = { ZK_TOK
const fd_pubkey_t fd_solana_address_lookup_table_program_id = { .uc = { ADDR_LUT_PROG_ID } };
const fd_pubkey_t fd_solana_spl_native_mint_id = { .uc = { NATIVE_MINT_ID } };
const fd_pubkey_t fd_solana_spl_token_id = { .uc = { TOKEN_PROG_ID } };
const fd_pubkey_t fd_solana_zk_el_gamal_program_id = { .uc = { ZK_EL_GAMAL_PROG_ID } };

#define MAP_PERFECT_NAME fd_pubkey_sysvar_tbl
#define MAP_PERFECT_LG_TBL_SZ 4
Expand Down
1 change: 1 addition & 0 deletions src/flamenco/runtime/fd_system_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ extern const fd_pubkey_t fd_solana_zk_token_proof_program_id;
extern const fd_pubkey_t fd_solana_address_lookup_table_program_id;
extern const fd_pubkey_t fd_solana_spl_native_mint_id;
extern const fd_pubkey_t fd_solana_spl_token_id;
extern const fd_pubkey_t fd_solana_zk_el_gamal_program_id;

/* fd_pubkey_is_{sysvar_id, builtin_program, sysvar_or_builtin} checks
whether the provided pubkey is included in the hardcoded list of
Expand Down
2 changes: 2 additions & 0 deletions src/flamenco/runtime/fd_system_ids_pp.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@
0xdaU,0xc4U,0x39U,0xdcU,0x1aU,0xebU,0x3bU,0x55U,0x98U,0xa0U,0xf0U,0x00U,0x00U,0x00U,0x00U,0x01U
#define TOKEN_PROG_ID 0x06U,0xddU,0xf6U,0xe1U,0xd7U,0x65U,0xa1U,0x93U,0xd9U,0xcbU,0xe1U,0x46U,0xceU,0xebU,0x79U,0xacU, \
0x1cU,0xb4U,0x85U,0xedU,0x5fU,0x5bU,0x37U,0x91U,0x3aU,0x8cU,0xf5U,0x85U,0x7eU,0xffU,0x00U,0xa9U
#define ZK_EL_GAMAL_PROG_ID 0x08U,0x63U,0x75U,0xacU,0xe2U,0xaeU,0xeaU,0x28U,0x1aU,0x6bU,0x37U,0x4dU,0x68U,0x1bU,0xa7U,0x6aU, \
0x53U,0xccU,0xf6U,0x38U,0xc0U,0x74U,0x55U,0x93U,0x6cU,0x05U,0xd0U,0x65U,0x40U,0x00U,0x00U,0x00U
1 change: 1 addition & 0 deletions src/flamenco/runtime/test_system_ids.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ main( int argc,
assert_eq( "AddressLookupTab1e1111111111111111111111111", fd_solana_address_lookup_table_program_id );
assert_eq( "So11111111111111111111111111111111111111112", fd_solana_spl_native_mint_id );
assert_eq( "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", fd_solana_spl_token_id );
assert_eq( "ZkE1Gama1Proof11111111111111111111111111111", fd_solana_zk_el_gamal_program_id );

char const * const test_pubkeys[ 34 ] = {
"Sysvar1111111111111111111111111111111111111",
Expand Down
1 change: 1 addition & 0 deletions src/flamenco/runtime/tests/fd_exec_sol_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ static ulong supported_features[] =
0x4b241cb4c6f3b3b2, // require_rent_exempt_split_destination
0x74326f811fd7d861, // vote_state_add_vote_latency
0x86fa44f01141c71a, // timely_vote_credits
0xe9d32123513c4d0d, // timely_vote_credits
0x5795654d01457757, // vote_authorize_with_seed
0x8a8eb9085ca2bb0b, // commission_updates_only_allowed_in_first_half_of_epoch
0x7bc99a080444c8d9, // allow_votes_to_directly_update_vote_state
Expand Down
Loading