Skip to content

Commit 0beeaa5

Browse files
riptlripatel-fd
authored andcommitted
accdb: use virtual methods
Introduce a 'accdb_user' virtual class in preparation for additional database engines. Add read API and rename accessors to {open,close}_{ro,rw}.
1 parent 88936ea commit 0beeaa5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+560
-371
lines changed

src/app/firedancer/callbacks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#include "../../disco/topo/fd_topo.h"
44
#include "../../disco/store/fd_store.h"
55
#include "../../flamenco/runtime/fd_bank.h"
6-
#include "../../flamenco/runtime/fd_runtime.h"
76
#include "../../flamenco/runtime/fd_txncache_shmem.h"
7+
#include "../../funk/fd_funk.h"
88

99
#define VAL(name) (__extension__({ \
1010
ulong __x = fd_pod_queryf_ulong( topo->props, ULONG_MAX, "obj.%lu.%s", obj->id, name ); \

src/discof/bank/fd_bank_tile.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "../../disco/metrics/generated/fd_metrics_enums.h"
1414
#include "../../flamenco/runtime/fd_runtime.h"
1515
#include "../../flamenco/runtime/fd_bank.h"
16+
#include "../../flamenco/accdb/fd_accdb_impl_v1.h"
1617
#include "../../flamenco/progcache/fd_progcache_user.h"
1718
#include "../../flamenco/log_collector/fd_log_collector.h"
1819

@@ -26,7 +27,7 @@ struct fd_bank_out {
2627

2728
typedef struct fd_bank_out fd_bank_out_t;
2829

29-
typedef struct {
30+
struct fd_bank_ctx {
3031
ulong kind_id;
3132

3233
fd_blake3_t * blake3;
@@ -52,8 +53,8 @@ typedef struct {
5253

5354
fd_banks_t * banks;
5455

55-
fd_funk_t funk[1];
56-
fd_progcache_t progcache[1];
56+
fd_accdb_user_t accdb[1];
57+
fd_progcache_t progcache[1];
5758

5859
/* For bundle execution, we need to execute each transaction against
5960
a separate transaction context and a set of accounts, but the exec
@@ -72,7 +73,9 @@ typedef struct {
7273
ulong txn_result[ FD_METRICS_ENUM_TRANSACTION_RESULT_CNT ];
7374
ulong txn_landed[ FD_METRICS_ENUM_TRANSACTION_LANDED_CNT ];
7475
} metrics;
75-
} fd_bank_ctx_t;
76+
};
77+
78+
typedef struct fd_bank_ctx fd_bank_ctx_t;
7679

7780
FD_FN_CONST static inline ulong
7881
scratch_align( void ) {
@@ -573,8 +576,8 @@ unprivileged_init( fd_topo_t * topo,
573576

574577
void * shfunk = fd_topo_obj_laddr( topo, tile->bank.funk_obj_id );
575578
FD_TEST( shfunk );
576-
fd_funk_t * funk = fd_funk_join( ctx->funk, shfunk );
577-
FD_TEST( funk );
579+
fd_accdb_user_t * accdb = fd_accdb_user_v1_init( ctx->accdb, shfunk );
580+
FD_TEST( accdb );
578581

579582
void * shprogcache = fd_topo_obj_laddr( topo, tile->bank.progcache_obj_id );
580583
FD_TEST( shprogcache );
@@ -596,7 +599,8 @@ unprivileged_init( fd_topo_t * topo,
596599
}
597600

598601
ctx->runtime = (fd_runtime_t) {
599-
.funk = funk,
602+
.accdb = accdb,
603+
.funk = fd_accdb_user_v1_funk( accdb ),
600604
.progcache = progcache,
601605
.status_cache = txncache,
602606
.log = {

src/discof/exec/fd_exec_tile.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33

44
#include "../../util/pod/fd_pod_format.h"
55
#include "../../discof/replay/fd_exec.h"
6-
#include "../../flamenco/fd_flamenco.h"
76
#include "../../flamenco/runtime/context/fd_capture_ctx.h"
87
#include "../../flamenco/runtime/fd_bank.h"
98
#include "../../flamenco/runtime/fd_runtime.h"
9+
#include "../../flamenco/accdb/fd_accdb_impl_v1.h"
1010
#include "../../flamenco/progcache/fd_progcache_user.h"
1111
#include "../../flamenco/log_collector/fd_log_collector.h"
1212
#include "../../disco/metrics/fd_metrics.h"
1313

14-
#include "../../funk/fd_funk.h"
15-
1614
/* The exec tile is responsible for executing single transactions. The
1715
tile recieves a parsed transaction (fd_txn_p_t) and an identifier to
1816
which bank to execute against (index into the bank pool). With this,
@@ -49,7 +47,7 @@ typedef struct fd_exec_tile_ctx {
4947
a funk_txn and a bank. These are queried from fd_banks_t and
5048
fd_funk_t. */
5149
fd_banks_t * banks;
52-
fd_funk_t funk[1];
50+
fd_accdb_user_t accdb[1];
5351
fd_progcache_t progcache[1];
5452

5553
fd_txncache_t * txncache;
@@ -255,8 +253,8 @@ unprivileged_init( fd_topo_t * topo,
255253
}
256254

257255
void * shfunk = fd_topo_obj_laddr( topo, tile->exec.funk_obj_id );
258-
if( FD_UNLIKELY( !fd_funk_join( ctx->funk, shfunk ) ) ) {
259-
FD_LOG_CRIT(( "fd_funk_join(accdb) failed" ));
256+
if( FD_UNLIKELY( !fd_accdb_user_v1_init( ctx->accdb, shfunk ) ) ) {
257+
FD_LOG_CRIT(( "fd_accdb_user_v1_init() failed" ));
260258
}
261259

262260
void * shprogcache = fd_topo_obj_laddr( topo, tile->exec.progcache_obj_id );
@@ -306,7 +304,8 @@ unprivileged_init( fd_topo_t * topo,
306304
/********************************************************************/
307305

308306
ctx->runtime = (fd_runtime_t) {
309-
.funk = ctx->funk,
307+
.accdb = ctx->accdb,
308+
.funk = fd_accdb_user_v1_funk( ctx->accdb ),
310309
.status_cache = ctx->txncache,
311310
.progcache = ctx->progcache,
312311
.log = {

src/discof/genesis/fd_genesi_tile.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "../../ballet/sha256/fd_sha256.h"
77
#include "../../flamenco/runtime/fd_txn_account.h"
88
#include "../../flamenco/accdb/fd_accdb_admin.h"
9-
#include "../../flamenco/accdb/fd_accdb_user.h"
9+
#include "../../flamenco/accdb/fd_accdb_impl_v1.h"
1010
#include "../../flamenco/runtime/fd_hashes.h"
1111
#include "../../util/archive/fd_tar.h"
1212

@@ -122,15 +122,16 @@ initialize_accdb( fd_genesi_tile_t * ctx ) {
122122

123123
fd_pubkey_account_pair_global_t const * accounts = fd_genesis_solana_accounts_join( genesis );
124124

125+
fd_funk_t * funk = fd_accdb_user_v1_funk( ctx->accdb );
125126
for( ulong i=0UL; i<genesis->accounts_len; i++ ) {
126127
fd_pubkey_account_pair_global_t const * account = &accounts[ i ];
127128

128129
/* FIXME use accdb API */
129130
fd_funk_rec_prepare_t prepare[1];
130131
fd_funk_rec_key_t key[1]; memcpy( key->uc, account->key.uc, sizeof(fd_pubkey_t) );
131-
fd_funk_rec_t * rec = fd_funk_rec_prepare( ctx->accdb->funk, &root_xid, key, prepare, NULL );
132+
fd_funk_rec_t * rec = fd_funk_rec_prepare( funk, &root_xid, key, prepare, NULL );
132133
FD_TEST( rec );
133-
fd_account_meta_t * meta = fd_funk_val_truncate( rec, ctx->accdb->funk->alloc, ctx->accdb->funk->wksp, 16UL, sizeof(fd_account_meta_t)+account->account.data_len, NULL );
134+
fd_account_meta_t * meta = fd_funk_val_truncate( rec, funk->alloc, funk->wksp, 16UL, sizeof(fd_account_meta_t)+account->account.data_len, NULL );
134135
FD_TEST( meta );
135136
void * data = (void *)( meta+1 );
136137
fd_memcpy( meta->owner, account->account.owner.uc, sizeof(fd_pubkey_t) );
@@ -139,7 +140,7 @@ initialize_accdb( fd_genesi_tile_t * ctx ) {
139140
meta->executable = !!account->account.executable;
140141
meta->dlen = (uint)account->account.data_len;
141142
fd_memcpy( data, fd_solana_account_data_join( &account->account ), account->account.data_len );
142-
fd_funk_rec_publish( ctx->accdb->funk, prepare );
143+
fd_funk_rec_publish( funk, prepare );
143144

144145
fd_lthash_value_t new_hash[1];
145146
fd_hashes_account_lthash( &account->key, meta, data, new_hash );
@@ -462,8 +463,8 @@ unprivileged_init( fd_topo_t * topo,
462463
FD_SCRATCH_ALLOC_APPEND( l, fd_genesis_client_align(), fd_genesis_client_footprint() );
463464
void * _alloc = FD_SCRATCH_ALLOC_APPEND( l, fd_alloc_align(), fd_alloc_footprint() );
464465

465-
FD_TEST( fd_accdb_admin_join( ctx->accdb_admin, fd_topo_obj_laddr( topo, tile->genesi.funk_obj_id ) ) );
466-
FD_TEST( fd_accdb_user_join ( ctx->accdb, fd_topo_obj_laddr( topo, tile->genesi.funk_obj_id ) ) );
466+
FD_TEST( fd_accdb_admin_join ( ctx->accdb_admin, fd_topo_obj_laddr( topo, tile->genesi.funk_obj_id ) ) );
467+
FD_TEST( fd_accdb_user_v1_init( ctx->accdb, fd_topo_obj_laddr( topo, tile->genesi.funk_obj_id ) ) );
467468

468469
fd_lthash_zero( ctx->lthash );
469470

src/discof/replay/fd_replay_tile.c

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#include "fd_sched.h"
33
#include "fd_exec.h"
44
#include "fd_vote_tracker.h"
5-
#include "../../flamenco/accdb/fd_accdb_sync.h"
65
#include "generated/fd_replay_tile_seccomp.h"
76

87
#include "../genesis/fd_genesi_tile.h"
@@ -21,7 +20,7 @@
2120
#include "../../disco/genesis/fd_genesis_cluster.h"
2221
#include "../../util/pod/fd_pod.h"
2322
#include "../../flamenco/accdb/fd_accdb_admin.h"
24-
#include "../../flamenco/accdb/fd_accdb_user.h"
23+
#include "../../flamenco/accdb/fd_accdb_impl_v1.h"
2524
#include "../../flamenco/rewards/fd_rewards.h"
2625
#include "../../flamenco/leaders/fd_multi_epoch_leaders.h"
2726
#include "../../flamenco/progcache/fd_progcache_admin.h"
@@ -642,9 +641,10 @@ static ulong
642641
get_identity_balance( fd_replay_tile_t * ctx, fd_funk_txn_xid_t xid ) {
643642
ulong identity_balance = ULONG_MAX;
644643
fd_txn_account_t identity_acc[1];
644+
fd_funk_t * funk = fd_accdb_user_v1_funk( ctx->accdb );
645645
int err = fd_txn_account_init_from_funk_readonly( identity_acc,
646646
ctx->identity_pubkey,
647-
ctx->accdb->funk,
647+
funk,
648648
&xid );
649649
if( FD_LIKELY( !err && identity_acc->meta ) ) identity_balance = identity_acc->meta->lamports;
650650

@@ -784,7 +784,8 @@ replay_block_finalize( fd_replay_tile_t * ctx,
784784
/* If enabled, dump the block to a file and reset the dumping
785785
context state */
786786
if( FD_UNLIKELY( ctx->capture_ctx && ctx->capture_ctx->dump_block_to_pb ) ) {
787-
fd_dump_block_to_protobuf( ctx->block_dump_ctx, ctx->banks, bank, ctx->accdb->funk, ctx->capture_ctx );
787+
fd_funk_t * funk = fd_accdb_user_v1_funk( ctx->accdb );
788+
fd_dump_block_to_protobuf( ctx->block_dump_ctx, ctx->banks, bank, funk, ctx->capture_ctx );
788789
fd_block_dump_context_reset( ctx->block_dump_ctx );
789790
}
790791
# endif
@@ -881,7 +882,8 @@ fini_leader_bank( fd_replay_tile_t * ctx,
881882
fd_sched_block_add_done( ctx->sched, ctx->leader_bank->idx, ctx->leader_bank->parent_idx, curr_slot );
882883

883884
/* Do hashing and other end-of-block processing */
884-
fd_funk_txn_map_t * txn_map = fd_funk_txn_map( ctx->accdb->funk );
885+
fd_funk_t * funk = fd_accdb_user_v1_funk( ctx->accdb );
886+
fd_funk_txn_map_t * txn_map = fd_funk_txn_map( funk );
885887
if( FD_UNLIKELY( !txn_map->map ) ) {
886888
FD_LOG_ERR(( "Could not find valid funk transaction map" ));
887889
}
@@ -984,8 +986,8 @@ init_funk( fd_replay_tile_t * ctx,
984986
FD_LOG_CRIT(( "failed to initialize account database: replay tile is not joined to program cache" ));
985987
}
986988
fd_progcache_clear( ctx->progcache_admin );
987-
fd_progcache_txn_attach_child( ctx->progcache_admin, fd_funk_root( ctx->progcache_admin->funk ), fd_funk_last_publish( ctx->accdb->funk ) );
988-
fd_progcache_txn_advance_root( ctx->progcache_admin, fd_funk_last_publish( ctx->accdb->funk ) );
989+
fd_progcache_txn_attach_child( ctx->progcache_admin, fd_funk_root( ctx->progcache_admin->funk ), fd_funk_last_publish( ctx->accdb_admin->funk ) );
990+
fd_progcache_txn_advance_root( ctx->progcache_admin, fd_funk_last_publish( ctx->accdb_admin->funk ) );
989991
}
990992

991993
static void
@@ -1000,17 +1002,18 @@ init_after_snapshot( fd_replay_tile_t * ctx ) {
10001002
FD_LOG_CRIT(( "invariant violation: replay bank is NULL at bank index %lu", FD_REPLAY_BOOT_BANK_IDX ));
10011003
}
10021004

1005+
fd_funk_t * funk = fd_accdb_user_v1_funk( ctx->accdb );
10031006
fd_funk_txn_xid_t xid = { .ul = { fd_bank_slot_get( bank ), bank->idx } };
10041007
init_funk( ctx, fd_bank_slot_get( bank ) );
10051008

10061009
fd_stake_delegations_t * root_delegations = fd_banks_stake_delegations_root_query( ctx->banks );
10071010

1008-
fd_stake_delegations_refresh( root_delegations, ctx->accdb->funk, &xid );
1011+
fd_stake_delegations_refresh( root_delegations, funk, &xid );
10091012

10101013
/* After both snapshots have been loaded in, we can determine if we should
10111014
start distributing rewards. */
10121015

1013-
fd_rewards_recalculate_partitioned_rewards( ctx->banks, bank, ctx->accdb->funk, &xid, &ctx->runtime_stack, ctx->capture_ctx );
1016+
fd_rewards_recalculate_partitioned_rewards( ctx->banks, bank, funk, &xid, &ctx->runtime_stack, ctx->capture_ctx );
10141017

10151018
ulong snapshot_slot = fd_bank_slot_get( bank );
10161019
if( FD_UNLIKELY( !snapshot_slot ) ) {
@@ -1110,10 +1113,11 @@ maybe_become_leader( fd_replay_tile_t * ctx,
11101113
fd_acct_addr_t tip_receiver[1];
11111114
fd_bundle_crank_get_addresses( ctx->bundle.gen, fd_bank_epoch_get( bank ), tip_payment_config, tip_receiver );
11121115

1116+
fd_funk_t * funk = fd_accdb_user_v1_funk( ctx->accdb );
11131117
fd_txn_account_t tip_config_acc[1];
11141118
int err = fd_txn_account_init_from_funk_readonly( tip_config_acc,
11151119
(fd_hash_t *)tip_payment_config->b,
1116-
ctx->accdb->funk,
1120+
funk,
11171121
&xid );
11181122
if( FD_UNLIKELY( err ) ) {
11191123
FD_LOG_CRIT(( "failed to initialize tip payment config account: err=%d", err ));
@@ -1125,7 +1129,7 @@ maybe_become_leader( fd_replay_tile_t * ctx,
11251129
fd_txn_account_t tip_receiver_acc[1];
11261130
err = fd_txn_account_init_from_funk_readonly( tip_receiver_acc,
11271131
(fd_hash_t *)tip_receiver->b,
1128-
ctx->accdb->funk,
1132+
funk,
11291133
&xid );
11301134
if( FD_LIKELY( !err ) ) {
11311135
memcpy( tip_receiver_owner, tip_receiver_acc->meta->owner, sizeof(fd_acct_addr_t) );
@@ -1412,7 +1416,8 @@ on_snapshot_message( fd_replay_tile_t * ctx,
14121416

14131417
fd_funk_txn_xid_t xid = { .ul = { snapshot_slot, FD_REPLAY_BOOT_BANK_IDX } };
14141418

1415-
fd_features_restore( bank, ctx->accdb->funk, &xid );
1419+
fd_funk_t * funk = fd_accdb_user_v1_funk( ctx->accdb );
1420+
fd_features_restore( bank, funk, &xid );
14161421

14171422
fd_runtime_update_leaders( bank, &ctx->runtime_stack );
14181423

@@ -1712,7 +1717,7 @@ process_fec_set( fd_replay_tile_t * ctx,
17121717
sched_fec->slot = reasm_fec->slot;
17131718
sched_fec->parent_slot = reasm_fec->slot - reasm_fec->parent_off;
17141719
sched_fec->is_first_in_block = reasm_fec->fec_set_idx==0U;
1715-
fd_funk_txn_xid_copy( sched_fec->alut_ctx->xid, fd_funk_last_publish( ctx->accdb->funk ) );
1720+
fd_funk_txn_xid_copy( sched_fec->alut_ctx->xid, fd_funk_last_publish( ctx->accdb_admin->funk ) );
17161721
sched_fec->alut_ctx->accdb[0] = ctx->accdb[0];
17171722
sched_fec->alut_ctx->els = ctx->published_root_slot;
17181723

@@ -2389,7 +2394,7 @@ unprivileged_init( fd_topo_t * topo,
23892394
fd_features_enable_one_offs( features, one_off_features, (uint)tile->replay.enable_features_cnt, 0UL );
23902395

23912396
FD_TEST( fd_accdb_admin_join ( ctx->accdb_admin, fd_topo_obj_laddr( topo, tile->replay.funk_obj_id ) ) );
2392-
FD_TEST( fd_accdb_user_join ( ctx->accdb, fd_topo_obj_laddr( topo, tile->replay.funk_obj_id ) ) );
2397+
FD_TEST( fd_accdb_user_v1_init ( ctx->accdb, fd_topo_obj_laddr( topo, tile->replay.funk_obj_id ) ) );
23932398
FD_TEST( fd_progcache_admin_join( ctx->progcache_admin, fd_topo_obj_laddr( topo, tile->replay.progcache_obj_id ) ) );
23942399

23952400
void * _txncache_shmem = fd_topo_obj_laddr( topo, tile->replay.txncache_obj_id );

src/discof/replay/fd_sched.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33

44
#include "fd_sched.h"
55
#include "../../util/math/fd_stat.h" /* for sorted search */
6-
#include "../../util/cstr/fd_cstr.h" /* for cstr_printf */
76
#include "../../disco/fd_disco_base.h" /* for FD_MAX_TXN_PER_SLOT */
7+
#include "../../flamenco/accdb/fd_accdb_impl_v1.h"
88
#include "../../flamenco/runtime/fd_runtime.h" /* for fd_runtime_load_txn_address_lookup_tables */
9-
109
#include "../../flamenco/runtime/sysvar/fd_sysvar_slot_hashes.h" /* for ALUTs */
1110

12-
1311
#define FD_SCHED_MAX_DEPTH (FD_RDISP_MAX_DEPTH>>2)
1412
#define FD_SCHED_MAX_STAGING_LANES_LOG (2)
1513
#define FD_SCHED_MAX_STAGING_LANES (1UL<<FD_SCHED_MAX_STAGING_LANES_LOG)
@@ -1457,11 +1455,12 @@ fd_sched_parse_txn( fd_sched_t * sched, fd_sched_block_t * block, fd_sched_alut_
14571455
int has_aluts = txn->transaction_version==FD_TXN_V0 && txn->addr_table_adtl_cnt>0;
14581456
int serializing = 0;
14591457
if( has_aluts ) {
1458+
fd_funk_t * funk = fd_accdb_user_v1_funk( alut_ctx->accdb );
14601459
uchar __attribute__((aligned(FD_SLOT_HASHES_GLOBAL_ALIGN))) slot_hashes_mem[ FD_SYSVAR_SLOT_HASHES_FOOTPRINT ];
1461-
fd_slot_hashes_global_t const * slot_hashes_global = fd_sysvar_slot_hashes_read( alut_ctx->accdb->funk, alut_ctx->xid, slot_hashes_mem );
1460+
fd_slot_hashes_global_t const * slot_hashes_global = fd_sysvar_slot_hashes_read( funk, alut_ctx->xid, slot_hashes_mem );
14621461
if( FD_LIKELY( slot_hashes_global ) ) {
14631462
fd_slot_hash_t * slot_hash = deq_fd_slot_hash_t_join( (uchar *)slot_hashes_global + slot_hashes_global->hashes_offset );
1464-
serializing = !!fd_runtime_load_txn_address_lookup_tables( txn, block->fec_buf+block->fec_buf_soff, alut_ctx->accdb->funk, alut_ctx->xid, alut_ctx->els, slot_hash, block->aluts );
1463+
serializing = !!fd_runtime_load_txn_address_lookup_tables( txn, block->fec_buf+block->fec_buf_soff, funk, alut_ctx->xid, alut_ctx->els, slot_hash, block->aluts );
14651464
sched->metrics->alut_success_cnt += (uint)!serializing;
14661465
} else {
14671466
serializing = 1;

src/discof/resolv/fd_resolv_tile.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "generated/fd_resolv_tile_seccomp.h"
66
#include "../../disco/metrics/fd_metrics.h"
77
#include "../../flamenco/accdb/fd_accdb_sync.h"
8+
#include "../../flamenco/accdb/fd_accdb_impl_v1.h"
89
#include "../../flamenco/runtime/fd_alut_interp.h"
910
#include "../../flamenco/runtime/fd_system_ids_pp.h"
1011
#include "../../flamenco/runtime/fd_bank.h"
@@ -631,7 +632,7 @@ unprivileged_init( fd_topo_t * topo,
631632
ctx->out_replay->wmark = fd_dcache_compact_wmark ( ctx->out_replay->mem, topo->links[ tile->out_link_id[ 1 ] ].dcache, topo->links[ tile->out_link_id[ 1 ] ].mtu );
632633
ctx->out_replay->chunk = ctx->out_replay->chunk0;
633634

634-
FD_TEST( fd_accdb_user_join( ctx->accdb, fd_topo_obj_laddr( topo, tile->resolv.funk_obj_id ) ) );
635+
FD_TEST( fd_accdb_user_v1_init( ctx->accdb, fd_topo_obj_laddr( topo, tile->resolv.funk_obj_id ) ) );
635636

636637
ulong banks_obj_id = fd_pod_queryf_ulong( topo->props, ULONG_MAX, "banks" );
637638
FD_TEST( banks_obj_id!=ULONG_MAX );

src/discof/restore/fd_snapin_tile.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "../../disco/topo/fd_topo.h"
77
#include "../../disco/metrics/fd_metrics.h"
88
#include "../../disco/gui/fd_gui_config_parse.h"
9+
#include "../../flamenco/accdb/fd_accdb_impl_v1.h"
910
#include "../../flamenco/runtime/fd_txncache.h"
1011
#include "../../flamenco/runtime/fd_system_ids.h"
1112
#include "../../flamenco/runtime/sysvar/fd_sysvar_slot_history.h"
@@ -809,8 +810,8 @@ unprivileged_init( fd_topo_t * topo,
809810

810811
ctx->boot_timestamp = fd_log_wallclock();
811812

812-
FD_TEST( fd_accdb_admin_join( ctx->accdb_admin, fd_topo_obj_laddr( topo, tile->snapin.funk_obj_id ) ) );
813-
FD_TEST( fd_accdb_user_join ( ctx->accdb, fd_topo_obj_laddr( topo, tile->snapin.funk_obj_id ) ) );
813+
FD_TEST( fd_accdb_admin_join ( ctx->accdb_admin, fd_topo_obj_laddr( topo, tile->snapin.funk_obj_id ) ) );
814+
FD_TEST( fd_accdb_user_v1_init( ctx->accdb, fd_topo_obj_laddr( topo, tile->snapin.funk_obj_id ) ) );
814815
fd_funk_txn_xid_copy( ctx->xid, fd_funk_root( ctx->accdb_admin->funk ) );
815816

816817
void * _txncache_shmem = fd_topo_obj_laddr( topo, tile->snapin.txncache_obj_id );

src/discof/tower/fd_tower_tile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "../../discof/restore/utils/fd_ssmsg.h"
1818
#include "../../discof/replay/fd_exec.h"
1919
#include "../../discof/replay/fd_replay_tile.h"
20-
#include "../../flamenco/fd_flamenco_base.h"
20+
#include "../../flamenco/accdb/fd_accdb_impl_v1.h"
2121
#include "../../flamenco/runtime/fd_bank.h"
2222
#include "../../util/pod/fd_pod.h"
2323

@@ -825,7 +825,7 @@ unprivileged_init( fd_topo_t * topo,
825825

826826
ulong funk_obj_id = fd_pod_query_ulong( topo->props, "funk", ULONG_MAX );
827827
FD_TEST( funk_obj_id!=ULONG_MAX );
828-
FD_TEST( fd_accdb_user_join( ctx->accdb, fd_topo_obj_laddr( topo, funk_obj_id ) ) );
828+
FD_TEST( fd_accdb_user_v1_init( ctx->accdb, fd_topo_obj_laddr( topo, funk_obj_id ) ) );
829829

830830
FD_TEST( tile->in_cnt<sizeof(ctx->in_kind)/sizeof(ctx->in_kind[0]) );
831831
for( ulong i=0UL; i<tile->in_cnt; i++ ) {

src/flamenco/accdb/Local.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ $(call add-objs,fd_accdb_admin,fd_flamenco)
44

55
# User API
66
$(call add-hdrs,fd_accdb_user.h fd_accdb_sync.h)
7-
$(call add-objs,fd_accdb_user,fd_flamenco)
7+
$(call add-objs,fd_accdb_impl_v1,fd_flamenco)
88

99
# Debug APIs
1010
$(call add-hdrs,fd_accdb_fsck.h)

0 commit comments

Comments
 (0)