Configurable wallet KEY_COUNT across all bots (#1) - #3
Merged
Conversation
Every bot derives key_count synthetic keys (wallet addresses) and sends them on each request; the node scans them all, so the default 500 over a wallet with address history can hit the per-wallet coin-fetch limit or time out. Add a global KEY_COUNT env var (default 500, unchanged) so keepers can lower it (e.g. 1-20) when funds live on early derivation indexes. Applied to every bot that builds a CircuitRPCClient. Addresses keeper-bots#1 (issue 2). Issue 1 (fee_per_cost) was already fixed. Issue 3 (KeyError 'expired') is not a current-code bug: SurplusAuctionCoin.expired is a required field the list endpoint always sets, so no bot-side guard is needed.
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.
Addresses the remaining actionable item from #1 (issue 2): the default
key_count=500makes each bot send 500 synthetic keys per request, and the node scans them all, so a wallet with address history can hit the per-wallet coin-fetch limit or time out.Change
Add a global
KEY_COUNTenv var (likeRPC_URL/PRIVATE_KEY/FEE_PER_COST), default 500 (unchanged), applied to every bot that builds aCircuitRPCClient. Keepers who hold CRT/XCH on early derivation indexes can set e.g.KEY_COUNT=1to avoid scanning empty addresses. Documented in.env.example.Notes on the other items in #1
surplus_bid_botcallsset_fee_per_cost()at the top of each loop.KeyError: 'expired'): not a current-code bug.SurplusAuctionCoin.expiredis a required field the surplus list endpoint always sets, and the client raises (not returns) on error responses, so a valid response can't omit it — the overnight error was a deployed-API-version artifact. No bot-side guard added. (A genuine instance of this bug class exists inrecharge_start_settle_bot's settle path —is_expiredplus an undefinedpub_key— tracked separately.)/send_crt): the blocking bidding failure is fixed on the backend by circuit#55 (surplus bids now auto-aggregate small CRT coins), so manual CRT merging is no longer required for reliable bidding.Related backend PRs: circuit#55 (CRT aggregation for surplus bids), circuit#56 (coin-fetch error messages).
🤖 Generated with Claude Code