BLNK_TRANSACTION_LOCK_DURATION overflow fixed in Blnk Core 0.15.1.
If you run 0.10.3 through 0.15.0 and set this value manually (especially as a Go duration such as 1m), upgrade before you rely on that config.
Summary
Who is affected?
You are affected if both are true:- You run Blnk Core 0.10.3 through 0.15.0
- You set
BLNK_TRANSACTION_LOCK_DURATION(ortransaction.lock_duration) yourself
What happened?
On affected versions, Blnk could multiply an already-parsed duration bytime.Second again during config load.
Example with BLNK_TRANSACTION_LOCK_DURATION=1m:
1mparses to 60 seconds in nanoseconds- Config load multiplies by
time.Secondagain - The value overflows a signed
int64into a positive duration of about 147 years - Redis receives that value as the lock TTL (
SET NX)
time.Second when the loaded value is greater than zero and less than one second (so JSON integer seconds still work). Parsed Go durations such as 1m are left unchanged.
Migration steps
1
2
Confirm your lock duration config
After upgrade, Go duration env values apply as written:In See Lock settings.
blnk.json, lock_duration remains integer seconds:3
Clean up orphaned Redis locks
After upgrade, check balances that stay unavailable or keep failing with lock errors.Redis lock keys are the balance IDs themselves (for example A healthy lock TTL is on the order of your configured lock duration (seconds or minutes). A TTL on the order of years is a leftover from the overflow.
bln_…). Inspect TTL, then delete only when you are sure no live transaction owns the lock:Temporary workaround (not recommended)
If you cannot upgrade yet and must set the duration on 0.10.3 through 0.15.0, a value below one second is multiplied into seconds by the buggy path. For example,60ms becomes 60 seconds after the extra multiply.
Migration checklist
- Upgrade every Core server and worker to 0.15.1 or later
- Keep or set
BLNK_TRANSACTION_LOCK_DURATIONwith a real Go duration (for example1m) only after upgrade - Remove any sub-second workaround values such as
60ms - Find stuck balances and inspect Redis
TTLon their balance ID keys - Delete orphaned locks only after confirming no live owner
- Re-test a transaction against each cleaned balance
This migration guide covers the lock duration overflow fixed in Blnk v0.15.1. For other fixes in that release, see the release notes.