Skip to content

banks: adding seed, fixing new/join pattern, removing templatization for complex types#7649

Merged
ibhatt-jumptrading merged 45 commits intofiredancer-io:mainfrom
ibhatt-jumptrading:ibhatt/unwind_banks_cow
Jan 7, 2026
Merged

banks: adding seed, fixing new/join pattern, removing templatization for complex types#7649
ibhatt-jumptrading merged 45 commits intofiredancer-io:mainfrom
ibhatt-jumptrading:ibhatt/unwind_banks_cow

Conversation

@ibhatt-jumptrading
Copy link
Copy Markdown
Contributor

No description provided.

@ibhatt-jumptrading ibhatt-jumptrading changed the title banks: adding seed, fixing new/join pattern, removing templatization for cow type banks: adding seed, fixing new/join pattern, removing templatization for cow type [wi[ Jan 6, 2026
@ibhatt-jumptrading ibhatt-jumptrading changed the title banks: adding seed, fixing new/join pattern, removing templatization for cow type [wi[ banks: adding seed, fixing new/join pattern, removing templatization for cow type [wip] Jan 6, 2026
@ibhatt-jumptrading ibhatt-jumptrading changed the title banks: adding seed, fixing new/join pattern, removing templatization for cow type [wip] banks: adding seed, fixing new/join pattern, removing templatization for complex types Jan 6, 2026
/**/ fd_topob_tile_uses( topo, &topo->tiles[ fd_topo_find_tile( topo, "replay", 0UL ) ], banks_obj, FD_SHMEM_JOIN_MODE_READ_WRITE );
/**/ fd_topob_tile_uses( topo, &topo->tiles[ fd_topo_find_tile( topo, "tower", 0UL ) ], banks_obj, FD_SHMEM_JOIN_MODE_READ_WRITE );
FOR(exec_tile_cnt) fd_topob_tile_uses( topo, &topo->tiles[ fd_topo_find_tile( topo, "exec", i ) ], banks_obj, FD_SHMEM_JOIN_MODE_READ_WRITE ); /* TODO: Should be readonly? */
FOR(exec_tile_cnt) fd_topob_tile_uses( topo, &topo->tiles[ fd_topo_find_tile( topo, "exec", i ) ], banks_obj, FD_SHMEM_JOIN_MODE_READ_WRITE );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future it would be nice to separate out the bank into parts that are directly modified by exec tiles (e.g. lthash and other commit stuff), and read-only stuff (where exec tiles only take read locks)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

working on a follow up that splits out locks from the banks data atm

Comment thread src/flamenco/runtime/fd_bank.h
static inline void
fd_bank_set_epoch_rewards_pool_lock( fd_bank_t * bank, fd_rwlock_t * rwlock ) {
bank->epoch_rewards_pool_lock_offset = (ulong)rwlock - (ulong)bank;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this? Can't we just make this rwlock a regular struct member?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the locks are shared with each fd_bank_t and the fd_banks_t so it can't be a struct member of the fd_bank_t we also can't use pointers because the bank/banks are all in different tiles

@ibhatt-jumptrading ibhatt-jumptrading merged commit 8ae066b into firedancer-io:main Jan 7, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants