Open
Conversation
…y networks Use Cow<'static, [u8]> to unify builtin (include_bytes!) and custom (file-based) genesis data, allowing the bootstrapper to load Byron and Shelley genesis files from disk for networks beyond mainnet/preview/sanchonet.
…alse rollback halt When an IndexActor starts from a cursor at Point::Origin, its points deque contains a single entry with slot 0 and no hash. If the first real block also arrives at slot 0 (as on preview/sanchonet), the rollback detection logic finds Origin via binary search, compares hashes (None != Some(block_hash)), and interprets it as a conflicting block. It then tries to roll back to index -1, which fails checked_sub(1) and halts the actor. We encountered this when adding custom genesis support, where networks can boot directly into post-Byron eras with an initial block at slot 0. Fix by replacing Origin with the actual first block's point at the top of apply_txs, before the rollback logic runs. This is preferable to making the rollback path Origin-aware (subtle, scattered checks) or stripping Origin in the constructor (causes the empty-deque early return to skip the first block, requiring a larger refactor).
whankinsiv
approved these changes
Feb 27, 2026
Collaborator
whankinsiv
left a comment
There was a problem hiding this comment.
Thanks for adding this Pi!
lowhung
approved these changes
Mar 2, 2026
| // Origin is a virtual starting point (slot 0, no hash). Replace it with | ||
| // the actual first block we receive so that rollback detection doesn't | ||
| // confuse it with a different block at slot 0. | ||
| if self.points.len() == 1 && matches!(self.points.front(), Some(Point::Origin)) { |
golddydev
approved these changes
Mar 3, 2026
Collaborator
golddydev
left a comment
There was a problem hiding this comment.
Thanks Pi. Good to know about Cow thing ❤️
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.
Description
Adds support for custom genesis files, in place of well known network names. Also fixes a bug that this uncovered.
Related Issue(s)
N/A
How was this tested?
Pointed Acropolis (technically scooper-v2) at a yaci-devkit private devnet and confirmed it was able to sync from origin to tip.
Checklist
Impact / Side effects
This will allow users using custom networks, like yaci-devkit to sync an acropolis node. It will allow users building custom tools like indexers to do the same.
Reviewer notes / Areas to focus