fix(event-streaming): initial addresses registration in utxo balance streaming#2431
Merged
fix(event-streaming): initial addresses registration in utxo balance streaming#2431
Conversation
…treamer isn't enabled check utxo_prepare_addresses_for_balance_stream_if_enabled for context. we should not error when the streamer isn't enabled. we now silently proceed.
mariocynicys
commented
Apr 29, 2025
borngraced
suggested changes
Apr 30, 2025
| .add_subscriptions(&scripthash_to_address_map) | ||
| .await; | ||
| // Convert the hashmap back to btreemap. | ||
| Ok(scripthash_to_address_map.into_iter().map(|(k, v)| (k, v)).collect()) |
There was a problem hiding this comment.
Suggested change
| Ok(scripthash_to_address_map.into_iter().map(|(k, v)| (k, v)).collect()) | |
| Ok(scripthash_to_address_map.into_iter().collect()) |
Collaborator
Author
|
@smk762 this should fix the utxo balance streaming issue. would be nice if u could also test the latency of the enable response (meant enable of the balance streamer - but not needed anymore anyways) for a large HD wallet (i.e. that has many addresses). |
smk762
previously approved these changes
May 1, 2025
smk762
left a comment
There was a problem hiding this comment.
Confirmed working ✔️
Activation of a wallet with "min_addresses_number": 50 in request returned a status of Ok in seconds (completed on second status request after init).
Balance changes across different addresses were communicated by the stream as expected. LGTM, thanks!
shamardy
reviewed
May 1, 2025
shamardy
reviewed
May 1, 2025
shamardy
reviewed
May 1, 2025
shamardy
approved these changes
May 1, 2025
Collaborator
|
@borngraced do you have any more comments or upcoming review for this PR? |
dimxy
pushed a commit
to dimxy/komodo-defi-framework
that referenced
this pull request
May 13, 2025
* dev: (26 commits) chore(deps): remove base58 and replace it completely with bs58 (GLEECBTC#2427) feat(tron): initial groundwork for full TRON integration (GLEECBTC#2425) fix(UTXO): improve tx fee calculation and min relay fee handling (GLEECBTC#2316) deps(timed-map): bump to 1.3.1 (GLEECBTC#2413) improvement(tendermint): safer IBC channel handler (GLEECBTC#2298) chore(release): complete v2.4.0-beta changelogs (GLEECBTC#2436) fix(event-streaming): initial addresses registration in utxo balance streaming (GLEECBTC#2431) improvement(watchers): re-write use-watchers handling (GLEECBTC#2430) fix(evm): make withdraw_nft work in HD mode (GLEECBTC#2424) feat(taproot): support parsing taproot output address types chore(RPC): use consistent param name for QTUM delegation (GLEECBTC#2419) fix(makerbot): add LiveCoinWatch price provider (GLEECBTC#2416) chore(release): add changelog entries for v2.4.0-beta (GLEECBTC#2415) fix(wallets): prevent path traversal in `wallet_file_path` and update file extension (GLEECBTC#2400) fix(nft): make `update_nft` work with hd wallets using the enabled address (GLEECBTC#2386) fix(wasm): unify error handling for mm2_main (GLEECBTC#2389) fix(tx-history): token information and query (GLEECBTC#2404) test(electrums): fix failing test_one_unavailable_electrum_proto_version (GLEECBTC#2412) improvement(network): remove static IPs from seed lists (GLEECBTC#2407) improvement(best-orders): return an rpc error when we can't find best orders (GLEECBTC#2318) ...
dimxy
pushed a commit
that referenced
this pull request
May 28, 2025
* dev: (29 commits) fix(p2pk): validate expected pubkey correctly for p2pk inputs (#2408) chore(docs): update old urls referencing atomicdex or old docs pages (#2428) improvement(p2p): remove hardcoded seeds (#2439) fix(evm-api): find enabled erc20 token using platform ticker (#2445) chore(docs): add DeepWiki badge to README (#2463) chore(core): organize deps using workspace.dependencies (#2449) feat(db-arch): more dbdir to address_dir replacements (#2398) chore(build-artifacts): remove duplicated mm2 build artifacts (#2448) feat(pubkey-banning): expirable bans (#2455) fix(eth-balance-events): serialize eth address using AddrToString (#2440) chore(deps): remove base58 and replace it completely with bs58 (#2427) feat(tron): initial groundwork for full TRON integration (#2425) fix(UTXO): improve tx fee calculation and min relay fee handling (#2316) deps(timed-map): bump to 1.3.1 (#2413) improvement(tendermint): safer IBC channel handler (#2298) chore(release): complete v2.4.0-beta changelogs (#2436) fix(event-streaming): initial addresses registration in utxo balance streaming (#2431) improvement(watchers): re-write use-watchers handling (#2430) fix(evm): make withdraw_nft work in HD mode (#2424) feat(taproot): support parsing taproot output address types ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We need to initially register the addresses we wanna get balance notification for. We used to do that in the past at coin enablement time (since event streaming config was static and doesn't change at runtime), that was removed since it doesn't make sense with runtime enabled/disabled streaming. But was never replaced with the appropriate logic to register these addresses once the streamer was enabled.
This PR register our addresses with the event streamer on initialization so it could track them.