Repository navigation
autoforward: never send to a Kraken address that is about to expire - #7
Merged
Merged
Conversation
Kraken now gives deposit addresses an expiry (`expiretm`; the LTC ones last about 7 days, some never expire). A deposit that lands after expiry "may not be possible" to process, or costs a recovery fee. Kraken hands back its newest unused address until a deposit lands on it. So an address left unused by a failed pass (a fee check, a broadcast error) keeps coming back until it expires, and the address code never looked at the expiry. An address now has to stay valid for KRAKEN_ADDRESS_MIN_VALIDITY seconds (default 86400). The rule applies to both lists Kraken returns, and to the existing address a dry run reuses. When Kraken offers only addresses expiring sooner, the coin's pass fails with an error naming the margin, so Zabbix alerts and nothing is sent. Against Kraken's real lists today (read-only): `expiretm` comes as a string, "0" for never. 4 BTC and 1 LTC addresses expire within 24h, and every coin still has a valid address for a dry run. Tests: the Kraken fake can give addresses an expiry. A live BTC forward handed an address expiring in an hour must raise and broadcast nothing, and one valid for 7 days still forwards. Ignoring the expiry fails the first test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Kraken now gives deposit addresses an expiry (
expiretm). The LTC ones last about 7 days, and some never expire. A deposit that lands after expiry "may not be possible" to process, or costs a recovery fee.Kraken hands back its newest unused address until a deposit lands on it. So an address left unused by a failed pass keeps coming back until it expires, and our address code never looked at the expiry.
Change. An address must stay valid for
KRAKEN_ADDRESS_MIN_VALIDITYseconds (default 86400) to be used. That covers live passes and the existing address a dry run reuses. When Kraken offers only addresses expiring sooner, that coin's pass fails with an error, so Zabbix alerts and nothing is sent.Checked against Kraken's real lists (read-only):
expiretmis a string,"0"for never. 4 BTC and 1 LTC addresses expire within 24h today, and every coin still has a valid address for a dry run.Tests: a live BTC forward handed an address expiring in an hour raises and broadcasts nothing, while one valid for 7 days still forwards. Ignoring the expiry fails the first test. 16 tests pass.
After merging, cake-tech/ansible re-pins
autoforward_versionto the merge commit.🤖 Generated with Claude Code