Skip to content

Conversation

cjjdespres
Copy link
Member

@cjjdespres cjjdespres commented Sep 6, 2025

This is a work in progress PR for generating a full hard fork config. The first commit 7f62428 was cherry-picked from #17722, which will eventually be merged.

The code contains some duplication and doesn't handle genesis epoch ledger snapshots yet. The dump also doesn't activate automatically - I've included a test RPC command to generate the hard fork config in a specified directory.

| Error e ->
eprintf "Failed to request hardfork config generation: %s\n"
(Error.to_string_hum e) ;
exit 17
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a general policy for using exit code?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I don't think so. It's also used when a client gets an error at a graphql endpoint. Some other parts of the code use exit 15 for client connection issues. The exit codes are not well organized.

The faster hard fork config generation method will involve applying the
diffs from a ledger mask branch onto a copy of its root. For that reason
it will be convenient to keep around more information about those
ledgers, so they can be migrated properly. The next epoch ledger is most
relevant for the upcoming hardfork; it could be

1. its own root, which should be checkpointed directly, or

2. an uncommitted ledger in the transition frontier, which should have
its accumulated diff harvested and applied to the root snarked ledger
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.

2 participants