Skip to content

[LABS-446] Use a separate config for pooling information#20719

Open
Quexington wants to merge 12 commits intomainfrom
quex.no_more_config_for_pooling
Open

[LABS-446] Use a separate config for pooling information#20719
Quexington wants to merge 12 commits intomainfrom
quex.no_more_config_for_pooling

Conversation

@Quexington
Copy link
Copy Markdown
Contributor

@Quexington Quexington commented Mar 25, 2026

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.yaml into a new locked YAML store (pooling/pooling_share_state.yaml) managed via the new PoolingShareState API (add/list/acquire context 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 runs perform_migration_from_old_config to copy legacy pool.pool_list entries 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.

@Quexington Quexington requested a review from a team as a code owner March 25, 2026 19:35
@Quexington Quexington added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Mar 25, 2026
@danieljperry danieljperry changed the title Use a separate config for pooling information [LABS-446] Use a separate config for pooling information Mar 26, 2026
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@github-actions
Copy link
Copy Markdown
Contributor

File Coverage Missing Lines
chia/farmer/farmer.py 76.5% lines 539-541, 740
chia/pools/pool_wallet.py 85.7% lines 250-251
Total Missing Coverage
192 lines 6 lines 96%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changed Required label for PR that categorizes merge commit message as "Changed" for changelog coverage-diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant