Skip to content

Commit 2f4ff84

Browse files
committed
replay: remove runtime pub wksp from txn ctx
1 parent 9d5b903 commit 2f4ff84

File tree

6 files changed

+10
-30
lines changed

6 files changed

+10
-30
lines changed

src/discof/exec/fd_exec_tile.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -405,15 +405,9 @@ unprivileged_init( fd_topo_t * topo,
405405

406406
fd_spad_push( ctx->exec_spad );
407407
// FIXME account for this in exec spad footprint
408-
uchar * txn_ctx_mem = fd_spad_alloc_check( ctx->exec_spad, FD_EXEC_TXN_CTX_ALIGN, FD_EXEC_TXN_CTX_FOOTPRINT );
409-
ctx->txn_ctx = fd_exec_txn_ctx_join( fd_exec_txn_ctx_new( txn_ctx_mem ), ctx->exec_spad, ctx->exec_spad_wksp );
410-
*ctx->txn_ctx->funk = *ctx->funk;
411-
412-
ctx->txn_ctx->runtime_pub_wksp = ctx->runtime_public_wksp;
413-
if( FD_UNLIKELY( !ctx->txn_ctx->runtime_pub_wksp ) ) {
414-
FD_LOG_ERR(( "Failed to find public wksp" ));
415-
}
416-
408+
uchar * txn_ctx_mem = fd_spad_alloc_check( ctx->exec_spad, FD_EXEC_TXN_CTX_ALIGN, FD_EXEC_TXN_CTX_FOOTPRINT );
409+
ctx->txn_ctx = fd_exec_txn_ctx_join( fd_exec_txn_ctx_new( txn_ctx_mem ), ctx->exec_spad, ctx->exec_spad_wksp );
410+
*ctx->txn_ctx->funk = *ctx->funk;
417411
ctx->txn_ctx->bank_hash_cmp = ctx->bank_hash_cmp;
418412

419413
/********************************************************************/

src/flamenco/runtime/context/fd_exec_txn_ctx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ struct fd_exec_txn_ctx {
7676
fd_bank_hash_cmp_t * bank_hash_cmp;
7777
fd_funk_txn_t * funk_txn;
7878
fd_funk_t funk[1];
79-
fd_wksp_t * runtime_pub_wksp;
8079
ulong slot;
8180

8281
fd_spad_t * spad; /* Sized out to handle the worst case footprint of single transaction execution. */

src/flamenco/runtime/fd_executor.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,13 +1395,9 @@ void
13951395
fd_exec_txn_ctx_from_exec_slot_ctx( fd_exec_slot_ctx_t const * slot_ctx,
13961396
fd_exec_txn_ctx_t * ctx,
13971397
fd_wksp_t const * funk_wksp,
1398-
fd_wksp_t const * runtime_pub_wksp,
13991398
ulong funk_txn_gaddr,
14001399
ulong funk_gaddr,
14011400
fd_bank_hash_cmp_t * bank_hash_cmp ) {
1402-
1403-
ctx->runtime_pub_wksp = (fd_wksp_t *)runtime_pub_wksp;
1404-
14051401
ctx->funk_txn = fd_wksp_laddr( funk_wksp, funk_txn_gaddr );
14061402
if( FD_UNLIKELY( !ctx->funk_txn ) ) {
14071403
FD_LOG_ERR(( "Could not find valid funk transaction" ));
@@ -1568,19 +1564,16 @@ fd_execute_txn_prepare_start( fd_exec_slot_ctx_t const * slot_ctx,
15681564
fd_txn_t const * txn_descriptor,
15691565
fd_rawtxn_b_t const * txn_raw ) {
15701566

1571-
fd_funk_t * funk = slot_ctx->funk;
1572-
fd_wksp_t * funk_wksp = fd_funk_wksp( funk );
1573-
/* FIXME: just pass in the runtime workspace, instead of getting it from fd_wksp_containing */
1574-
fd_wksp_t * runtime_pub_wksp = fd_wksp_containing( slot_ctx );
1575-
ulong funk_txn_gaddr = fd_wksp_gaddr( funk_wksp, slot_ctx->funk_txn );
1576-
ulong funk_gaddr = fd_wksp_gaddr( funk_wksp, slot_ctx->funk->shmem );
1567+
fd_funk_t * funk = slot_ctx->funk;
1568+
fd_wksp_t * funk_wksp = fd_funk_wksp( funk );
1569+
ulong funk_txn_gaddr = fd_wksp_gaddr( funk_wksp, slot_ctx->funk_txn );
1570+
ulong funk_gaddr = fd_wksp_gaddr( funk_wksp, slot_ctx->funk->shmem );
15771571

15781572
/* Init txn ctx */
15791573
fd_exec_txn_ctx_new( txn_ctx );
15801574
fd_exec_txn_ctx_from_exec_slot_ctx( slot_ctx,
15811575
txn_ctx,
15821576
funk_wksp,
1583-
runtime_pub_wksp,
15841577
funk_txn_gaddr,
15851578
funk_gaddr,
15861579
NULL );

src/flamenco/runtime/fd_executor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ void
149149
fd_exec_txn_ctx_from_exec_slot_ctx( fd_exec_slot_ctx_t const * slot_ctx,
150150
fd_exec_txn_ctx_t * ctx,
151151
fd_wksp_t const * funk_wksp,
152-
fd_wksp_t const * runtime_pub_wksp,
153152
ulong funk_txn_gaddr,
154153
ulong funk_gaddr,
155154
fd_bank_hash_cmp_t * bank_hash_cmp );

src/flamenco/runtime/program/fd_bpf_loader_program.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,14 +2640,12 @@ fd_directly_invoke_loader_v3_deploy( fd_exec_slot_ctx_t * slot_ctx,
26402640
fd_exec_txn_ctx_t * txn_ctx = fd_exec_txn_ctx_join( fd_exec_txn_ctx_new( fd_spad_alloc( runtime_spad, FD_EXEC_TXN_CTX_ALIGN, FD_EXEC_TXN_CTX_FOOTPRINT ) ), runtime_spad, fd_wksp_containing( runtime_spad ) );
26412641
fd_funk_t * funk = slot_ctx->funk;
26422642
fd_wksp_t * funk_wksp = fd_funk_wksp( funk );
2643-
fd_wksp_t * runtime_wksp = fd_wksp_containing( slot_ctx );
26442643
ulong funk_txn_gaddr = fd_wksp_gaddr( funk_wksp, slot_ctx->funk_txn );
26452644
ulong funk_gaddr = fd_wksp_gaddr( funk_wksp, funk->shmem );
26462645

26472646
fd_exec_txn_ctx_from_exec_slot_ctx( slot_ctx,
26482647
txn_ctx,
26492648
funk_wksp,
2650-
runtime_wksp,
26512649
funk_txn_gaddr,
26522650
funk_gaddr,
26532651
NULL );

src/flamenco/runtime/tests/harness/fd_instr_harness.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,9 @@ fd_runtime_fuzz_instr_ctx_create( fd_runtime_fuzz_runner_t * runner,
7474

7575
/* Set up txn context */
7676

77-
fd_wksp_t * funk_wksp = fd_funk_wksp( funk );
78-
fd_wksp_t * runtime_wksp = fd_wksp_containing( slot_ctx );
79-
ulong funk_txn_gaddr = fd_wksp_gaddr( funk_wksp, funk_txn );
80-
ulong funk_gaddr = fd_wksp_gaddr( funk_wksp, funk->shmem );
77+
fd_wksp_t * funk_wksp = fd_funk_wksp( funk );
78+
ulong funk_txn_gaddr = fd_wksp_gaddr( funk_wksp, funk_txn );
79+
ulong funk_gaddr = fd_wksp_gaddr( funk_wksp, funk->shmem );
8180

8281
/* Set up mock txn descriptor */
8382
fd_txn_t * txn_descriptor = fd_spad_alloc( runner->spad, fd_txn_align(), fd_txn_footprint( 1UL, 0UL ) );
@@ -87,7 +86,6 @@ fd_runtime_fuzz_instr_ctx_create( fd_runtime_fuzz_runner_t * runner,
8786
fd_exec_txn_ctx_from_exec_slot_ctx( slot_ctx,
8887
txn_ctx,
8988
funk_wksp,
90-
runtime_wksp,
9189
funk_txn_gaddr,
9290
funk_gaddr,
9391
NULL );
@@ -369,7 +367,6 @@ fd_runtime_fuzz_instr_ctx_create( fd_runtime_fuzz_runner_t * runner,
369367
fd_exec_txn_ctx_from_exec_slot_ctx( slot_ctx,
370368
txn_ctx,
371369
funk_wksp,
372-
runtime_wksp,
373370
funk_txn_gaddr,
374371
funk_gaddr,
375372
NULL );

0 commit comments

Comments
 (0)