Commit Graph

125 Commits

Author SHA1 Message Date
Dario Gabriel Lipicar b3cc73aa7f feat: use media server for community collectible images 2023-12-16 08:49:58 -03:00
Cuteivist 7af313cd53
feat: Add community manager and fetch cached community metadata (#4450) 2023-12-14 17:50:46 +01:00
Ivan Belyakov 81073b208e fix(wallet): Made an interface for BlockRangesSequentialDAO to
mock it in tests.
Made a configurable timeout interval for Commander interface.
Added tests to verify loadBlocksAndTransfers command is stopped
correctly on max errors limit reached
2023-12-14 16:49:23 +01:00
Ivan Belyakov 670954b71b feat(wallet): separated finite and infinite commands in transfers for
proper handling of errors and commands restart.
Now:
- Infinite commands started only once and never restarted, stoped on
context.Done.
- Finite commands are joined into AtomicGroup to stop the rest in the
  group in case one command fails. Otherwise other commands in the group
  will continue running and the failed command is not retried to
  restart. Fixed goroutine leakage in case of failure of some commands
2023-12-14 16:49:23 +01:00
Cuteivist dfe6baed9b
feat: Fetch community token image (#4440) 2023-12-12 08:37:57 +01:00
Ivan Belyakov 71b27394bb fix(wallet): fixed BalanceAt not called for all but first account
when new blocks are searched
2023-12-09 10:10:01 +01:00
Ivan Belyakov 5882705a21 fix(wallet): quick fix for eating RPC requests. Proper fix TBD 2023-12-09 10:10:01 +01:00
Ivan Belyakov 6e666f7c27 fix(wallet): accessing tokens block range nil on empty acc.
Fixed a crash in local notification service on a nil block number
in HistoryReady event
2023-12-07 21:40:02 +01:00
Anthony Laibe f502d991b7 fix: prevent crash when erc20 tx is contract creation 2023-12-07 09:50:41 +01:00
Ivan Belyakov b8c006843b fix(wallet): use mnemonic displayed check for 'findNewBlocksCommand'
Fixed some tests to use wrong sql DB for account DB
2023-12-06 14:07:52 +01:00
Ivan Belyakov 761aa64e04 test(wallet): add tests for findNewBlocks command 2023-12-06 12:08:18 +01:00
Ivan Belyakov 82185b54b5 feat(wallet): separate ETH and tokens search ranges to allow calling
`getLogs` for multiple accounts simultaneously. For now only used for
new transfers detection. Detection of `new` transfers has been changed,
now they are searched from head and forward. Previously they were
searched from last scanned block forward.
2023-12-05 16:09:56 +01:00
Sale Djenic cfa542378d chore(walletconnect)_: various improvements applied
- `WalletConnectTransfer` identified as a new transfer type
- Wallet-related endpoints that logically belong to the wallet moved from the wallet connect service
- Wallet connect service now receives `transfer.TransactionManager` instead of `transactions.Transactor`
- Deadlock issue when trying to send the tx with the wrong nonce fixed
2023-12-04 11:18:38 +01:00
Roman Volosovskyi aee111e5ab
[#4200] Avoid tx watching for addresses which were not exposed 2023-12-01 12:30:42 +01:00
Cuteivist 79f0d8a5ec
bug: Added missing out chain data (#4303) 2023-11-30 12:37:32 +01:00
Ivan Belyakov c0f2f76e9a feat(wallet): remove transfers data on account removal
Closes:  #4394
2023-11-29 16:17:21 +01:00
Sale Djenic dea0b62650 feat(wallet)_: common endpoints added to wallet api
- `SignMessage`
- `BuildTransaction`
- `SendTransactionWithSignature`
2023-11-29 15:34:44 +01:00
Dario Gabriel Lipicar 8b539cd400 feat: refresh balances when Eth or ERC20 transfer is detected 2023-11-29 09:16:03 -03:00
Sale Djenic 8641ec5dd5 feat(walletconnect)_: ethereum rpc calls support
Reference: https://docs.walletconnect.com/advanced/rpc-reference/ethereum-rpc
2023-11-27 10:49:23 +01:00
Sale Djenic e9f11f70dd chore(wallet)_: proper release of locked nonce (unlock function call) 2023-11-22 09:46:50 +01:00
Ivan Belyakov f4fc0ea324 feat(wallet): remove old OnDemand transfer fetch strategy as it not
functional and not maintained any more and we will work on improvement
of SequentialFetchStrategy
2023-11-16 12:59:47 +01:00
Ivan Belyakov b6ade53603 feat(wallet): detect ERC1155 batch transfers.
Refactored transfers loading to reduce blockchain RPC requests (getBaseFee, getTransaction,
getTransactionReceipt) by reusing preloaded transaction and block fee.
Split extraction of subtransaction from logs and from ETH transfer into
different methods.
Refactored log_parser to extract sender and receiver addresses
uniformly for different transfer types.
Replaced info logs with debug where needed.

closes #4221
2023-11-16 09:37:09 +01:00
Anthony Laibe 5381ec4a76 feat: add token list 2023-11-15 09:02:36 +01:00
Ivan Belyakov 57e370e7b9 feat(wallet): Added detection of ERC1155 SingleTransfer events 2023-11-13 20:19:57 +01:00
Sale Djenic ce121710d9 fix: unlock local nonce when an error occurs and increment only when the tx is sent for real 2023-11-06 18:30:42 +01:00
Cuteivist 05530f57bd
feat: Return only community tokens (#4249) 2023-11-03 13:08:32 +01:00
Cuteivist 3c5b0529c7
fix: Add network id for multi tx (#4199) 2023-10-30 10:03:29 +01:00
Cuteivist fa5765cf83
fix: Update timestamp when upserting multi tx (#4224) 2023-10-30 07:53:22 +01:00
Roman Volosovskyi 9d59d889f6
[#3833] Increase intreval of new blocks detection command 2023-10-25 14:45:06 +02:00
Roman Volosovskyi 42527723f2
[#4087] Omit history scanning on generated multiacc creation 2023-10-19 15:07:34 +02:00
Sale Djenic b348cca15c feat: added functionality to ask a client to sign a transaction and an endpoint to continue sending using provided signature
This functionality is needed in case the user wants to send a transaction and
signs it using the signature provided by the keycard (or any other compatible way).
2023-10-17 19:42:06 +02:00
Roman Volosovskyi 778753bb57
Fix checking of ERC20 tail on new blocks scanning 2023-10-12 16:21:09 +02:00
Cuteivist 5674a010cd
feat: Handle Status Mint transaction (#4137) 2023-10-12 12:21:03 +02:00
Dario Gabriel Lipicar 094228871e feat: trigger collectibles refresh on transfer 2023-10-11 15:22:46 -03:00
Cuteivist 6798d1ac5c
feat: Handled token mint activity (#4126) 2023-10-11 07:10:08 +02:00
Ivan Belyakov 01526c344a fix(wallet): new blocks were not found 2023-10-06 15:51:57 +02:00
Roman Volosovskyi d82c50b50a
[#3930] Prevent repeated eth_getLogs calls (ERC20 history tail) 2023-10-05 19:45:40 +02:00
Roman Volosovskyi 6a110ca3df
[#3930] Make sure eth_getLogs for outgoing transfers are not executed for erc20 tail 2023-10-05 11:44:09 +02:00
IvanBelyakoff 9d6577049f
Implemented balance history based on transfers (#4022)
* feat(wallet): implement balance history based on fetched transfers
* Added vendor 'ttlcache'
2023-10-04 15:00:12 +03:00
Roman Volosovskyi 382fcde74e
Scanning of ERC20 tail of transfers history 2023-10-01 10:09:11 +02:00
Stefan 579f7e4a52 chore(wallet) optimize the filer query
Main changes:

- Use tr_type instead of IN clause
- Use binary (X'...' syntax) directly into the query instead of
  converting DB values to HEX
  - Found to be slightly faster than query parameters in the dedicated benchmark
  - Didn't see much improvement in filter benchmarks
- Tried various combinations of optimizations but without impressive performance results

Benchmark results:

| Name                   | Original   | tr_type   | join     | hex      | no-db     | db_only   |     last |    net_j |
|:-----------------------|:-----------|:----------|:---------|:---------|:----------|:----------|---------:|---------:|
| RAM_NoFilter-10        | 49580229   | 51253242  | 51112462 | 50915133 | 121217817 | 141691008 | 50908642 | 50239712 |
| SSD_NoFilter-10        | 49963604   | 51393588  | 51213038 | 50881483 | 120785679 | 141063467 | 50462767 | 49676867 |
| SSD_MovingWindow-10    | 53695712   | 54155292  | 54161733 | 54061325 | 126966633 | 146866017 | 53479929 | 53350475 |
| SSD_AllAddr_AllTos-10  | 41382804   | 41195225  | 51684175 | 52107262 | 64348100  | 97608833  | 50523529 | 49968321 |
| SSD_OneAddress-10      | 34945275   | 35103850  | 31066429 | 31328762 | 50927300  | 54322971  | 30098529 | 30252546 |
| FilterSend_AllAddr-10  | 39546808   | 37566604  | 38389725 | 38260738 | 114820458 | 125588408 | 37127625 | 36864575 |
| FilterSend_6Addr-10    | 41221458   | 41111225  | 40848288 | 40135492 | 118629700 | 128200467 | 38942521 | 39012100 |
| FilterThreeNetworks-10 | -          | -         | -        | -        | -         | -         | 50058929 | 49854450 |

Update status-desktop: #11036
2023-09-21 13:56:44 +02:00
Cuteivist bc4093299e
feat: Filter by collectibles (#4028) 2023-09-21 08:58:36 +02:00
Roman Volosovskyi 1dca3adb89
Basic test for findBlocksCommand 2023-09-19 13:17:36 +02:00
Stefan 70341f85a5 fix(wallet) send/receive for duplicate transactions
Brings consistency in case when sender and receiver are both in the
filter address list. This fixes the case of sender and receiver in
addresses and filters out duplicate entries.

Also

- refactor tests to provide support for owners
- adapt TestGetActivityEntriesWithSameTransactionForSenderAndReceiverInDB
  to the use of owner instead of from
2023-09-12 11:58:24 +02:00
Cuteivist e77fc59f5e
feat: Add activity filtering by contract deploy and minting (#4009) 2023-09-11 11:54:37 +02:00
Ivan Belyakov 81b94b7a4e fix(wallet): added ChainID to balance cache, as now it is shared between
services and contains balances for all addresses and chains.
Made rpc chain client return ChainID property on `NetworkID()` method
2023-09-07 15:00:19 +02:00
Anthony Laibe 22fc83de59 feat: create unknown erc20 2023-09-07 10:04:58 +02:00
Stefan 555aae4d0f fix(wallet) filter by sub-transaction chain ID
Closes status-desktop #12077
2023-09-06 21:08:39 +02:00
Ivan Belyakov 20c585a621 fix(wallet): new transfers were not loaded in real time 2023-09-05 14:19:36 +02:00
Ivan Belyakov 24bf9aada5 feat(wallet): move balance cache to a common place and make it a
parameter to share between transfers and balance history in an upcoming
commit.
Had to refactor its interface for that reason.
2023-09-05 12:20:49 +02:00