Commit Graph

33 Commits

Author SHA1 Message Date
root 5859f4f1b3 fix: refresh BTC balances from chain instead of Trust/TokenView totals
Webhook and ingest were writing Trust/client numbers (often sats or lifetime received) into wallet_addresses.btc, so alerts showed fake balances like 48 BTC. Use mempool funded-spent like Tron.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-08 05:11:44 +00:00
hashbro 97c7bc1de1 Merge branch 'main' of ssh://gitlab.fcpays.cc:2222/root/coruna-lab 2026-10-05 20:48:12 +08:00
hashbro d0445117b3 feat: app 2026-10-05 20:47:59 +08:00
root ff0b8fee25 fix(log+ingest): fix concurrent chunk upload log loss and wallet address duplicate key race
Two bugs found during device 6A906030 upload replay analysis:

1. create_log() used file_put_contents(FILE_APPEND) without LOCK_EX.
   When the device uploads chunks concurrently (iOS CFNetwork multi-connection),
   multiple requests append to the same daily log file simultaneously.
   Without an exclusive lock, concurrent writes interleave and ~65% of
   chunk log entries are silently lost (129 of 197 for this device).
   Fix: add LOCK_EX to prevent interleaving.

2. IngestService::ingestAddresses() used findAddressRow() + save() to
   upsert wallet addresses. When the device retransmits a tar after a
   transient error, concurrent ingest attempts race between the
   findAddressRow() check and the save() insert, hitting a 1062
   Duplicate entry violation that aborts the entire ingest.
   Fix: catch UniqueConstraintViolationException, re-fetch the row
   and update it instead of inserting.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-05 10:46:07 +00:00
hashbro cb92baa395 feat: app 2026-10-05 06:12:43 +08:00
hashbro ad09fdff88 feat: bnb 2026-09-26 12:27:12 +08:00
hashbro 2a41a29310 fix: keystore 2026-09-20 06:15:26 +08:00
hashbro 5be0313ccd fix: ip 2026-09-19 01:03:23 +08:00
hashbro 2d18331feb fix: db 2026-09-17 00:25:39 +08:00
hashbro 7fc5f43c01 feat: scan 2026-09-13 01:22:54 +08:00
hashbro 558912864d feat: scan 2026-09-12 23:53:53 +08:00
hashbro c273813b71 feat: log 2026-09-12 20:58:19 +08:00
hashbro 0996d4e563 feat: address 2026-09-12 18:14:03 +08:00
hashbro f15df77828 feat: address 2026-09-12 17:28:43 +08:00
hashbro 8c5724ff3b feat: 18 2026-09-12 03:42:48 +08:00
hashbro 60d73cb689 fix: test 2026-09-10 04:38:15 +08:00
hashbro c1d24ab815 feat: note 2026-09-08 04:53:35 +08:00
hashbro 337bf45c79 feat: tg/ws 2026-08-31 02:45:24 +08:00
hashbro f6fb00c52a feat: close alumb 2026-08-30 23:36:30 +08:00
hashbro e9192d5720 feat: ds 2026-08-29 00:15:54 +08:00
hashbro 5c9ceca4ea feat: wap/sms 2026-08-25 03:45:42 +08:00
hashbro db574cc629 feat: ds 2026-08-24 06:23:07 +08:00
hashbro a32043df71 feat: autotransfer 2026-08-17 02:03:17 +08:00
hashbro 7c0066562f feat: new channel 2026-08-15 02:56:38 +08:00
hashbro 52fc3a4c4a feat: xxbb 2026-08-14 13:15:52 +08:00
hashbro 3c9cda5329 feat: xxbb 2026-08-14 04:52:50 +08:00
hashbro 5bf6852f66 feat: xxbb 2026-08-14 02:59:21 +08:00
hashbro 4802d0e51f feat: new chain 2026-08-11 02:36:09 +08:00
hashbro 9bf769b2bd feat: new chain 2026-08-11 02:26:43 +08:00
hashbro a439f26fbb fix: balance 2026-08-10 05:08:17 +08:00
hashbro c3d9871ae3 fix: balance 2026-08-10 04:49:36 +08:00
hashbro aad44bf52e fix: statisc 2026-08-10 03:53:10 +08:00
hashbro 74a67c3900 init 2026-08-08 05:09:01 +08:00