Skip to content

Conversation

dlipicar
Copy link
Contributor

@dlipicar dlipicar commented Sep 26, 2025

status-dekstop PR for testing: status-im/status-desktop#18924

This PR removes the old transfer detection algorithm (most of services/wallet/transfer) and integrates multistandardbalance (#6958) and transferdetector (#6959) instead.

Additionally blockchainstate is improved to properly initialize with the latest block number. After that, multistandardbalance updates it every time it performs a fetch.

Modules that needed to react to detected transactions (to trigger assets/collectibles refreshes) now listen to balance changes from multistandardbalance ( multistandardbalance.EventBalanceFetchFinished) and detected transfer events from transferdetector (transferdetector.EventTransferDetectionFinished).

Results of these changes:

multistandardbalance

  • Native/ERC20 balance changes will be detected every 2 minutes (balance change means if transactions between checks result in a net 0 balance change they won't be caught) and trigger a refresh.
  • ERC721 contract balance changes for collections of which an account owns some collectible (e.g. you own one Cryptokittie and you get another one, you own one Doodles and you transfer it using an external app) will be detected every 2 minutes and trigger a refresh. We could extend this functionality with a list of popular collections we always check.
  • ERC1155 balance changes for collectibles owned by an account (you own 1000 of some specific token from a specific contract, and you get 20 more of that same token or you transfer some using an external app) will be detected every 2 minutes and trigger a refresh.

transferdetector
All ERC20/ERC721/ERC1155 transfer events (of known or unknown tokens) will be detected in 10 minute periods.

@status-im-auto
Copy link
Member

status-im-auto commented Sep 26, 2025

Jenkins Builds

Click to see older builds (75)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 4e84983 #1 2025-09-26 18:43:24 ~3 min macos/status-go 📦zip
✔️ 4e84983 #1 2025-09-26 18:43:39 ~3 min linux/status-go 📦zip
✖️ 4e84983 #1 2025-09-26 18:47:02 ~7 min tests 📄log
✔️ 4e84983 #1 2025-09-26 18:49:58 ~10 min tests-rpc 📄log
✔️ 4e84983 #1 2025-09-26 18:50:12 ~10 min windows/status-go 📦zip
✔️ 4e84983 #1 2025-09-26 18:51:06 ~11 min linux/nwaku 📦zip
✔️ 8f2d9a3 #2 2025-09-26 19:44:54 ~3 min macos/status-go 📦zip
✔️ 8f2d9a3 #2 2025-09-26 19:45:04 ~3 min linux/status-go 📦zip
✖️ 8f2d9a3 #2 2025-09-26 19:47:00 ~5 min tests 📄log
✔️ 8f2d9a3 #2 2025-09-26 19:48:42 ~6 min windows/status-go 📦zip
✔️ 8f2d9a3 #2 2025-09-26 19:52:08 ~10 min tests-rpc 📄log
✔️ 8f2d9a3 #2 2025-09-26 19:53:02 ~11 min linux/nwaku 📦zip
✖️ 8f2d9a3 #3 2025-09-26 20:27:28 ~5 min tests 📄log
e79a764 #3 2025-10-01 20:27:13 ~1 min macos/status-go 📄log
e79a764 #3 2025-10-01 20:27:35 ~2 min linux/status-go 📄log
✖️ e79a764 #4 2025-10-01 20:28:45 ~3 min tests 📄log
e79a764 #3 2025-10-01 20:30:22 ~4 min windows/status-go 📄log
e79a764 #3 2025-10-01 20:34:03 ~8 min linux/nwaku 📄log
✔️ e79a764 #3 2025-10-01 20:37:27 ~11 min tests-rpc 📄log
✔️ c020188 #4 2025-10-01 20:33:25 ~3 min macos/status-go 📦zip
✔️ c020188 #4 2025-10-01 20:34:33 ~4 min linux/status-go 📦zip
✖️ c020188 #5 2025-10-01 20:35:33 ~5 min tests 📄log
✔️ c020188 #4 2025-10-01 20:37:41 ~7 min windows/status-go 📦zip
✔️ c020188 #4 2025-10-01 20:44:29 ~10 min linux/nwaku 📦zip
✔️ c020188 #4 2025-10-01 20:48:24 ~10 min tests-rpc 📄log
✔️ bd4386a #5 2025-10-01 21:27:38 ~3 min macos/status-go 📦zip
✔️ bd4386a #5 2025-10-01 21:27:51 ~3 min linux/status-go 📦zip
✔️ bd4386a #5 2025-10-01 21:32:13 ~7 min windows/status-go 📦zip
✔️ bd4386a #5 2025-10-01 21:35:23 ~11 min tests-rpc 📄log
✔️ bd4386a #5 2025-10-01 21:35:33 ~11 min linux/nwaku 📦zip
✔️ bd4386a #6 2025-10-01 21:50:30 ~26 min tests 📄log
✔️ d064ce0 #6 2025-10-02 12:11:08 ~4 min linux/status-go 📦zip
✔️ d064ce0 #6 2025-10-02 12:12:43 ~6 min macos/status-go 📦zip
✔️ d064ce0 #6 2025-10-02 12:13:31 ~6 min windows/status-go 📦zip
✔️ d064ce0 #6 2025-10-02 12:18:31 ~11 min linux/nwaku 📦zip
✔️ d064ce0 #6 2025-10-02 12:19:31 ~12 min tests-rpc 📄log
✖️ d064ce0 #7 2025-10-02 12:36:48 ~30 min tests 📄log
✔️ 1933ca4 #7 2025-10-02 15:10:14 ~3 min macos/status-go 📦zip
✔️ 1933ca4 #7 2025-10-02 15:11:29 ~4 min linux/status-go 📦zip
✔️ 1933ca4 #7 2025-10-02 15:13:50 ~7 min windows/status-go 📦zip
✖️ 1933ca4 #8 2025-10-02 15:18:19 ~11 min tests 📄log
✔️ 1933ca4 #7 2025-10-02 15:19:21 ~12 min linux/nwaku 📦zip
✔️ 1933ca4 #7 2025-10-02 15:23:18 ~16 min tests-rpc 📄log
✔️ c89a9ca #8 2025-10-02 15:39:10 ~4 min linux/status-go 📦zip
✔️ c89a9ca #8 2025-10-02 15:39:21 ~4 min macos/status-go 📦zip
✔️ c89a9ca #8 2025-10-02 15:42:11 ~6 min windows/status-go 📦zip
✔️ c89a9ca #8 2025-10-02 15:46:52 ~11 min linux/nwaku 📦zip
✔️ c89a9ca #8 2025-10-02 15:50:05 ~14 min tests-rpc 📄log
✔️ c89a9ca #9 2025-10-02 16:06:10 ~30 min tests 📄log
✔️ c89a9ca #9 2025-10-02 16:27:17 ~3 min macos/status-go 📦zip
✔️ c89a9ca #9 2025-10-02 16:28:02 ~3 min linux/status-go 📦zip
✔️ c89a9ca #9 2025-10-02 16:31:50 ~7 min windows/status-go 📦zip
✔️ c89a9ca #9 2025-10-02 16:34:52 ~10 min tests-rpc 📄log
✔️ c89a9ca #9 2025-10-02 16:35:45 ~11 min linux/nwaku 📦zip
✔️ c89a9ca #10 2025-10-02 16:50:54 ~26 min tests 📄log
✔️ c7fcae5 #10 2025-10-02 16:30:38 ~3 min macos/status-go 📦zip
✔️ c7fcae5 #10 2025-10-02 16:32:23 ~4 min linux/status-go 📦zip
✔️ c7fcae5 #10 2025-10-02 16:38:59 ~7 min windows/status-go 📦zip
✔️ ba10eaa #11 2025-10-02 16:36:35 ~3 min macos/status-go 📦zip
✔️ ba10eaa #11 2025-10-02 16:36:57 ~3 min linux/status-go 📦zip
✔️ ba10eaa #10 2025-10-02 16:46:09 ~11 min tests-rpc 📄log
✔️ ba10eaa #11 2025-10-02 16:46:48 ~7 min windows/status-go 📦zip
✔️ ba10eaa #10 2025-10-02 16:46:58 ~11 min linux/nwaku 📦zip
✔️ 6b24327 #12 2025-10-02 16:44:58 ~3 min macos/status-go 📦zip
✔️ 6b24327 #12 2025-10-02 16:45:27 ~3 min linux/status-go 📦zip
✔️ 6b24327 #12 2025-10-02 16:54:14 ~7 min windows/status-go 📦zip
✔️ 6b24327 #11 2025-10-02 17:01:08 ~14 min linux/nwaku 📦zip
✔️ 6b24327 #11 2025-10-02 17:01:24 ~15 min tests-rpc 📄log
✔️ 6b24327 #11 2025-10-02 17:18:19 ~27 min tests 📄log
✔️ 6637db7 #13 2025-10-03 14:17:20 ~3 min macos/status-go 📦zip
✔️ 6637db7 #13 2025-10-03 14:17:21 ~3 min linux/status-go 📦zip
✔️ 6637db7 #13 2025-10-03 14:21:12 ~7 min windows/status-go 📦zip
✔️ 6637db7 #12 2025-10-03 14:24:59 ~11 min linux/nwaku 📦zip
✔️ 6637db7 #12 2025-10-03 14:25:36 ~11 min tests-rpc 📄log
✔️ 6637db7 #12 2025-10-03 14:44:02 ~30 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ a1c4195 #14 2025-10-03 18:23:09 ~3 min linux/status-go 📦zip
✔️ a1c4195 #14 2025-10-03 18:23:48 ~4 min macos/status-go 📦zip
✔️ a1c4195 #14 2025-10-03 18:27:44 ~8 min windows/status-go 📦zip
✔️ a1c4195 #13 2025-10-03 18:30:13 ~10 min linux/nwaku 📦zip
✔️ a1c4195 #13 2025-10-03 18:30:34 ~10 min tests-rpc 📄log
✔️ a1c4195 #13 2025-10-03 18:47:06 ~27 min tests 📄log
✔️ c9ab1fe #15 2025-10-03 18:28:18 ~3 min macos/status-go 📦zip
✔️ c9ab1fe #15 2025-10-03 18:28:42 ~3 min linux/status-go 📦zip
✔️ c9ab1fe #15 2025-10-03 18:34:42 ~6 min windows/status-go 📦zip
✔️ c9ab1fe #14 2025-10-03 18:45:35 ~15 min linux/nwaku 📦zip
✔️ c9ab1fe #14 2025-10-03 18:47:46 ~17 min tests-rpc 📄log
✔️ c9ab1fe #14 2025-10-03 19:14:21 ~27 min tests 📄log

@dlipicar dlipicar changed the title Feat/replace old transfer detector feat: replace old transfer detector Sep 26, 2025
@dlipicar dlipicar force-pushed the feat/replace-old-transfer-detector branch from 4e84983 to 8f2d9a3 Compare September 26, 2025 19:41
@dlipicar dlipicar force-pushed the feat/introduce-transferdetector-package branch 2 times, most recently from 847ac64 to f046a1d Compare October 1, 2025 20:09
@dlipicar dlipicar force-pushed the feat/replace-old-transfer-detector branch 3 times, most recently from c020188 to bd4386a Compare October 1, 2025 21:23
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

❌ Patch coverage is 66.88889% with 149 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.36%. Comparing base (3386609) to head (c9ab1fe).

Files with missing lines Patch % Lines
services/wallet/reader.go 52.10% 53 Missing and 4 partials ⚠️
...rvices/wallet/collectibles/ownership/controller.go 54.11% 34 Missing and 5 partials ⚠️
services/wallet/multistandardbalance_adaptors.go 41.86% 20 Missing and 5 partials ⚠️
services/wallet/blockchainstate/blockchainstate.go 74.15% 20 Missing and 3 partials ⚠️
services/wallet/collectibles/contract_type_db.go 61.53% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6960      +/-   ##
===========================================
+ Coverage    55.44%   59.36%   +3.91%     
===========================================
  Files          833      822      -11     
  Lines       120101   116644    -3457     
===========================================
+ Hits         66595    69248    +2653     
+ Misses       46535    40275    -6260     
- Partials      6971     7121     +150     
Flag Coverage Δ
functional 33.84% <56.44%> (?)
unit 55.09% <58.22%> (-0.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
services/wallet/activity/session_service.go 73.87% <ø> (+37.33%) ⬆️
services/wallet/collectibles/service.go 19.09% <100.00%> (-1.92%) ⬇️
services/wallet/common/const.go 75.67% <ø> (ø)
services/wallet/routeexecution/manager.go 62.60% <100.00%> (+56.15%) ⬆️
services/wallet/service.go 76.37% <100.00%> (+3.34%) ⬆️
services/wallet/token/token.go 51.23% <ø> (+7.06%) ⬆️
services/wallet/collectibles/contract_type_db.go 54.09% <61.53%> (+2.01%) ⬆️
services/wallet/blockchainstate/blockchainstate.go 73.40% <74.15%> (-17.23%) ⬇️
services/wallet/multistandardbalance_adaptors.go 41.86% <41.86%> (ø)
...rvices/wallet/collectibles/ownership/controller.go 73.85% <54.11%> (-4.44%) ⬇️
... and 1 more

... and 217 files with indirect coverage changes

@dlipicar dlipicar force-pushed the feat/introduce-transferdetector-package branch from f046a1d to 5942ffa Compare October 2, 2025 12:05
@dlipicar dlipicar force-pushed the feat/replace-old-transfer-detector branch from bd4386a to d064ce0 Compare October 2, 2025 12:06
@dlipicar dlipicar force-pushed the feat/introduce-transferdetector-package branch from 5942ffa to b387458 Compare October 2, 2025 15:03
@dlipicar dlipicar force-pushed the feat/replace-old-transfer-detector branch from d064ce0 to 1933ca4 Compare October 2, 2025 15:06
@dlipicar dlipicar force-pushed the feat/introduce-transferdetector-package branch 3 times, most recently from 58b92b5 to e598c02 Compare October 2, 2025 15:28
@dlipicar dlipicar force-pushed the feat/replace-old-transfer-detector branch from 1933ca4 to c89a9ca Compare October 2, 2025 15:34
Base automatically changed from feat/introduce-transferdetector-package to develop October 2, 2025 16:23
@dlipicar dlipicar force-pushed the feat/replace-old-transfer-detector branch 3 times, most recently from ba10eaa to 6b24327 Compare October 2, 2025 16:41
@dlipicar dlipicar force-pushed the feat/replace-old-transfer-detector branch 2 times, most recently from 6637db7 to a1c4195 Compare October 3, 2025 18:19
@dlipicar dlipicar force-pushed the feat/replace-old-transfer-detector branch from a1c4195 to c9ab1fe Compare October 3, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants