runtime: add accdb_svm API#9042
Merged
ripatel-fd merged 1 commit intofiredancer-io:mainfrom Apr 5, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new fd_accdb_svm slot-boundary account update API intended to centralize/standardize LtHash, capture, and capitalization handling, and refactors several runtime call sites to use it.
Changes:
- Introduces
fd_accdb_svm_{open_rw,close_rw,credit,write,remove}helpers for slot boundary account mutations. - Refactors sysvar updates, builtin program account writes, incinerator removal, fee settlement, feature activation, and vote-reward crediting to use the new helpers.
- Wires the new module into the runtime build (
Local.mk).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
src/flamenco/runtime/sysvar/fd_sysvar.c |
Switch sysvar account writes to fd_accdb_svm_write |
src/flamenco/runtime/program/fd_builtin_programs.c |
Use fd_accdb_svm_write for builtin “bogus executable” accounts |
src/flamenco/runtime/fd_runtime.c |
Use fd_accdb_svm_remove for incinerator and fd_accdb_svm_open_rw/close_rw in fee settlement; use fd_accdb_svm_write for feature activation |
src/flamenco/runtime/fd_core_bpf_migration.c |
Use fd_accdb_svm_open_rw/close_rw in tmp account store |
src/flamenco/runtime/fd_accdb_svm.h |
New public API for slot-boundary account changes |
src/flamenco/runtime/fd_accdb_svm.c |
Implementation of the new slot-boundary helpers (LtHash/capture/cap) |
src/flamenco/runtime/Local.mk |
Adds header + object for the new module |
src/flamenco/rewards/fd_rewards.c |
Use fd_accdb_svm_credit for vote reward crediting and rely on it for cap updates |
193593e to
0e48563
Compare
Add API for safer slot boundary account updates. Does automatic bank lthash and capitalization updates. Clean up test_settle_fees for maintainability. Reset execution_fees and priority_fees after distributing fees to fix re-entrancy issues / double accounting.
mmcgee-jump
approved these changes
Apr 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add API for safer slot boundary account updates. Does automatic
bank lthash and capitalization updates.
Closes #6473