Commit Graph

43 Commits

Author SHA1 Message Date
Igor Sirotin c1dd9397f7
refactor_: remove generated files from source control (#5878)
* fix_: gitignore generated files

* chore_: delete generated files

* fix_: update go generate instructions

* feat(Makefile)_: clean-generated-files target

* feat(Makefile)_: `generate` target

* fix(Makefile)_: dependent generate target

* ci_: run generate, update docker file deps

* fix(Makefile)_: remove `clean-generated-files` target

* fix(Makefile)_: simpler GO_GENERATE_CMD arg

* fix_: temp workspace GO_GENERATE_FAST_DIR
2024-10-03 20:59:44 +01:00
dlipicar 55d91400b8
fix_: bump go-ethereum to get fix for block hash calculation (#5873)
* fix_: bump go-ethereum to get fix for block hash calculation

* chore_: remove CallBlockHashByTransaction workaround for bad block hash calculation
2024-09-26 08:38:22 -03:00
dlipicar dd994587a3
chore_: initial steps to decouple rpc chain modules (#5856)
* chore_: moved chain rpclimiter and tagger to separate packages

* chore_: initial steps to decouple rpc chain modules
2024-09-24 14:07:26 +01:00
Andrea Maria Piana e07182b3f3 fix_: Don't count error rate for circuit breaker on cancel and handle
not found
2024-08-20 15:26:28 +01:00
Andrea Maria Piana 9e5fa3f22c feat_: Cache GetWalletToken method and split circuits
This commits does a few things:

1) Adds cache of token amount to the GetWalletToken endpoint, used by
   mobile, in case the user is offline.

2) Split circuits by chain-id (when available) and by host+index when
   not

3) It makes GetWalletToken always refresh, as that's directed from an
   user action and we want to respect that. A cool down of 10s should be
   added in the future to avoid spamming.
