Skip to content

Conversation

@mjain-jump
Copy link
Contributor

No description provided.

@mjain-jump mjain-jump force-pushed the mjain/rebased-vote-state-v3 branch 6 times, most recently from a43af0e to b289efa Compare December 18, 2025 20:50
@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050658 s 0.050616 s -0.083%
backtest mainnet-368528500-perf snapshot load 1.623 s 1.638 s 0.924%
backtest mainnet-368528500-perf total elapsed 50.658096 s 50.615552 s -0.084%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%


/**********************************************************************/
/* Getters */
/**********************************************************************/
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer to remove these banners and instead document the functions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tbh I'd prefer to keep these banners because it delineates the getters / setters cleanly without needing to explicitly document the exact same thing for every method in the file

Copy link
Contributor

@ripatel-fd ripatel-fd left a comment

Choose a reason for hiding this comment

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

Looks good generally. Found some minor code style issues.
I'm rather concerned about object lifetime management and handling of tail-allocated variable size memory region. But these issues stem from fd_types and cannot trivially be fixed in the scope of this PR. Fuzzing will give us necessary confidence, but hope to make the deserialized vote state struct static size in the future.

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050928 s 0.050838 s -0.177%
backtest mainnet-368528500-perf snapshot load 1.691 s 1.716 s 1.478%
backtest mainnet-368528500-perf total elapsed 50.927636 s 50.837558 s -0.177%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050561 s 0.050663 s 0.202%
backtest mainnet-368528500-perf snapshot load 1.635 s 1.617 s -1.101%
backtest mainnet-368528500-perf total elapsed 50.561084 s 50.663427 s 0.202%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050715 s 0.0506 s -0.227%
backtest mainnet-368528500-perf snapshot load 1.642 s 1.674 s 1.949%
backtest mainnet-368528500-perf total elapsed 50.715048 s 50.600215 s -0.226%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050681 s 0.05057 s -0.219%
backtest mainnet-368528500-perf snapshot load 1.627 s 1.629 s 0.123%
backtest mainnet-368528500-perf total elapsed 50.680843 s 50.569832 s -0.219%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050577 s 0.050787 s 0.415%
backtest mainnet-368528500-perf snapshot load 1.639 s 1.64 s 0.061%
backtest mainnet-368528500-perf total elapsed 50.576744 s 50.786725 s 0.415%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050626 s 0.050632 s 0.012%
backtest mainnet-368528500-perf snapshot load 1.603 s 1.614 s 0.686%
backtest mainnet-368528500-perf total elapsed 50.625593 s 50.631777 s 0.012%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050549 s 0.050694 s 0.287%
backtest mainnet-368528500-perf snapshot load 1.625 s 1.614 s -0.677%
backtest mainnet-368528500-perf total elapsed 50.548703 s 50.693636 s 0.287%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

@mjain-jump mjain-jump force-pushed the mjain/rebased-vote-state-v3 branch 2 times, most recently from 34d4072 to b55655e Compare December 30, 2025 18:13
@mjain-jump mjain-jump force-pushed the mjain/rebased-vote-state-v3 branch from b55655e to f37a5d2 Compare December 30, 2025 18:16
@github-actions
Copy link

Performance Measurements ⏳

Suite Baseline New Change
backtest mainnet-368528500-perf per slot 0.050783 s 0.050511 s -0.536%
backtest mainnet-368528500-perf snapshot load 1.637 s 1.624 s -0.794%
backtest mainnet-368528500-perf total elapsed 50.78265 s 50.511255 s -0.534%
firedancer mem usage with mainnet.toml 1005.23 GiB 1005.23 GiB 0.000%

Copy link
Contributor

@ibhatt-jumptrading ibhatt-jumptrading left a comment

Choose a reason for hiding this comment

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

can we take this opportunity to break the fd types dependency on vote states

case fd_vote_state_versioned_enum_v0_23_5:
*credits = vsv->inner.v0_23_5.epoch_credits;
break;
case fd_vote_state_versioned_enum_v1_14_11:
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to ignore the old vote states since it's deprecated. not sure how it's handled in agave

ulong stake_lamports,
fd_pubkey_t const * voter_pubkey,
fd_vote_state_t const * vote_state,
fd_vote_state_v3_t const * vote_state,
Copy link
Contributor

Choose a reason for hiding this comment

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

align

expected = FD_VOTE_STATE_V4_SZ;
break;
default:
FD_LOG_CRIT(( "unsupported version: %d", target_version ));
Copy link
Contributor

Choose a reason for hiding this comment

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

missing indent

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.

4 participants