Skip to content
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

refactor(choreo): revamp APIs & zero copy funk reads #3773

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lidatong
Copy link
Member

@lidatong lidatong commented Dec 21, 2024

Initially the fd_tower API revolved around using fd_fork_t as the type for inputs and outputs. The idea was to conceptually represent voting for / switching forks (rather than slots). I decided this made the tower API unnecessarily cumbersome to require passing in forks and fork objects when all that was actually used by the implementation was the frontier slot. So the revamped API just takes and returns slots ie. ulong.

Also reworked fd_tower to be a P.O.D. type rather than holding state like the epoch voters. Relatedly, the vote account iteration logic belongs elsewhere, so moved it to forks which feels most logical. Rather than tower and ghost each maintaining their own set of voters, they now share the epoch voters which fd_forks API will update.

Also added zero-copy deserialization of vote accounts from funk inside fd_voter to support ghost and tower ops.

@lidatong lidatong force-pushed the chali/refactor/tower-api branch 3 times, most recently from df05657 to d029184 Compare December 21, 2024 23:57
@lidatong lidatong changed the title perf(tower): zero copy deserialization of towers from funk perf(tower,voter): zero copy funk reads of towers in voter API Dec 21, 2024
@lidatong lidatong force-pushed the chali/refactor/tower-api branch 6 times, most recently from 8208eae to 3859af7 Compare December 24, 2024 02:03
@lidatong lidatong changed the title perf(tower,voter): zero copy funk reads of towers in voter API refactor(ghost,tower,voter): zero copy funk reads of towers in voter API Dec 24, 2024
@lidatong lidatong changed the title refactor(ghost,tower,voter): zero copy funk reads of towers in voter API refactor(ghost,tower,voter): ghost polish, tower cleanup, zero copy voter API Dec 24, 2024
@lidatong lidatong changed the title refactor(ghost,tower,voter): ghost polish, tower cleanup, zero copy voter API refactor(ghost,tower,voter): ghost & tower polish, zero copy voter API Dec 24, 2024
@lidatong lidatong force-pushed the chali/refactor/tower-api branch 3 times, most recently from e90e344 to 6ab0dd9 Compare December 26, 2024 14:09
@lidatong lidatong changed the title refactor(ghost,tower,voter): ghost & tower polish, zero copy voter API refactor(ghost,tower,voter): revise APIs, zero copy funk reads Dec 26, 2024
@lidatong lidatong force-pushed the chali/refactor/tower-api branch from 6ab0dd9 to 87d82b1 Compare December 26, 2024 14:56
@lidatong lidatong changed the title refactor(ghost,tower,voter): revise APIs, zero copy funk reads refactor(choreo): revise APIs, zero copy funk reads Dec 26, 2024
@lidatong lidatong changed the title refactor(choreo): revise APIs, zero copy funk reads refactor(choreo): revamp APIs & zero copy funk reads Dec 26, 2024
@lidatong lidatong force-pushed the chali/refactor/tower-api branch 2 times, most recently from b67f556 to 14cb214 Compare December 26, 2024 18:30
@lidatong lidatong force-pushed the chali/refactor/tower-api branch from 14cb214 to b889c42 Compare December 31, 2024 00:48
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.

1 participant