2024-08-16 14:02:29 +01:00
IvanBelyakoff bf6c0c4cc6
fix(wallet)_: fix provider down event happening too often (#5595)
* fix(wallet)_: fix provider down event happening too often

- handle context cancelled error
- do not count expected errors when calling tokenURI as providers
  errors
- use archival not for optimism (was silently added by Grove makeing the
  old URL non-archival)

Closes #5555

* test(wallet)_: add test for collectibles manager to verify that main
circuit is not tripped calling by tokenURI method
2024-07-29 18:07:43 +01:00
Ivan Belyakov a009855bbb feat(wallet)_: use CircuitBreaker for blockhain RPC calls
fix usage of circuit breaker for collectibles and market data to
match the implementation
2024-07-05 12:39:19 +01:00
Ivan Belyakov 23b185ae2b fix(wallet)_: fixed some errors handling that caused provider up/down
banner
2024-07-05 13:35:44 +02:00
Ivan Belyakov 3983114ae5 test(wallet)_: add unit tests for balance fetcher
replace types with interfaces where necessary to allow mocking
implement fake eth scanner and erc20 contracts
2024-07-04 09:29:49 +02:00
Ivan Belyakov 43c9860491 fix(wallet)_: fix rpc limiter to reset counters on timeout
fix rpc limiter to delete limits on account removal
fix rpc limiter to not overwrite existing account limit on startup
fix providers down banner on limit reached error
2024-06-20 16:48:28 +02:00
Ivan Belyakov 4e51b5ba24 feat(wallet)_: more fixes for rpc_limiter_db and chain client, more
tests
2024-05-28 13:44:40 +02:00
Ivan Belyakov ce773b69ce feat(wallet)_: fixed lint issues. Fixed rpc stats to include tagged
requests
2024-05-28 13:44:40 +02:00
Ivan Belyakov cdf80b5300 feat(wallet)_: added group tag for RPC chain client
It is needed to be able to set common limits for chain client
Added a test for group tag limiter
Added a mutex to RPC limiter to change counters atomically
Replaced isConnected with atomic.Bool and made it a pointer to
be shared across client instances
2024-05-28 13:44:40 +02:00
Ivan Belyakov bf7aabfa3e feat(wallet)_: renamed some methods for clarity 2024-05-28 13:44:40 +02:00
Ivan Belyakov 9fe87657d6 feat(wallet)_: added and fixed tests for findBlocksCommand with limiter. 2024-05-28 13:44:40 +02:00
Ivan Belyakov 78f05f60b2 feat(wallet)_: add limiter to rpc.client
Add tests for limiter
Use limiter for transfer history commands
2024-05-28 13:44:40 +02:00
Ivan Belyakov 4a1f751ced feat(wallet)_: Implemented RPC limiter interface
Split ClientInterface to aggregation of multiple interfaces
Added tags to RPC stats API
Use tagged RPC client for transfers commands
Implemented general interface for RPC limiting
2024-05-28 13:44:40 +02:00
Sale Djenic dcc93dee96 fix_: handling throughput limit error from providers 2024-05-12 14:15:02 +02:00
Anthony Laibe 6e44165b51 fix: sepolia balance 2024-03-07 13:11:51 +01:00
Ivan Belyakov 34f1d26371 feat(wallet): replace RPC client's makeCallReturnSingle, makeCallReturnDouble,
makeCallNoReturn functions with a single makeCall function
2024-03-07 07:43:18 +01:00
Anthony Laibe 004bd4e79a fix: gas estimation error cause network error 2024-03-05 13:56:26 +01:00
Sale Djenic bb3006d747 feat: rpc request limiter 2024-02-29 08:26:10 +01:00
Anthony Laibe 0856efff6f fix: resolve first tx of block
This is a workaround when fetching unknown tx without receiver
2024-02-21 13:28:26 +01:00
Roman Volosovskyi 9c0526f7d9
[#4202] Detect balance and erc20 transfers by a single contract call (#4508) 2024-01-19 16:57:04 +01:00
Roman Volosovskyi 382fcde74e
Scanning of ERC20 tail of transfers history 2023-10-01 10:09:11 +02:00
Roman Volosovskyi 1dca3adb89
Basic test for findBlocksCommand 2023-09-19 13:17:36 +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
Stefan 524c21834b fix(wallet) propagate multi-transactions IDs to transfers
Mainly refactor API to have control on pending_transactions operations.
Use the new API to migrate the multi-transaction ID from to transfers
in one SQL transaction.
The refactoring was done to better mirror the purpose of pending_transactions

Also:
- Externalize TransactionManager from WalletService to be used by
  other services
- Extract walletEvent as a dependency for all services that need to
  propagate events
- Batch chain requests
- Remove unused APIs
- Add auto delete option for clients that fire and forget transactions

Updates status-desktop #11754
2023-08-22 18:39:42 +02:00
Dario Gabriel Lipicar da8e8716b2 fix(wallet): Fix block hash for detected blocks with ETH transfers
Part of #10251
2023-06-05 12:08:18 -03:00
Stefan a6d553c937 fix(wallet) ClientWithFallback handling state errors required by BH
The "not found" and "no contract" expected error is caught and wrapped
by ClientWithFallback. The fetching of balance history of next blocks
is aborted which is not desired.

Fix by not treating the error as a connection error in
ClientWithFallback.
2023-05-02 12:07:06 +02:00
Anthony Laibe c84d6fcc35 feat: remove consecutive 2023-03-31 19:22:53 +02:00
Anthony Laibe cd6d22d1c1 chore: re-enable toggle is connected flag 2023-03-31 19:22:53 +02:00
Anthony Laibe 9c33049b4f chore: update connected on global failure 2023-03-31 19:22:53 +02:00
Anthony Laibe 0c8ce79941 feat: returns tokens even when error 2023-03-31 19:22:53 +02:00
Anthony Laibe c9a8ab13c2 fix: set is connected for chain without fallback 2023-03-31 19:22:53 +02:00
Anthony Laibe b2ea01c32e feat: add up event 2023-03-31 19:22:53 +02:00
Anthony Laibe f7690a5d89 feat: add buffer for status event 2023-03-31 19:22:53 +02:00
Anthony Laibe 62220cedee feat: update chunk limit for token 2023-03-31 19:22:53 +02:00
Anthony Laibe ba75bda39e feat: event on error 2023-03-31 19:22:53 +02:00
Anthony Laibe eb4257a904 fix: return on vm error 2023-03-29 18:05:15 +02:00
Anthony Laibe 1189fb882e feat: avoid vm error to retry 2023-03-29 18:05:15 +02:00
Anthony Laibe 60dbc5d44d feat: config optimisation 2023-03-28 15:11:35 +02:00
Anthony Laibe 60e1978bb5 feat: fallback rpc endpoint 2023-02-28 08:43:57 +01:00