Skip to content

runtime: removing slot ctx [wip] #5474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7077440
intiial
ibhatt-jumptrading Jun 27, 2025
819e87f
removing slot ctx pt 2 of many
ibhatt-jumptrading Jun 27, 2025
04a9ec1
removing banks
ibhatt-jumptrading Jun 27, 2025
382f336
more slot ctx replacement
ibhatt-jumptrading Jun 27, 2025
b187d27
more slot ctx replacement
ibhatt-jumptrading Jun 27, 2025
d9f0fa2
more replacement
ibhatt-jumptrading Jun 27, 2025
535b19a
merge
ibhatt-jumptrading Jul 7, 2025
39efc28
patch
ibhatt-jumptrading Jul 8, 2025
66110d0
merge
ibhatt-jumptrading Jul 8, 2025
5c3699a
patch
ibhatt-jumptrading Jul 8, 2025
e9c18e2
patch
ibhatt-jumptrading Jul 8, 2025
41d36c4
more
ibhatt-jumptrading Jul 8, 2025
cab237b
more
ibhatt-jumptrading Jul 8, 2025
4301a4c
more
ibhatt-jumptrading Jul 8, 2025
636aa2c
merge
ibhatt-jumptrading Jul 8, 2025
636ab74
more replacement
ibhatt-jumptrading Jul 8, 2025
1fc14d9
more
ibhatt-jumptrading Jul 8, 2025
ab00aba
moving more
ibhatt-jumptrading Jul 8, 2025
87b16c1
more
ibhatt-jumptrading Jul 8, 2025
0652e6c
little by little
ibhatt-jumptrading Jul 8, 2025
2e23895
more
ibhatt-jumptrading Jul 8, 2025
987337f
asdf
ibhatt-jumptrading Jul 8, 2025
c9b2029
asdf
ibhatt-jumptrading Jul 8, 2025
e620a95
no more slot ctx
ibhatt-jumptrading Jul 8, 2025
b088d01
nit
ibhatt-jumptrading Jul 8, 2025
72e8d00
even less slot ctx
ibhatt-jumptrading Jul 8, 2025
86f0c47
some more tweaks
ibhatt-jumptrading Jul 9, 2025
cca1b3c
removing from replay tile
ibhatt-jumptrading Jul 9, 2025
af76f0d
merge
ibhatt-jumptrading Jul 9, 2025
e64d0ee
decouple from snapshot loading totally
ibhatt-jumptrading Jul 9, 2025
9e3a504
starting to remove improts
ibhatt-jumptrading Jul 9, 2025
b7e2268
merge
ibhatt-jumptrading Jul 9, 2025
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
228 changes: 118 additions & 110 deletions src/app/ledger/main.c

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions src/choreo/forks/fd_forks.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
#include "fd_forks.h"

#include "../../flamenco/runtime/context/fd_exec_slot_ctx.h"
#include "../../flamenco/runtime/fd_acc_mgr.h"
#include "../../flamenco/runtime/fd_borrowed_account.h"
#include "../../flamenco/runtime/fd_runtime.h"
#include "../../flamenco/runtime/program/fd_program_util.h"
#include "../../flamenco/runtime/program/fd_vote_program.h"

void *
fd_forks_new( void * shmem, ulong max, ulong seed ) {

Expand Down
3 changes: 0 additions & 3 deletions src/choreo/forks/fd_forks.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "../../flamenco/runtime/context/fd_exec_slot_ctx.h"
#include "../../flamenco/runtime/fd_blockstore.h"
#include "../fd_choreo_base.h"
#include "../ghost/fd_ghost.h"
#include "../voter/fd_voter.h"

/* FD_FORKS_USE_HANDHOLDING: Define this to non-zero at compile time
to turn on additional runtime checks and logging. */
Expand Down
2 changes: 1 addition & 1 deletion src/discof/consensus/test_consensus.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ main( void ) {
// /**********************************************************************/

// fd_fork_t * snapshot_fork = fd_fork_pool_ele_acquire( forks->pool );
// fd_exec_slot_ctx_t * snapshot_slot_ctx =
// * snapshot_slot_ctx =
// fd_exec_slot_ctx_join( fd_exec_slot_ctx_new( &snapshot_fork->slot_ctx, valloc ) );
// FD_TEST( snapshot_slot_ctx );

Expand Down
5 changes: 0 additions & 5 deletions src/discof/exec/fd_exec_tile.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,6 @@ unprivileged_init( fd_topo_t * topo,
ctx->txn_ctx = fd_exec_txn_ctx_join( fd_exec_txn_ctx_new( txn_ctx_mem ), ctx->exec_spad, ctx->exec_spad_wksp );
*ctx->txn_ctx->funk = *ctx->funk;

ctx->txn_ctx->runtime_pub_wksp = ctx->runtime_public_wksp;
if( FD_UNLIKELY( !ctx->txn_ctx->runtime_pub_wksp ) ) {
FD_LOG_ERR(( "Failed to find public wksp" ));
}

ctx->txn_ctx->bank_hash_cmp = ctx->bank_hash_cmp;

/********************************************************************/
Expand Down
14 changes: 7 additions & 7 deletions src/discof/replay/fd_exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@
a dcache region and formats it as a specific message type. */

static inline ulong
generate_stake_weight_msg( fd_exec_slot_ctx_t * slot_ctx,
fd_spad_t * runtime_spad,
ulong epoch,
ulong * stake_weight_msg_out ) {
generate_stake_weight_msg( fd_bank_t * bank,
fd_spad_t * runtime_spad,
ulong epoch,
ulong * stake_weight_msg_out ) {

fd_stake_weight_msg_t * stake_weight_msg = (fd_stake_weight_msg_t *)fd_type_pun( stake_weight_msg_out );
fd_stake_weight_t * stake_weights = (fd_stake_weight_t *)&stake_weight_msg_out[5];
fd_vote_accounts_global_t const * vote_accounts = fd_bank_epoch_stakes_locking_query( slot_ctx->bank );
fd_vote_accounts_global_t const * vote_accounts = fd_bank_epoch_stakes_locking_query( bank );
ulong stake_weight_idx = fd_stake_weights_by_node( vote_accounts,
stake_weights,
runtime_spad );
fd_bank_epoch_stakes_end_locking_query( slot_ctx->bank );
fd_bank_epoch_stakes_end_locking_query( bank );

fd_epoch_schedule_t const * epoch_schedule = fd_bank_epoch_schedule_query( slot_ctx->bank );
fd_epoch_schedule_t const * epoch_schedule = fd_bank_epoch_schedule_query( bank );

stake_weight_msg->epoch = epoch;
stake_weight_msg->staked_cnt = stake_weight_idx; /* staked_cnt */
Expand Down
2 changes: 1 addition & 1 deletion src/discof/replay/fd_replay.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ leader_pipeline( void ) {
// for( fd_fork_frontier_iter_t iter = fd_fork_frontier_iter_init( ctx->forks->frontier, ctx->forks->pool );
// !fd_fork_frontier_iter_done( iter, ctx->forks->frontier, ctx->forks->pool );
// iter = fd_fork_frontier_iter_next( iter, ctx->forks->frontier, ctx->forks->pool ) ) {
// fd_exec_slot_ctx_t * ele = &fd_fork_frontier_iter_ele( iter, ctx->forks->frontier, ctx->forks->pool )->slot_ctx;
// * ele = &fd_fork_frontier_iter_ele( iter, ctx->forks->frontier, ctx->forks->pool )->slot_ctx;
// if ( max_slot < ele->slot_bank.slot ) {
// max_slot = ele->slot_bank.slot;
// }
Expand Down
Loading
Loading