[LABS-446] Use a separate config for pooling information#20719
Open
Quexington wants to merge 12 commits intomainfrom
Open
[LABS-446] Use a separate config for pooling information#20719Quexington wants to merge 12 commits intomainfrom
Quexington wants to merge 12 commits intomainfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Contributor
|
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.

This change makes it so that instead of using the application config for storing pooling information (as communication between the farmer and wallet), we instead use a brand new file that does the same thing but without changing the user's config.
The ergonomics of the new drivers are such that you can create a context manager which locks the config and returns you an object representing one item within it. You can edit this object within the context manager and then, when you exit, the object in its final state is automatically saved back to the config. These ergonomics help eliminate a lot of the logic that the farmer and pool wallet had to implement by remembering to lock the config and save when done and do exception handling, etc.
Note
Medium Risk
Introduces a new on-disk pooling state store and migrates away from
config.yaml, touching farmer/wallet/CLI code paths; issues could surface as missing/incorrect pool configuration or migration edge cases.Overview
Pooling configuration is moved out of
config.yamlinto a new locked YAML store (pooling/pooling_share_state.yaml) managed via the newPoolingShareStateAPI (add/list/acquirecontext manager).Farmer, wallet, and PlotNFT CLI flows are updated to read/update pooling state through
PoolingShareState(including payout-instruction and pool-URL updates), and startup now runsperform_migration_from_old_configto copy legacypool.pool_listentries into the new file and then clear the old list.Tests are updated accordingly, with new coverage for the standalone pooling-state file and migration behavior, and legacy
PoolWalletConfig/config-based tests removed.Written by Cursor Bugbot for commit f1a20ad. This will update automatically on new commits. Configure here.