LCOV - code coverage report
Current view: top level - app/shared_dev/commands/configure - genesis.c (source / functions) Hit Total Coverage
Test: cov.lcov Lines: 0 246 0.0 %
Date: 2026-11-11 12:40:43 Functions: 0 5 0.0 %

          Line data    Source code
       1             : #define _GNU_SOURCE
       2             : #include "../../../shared/commands/configure/configure.h"
       3             : #include "../bench/bench.h"
       4             : 
       5             : #include "../../../platform/fd_file_util.h"
       6             : #include "../../../../disco/keyguard/fd_keyguard_bls.h"
       7             : #include "../../../../disco/keyguard/fd_keyload.h"
       8             : #include "../../../../discof/genesis/genesis_hash.h"
       9             : #include "../../../../flamenco/features/fd_features.h"
      10             : #include "../../../../flamenco/genesis/fd_genesis_create.h"
      11             : #include "../../../../flamenco/genesis/fd_genesis_parse.h"
      12             : #include "../../../../flamenco/runtime/sysvar/fd_sysvar_clock.h"
      13             : #include <stdio.h>
      14             : #include <unistd.h>
      15             : #include <dirent.h>
      16             : #include <sys/stat.h>
      17             : #include <sys/wait.h>
      18             : 
      19             : #define NAME "genesis"
      20             : 
      21             : /* Covers genesis and scratch requirements of the 32,768-account bench
      22             :    presets, including two token accounts per funded account. */
      23             : 
      24             : #define GENESIS_BUF_MAX (1UL<<25)
      25           0 : #define GENESIS_ACCOUNT_MAX FD_GENESIS_ACCOUNT_MAX( GENESIS_BUF_MAX )
      26             : 
      27             : FD_IMPORT_BINARY( ptoken_program_elf, "src/ballet/sbpf/fixtures/spl_p_token.so" );
      28             : 
      29             : /* default_enable_features is a table of features enabled by default */
      30             : 
      31             : static void
      32           0 : default_enable_features( fd_features_t * features ) {
      33           0 :   features->index_erasure_conflict_duplicate_proofs = 0UL;
      34           0 :   features->curve25519_restrict_msm_length = 0UL;
      35           0 :   features->commission_updates_only_allowed_in_first_half_of_epoch = 0UL;
      36           0 :   features->validate_fee_collector_account = 0UL;
      37           0 :   features->incremental_snapshot_only_incremental_hash_calculation = 0UL;
      38           0 :   features->timely_vote_credits = 0UL;
      39           0 :   features->apply_cost_tracker_during_replay = 0UL;
      40           0 :   features->reject_callx_r10 = 0UL;
      41           0 :   features->update_hashes_per_tick = 0UL;
      42           0 :   features->pico_inflation = 0UL;
      43           0 :   features->remaining_compute_units_syscall_enabled = 0UL;
      44           0 :   features->simplify_writable_program_account_check = 0UL;
      45           0 :   features->enable_bpf_loader_set_authority_checked_ix = 0UL;
      46           0 :   features->consume_blockstore_duplicate_proofs = 0UL;
      47           0 :   features->disable_deploy_of_alloc_free_syscall = 0UL;
      48           0 :   features->disable_bpf_loader_instructions = 0UL;
      49           0 :   features->full_inflation_enable = 0UL;
      50           0 :   features->vote_state_add_vote_latency = 0UL;
      51           0 :   features->error_on_syscall_bpf_function_hash_collisions = 0UL;
      52           0 :   features->update_hashes_per_tick3 = 0UL;
      53           0 :   features->update_hashes_per_tick4 = 0UL;
      54           0 :   features->enable_bpf_loader_extend_program_ix = 0UL;
      55           0 :   features->enable_loader_v4 = 0UL;
      56           0 :   features->increase_tx_account_lock_limit = 0UL;
      57           0 :   features->revise_turbine_epoch_stakes = 0UL;
      58           0 :   features->clean_up_delegation_errors = 0UL;
      59           0 :   features->update_hashes_per_tick5 = 0UL;
      60           0 :   features->skip_rent_rewrites = 0UL;
      61           0 :   features->switch_to_new_elf_parser = 0UL;
      62           0 :   features->require_rent_exempt_split_destination = 0UL;
      63           0 :   features->enable_turbine_fanout_experiments = 0UL;
      64           0 :   features->devnet_and_testnet = 0UL;
      65           0 :   features->enable_big_mod_exp_syscall = 0UL;
      66           0 :   features->update_hashes_per_tick2 = 0UL;
      67           0 :   features->account_data_direct_mapping = 0UL;
      68           0 :   features->syscall_parameter_address_restrictions = 0UL;
      69           0 :   features->virtual_address_space_adjustments = 0UL;
      70           0 :   features->bpf_account_data_direct_mapping = 0UL;
      71           0 :   features->relax_authority_signer_check_for_lookup_table_creation = 0UL;
      72           0 :   features->update_hashes_per_tick6 = 0UL;
      73           0 :   features->better_error_codes_for_tx_lamport_check = 0UL;
      74           0 :   features->loosen_cpi_size_restriction = 0UL;
      75           0 :   features->drop_legacy_shreds = 0UL;
      76           0 :   features->deprecate_rewards_sysvar = 0UL;
      77           0 :   features->warp_timestamp_again = 0UL;
      78           0 :   features->reduce_stake_warmup_cooldown = 0UL;
      79           0 :   features->disable_turbine_fanout_experiments = 0UL;
      80           0 :   features->last_restart_slot_sysvar = 0UL;
      81           0 :   features->disable_fees_sysvar = 0UL;
      82           0 : }
      83             : 
      84             : /* Create a new genesis.bin file contents into the provided blob buffer
      85             :    and return the size of the buffer.  Will abort on error if the
      86             :    provided buffer is not large enough. */
      87             : 
      88             : static ulong
      89             : create_genesis( config_t const * config,
      90             :                 uchar *          blob,
      91           0 :                 ulong            blob_max ) {
      92             : 
      93           0 :   fd_genesis_options_t options[1];
      94             : 
      95             :   /* Read in keys */
      96             : 
      97           0 :   uchar const * identity_key_ = fd_keyload_load( config->paths.identity_key, 0 );
      98           0 :   if( FD_UNLIKELY( !identity_key_ ) ) FD_LOG_ERR(( "Failed to load identity key" ));
      99           0 :   memcpy( options->identity_pubkey.key, identity_key_+32UL, 32 );
     100             : 
     101             :   /* The identity is the authorized voter, so the vote account carries
     102             :      the BLS key the sign tile derives from it. */
     103           0 :   fd_keyguard_bls_key_t bls_key[1];
     104           0 :   fd_sha512_t           sha[1];
     105           0 :   fd_keyguard_bls_key_derive( bls_key, identity_key_+32UL, identity_key_, fd_sha512_join( fd_sha512_new( sha ) ) );
     106           0 :   memcpy( options->bls_pubkey, bls_key->public_key, sizeof(options->bls_pubkey) );
     107           0 :   fd_memzero_explicit( bls_key, sizeof(bls_key) );
     108           0 :   fd_keyload_unload( identity_key_, 0 );
     109             : 
     110           0 :   char file_path[ PATH_MAX ];
     111           0 :   FD_TEST( fd_cstr_printf_check( file_path, PATH_MAX, NULL, "%s/faucet.json", config->paths.base ) );
     112           0 :   uchar const * faucet_pubkey_ = fd_keyload_load( file_path, 1 );
     113           0 :   if( FD_UNLIKELY( !faucet_pubkey_ ) ) FD_LOG_ERR(( "Failed to load faucet key" ));
     114           0 :   memcpy( options->faucet_pubkey.key, faucet_pubkey_, 32 );
     115           0 :   fd_keyload_unload( faucet_pubkey_, 1 );
     116             : 
     117           0 :   FD_TEST( fd_cstr_printf_check( file_path, PATH_MAX, NULL, "%s/stake-account.json", config->paths.base ) );
     118           0 :   uchar const * stake_pubkey_ = fd_keyload_load( file_path, 1 );
     119           0 :   if( FD_UNLIKELY( !stake_pubkey_ ) ) FD_LOG_ERR(( "Failed to load stake account key" ));
     120           0 :   memcpy( options->stake_pubkey.key, stake_pubkey_, 32 );
     121           0 :   fd_keyload_unload( stake_pubkey_, 1 );
     122             : 
     123           0 :   if( !strcmp( config->paths.vote_account, "" ) ) {
     124           0 :     FD_TEST( fd_cstr_printf_check( file_path, PATH_MAX, NULL, "%s/vote-account.json", config->paths.base ) );
     125           0 :   } else {
     126           0 :     fd_cstr_fini( fd_cstr_append_cstr_safe( fd_cstr_init( file_path ), config->paths.vote_account, PATH_MAX-1UL ) );
     127           0 :   }
     128             : 
     129           0 :   uchar const * vote_pubkey_ = fd_keyload_load( file_path, 1 );
     130           0 :   if( FD_UNLIKELY( !vote_pubkey_ ) ) FD_LOG_ERR(( "Failed to load vote account key" ));
     131           0 :   memcpy( options->vote_pubkey.key, vote_pubkey_, 32 );
     132           0 :   fd_keyload_unload( vote_pubkey_, 1 );
     133             : 
     134           0 :   options->creation_time      = (ulong)fd_log_wallclock() / (ulong)1e9;
     135           0 :   options->faucet_balance     = 500000000000000000UL;
     136           0 :   options->vote_account_stake = config->development.genesis.vote_account_stake_lamports;
     137             : 
     138           0 :   options->ticks_per_slot               = config->development.genesis.ticks_per_slot;
     139           0 :   options->target_tick_duration_micros  = config->development.genesis.target_tick_duration_micros;
     140             : 
     141           0 :   options->fund_initial_accounts        = config->development.genesis.fund_initial_accounts;
     142           0 :   options->fund_initial_amount_lamports = config->development.genesis.fund_initial_amount_lamports;
     143             : 
     144           0 :   options->warmup_epochs                = config->development.genesis.warmup_epochs;
     145             : 
     146           0 :   options->token_program_elf    = NULL;
     147           0 :   options->token_program_elf_sz = 0UL;
     148           0 :   if( BENCHG_TRANSACTION_MODE_PTOKEN_TRANSFER==bench_transaction_mode( config->development.bench.transaction_mode ) ) {
     149           0 :     options->token_program_elf    = ptoken_program_elf;
     150           0 :     options->token_program_elf_sz = ptoken_program_elf_sz;
     151           0 :   }
     152             : 
     153           0 :   fd_features_t features[1];
     154           0 :   fd_features_disable_all( features );
     155           0 :   fd_features_enable_cleaned_up( features );
     156           0 :   default_enable_features( features );
     157           0 :   features->alpenglow = 0UL;
     158             : 
     159           0 :   options->features = features;
     160             : 
     161             :   /* Serialize blob */
     162             : 
     163           0 :   static uchar scratch_smem[ GENESIS_BUF_MAX ];
     164           0 :          ulong scratch_fmem[ 4 ];
     165           0 :   fd_scratch_attach( scratch_smem, scratch_fmem,
     166           0 :                      sizeof(scratch_smem), sizeof(scratch_fmem)/sizeof(ulong) );
     167             : 
     168           0 :   ulong blob_sz = fd_genesis_create( blob, blob_max, options );
     169           0 :   if( FD_UNLIKELY( !blob_sz ) ) FD_LOG_ERR(( "Failed to create genesis blob" ));
     170             : 
     171           0 :   fd_scratch_detach( NULL );
     172             : 
     173           0 :   return blob_sz;
     174           0 : }
     175             : 
     176             : static void
     177           0 : init( config_t const * config ) {
     178           0 :   int bootstrap = !config->gossip.entrypoints_cnt;
     179           0 :   if( FD_LIKELY( !bootstrap ) ) return;
     180             : 
     181           0 :   char const * genesis_path = config->paths.genesis;
     182           0 :   if( FD_UNLIKELY( -1==fd_file_util_mkdir_all( genesis_path, config->uid, config->gid, 0 ) ) )
     183           0 :     FD_LOG_ERR(( "could not create ledger directory `%s` (%i-%s)", genesis_path, errno, fd_io_strerror( errno ) ));
     184             : 
     185           0 :   static uchar blob[ GENESIS_BUF_MAX ];
     186           0 :   ulong blob_sz = create_genesis( config, blob, sizeof(blob) );
     187             : 
     188             :   /* Switch to target user in the configuration when creating the
     189             :      genesis.bin file so it is permissioned correctly. */
     190             : 
     191           0 :   gid_t gid = getgid();
     192           0 :   uid_t uid = getuid();
     193           0 :   if( FD_LIKELY( gid == 0 && setegid( config->gid ) ) )
     194           0 :     FD_LOG_ERR(( "setegid() failed (%i-%s)", errno, fd_io_strerror( errno ) ));
     195           0 :   if( FD_LIKELY( uid == 0 && seteuid( config->uid ) ) )
     196           0 :     FD_LOG_ERR(( "seteuid() failed (%i-%s)", errno, fd_io_strerror( errno ) ));
     197             : 
     198           0 :   mode_t previous = umask( S_IRWXO | S_IRWXG );
     199             : 
     200           0 :   do {
     201           0 :     FILE * genesis_file = fopen( genesis_path, "w" );
     202           0 :     FD_TEST( genesis_file );
     203           0 :     FD_TEST( 1L == fwrite( blob, blob_sz, 1L, genesis_file ) );
     204           0 :     FD_TEST( !fclose( genesis_file ) );
     205           0 :   } while(0);
     206             : 
     207           0 :   umask( previous );
     208             : 
     209           0 :   if( FD_UNLIKELY( seteuid( uid ) ) ) FD_LOG_ERR(( "seteuid() failed (%i-%s)", errno, fd_io_strerror( errno ) ));
     210           0 :   if( FD_UNLIKELY( setegid( gid ) ) ) FD_LOG_ERR(( "setegid() failed (%i-%s)", errno, fd_io_strerror( errno ) ));
     211             : 
     212           0 :   uchar genesis_hash[ 32 ];
     213           0 :   char  genesis_hash_cstr[ FD_BASE58_ENCODED_32_SZ ];
     214             : 
     215           0 :   ushort shred_version;
     216           0 :   int result = read_genesis_bin( genesis_path, &shred_version, genesis_hash );
     217           0 :   if( FD_UNLIKELY( -1==result ) ) FD_LOG_ERR(( "could not compute shred version from genesis file `%s` (%i-%s)", genesis_path, errno, fd_io_strerror( errno ) ));
     218             : 
     219           0 :   FD_LOG_INFO(( "Created %s:  genesis_hash=%s sz=%lu",
     220           0 :                 genesis_path,
     221           0 :                 fd_base58_encode_32( genesis_hash, NULL, genesis_hash_cstr ),
     222           0 :                 blob_sz ));
     223           0 :   FD_LOG_INFO(( "Shred version: %hu", shred_version ));
     224           0 : }
     225             : 
     226             : static int
     227             : fini( config_t const * config,
     228           0 :       int              pre_init ) {
     229           0 :   (void)pre_init;
     230             : 
     231           0 :   char const * genesis_path = config->paths.genesis;
     232           0 :   if( FD_UNLIKELY( -1==unlink( genesis_path ) && errno!=ENOENT ) )
     233           0 :     FD_LOG_ERR(( "could not remove genesis.bin file `%s` (%i-%s)", genesis_path, errno, fd_io_strerror( errno ) ));
     234           0 :   return 0;
     235           0 : }
     236             : 
     237             : static configure_result_t
     238             : check( config_t const * config,
     239           0 :        int              check_type FD_PARAM_UNUSED ) {
     240           0 :   if( FD_LIKELY( config->gossip.entrypoints_cnt ) ) {
     241           0 :     if( FD_UNLIKELY( strcmp( config->consensus.expected_genesis_hash, "" ) ) ) {
     242           0 :       uchar expected_genesis_hash[ 32 ];
     243           0 :       if( FD_UNLIKELY( !fd_base58_decode_32( config->consensus.expected_genesis_hash, expected_genesis_hash ) ) )
     244           0 :         FD_LOG_ERR(( "failed to decode [consensus.expected_genesis_hash] \"%s\" as base58", config->consensus.expected_genesis_hash ));
     245           0 :       uchar genesis_hash[ 32 ];
     246           0 :       int result = read_genesis_bin( config->paths.genesis, NULL, genesis_hash );
     247           0 :       if( FD_UNLIKELY( -1==result && errno!=ENOENT ) )
     248           0 :         FD_LOG_ERR(( "could not read genesis file at `%s` (%i-%s)", config->paths.genesis, errno, fd_io_strerror( errno ) ));
     249           0 :       if( FD_UNLIKELY( !result && memcmp( genesis_hash, expected_genesis_hash, 32UL ) ) )
     250           0 :         PARTIALLY_CONFIGURED( "genesis file at `%s` does not match [consensus.expected_genesis_hash]", config->paths.genesis );
     251           0 :     }
     252           0 :     CONFIGURE_OK();
     253           0 :   }
     254             : 
     255           0 :   char const * genesis_path = config->paths.genesis;
     256           0 :   struct stat st;
     257           0 :   int err = stat( genesis_path, &st );
     258           0 :   if( FD_UNLIKELY( -1==err && errno!=ENOENT ) ) FD_LOG_ERR(( "could not stat genesis.bin file at `%s` (%i-%s)", genesis_path, errno, fd_io_strerror( errno ) ));
     259           0 :   else if( FD_UNLIKELY( -1==err ) ) NOT_CONFIGURED( "`%s` does not exist", genesis_path );
     260             : 
     261           0 :   CHECK( check_file( genesis_path, config->uid, config->gid, S_IFREG | S_IRUSR | S_IWUSR ) );
     262             : 
     263           0 :   static uchar disk_bin[ GENESIS_BUF_MAX ];
     264           0 :   if( FD_UNLIKELY( (ulong)st.st_size>sizeof(disk_bin) ) ) FD_LOG_ERR(( "genesis file at `%s` too large (%lu bytes, max %lu)", genesis_path, (ulong)st.st_size, sizeof(disk_bin) ));
     265             : 
     266           0 :   ulong bytes_read = 0UL;
     267           0 :   int fd = open( genesis_path, O_RDONLY );
     268           0 :   if( FD_UNLIKELY( -1==fd ) ) FD_LOG_ERR(( "could not open genesis.bin file at `%s` (%i-%s)", genesis_path, errno, fd_io_strerror( errno ) ));
     269             : 
     270           0 :   while( bytes_read < (ulong)st.st_size ) {
     271           0 :     long result = read( fd, disk_bin + bytes_read, (ulong)st.st_size - bytes_read );
     272           0 :     if( FD_UNLIKELY( -1==result ) ) FD_LOG_ERR(( "could not read genesis.bin file at `%s` (%i-%s)", genesis_path, errno, fd_io_strerror( errno ) ));
     273           0 :     if( FD_UNLIKELY( !result ) )  FD_LOG_ERR(( "read() returned 0 before reading full genesis.bin file at `%s`", genesis_path ));
     274           0 :     bytes_read += (ulong)result;
     275           0 :   }
     276             : 
     277           0 :   if( FD_UNLIKELY( -1==close( fd ) ) ) FD_LOG_ERR(( "could not close genesis.bin file at `%s` (%i-%s)", genesis_path, errno, fd_io_strerror( errno ) ));
     278             : 
     279           0 :   static uchar _genesis_mem[ FD_GENESIS_FOOTPRINT( GENESIS_ACCOUNT_MAX ) ] __attribute__((aligned(FD_GENESIS_ALIGN)));
     280           0 :   fd_genesis_t * _genesis = fd_genesis_new( _genesis_mem, GENESIS_ACCOUNT_MAX );
     281           0 :   FD_TEST( _genesis );
     282           0 :   if( FD_UNLIKELY( !fd_genesis_parse( _genesis, disk_bin, (ulong)st.st_size ) ) )
     283           0 :     FD_LOG_ERR(( "malformed genesis file at `%s`", genesis_path ));
     284             : 
     285           0 :   static uchar fresh_bin[ GENESIS_BUF_MAX ];
     286           0 :   ulong fresh_bin_sz = create_genesis( config, fresh_bin, sizeof(fresh_bin) );
     287             : 
     288           0 :   static uchar _tmp_genesis_mem[ FD_GENESIS_FOOTPRINT( GENESIS_ACCOUNT_MAX ) ] __attribute__((aligned(FD_GENESIS_ALIGN)));
     289           0 :   fd_genesis_t * _tmp_genesis = fd_genesis_new( _tmp_genesis_mem, GENESIS_ACCOUNT_MAX );
     290           0 :   FD_TEST( _tmp_genesis );
     291           0 :   if( FD_UNLIKELY( !fd_genesis_parse( _tmp_genesis, fresh_bin, fresh_bin_sz ) ) )
     292           0 :     FD_LOG_ERR(( "malformed genesis file generated for comparison for `%s`", genesis_path ));
     293             : 
     294           0 :   fd_genesis_t const * genesis     = _genesis;
     295           0 :   fd_genesis_t const * tmp_genesis = _tmp_genesis;
     296             : 
     297           0 :   if( FD_UNLIKELY( tmp_genesis->account_cnt!=genesis->account_cnt ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected accounts_len", genesis_path );
     298           0 :   for( ulong i=0UL; i<genesis->account_cnt; i++ ) {
     299           0 :     fd_genesis_account_t a[1];  fd_genesis_account( genesis,     disk_bin,  a, i );
     300           0 :     fd_genesis_account_t b[1];  fd_genesis_account( tmp_genesis, fresh_bin, b, i );
     301             : 
     302           0 :     if( FD_UNLIKELY( memcmp( a->pubkey.uc, b->pubkey.uc, 32 ) ) )               PARTIALLY_CONFIGURED( "`%s` has unexpected account key at index %lu", genesis_path, i );
     303           0 :     if( FD_UNLIKELY( a->lamports!=b->lamports ) )                               PARTIALLY_CONFIGURED( "`%s` has unexpected account lamports at index %lu", genesis_path, i );
     304           0 :     if( FD_UNLIKELY( a->data_len!=b->data_len ) )                               PARTIALLY_CONFIGURED( "`%s` has unexpected account data_len at index %lu", genesis_path, i );
     305           0 :     if( FD_UNLIKELY( memcmp( a->owner.uc, b->owner.uc, 32 ) ) )                 PARTIALLY_CONFIGURED( "`%s` has unexpected account owner at index %lu", genesis_path, i );
     306           0 :     if( FD_UNLIKELY( a->executable!=b->executable ) )                           PARTIALLY_CONFIGURED( "`%s` has unexpected account executable flag at index %lu", genesis_path, i );
     307           0 :     if( FD_UNLIKELY( a->data_len && memcmp( a->data, b->data, a->data_len ) ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected account data at index %lu", genesis_path, i );
     308           0 :   }
     309             : 
     310           0 :   if( FD_UNLIKELY( tmp_genesis->builtin_cnt!=genesis->builtin_cnt ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected native_instruction_processors_len", genesis_path );
     311           0 :   for( ulong i=0UL; i<genesis->builtin_cnt; i++ ) {
     312           0 :     fd_genesis_builtin_t a[1];  fd_genesis_builtin( genesis,     disk_bin,  a, i );
     313           0 :     fd_genesis_builtin_t b[1];  fd_genesis_builtin( tmp_genesis, fresh_bin, b, i );
     314             : 
     315           0 :     if( FD_UNLIKELY( memcmp( a->pubkey.uc, b->pubkey.uc, 32 ) ) )               PARTIALLY_CONFIGURED( "`%s` has unexpected native_instruction_processors pubkey at index %lu", genesis_path, i );
     316           0 :     if( FD_UNLIKELY( a->data_len!=b->data_len ) )                               PARTIALLY_CONFIGURED( "`%s` has unexpected native_instruction_processors string_len at index %lu", genesis_path, i );
     317           0 :     if( FD_UNLIKELY( a->data_len && memcmp( a->data, b->data, a->data_len ) ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected native_instruction_processors string at index %lu", genesis_path, i );
     318           0 :   }
     319             : 
     320           0 :   if( FD_UNLIKELY( tmp_genesis->poh.ticks_per_slot!=config->development.genesis.ticks_per_slot ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected ticks_per_slot", genesis_path );
     321             : 
     322           0 :   if( FD_UNLIKELY( tmp_genesis->poh.tick_duration_secs!=genesis->poh.tick_duration_secs ) )  PARTIALLY_CONFIGURED( "`%s` has unexpected poh_config.target_tick_duration.seconds", genesis_path );
     323           0 :   if( FD_UNLIKELY( tmp_genesis->poh.tick_duration_ns!=genesis->poh.tick_duration_ns ) )      PARTIALLY_CONFIGURED( "`%s` has unexpected poh_config.target_tick_duration.nanoseconds", genesis_path );
     324           0 :   if( FD_UNLIKELY( tmp_genesis->poh.target_tick_count!=genesis->poh.target_tick_count ) )    PARTIALLY_CONFIGURED( "`%s` has unexpected poh_config.target_tick_count", genesis_path );
     325           0 :   if( FD_UNLIKELY( tmp_genesis->poh.hashes_per_tick!=genesis->poh.hashes_per_tick ) )        PARTIALLY_CONFIGURED( "`%s` has unexpected poh_config.hashes_per_tick", genesis_path );
     326             : 
     327           0 :   if( FD_UNLIKELY( tmp_genesis->fee_rate_governor.target_lamports_per_signature!=genesis->fee_rate_governor.target_lamports_per_signature ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected fee_rate_governor.target_lamports_per_signature", genesis_path );
     328           0 :   if( FD_UNLIKELY( tmp_genesis->fee_rate_governor.target_signatures_per_slot!=genesis->fee_rate_governor.target_signatures_per_slot ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected fee_rate_governor.target_signatures_per_slot", genesis_path );
     329           0 :   if( FD_UNLIKELY( tmp_genesis->fee_rate_governor.min_lamports_per_signature!=genesis->fee_rate_governor.min_lamports_per_signature ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected fee_rate_governor.min_lamports_per_signature", genesis_path );
     330           0 :   if( FD_UNLIKELY( tmp_genesis->fee_rate_governor.max_lamports_per_signature!=genesis->fee_rate_governor.max_lamports_per_signature ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected fee_rate_governor.max_lamports_per_signature", genesis_path );
     331           0 :   if( FD_UNLIKELY( tmp_genesis->fee_rate_governor.burn_percent!=genesis->fee_rate_governor.burn_percent ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected fee_rate_governor.burn_percent", genesis_path );
     332             : 
     333           0 :   if( FD_UNLIKELY( tmp_genesis->rent.lamports_per_uint8_year!=genesis->rent.lamports_per_uint8_year ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected rent.lamports_per_uint8_year", genesis_path );
     334           0 :   if( FD_UNLIKELY( tmp_genesis->rent.exemption_threshold!=genesis->rent.exemption_threshold ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected rent.exemption_threshold", genesis_path );
     335           0 :   if( FD_UNLIKELY( tmp_genesis->rent.burn_percent!=genesis->rent.burn_percent ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected rent.burn_percent", genesis_path );
     336             : 
     337           0 :   if( FD_UNLIKELY( tmp_genesis->inflation.initial!=genesis->inflation.initial ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected inflation.initial", genesis_path );
     338           0 :   if( FD_UNLIKELY( tmp_genesis->inflation.terminal!=genesis->inflation.terminal ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected inflation.terminal", genesis_path );
     339           0 :   if( FD_UNLIKELY( tmp_genesis->inflation.taper!=genesis->inflation.taper ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected inflation.taper", genesis_path );
     340           0 :   if( FD_UNLIKELY( tmp_genesis->inflation.foundation!=genesis->inflation.foundation ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected inflation.foundation", genesis_path );
     341           0 :   if( FD_UNLIKELY( tmp_genesis->inflation.foundation_term!=genesis->inflation.foundation_term ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected inflation.foundation_term", genesis_path );
     342             : 
     343           0 :   if( FD_UNLIKELY( tmp_genesis->epoch_schedule.slots_per_epoch!=genesis->epoch_schedule.slots_per_epoch ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected epoch_schedule.slots_per_epoch", genesis_path );
     344           0 :   if( FD_UNLIKELY( tmp_genesis->epoch_schedule.leader_schedule_slot_offset!=genesis->epoch_schedule.leader_schedule_slot_offset ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected epoch_schedule.leader_schedule_slot_offset", genesis_path );
     345           0 :   if( FD_UNLIKELY( tmp_genesis->epoch_schedule.warmup!=genesis->epoch_schedule.warmup ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected epoch_schedule.warmup", genesis_path );
     346           0 :   if( FD_UNLIKELY( tmp_genesis->epoch_schedule.first_normal_epoch!=genesis->epoch_schedule.first_normal_epoch ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected epoch_schedule.first_normal_epoch", genesis_path );
     347           0 :   if( FD_UNLIKELY( tmp_genesis->epoch_schedule.first_normal_slot!=genesis->epoch_schedule.first_normal_slot ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected epoch_schedule.first_normal_slot", genesis_path );
     348             : 
     349           0 :   if( FD_UNLIKELY( tmp_genesis->cluster_type!=genesis->cluster_type ) ) PARTIALLY_CONFIGURED( "`%s` has unexpected cluster_type", genesis_path );
     350             : 
     351           0 :   CONFIGURE_OK();
     352           0 : }
     353             : 
     354             : configure_stage_t fd_cfg_stage_genesis = {
     355             :   .name  = NAME,
     356             :   .init  = init,
     357             :   .fini  = fini,
     358             :   .check = check,
     359             : };
     360             : 
     361             : #undef NAME

Generated by: LCOV version 1.14