Skip to content

Conversation

@ripatel-fd
Copy link
Contributor

Simplifies addressing of objects that are shared across multiple
banks. For convenience, each bank retains position-independent
pointers to objects managed by fd_banks. Since the difference
between (bank[i]-fd_banks) and (bank[i]<->cost_tracker) is constant
for each i, each bank only needs to store a pointer to fd_banks.

Also, we remove the assumption that certain bank fields are
retained while the bank is in the free pool. (All fields are
initialized on bank object creation now.) This allows us to install
stronger UAF detection using MSan.

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.052412 s 0.051947 s -0.887%
backtest mainnet-368528500-perf snapshot load 2.604 s 1.798 s -30.952%
backtest mainnet-368528500-perf total elapsed 52.412284 s 51.947053 s -0.888%
firedancer mem usage with mainnet.toml 1003.33 GiB 1003.33 GiB 0.000%

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.052215 s 0.051913 s -0.578%
backtest mainnet-368528500-perf snapshot load 2.636 s 1.787 s -32.208%
backtest mainnet-368528500-perf total elapsed 52.214724 s 51.912626 s -0.579%
firedancer mem usage with mainnet.toml 1003.33 GiB 959.33 GiB -4.385%

Simplifies addressing of objects that are shared across multiple
banks.  For convenience, each bank retains position-independent
pointers to objects managed by fd_banks.  Since the difference
between (bank[i]-fd_banks) and (bank[i]<->cost_tracker) is constant
for each i, each bank only needs to store a pointer to fd_banks.

Also, we remove the assumption that certain bank fields are
retained while the bank is in the free pool.  (All fields are
initialized on bank object creation now.)  This allows us to install
stronger UAF detection using MSan.
Don't rely on partially-initialized structs, allowing us to add
MSan support.
Simplifies plumbing of a benchmark/development option

Also fix initialization of the cost tracker object
@ripatel-fd ripatel-fd changed the title runtime: simplify refs to shared bank objects runtime: bank memory management Feb 12, 2026
@ripatel-fd ripatel-fd changed the title runtime: bank memory management runtime: simplify bank object initialization Feb 12, 2026
@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.05212 s 0.052103 s -0.033%
backtest mainnet-368528500-perf snapshot load 2.627 s 1.817 s -30.834%
backtest mainnet-368528500-perf total elapsed 52.120247 s 52.102864 s -0.033%
firedancer mem usage with mainnet.toml 1003.33 GiB 1003.33 GiB 0.000%

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