|
17 | 17 | #include "../../util/pod/fd_pod.h" |
18 | 18 | #include "../../flamenco/rewards/fd_rewards.h" |
19 | 19 | #include "../../flamenco/leaders/fd_multi_epoch_leaders.h" |
| 20 | +#include "../../flamenco/progcache/fd_progcache_admin.h" |
20 | 21 | #include "../../disco/metrics/fd_metrics.h" |
21 | 22 |
|
22 | 23 | #include <errno.h> |
@@ -127,7 +128,7 @@ struct fd_replay_tile { |
127 | 128 | int tx_metadata_storage; |
128 | 129 |
|
129 | 130 | fd_funk_t funk[1]; |
130 | | - fd_progcache_t progcache[1]; |
| 131 | + fd_progcache_admin_t progcache_admin[1]; |
131 | 132 |
|
132 | 133 | fd_txncache_t * txncache; |
133 | 134 | fd_store_t * store; |
@@ -613,8 +614,8 @@ replay_block_start( fd_replay_tile_t * ctx, |
613 | 614 |
|
614 | 615 | fd_funk_txn_xid_t xid = { .ul = { slot, slot } }; |
615 | 616 | fd_funk_txn_xid_t parent_xid = { .ul = { parent_slot, parent_slot } }; |
616 | | - fd_funk_txn_prepare( ctx->funk, &parent_xid, &xid ); |
617 | | - fd_funk_txn_prepare( ctx->progcache->funk, &parent_xid, &xid ); |
| 617 | + fd_funk_txn_prepare ( ctx->funk, &parent_xid, &xid ); |
| 618 | + fd_progcache_txn_prepare( ctx->progcache_admin, &parent_xid, &xid ); |
618 | 619 |
|
619 | 620 | /* Update any required runtime state and handle any potential epoch |
620 | 621 | boundary change. */ |
@@ -823,8 +824,8 @@ prepare_leader_bank( fd_replay_tile_t * ctx, |
823 | 824 | /* prepare the funk transaction for the leader bank */ |
824 | 825 | fd_funk_txn_xid_t xid = { .ul = { slot, slot } }; |
825 | 826 | fd_funk_txn_xid_t parent_xid = { .ul = { parent_slot, parent_slot } }; |
826 | | - fd_funk_txn_prepare( ctx->funk, &parent_xid, &xid ); |
827 | | - fd_funk_txn_prepare( ctx->progcache->funk, &parent_xid, &xid ); |
| 827 | + fd_funk_txn_prepare ( ctx->funk, &parent_xid, &xid ); |
| 828 | + fd_progcache_txn_prepare( ctx->progcache_admin, &parent_xid, &xid ); |
828 | 829 |
|
829 | 830 | fd_bank_execution_fees_set( ctx->leader_bank, 0UL ); |
830 | 831 | fd_bank_priority_fees_set( ctx->leader_bank, 0UL ); |
@@ -977,12 +978,12 @@ init_funk( fd_replay_tile_t * ctx, |
977 | 978 | /* The program cache tracks the account database's fork graph at all |
978 | 979 | times. Perform initial synchronization: pivot from funk 'root' (a |
979 | 980 | sentinel XID) to 'last publish' (the bootstrap root slot). */ |
980 | | - if( FD_UNLIKELY( !ctx->progcache->funk->shmem ) ) { |
| 981 | + if( FD_UNLIKELY( !ctx->progcache_admin->funk->shmem ) ) { |
981 | 982 | FD_LOG_CRIT(( "failed to initialize account database: replay tile is not joined to program cache" )); |
982 | 983 | } |
983 | | - fd_progcache_clear( ctx->progcache ); |
984 | | - fd_funk_txn_prepare( ctx->progcache->funk, fd_funk_root( ctx->progcache->funk ), fd_funk_last_publish( ctx->funk ) ); |
985 | | - fd_funk_txn_publish( ctx->progcache->funk, fd_funk_last_publish( ctx->funk ) ); |
| 984 | + fd_progcache_clear( ctx->progcache_admin ); |
| 985 | + fd_progcache_txn_prepare( ctx->progcache_admin, fd_funk_root( ctx->progcache_admin->funk ), fd_funk_last_publish( ctx->funk ) ); |
| 986 | + fd_progcache_txn_publish( ctx->progcache_admin, fd_funk_last_publish( ctx->funk ) ); |
986 | 987 | } |
987 | 988 |
|
988 | 989 | static void |
@@ -1448,10 +1449,6 @@ replay( fd_replay_tile_t * ctx, |
1448 | 1449 | FD_LOG_CRIT(( "invariant violation: bank is NULL for bank index %lu", ready_txn->bank_idx )); |
1449 | 1450 | } |
1450 | 1451 |
|
1451 | | - fd_funk_txn_xid_t xid = { .ul = { ready_txn->slot, ready_txn->slot } }; |
1452 | | - |
1453 | | - fd_runtime_update_program_cache( bank, ctx->progcache, ctx->funk, &xid, txn_p, ctx->runtime_spad ); |
1454 | | - |
1455 | 1452 | /* At this point, we are going to send the txn down the execution |
1456 | 1453 | pipeline. Increment the refcnt so we don't prematurely prune a |
1457 | 1454 | bank that's needed by an in-flight txn. */ |
@@ -1602,8 +1599,8 @@ funk_publish( fd_replay_tile_t * ctx, |
1602 | 1599 | /* This is the standard case. Publish all transactions up to and |
1603 | 1600 | including the watermark. This will publish any in-prep ancestors |
1604 | 1601 | of root_txn as well. */ |
1605 | | - if( FD_UNLIKELY( !fd_funk_txn_publish( ctx->funk, &xid ) ) ) FD_LOG_CRIT(( "failed to root slot %lu: fd_funk_txn_publish(accdb) failed", slot )); |
1606 | | - if( FD_UNLIKELY( !fd_funk_txn_publish( ctx->progcache->funk, &xid ) ) ) FD_LOG_CRIT(( "failed to root slot %lu: fd_funk_txn_publish(progcache) failed", slot )); |
| 1602 | + if( FD_UNLIKELY( !fd_funk_txn_publish( ctx->funk, &xid ) ) ) FD_LOG_CRIT(( "failed to root slot %lu: fd_funk_txn_publish(accdb) failed", slot )); |
| 1603 | + fd_progcache_txn_publish( ctx->progcache_admin, &xid ); |
1607 | 1604 | } |
1608 | 1605 |
|
1609 | 1606 | static int |
@@ -2052,7 +2049,9 @@ unprivileged_init( fd_topo_t * topo, |
2052 | 2049 | fd_features_enable_one_offs( features, one_off_features, (uint)tile->replay.enable_features_cnt, 0UL ); |
2053 | 2050 |
|
2054 | 2051 | FD_TEST( fd_funk_join( ctx->funk, fd_topo_obj_laddr( topo, tile->replay.funk_obj_id ) ) ); |
2055 | | - FD_TEST( fd_progcache_join( ctx->progcache, fd_topo_obj_laddr( topo, tile->replay.progcache_obj_id ) ) ); |
| 2052 | + FD_TEST( fd_progcache_admin_join( |
| 2053 | + ctx->progcache_admin, |
| 2054 | + fd_topo_obj_laddr( topo, tile->replay.progcache_obj_id ) ) ); |
2056 | 2055 |
|
2057 | 2056 | void * _txncache_shmem = fd_topo_obj_laddr( topo, tile->replay.txncache_obj_id ); |
2058 | 2057 | fd_txncache_shmem_t * txncache_shmem = fd_txncache_shmem_join( _txncache_shmem ); |
|
0 commit comments