diff --git a/src/app/firedancer/topology.c b/src/app/firedancer/topology.c index 853378f63a3..6b891c854fb 100644 --- a/src/app/firedancer/topology.c +++ b/src/app/firedancer/topology.c @@ -1080,8 +1080,6 @@ fd_topo_configure_tile( fd_topo_tile_t * tile, tile->replay.funk_obj_id = fd_pod_query_ulong( config->topo.props, "funk", ULONG_MAX ); FD_TEST( tile->replay.funk_obj_id !=ULONG_MAX ); tile->replay.progcache_obj_id = fd_pod_query_ulong( config->topo.props, "progcache", ULONG_MAX ); FD_TEST( tile->replay.progcache_obj_id!=ULONG_MAX ); - strncpy( tile->replay.cluster_version, config->tiles.replay.cluster_version, sizeof(tile->replay.cluster_version) ); - tile->replay.max_live_slots = config->firedancer.runtime.max_live_slots; tile->replay.expected_shred_version = config->consensus.expected_shred_version; diff --git a/src/app/shared/fd_config_parse.c b/src/app/shared/fd_config_parse.c index 662aea9924e..a4658a0f850 100644 --- a/src/app/shared/fd_config_parse.c +++ b/src/app/shared/fd_config_parse.c @@ -249,7 +249,6 @@ fd_config_extract_pod( uchar * pod, CFG_POP ( bool, capture.dump_txn_to_pb ); CFG_POP ( bool, capture.dump_block_to_pb ); - CFG_POP ( cstr, tiles.replay.cluster_version ); CFG_POP_ARRAY( cstr, tiles.replay.enable_features ); CFG_POP ( cstr, tiles.store_int.slots_pending ); diff --git a/src/app/shared_dev/commands/configure/genesis.c b/src/app/shared_dev/commands/configure/genesis.c index 61b49df1f39..47404bdc7db 100644 --- a/src/app/shared_dev/commands/configure/genesis.c +++ b/src/app/shared_dev/commands/configure/genesis.c @@ -195,12 +195,7 @@ create_genesis( config_t const * config, fd_features_t features[1]; fd_features_disable_all( features ); - fd_cluster_version_t cluster_version = { - .major = FD_DEFAULT_AGAVE_CLUSTER_VERSION_MAJOR, - .minor = FD_DEFAULT_AGAVE_CLUSTER_VERSION_MINOR, - .patch = FD_DEFAULT_AGAVE_CLUSTER_VERSION_PATCH - }; - fd_features_enable_cleaned_up( features, &cluster_version ); + fd_features_enable_cleaned_up( features ); default_enable_features( features ); options->features = features; diff --git a/src/disco/topo/fd_topo.h b/src/disco/topo/fd_topo.h index d8e66e10297..977e4c4f68a 100644 --- a/src/disco/topo/fd_topo.h +++ b/src/disco/topo/fd_topo.h @@ -362,7 +362,6 @@ struct fd_topo_tile { ulong progcache_obj_id; char shred_cap[ PATH_MAX ]; - char cluster_version[ 32 ]; char identity_key_path[ PATH_MAX ]; uint ip_addr; diff --git a/src/discof/replay/fd_replay_tile.c b/src/discof/replay/fd_replay_tile.c index 233f3d4872d..0c5aca15faa 100644 --- a/src/discof/replay/fd_replay_tile.c +++ b/src/discof/replay/fd_replay_tile.c @@ -2490,13 +2490,8 @@ unprivileged_init( fd_topo_t * topo, /* Set some initial values for the bank: hardcoded features and the cluster version. */ - fd_cluster_version_t * cluster_version = fd_bank_cluster_version_modify( bank ); - if( FD_UNLIKELY( sscanf( tile->replay.cluster_version, "%u.%u.%u", &cluster_version->major, &cluster_version->minor, &cluster_version->patch )!=3 ) ) { - FD_LOG_ERR(( "failed to decode cluster version, configured as \"%s\"", tile->replay.cluster_version )); - } - fd_features_t * features = fd_bank_features_modify( bank ); - fd_features_enable_cleaned_up( features, cluster_version ); + fd_features_enable_cleaned_up( features ); char const * one_off_features[ 16UL ]; FD_TEST( tile->replay.enable_features_cnt<=sizeof(one_off_features)/sizeof(one_off_features[0]) ); diff --git a/src/flamenco/features/fd_features.c b/src/flamenco/features/fd_features.c index b07a76245aa..cb530f97ed7 100644 --- a/src/flamenco/features/fd_features.c +++ b/src/flamenco/features/fd_features.c @@ -19,18 +19,8 @@ fd_features_disable_all( fd_features_t * f ) { } void -fd_features_enable_cleaned_up( fd_features_t * f, fd_cluster_version_t const * cluster_version ) { - for( fd_feature_id_t const * id = fd_feature_iter_init(); - !fd_feature_iter_done( id ); - id = fd_feature_iter_next( id ) ) { - if( ( id->cleaned_up[0]major ) || - ( id->cleaned_up[0]==cluster_version->major && id->cleaned_up[1]minor ) || - ( id->cleaned_up[0]==cluster_version->major && id->cleaned_up[1]==cluster_version->minor && id->cleaned_up[2]<=cluster_version->patch ) ) { - fd_features_set( f, id, 0UL ); - } else { - fd_features_set( f, id, FD_FEATURE_DISABLED ); - } - } +fd_features_enable_cleaned_up( fd_features_t * f ) { + (void)f; } void diff --git a/src/flamenco/features/fd_features.h b/src/flamenco/features/fd_features.h index 9c1cce2da9d..bca5b19bf1f 100644 --- a/src/flamenco/features/fd_features.h +++ b/src/flamenco/features/fd_features.h @@ -85,7 +85,7 @@ fd_features_enable_all( fd_features_t * ); of the Firedancer software and can't be disabled. */ void -fd_features_enable_cleaned_up( fd_features_t *, fd_cluster_version_t const * ); +fd_features_enable_cleaned_up( fd_features_t * ); /* fd_features_enable_one_offs enables all manually passed in features. */ diff --git a/src/flamenco/runtime/fd_bank.h b/src/flamenco/runtime/fd_bank.h index c978f26e906..09bf39202f4 100644 --- a/src/flamenco/runtime/fd_bank.h +++ b/src/flamenco/runtime/fd_bank.h @@ -236,7 +236,6 @@ FD_PROTOTYPES_BEGIN X(ulong, signature_count, sizeof(ulong), alignof(ulong), 0, 0, 0 ) /* Signature count */ \ X(fd_hash_t, poh, sizeof(fd_hash_t), alignof(fd_hash_t), 0, 0, 0 ) /* PoH */ \ X(fd_sol_sysvar_last_restart_slot_t, last_restart_slot, sizeof(fd_sol_sysvar_last_restart_slot_t), alignof(fd_sol_sysvar_last_restart_slot_t), 0, 0, 0 ) /* Last restart slot */ \ - X(fd_cluster_version_t, cluster_version, sizeof(fd_cluster_version_t), alignof(fd_cluster_version_t), 0, 0, 0 ) /* Cluster version */ \ X(fd_hash_t, bank_hash, sizeof(fd_hash_t), alignof(fd_hash_t), 0, 0, 0 ) /* Bank hash */ \ X(fd_hash_t, prev_bank_hash, sizeof(fd_hash_t), alignof(fd_hash_t), 0, 0, 0 ) /* Previous bank hash */ \ X(fd_hash_t, genesis_hash, sizeof(fd_hash_t), alignof(fd_hash_t), 0, 0, 0 ) /* Genesis hash */ \ diff --git a/src/flamenco/runtime/program/fd_builtin_programs.c b/src/flamenco/runtime/program/fd_builtin_programs.c index ce16ce6c92b..54392c729dd 100644 --- a/src/flamenco/runtime/program/fd_builtin_programs.c +++ b/src/flamenco/runtime/program/fd_builtin_programs.c @@ -295,18 +295,10 @@ fd_builtin_programs_init( fd_bank_t * bank, } } - /* Precompiles have empty account data */ - if( fd_bank_cluster_version_get( bank ).major == 1 ) { - char data[1] = {1}; - fd_write_builtin_account( bank, accdb, xid, capture_ctx, fd_solana_keccak_secp_256k_program_id, data, 1 ); - fd_write_builtin_account( bank, accdb, xid, capture_ctx, fd_solana_ed25519_sig_verify_program_id, data, 1 ); - if( FD_FEATURE_ACTIVE_BANK( bank, enable_secp256r1_precompile ) ) - fd_write_builtin_account( bank, accdb, xid, capture_ctx, fd_solana_secp256r1_program_id, data, 1 ); - } else { - fd_write_builtin_account( bank, accdb, xid, capture_ctx, fd_solana_keccak_secp_256k_program_id, "", 0 ); - fd_write_builtin_account( bank, accdb, xid, capture_ctx, fd_solana_ed25519_sig_verify_program_id, "", 0 ); - if( FD_FEATURE_ACTIVE_BANK( bank, enable_secp256r1_precompile ) ) - fd_write_builtin_account( bank, accdb, xid, capture_ctx, fd_solana_secp256r1_program_id, "", 0 ); + fd_write_builtin_account( bank, accdb, xid, capture_ctx, fd_solana_keccak_secp_256k_program_id, "", 0 ); + fd_write_builtin_account( bank, accdb, xid, capture_ctx, fd_solana_ed25519_sig_verify_program_id, "", 0 ); + if( FD_FEATURE_ACTIVE_BANK( bank, enable_secp256r1_precompile ) ) { + fd_write_builtin_account( bank, accdb, xid, capture_ctx, fd_solana_secp256r1_program_id, "", 0 ); } /* Inline SPL token mint program ("inlined to avoid an external dependency on the spl-token crate") */ diff --git a/src/flamenco/types/fd_fuzz_types.h b/src/flamenco/types/fd_fuzz_types.h index 50a2634c464..5a7dfab27a3 100644 --- a/src/flamenco/types/fd_fuzz_types.h +++ b/src/flamenco/types/fd_fuzz_types.h @@ -929,16 +929,6 @@ void *fd_cluster_type_generate( void *mem, void **alloc_mem, fd_rng_t * rng ) { return mem; } -void *fd_cluster_version_generate( void *mem, void **alloc_mem, fd_rng_t * rng ) { - fd_cluster_version_t *self = (fd_cluster_version_t *) mem; - *alloc_mem = (uchar *) *alloc_mem + sizeof(fd_cluster_version_t); - fd_cluster_version_new(mem); - self->major = fd_rng_uint( rng ); - self->minor = fd_rng_uint( rng ); - self->patch = fd_rng_uint( rng ); - return mem; -} - void *fd_stake_reward_generate( void *mem, void **alloc_mem, fd_rng_t * rng ) { fd_stake_reward_t *self = (fd_stake_reward_t *) mem; *alloc_mem = (uchar *) *alloc_mem + sizeof(fd_stake_reward_t); diff --git a/src/flamenco/types/fd_types.c b/src/flamenco/types/fd_types.c index d1ff7ca2fb0..108e8e7ae58 100644 --- a/src/flamenco/types/fd_types.c +++ b/src/flamenco/types/fd_types.c @@ -5520,43 +5520,6 @@ int fd_cluster_type_encode( fd_cluster_type_t const * self, fd_bincode_encode_ct return err; } -int fd_cluster_version_encode( fd_cluster_version_t const * self, fd_bincode_encode_ctx_t * ctx ) { - int err; - err = fd_bincode_uint32_encode( self->major, ctx ); - if( FD_UNLIKELY( err ) ) return err; - err = fd_bincode_uint32_encode( self->minor, ctx ); - if( FD_UNLIKELY( err ) ) return err; - err = fd_bincode_uint32_encode( self->patch, ctx ); - if( FD_UNLIKELY( err ) ) return err; - return FD_BINCODE_SUCCESS; -} -static inline int fd_cluster_version_decode_footprint_inner( fd_bincode_decode_ctx_t * ctx, ulong * total_sz ) { - if( (ulong)ctx->data + 12UL > (ulong)ctx->dataend ) { return FD_BINCODE_ERR_OVERFLOW; }; - ctx->data = (void *)( (ulong)ctx->data + 12UL ); - return 0; -} -static void fd_cluster_version_decode_inner( void * struct_mem, void * * alloc_mem, fd_bincode_decode_ctx_t * ctx ) { - fd_cluster_version_t * self = (fd_cluster_version_t *)struct_mem; - fd_bincode_uint32_decode_unsafe( &self->major, ctx ); - fd_bincode_uint32_decode_unsafe( &self->minor, ctx ); - fd_bincode_uint32_decode_unsafe( &self->patch, ctx ); -} -void * fd_cluster_version_decode( void * mem, fd_bincode_decode_ctx_t * ctx ) { - fd_cluster_version_t * self = (fd_cluster_version_t *)mem; - fd_cluster_version_new( self ); - void * alloc_region = (uchar *)mem + sizeof(fd_cluster_version_t); - void * * alloc_mem = &alloc_region; - fd_cluster_version_decode_inner( mem, alloc_mem, ctx ); - return self; -} -void fd_cluster_version_walk( void * w, fd_cluster_version_t const * self, fd_types_walk_fn_t fun, const char *name, uint level, uint varint ) { - (void) varint; - fun( w, self, name, FD_FLAMENCO_TYPE_MAP, "fd_cluster_version", level++, 0 ); - fun( w, &self->major, "major", FD_FLAMENCO_TYPE_UINT, "uint", level, 0 ); - fun( w, &self->minor, "minor", FD_FLAMENCO_TYPE_UINT, "uint", level, 0 ); - fun( w, &self->patch, "patch", FD_FLAMENCO_TYPE_UINT, "uint", level, 0 ); - fun( w, self, name, FD_FLAMENCO_TYPE_MAP_END, "fd_cluster_version", level--, 0 ); -} int fd_stake_reward_encode( fd_stake_reward_t const * self, fd_bincode_encode_ctx_t * ctx ) { int err; err = fd_pubkey_encode( &self->stake_pubkey, ctx ); diff --git a/src/flamenco/types/fd_types.h b/src/flamenco/types/fd_types.h index 8fda01f8de3..09d7b796a59 100644 --- a/src/flamenco/types/fd_types.h +++ b/src/flamenco/types/fd_types.h @@ -946,15 +946,6 @@ struct fd_cluster_type { typedef struct fd_cluster_type fd_cluster_type_t; #define FD_CLUSTER_TYPE_ALIGN alignof(fd_cluster_type_t) -/* Encoded Size: Fixed (12 bytes) */ -struct fd_cluster_version { - uint major; - uint minor; - uint patch; -}; -typedef struct fd_cluster_version fd_cluster_version_t; -#define FD_CLUSTER_VERSION_ALIGN alignof(fd_cluster_version_t) - /* Encoded Size: Fixed (49 bytes) */ struct fd_stake_reward { ulong prev; @@ -2575,18 +2566,6 @@ fd_cluster_type_enum_MainnetBeta = 1, fd_cluster_type_enum_Devnet = 2, fd_cluster_type_enum_Development = 3, }; -static inline void fd_cluster_version_new( fd_cluster_version_t * self ) { fd_memset( self, 0, sizeof(fd_cluster_version_t) ); } -int fd_cluster_version_encode( fd_cluster_version_t const * self, fd_bincode_encode_ctx_t * ctx ); -void fd_cluster_version_walk( void * w, fd_cluster_version_t const * self, fd_types_walk_fn_t fun, const char *name, uint level, uint varint ); -static inline ulong fd_cluster_version_size( fd_cluster_version_t const * self ) { (void)self; return 12UL; } -static inline ulong fd_cluster_version_align( void ) { return FD_CLUSTER_VERSION_ALIGN; } -static inline int fd_cluster_version_decode_footprint( fd_bincode_decode_ctx_t * ctx, ulong * total_sz ) { - *total_sz += sizeof(fd_cluster_version_t); - if( (ulong)ctx->data + 12UL > (ulong)ctx->dataend ) { return FD_BINCODE_ERR_OVERFLOW; }; - return 0; -} -void * fd_cluster_version_decode( void * mem, fd_bincode_decode_ctx_t * ctx ); - static inline void fd_stake_reward_new( fd_stake_reward_t * self ) { fd_memset( self, 0, sizeof(fd_stake_reward_t) ); } int fd_stake_reward_encode( fd_stake_reward_t const * self, fd_bincode_encode_ctx_t * ctx ); void fd_stake_reward_walk( void * w, fd_stake_reward_t const * self, fd_types_walk_fn_t fun, const char *name, uint level, uint varint ); diff --git a/src/flamenco/types/fd_types.json b/src/flamenco/types/fd_types.json index 6674983fa35..46a6a70e129 100644 --- a/src/flamenco/types/fd_types.json +++ b/src/flamenco/types/fd_types.json @@ -678,16 +678,6 @@ { "name": "Development" } ] }, - { - "name": "cluster_version", - "type": "struct", - "global": true, - "fields": [ - { "name": "major", "type": "uint" }, - { "name": "minor", "type": "uint" }, - { "name": "patch", "type": "uint" } - ] - }, { "name": "stake_reward", "type": "struct", diff --git a/src/flamenco/types/fd_types_reflect_generated.c b/src/flamenco/types/fd_types_reflect_generated.c index 97cd688f321..10285f94bea 100644 --- a/src/flamenco/types/fd_types_reflect_generated.c +++ b/src/flamenco/types/fd_types_reflect_generated.c @@ -3,7 +3,7 @@ #include "fd_types_custom.h" #include "fd_types_reflect_private.h" #pragma GCC diagnostic ignored "-Wpedantic" -ulong fd_types_vt_list_cnt = 151; +ulong fd_types_vt_list_cnt = 150; fd_types_vt_t const fd_types_vt_list[] = { { .name="fd_hash", .name_len=7, .align=FD_HASH_ALIGN, .new_=(void *)fd_hash_new, .decode=(void *)fd_hash_decode, .size=(void *)fd_hash_size, .walk=(void *)fd_hash_walk, .decode_footprint=(void *)fd_hash_decode_footprint, .encode=(void *)fd_hash_encode }, { .name="fd_pubkey", .name_len=9, .align=FD_PUBKEY_ALIGN, .new_=(void *)fd_pubkey_new, .decode=(void *)fd_pubkey_decode, .size=(void *)fd_pubkey_size, .walk=(void *)fd_pubkey_walk, .decode_footprint=(void *)fd_pubkey_decode_footprint, .encode=(void *)fd_pubkey_encode }, @@ -70,7 +70,6 @@ fd_types_vt_t const fd_types_vt_list[] = { { .name="fd_stake_config", .name_len=15, .align=FD_STAKE_CONFIG_ALIGN, .new_=(void *)fd_stake_config_new, .decode=(void *)fd_stake_config_decode, .size=(void *)fd_stake_config_size, .walk=(void *)fd_stake_config_walk, .decode_footprint=(void *)fd_stake_config_decode_footprint, .encode=(void *)fd_stake_config_encode }, { .name="fd_feature_entry", .name_len=16, .align=FD_FEATURE_ENTRY_ALIGN, .new_=(void *)fd_feature_entry_new, .decode=(void *)fd_feature_entry_decode, .size=(void *)fd_feature_entry_size, .walk=(void *)fd_feature_entry_walk, .decode_footprint=(void *)fd_feature_entry_decode_footprint, .encode=(void *)fd_feature_entry_encode }, { .name="fd_cluster_type", .name_len=15, .align=FD_CLUSTER_TYPE_ALIGN, .new_=(void *)fd_cluster_type_new, .decode=(void *)fd_cluster_type_decode, .size=(void *)fd_cluster_type_size, .walk=(void *)fd_cluster_type_walk, .decode_footprint=(void *)fd_cluster_type_decode_footprint, .encode=(void *)fd_cluster_type_encode }, - { .name="fd_cluster_version", .name_len=18, .align=FD_CLUSTER_VERSION_ALIGN, .new_=(void *)fd_cluster_version_new, .decode=(void *)fd_cluster_version_decode, .size=(void *)fd_cluster_version_size, .walk=(void *)fd_cluster_version_walk, .decode_footprint=(void *)fd_cluster_version_decode_footprint, .encode=(void *)fd_cluster_version_encode }, { .name="fd_stake_reward", .name_len=15, .align=FD_STAKE_REWARD_ALIGN, .new_=(void *)fd_stake_reward_new, .decode=(void *)fd_stake_reward_decode, .size=(void *)fd_stake_reward_size, .walk=(void *)fd_stake_reward_walk, .decode_footprint=(void *)fd_stake_reward_decode_footprint, .encode=(void *)fd_stake_reward_encode }, { .name="fd_partitioned_rewards_calculation", .name_len=34, .align=FD_PARTITIONED_REWARDS_CALCULATION_ALIGN, .new_=(void *)fd_partitioned_rewards_calculation_new, .decode=(void *)fd_partitioned_rewards_calculation_decode, .size=(void *)fd_partitioned_rewards_calculation_size, .walk=(void *)fd_partitioned_rewards_calculation_walk, .decode_footprint=(void *)fd_partitioned_rewards_calculation_decode_footprint, .encode=(void *)fd_partitioned_rewards_calculation_encode }, { .name="fd_prev_epoch_inflation_rewards", .name_len=31, .align=FD_PREV_EPOCH_INFLATION_REWARDS_ALIGN, .new_=(void *)fd_prev_epoch_inflation_rewards_new, .decode=(void *)fd_prev_epoch_inflation_rewards_decode, .size=(void *)fd_prev_epoch_inflation_rewards_size, .walk=(void *)fd_prev_epoch_inflation_rewards_walk, .decode_footprint=(void *)fd_prev_epoch_inflation_rewards_decode_footprint, .encode=(void *)fd_prev_epoch_inflation_rewards_encode },