Skip to content

Conversation

@alexwoods
Copy link
Collaborator

@alexwoods alexwoods commented Dec 5, 2025

Description

This PR modifies the streaming snapshot reader to pass acropolis common types to the pools callback and reworks the old snapshot handling code to work with the new bootstrap publisher.

Related Issue(s)

Implements #389.

How was this tested?

From real snapshots and examining the /pools/ endpoint.

Checklist

  • My code builds and passes local tests
  • I added/updated tests for my changes, where applicable
  • I updated documentation (if applicable)
  • CI is green for this PR

Impact / Side effects

Reviewer notes / Areas to focus

The rework to the streaming reader would be good to receive feedback on since it's the main part of this PR and may be used as a future pattern for other bootstrap modules

@alexwoods alexwoods marked this pull request as ready for review December 10, 2025 13:49
Copy link
Collaborator

@sandtreader sandtreader left a comment

Choose a reason for hiding this comment

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

Looks like a great general pattern - nice that we can decode things like IP addresses directly, and that SPOState's state is literally just the bootstrap message content.

@alexwoods alexwoods linked an issue Dec 10, 2025 that may be closed by this pull request
4 tasks
Copy link
Collaborator

@lowhung lowhung left a comment

Choose a reason for hiding this comment

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

So clean! Nice to see so much code removal too.

);

// pool_registration (third element)
let pools: VMap<PoolId, PoolParams> = decoder
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice to see all this ugly code go away.

let start = Instant::now();

match parser.parse(&mut callbacks) {
match parser.parse(&mut callbacks, NetworkId::Mainnet) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pulling the networkid out is nice.

Copy link
Collaborator

@buddhisthead buddhisthead left a comment

Choose a reason for hiding this comment

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

Really nice work, Alex. Thanks for cleaning up all of my gross decoding! This looks great. I ran the test and verified it still works :-)

@alexwoods alexwoods merged commit 1fa60a8 into main Dec 10, 2025
2 checks passed
@alexwoods alexwoods deleted the ajw/389-bootstrap-spo-module branch December 10, 2025 17:05
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.

Bootstrap SPO Module

5 participants