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
2 changes: 1 addition & 1 deletion src/app/firedancer-dev/commands/backtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ backtest_topo( config_t * config ) {

/* blockstore_obj shared by replay and backtest tiles */
fd_topob_wksp( topo, "blockstore" );
fd_topo_obj_t * blockstore_obj = setup_topo_blockstore( topo, "blockstore", config->firedancer.blockstore.shred_max, config->firedancer.blockstore.block_max, config->firedancer.blockstore.idx_max, config->firedancer.blockstore.txn_max, config->firedancer.blockstore.alloc_max );
fd_topo_obj_t * blockstore_obj = setup_topo_blockstore( topo, "blockstore", config->firedancer.blockstore.shred_max, config->firedancer.blockstore.block_max, config->firedancer.blockstore.idx_max, config->firedancer.blockstore.alloc_max );
fd_topob_tile_uses( topo, replay_tile, blockstore_obj, FD_SHMEM_JOIN_MODE_READ_WRITE );
fd_topob_tile_uses( topo, backtest_tile, blockstore_obj, FD_SHMEM_JOIN_MODE_READ_WRITE );
FD_TEST( fd_pod_insertf_ulong( topo->props, blockstore_obj->id, "blockstore" ) );
Expand Down
1 change: 0 additions & 1 deletion src/app/firedancer-dev/commands/sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ sim_topo( config_t * config ) {
config->firedancer.blockstore.shred_max,
config->firedancer.blockstore.block_max,
config->firedancer.blockstore.idx_max,
config->firedancer.blockstore.txn_max,
config->firedancer.blockstore.alloc_max );
fd_topo_obj_t * poh_shred_obj = fd_topob_obj( topo, "fseq", "poh_shred" );
fd_topo_obj_t * root_slot_obj = fd_topob_obj( topo, "fseq", "root_slot" );
Expand Down
3 changes: 0 additions & 3 deletions src/app/firedancer-dev/config/default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
[blockstore]
shred_max = 16777216
block_max = 131072
txn_max = 1048576
idx_max = 8192
alloc_max = 10737418240
file = "{blockstore_path}"
Expand All @@ -32,7 +31,6 @@
prometheus_listen_address = "0.0.0.0"
prometheus_listen_port = 7999
[consensus]
vote = false
expected_shred_version = 64475
[paths]
identity_key = "{keys}/fd-identity-keypair.json"
Expand All @@ -41,4 +39,3 @@
path = "{ledger_dir}/firedancer-dev.log"
level_stderr = "INFO"
level_logfile = "NOTICE"

4 changes: 2 additions & 2 deletions src/app/firedancer/callbacks.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ fd_topo_obj_callbacks_t fd_obj_cb_funk = {
static ulong
blockstore_footprint( fd_topo_t const * topo,
fd_topo_obj_t const * obj ) {
return fd_blockstore_footprint( VAL("shred_max"), VAL("block_max"), VAL("idx_max"), VAL("txn_max") ) + VAL("alloc_max");
return fd_blockstore_footprint( VAL("shred_max"), VAL("block_max"), VAL("idx_max") ) + VAL("alloc_max");
}

static ulong
Expand All @@ -143,7 +143,7 @@ blockstore_align( fd_topo_t const * topo FD_FN_UNUSED,
static void
blockstore_new( fd_topo_t const * topo,
fd_topo_obj_t const * obj ) {
FD_TEST( fd_blockstore_new( fd_topo_obj_laddr( topo, obj->id ), VAL("wksp_tag"), VAL("seed"), VAL("shred_max"), VAL("block_max"), VAL("idx_max"), VAL("txn_max") ) );
FD_TEST( fd_blockstore_new( fd_topo_obj_laddr( topo, obj->id ), VAL("wksp_tag"), VAL("seed"), VAL("shred_max"), VAL("block_max"), VAL("idx_max") ) );
}

fd_topo_obj_callbacks_t fd_obj_cb_blockstore = {
Expand Down
5 changes: 1 addition & 4 deletions src/app/firedancer/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ setup_topo_blockstore( fd_topo_t * topo,
ulong shred_max,
ulong block_max,
ulong idx_max,
ulong txn_max,
ulong alloc_max ) {
fd_topo_obj_t * obj = fd_topob_obj( topo, "blockstore", wksp_name );

Expand All @@ -37,12 +36,11 @@ setup_topo_blockstore( fd_topo_t * topo,
FD_TEST( fd_pod_insertf_ulong( topo->props, shred_max, "obj.%lu.shred_max", obj->id ) );
FD_TEST( fd_pod_insertf_ulong( topo->props, block_max, "obj.%lu.block_max", obj->id ) );
FD_TEST( fd_pod_insertf_ulong( topo->props, idx_max, "obj.%lu.idx_max", obj->id ) );
FD_TEST( fd_pod_insertf_ulong( topo->props, txn_max, "obj.%lu.txn_max", obj->id ) );
FD_TEST( fd_pod_insertf_ulong( topo->props, alloc_max, "obj.%lu.alloc_max", obj->id ) );

/* DO NOT MODIFY LOOSE WITHOUT CHANGING HOW BLOCKSTORE ALLOCATES INTERNAL STRUCTURES */

ulong blockstore_footprint = fd_blockstore_footprint( shred_max, block_max, idx_max, txn_max ) + alloc_max;
ulong blockstore_footprint = fd_blockstore_footprint( shred_max, block_max, idx_max ) + alloc_max;
FD_TEST( fd_pod_insertf_ulong( topo->props, blockstore_footprint, "obj.%lu.loose", obj->id ) );

return obj;
Expand Down Expand Up @@ -483,7 +481,6 @@ fd_topo_initialize( config_t * config ) {
config->firedancer.blockstore.shred_max,
config->firedancer.blockstore.block_max,
config->firedancer.blockstore.idx_max,
config->firedancer.blockstore.txn_max,
config->firedancer.blockstore.alloc_max );
fd_topob_tile_uses( topo, replay_tile, blockstore_obj, FD_SHMEM_JOIN_MODE_READ_WRITE );
fd_topob_tile_uses( topo, repair_tile, blockstore_obj, FD_SHMEM_JOIN_MODE_READ_ONLY );
Expand Down
1 change: 0 additions & 1 deletion src/app/firedancer/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ setup_topo_blockstore( fd_topo_t * topo,
ulong shred_max,
ulong block_max,
ulong idx_max,
ulong txn_max,
ulong alloc_max );

fd_topo_obj_t *
Expand Down
14 changes: 3 additions & 11 deletions src/app/ledger/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ runtime_replay( fd_ledger_args_t * ledger_args ) {
if( !block_exists && slot_meta.slot == slot ) {
int err = fd_rocksdb_import_block_blockstore( &rocks_db,
&slot_meta, blockstore,
ledger_args->copy_txn_status,
slot == (ledger_args->trash_hash) ? trash_hash_buf : NULL,
ledger_args->valloc );
if( FD_UNLIKELY( err ) ) {
Expand Down Expand Up @@ -550,7 +549,6 @@ ingest_rocksdb( char const * file,
ulong start_slot,
ulong end_slot,
fd_blockstore_t * blockstore,
int txn_status,
ulong trash_hash,
fd_valloc_t valloc ) {

Expand Down Expand Up @@ -607,7 +605,6 @@ ingest_rocksdb( char const * file,
int err = fd_rocksdb_import_block_blockstore( &rocks_db,
&slot_meta,
blockstore,
txn_status,
(slot == trash_hash) ? trash_hash_buf : NULL,
valloc );
if( FD_UNLIKELY( err ) ) {
Expand Down Expand Up @@ -727,12 +724,11 @@ init_blockstore( fd_ledger_args_t * args ) {
}
FD_LOG_NOTICE(( "joined blockstore" ));
} else {
ulong txn_max = 256UL;
shmem = fd_wksp_alloc_laddr( args->wksp, fd_blockstore_align(), fd_blockstore_footprint( args->shred_max, args->slot_history_max, 16, txn_max ), blockstore_tag );
shmem = fd_wksp_alloc_laddr( args->wksp, fd_blockstore_align(), fd_blockstore_footprint( args->shred_max, args->slot_history_max, 16 ), blockstore_tag );
if( shmem == NULL ) {
FD_LOG_ERR(( "failed to allocate a blockstore" ));
}
args->blockstore = fd_blockstore_join( &args->blockstore_ljoin, fd_blockstore_new( shmem, 1, args->hashseed, args->shred_max, args->slot_history_max, 16, txn_max ) );
args->blockstore = fd_blockstore_join( &args->blockstore_ljoin, fd_blockstore_new( shmem, 1, args->hashseed, args->shred_max, args->slot_history_max, 16 ) );
if( args->blockstore->shmem->magic != FD_BLOCKSTORE_MAGIC ) {
fd_wksp_free_laddr( shmem );
FD_LOG_ERR(( "failed to allocate a blockstore" ));
Expand Down Expand Up @@ -842,13 +838,9 @@ minify( fd_ledger_args_t * args ) {
args->start_slot,
args->end_slot,
args->blockstore,
0,
ULONG_MAX,
args->valloc );

fd_rocksdb_copy_over_txn_status_range( &big_rocksdb, &mini_rocksdb, args->blockstore,
args->start_slot, args->end_slot );
FD_LOG_NOTICE(( "copied over all transaction statuses" ));
} else {
FD_LOG_NOTICE(( "skipping copying of transaction statuses" ));
}
Expand Down Expand Up @@ -953,7 +945,7 @@ ingest( fd_ledger_args_t * args ) {
args->end_slot = slot_ctx->slot + args->slot_history_max - 1;
}
ingest_rocksdb( args->rocksdb_list[ 0UL ], args->start_slot, args->end_slot,
blockstore, args->copy_txn_status, args->trash_hash, args->valloc );
blockstore, args->trash_hash, args->valloc );
}

#ifdef FD_FUNK_HANDHOLDING
Expand Down
1 change: 0 additions & 1 deletion src/app/shared/fd_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ struct fd_configf {
ulong shred_max;
ulong block_max;
ulong idx_max;
ulong txn_max;
ulong alloc_max;
char file[PATH_MAX];
char checkpt[PATH_MAX];
Expand Down
1 change: 0 additions & 1 deletion src/app/shared/fd_config_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ fd_config_extract_podf( uchar * pod,
CFG_POP ( ulong, blockstore.shred_max );
CFG_POP ( ulong, blockstore.block_max );
CFG_POP ( ulong, blockstore.idx_max );
CFG_POP ( ulong, blockstore.txn_max );
CFG_POP ( ulong, blockstore.alloc_max );
CFG_POP ( cstr, blockstore.file );
CFG_POP ( cstr, blockstore.checkpt );
Expand Down
4 changes: 2 additions & 2 deletions src/app/shredcap/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ main( int argc, char ** argv ) {
FD_LOG_ERR(( "failed to join a blockstore" ));
}
} else {
shmem = fd_wksp_alloc_laddr( wksp, fd_blockstore_align(), fd_blockstore_footprint( shred_max, slot_history_max, 16, shred_max ), FD_BLOCKSTORE_MAGIC );
shmem = fd_wksp_alloc_laddr( wksp, fd_blockstore_align(), fd_blockstore_footprint( shred_max, slot_history_max, 16 ), FD_BLOCKSTORE_MAGIC );
if ( shmem == NULL ) {
FD_LOG_ERR(( "failed to allocate a blockstore" ));
}

blockstore = fd_blockstore_join( &blockstore_ljoin, fd_blockstore_new( shmem, 1, hashseed, shred_max, slot_history_max, 16, shred_max ) );
blockstore = fd_blockstore_join( &blockstore_ljoin, fd_blockstore_new( shmem, 1, hashseed, shred_max, slot_history_max, 16 ) );
if ( blockstore == NULL ) {
fd_wksp_free_laddr( shmem );
FD_LOG_ERR(( "failed to allocate a blockstore" ));
Expand Down
Loading
Loading