Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(utxo): prioritize electrum connections #1966

Merged
merged 206 commits into from
Oct 25, 2024
Merged

Commits on Aug 26, 2023

  1. stash

    rozhkovdmitrii committed Aug 26, 2023
    Configuration menu
    Copy the full SHA
    bd00a99 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2023

  1. stash

    rozhkovdmitrii committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    a31179a View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2023

  1. save state of being able to be compiled

    rozhkovdmitrii committed Sep 4, 2023
    Configuration menu
    Copy the full SHA
    da4e5f9 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. save state

    rozhkovdmitrii committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    38e3cc4 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. introduce conn_mng guarded state

    rozhkovdmitrii committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    50c8052 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2023

  1. stash

    rozhkovdmitrii committed Sep 10, 2023
    Configuration menu
    Copy the full SHA
    4ba4a1a View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2023

  1. get rid of warnings

    rozhkovdmitrii committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    9466e53 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. pushing secondary connection is implemented

    rozhkovdmitrii committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    ae5ed65 View commit details
    Browse the repository at this point in the history
  2. move connect_to

    rozhkovdmitrii committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    c1bffff View commit details
    Browse the repository at this point in the history
  3. Conn manager works as it was supposed

    rozhkovdmitrii committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    03af8ce View commit details
    Browse the repository at this point in the history
  4. refactor: get get_conn and get_conn_by_address apart

    rozhkovdmitrii committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    b31a9ff View commit details
    Browse the repository at this point in the history
  5. refactor: electrum_request_multi rolled back

    rozhkovdmitrii committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    f325ebf View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2023

  1. feat: introduce conn_mng_policy and start moving parts into the files…

    … of theirs own
    rozhkovdmitrii committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    39a7475 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0e612bb View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2023

  1. feat: stash

    rozhkovdmitrii committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    d5fa172 View commit details
    Browse the repository at this point in the history
  2. feat: multiple conn mng has been simplified

    rozhkovdmitrii committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    e7a10f0 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2023

  1. doc: get rid of typo

    rozhkovdmitrii committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    cfbeea0 View commit details
    Browse the repository at this point in the history
  2. refactor: Bring Priority enum into mm2_rpc::rpc_data

    rozhkovdmitrii committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    99408ce View commit details
    Browse the repository at this point in the history
  3. feat: Provide setting conn_mng_policy during config initialization us…

    …ing the cli
    rozhkovdmitrii committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    de14a3f View commit details
    Browse the repository at this point in the history
  4. refactor: Prefer &str in some places

    rozhkovdmitrii committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    8363353 View commit details
    Browse the repository at this point in the history
  5. feat: implement rotate_servers for conn_mng_multiple

    rozhkovdmitrii committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    04eae35 View commit details
    Browse the repository at this point in the history
  6. get rid of redundant trace

    rozhkovdmitrii committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    48d507c View commit details
    Browse the repository at this point in the history
  7. revert doc comment

    rozhkovdmitrii committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    a193f5d View commit details
    Browse the repository at this point in the history
  8. revert commenting

    rozhkovdmitrii committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    7b98067 View commit details
    Browse the repository at this point in the history
  9. process creating subsystem errors

    rozhkovdmitrii committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    3663716 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2023

  1. Merge branch 'dev' into 1520-prioritize-nodes

    # Conflicts:
    #	mm2src/adex_cli/src/rpc_data.rs
    #	mm2src/adex_cli/src/scenarios/init_mm2_cfg.rs
    #	mm2src/coins/utxo/utxo_builder/utxo_coin_builder.rs
    #	mm2src/coins/z_coin.rs
    rozhkovdmitrii committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    7f10b19 View commit details
    Browse the repository at this point in the history
  2. commit working state

    rozhkovdmitrii committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    4c1a577 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. make wasm version working

    rozhkovdmitrii committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    da4d58d View commit details
    Browse the repository at this point in the history
  2. Get rid of some warnings

    rozhkovdmitrii committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    5686619 View commit details
    Browse the repository at this point in the history
  3. Renaming

    rozhkovdmitrii committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    3534ddb View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2023

  1. refactor: implement duplicate_suspend_timeout and `reset_supend_tim…

    …eout` using the common method `set_suspend_timeout`
    rozhkovdmitrii committed Oct 1, 2023
    Configuration menu
    Copy the full SHA
    d98521f View commit details
    Browse the repository at this point in the history
  2. fix: getting of connecting state

    rozhkovdmitrii committed Oct 1, 2023
    Configuration menu
    Copy the full SHA
    9031c9f View commit details
    Browse the repository at this point in the history
  3. refactor: spit and polish

    rozhkovdmitrii committed Oct 1, 2023
    Configuration menu
    Copy the full SHA
    fa25b6f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6500dbd View commit details
    Browse the repository at this point in the history
  5. refactor: bring ConnMngTrait into separate file

    rozhkovdmitrii committed Oct 1, 2023
    Configuration menu
    Copy the full SHA
    41c1872 View commit details
    Browse the repository at this point in the history
  6. refactor: introduce ConnMngError

    rozhkovdmitrii committed Oct 1, 2023
    Configuration menu
    Copy the full SHA
    22116e1 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2023

  1. refactor: rollback some changes

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0d09323 View commit details
    Browse the repository at this point in the history
  2. refactor: rollback some changes

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    9d045ef View commit details
    Browse the repository at this point in the history
  3. Revert "refactor: rollback some changes"

    This reverts commit 9d045ef.
    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    4fce08b View commit details
    Browse the repository at this point in the history
  4. refactor: rollback some changes

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    95bf9fa View commit details
    Browse the repository at this point in the history
  5. refactor: rollback some changes

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    2373174 View commit details
    Browse the repository at this point in the history
  6. refactor: spit and polish

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    9608966 View commit details
    Browse the repository at this point in the history
  7. refactor: spit and polish

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    d05347d View commit details
    Browse the repository at this point in the history
  8. refactor: spit and polish

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    291d901 View commit details
    Browse the repository at this point in the history
  9. refactor: spit and polish

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    5e51798 View commit details
    Browse the repository at this point in the history
  10. refactor: spit and polish

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    5b23e37 View commit details
    Browse the repository at this point in the history
  11. refactor: spit and polish

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    eb82125 View commit details
    Browse the repository at this point in the history
  12. refactor: spit and polish

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    3e98a42 View commit details
    Browse the repository at this point in the history
  13. refactor: spit and polish

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    5663668 View commit details
    Browse the repository at this point in the history
  14. refactor: spit and polish

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    79e6850 View commit details
    Browse the repository at this point in the history
  15. refactor: spit and polish

    rozhkovdmitrii committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    0e10bcb View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. Merge branch 'dev' into 1520-prioritize-nodes

    # Conflicts:
    #	mm2src/adex_cli/Cargo.lock
    #	mm2src/coins/utxo.rs
    #	mm2src/coins/utxo/rpc_clients.rs
    #	mm2src/coins/utxo/utxo_builder/utxo_coin_builder.rs
    #	mm2src/coins/utxo/utxo_tests.rs
    #	mm2src/coins/z_coin.rs
    borngraced committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    6f96d6e View commit details
    Browse the repository at this point in the history
  2. fix merge conflicts

    borngraced committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    c630ee0 View commit details
    Browse the repository at this point in the history
  3. fix wasm clippy warnings

    borngraced committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    71d9664 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b2434da View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2024

  1. merge ConnectionManagerSelectiveQueue with ConnectionManagerSelective…

    …State and other minor changes
    borngraced committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    935bee5 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2024

  1. Configuration menu
    Copy the full SHA
    2097e53 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Merge remote-tracking branch 'origin/dev' into 1520-prioritize-nodes

    # Conflicts:
    #	mm2src/coins/utxo/rpc_clients.rs
    #	mm2src/coins/utxo/utxo_balance_events.rs
    borngraced committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    0ed6c3a View commit details
    Browse the repository at this point in the history
  2. fix merge conflicts

    borngraced committed Feb 12, 2024
    Configuration menu
    Copy the full SHA
    e6585ee View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2024

  1. Configuration menu
    Copy the full SHA
    9cc0378 View commit details
    Browse the repository at this point in the history
  2. rename guarded to state_guard and move connect impl to impl trait for…

    … ConnectionManagerMultiple
    borngraced committed Feb 15, 2024
    Configuration menu
    Copy the full SHA
    0e59572 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e6f2ba3 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. Configuration menu
    Copy the full SHA
    5eede71 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    350a992 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d24da3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7b7110d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    10ff5c8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ef6ff41 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2024

  1. Refactor ConnectionManagerMultiple & ConnectionManagerSelective

    This commit refactors `multiple` and `selective` connection managers.
    
    Now the inner impl managers' `Arc` implements `ConnectionManagerTrait`
    while the outer wrapper only implements `Deref` to return the `Arc`.
    
    Also some methods that only used the `state: MutexGuard` are now moved
    to `ConnectionManager[Multiple|Selective]State`.
    mariocynicys committed Feb 17, 2024
    Configuration menu
    Copy the full SHA
    f87278d View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2024

  1. fix merge conflicts

    borngraced committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    61af931 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. Configuration menu
    Copy the full SHA
    a1d0a9a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ebb5394 View commit details
    Browse the repository at this point in the history
  3. remove deadcode

    mariocynicys committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    9bed9d1 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2024

  1. stashing

    mariocynicys committed Apr 18, 2024
    Configuration menu
    Copy the full SHA
    5666936 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2024

  1. stashing

    mariocynicys committed Apr 19, 2024
    Configuration menu
    Copy the full SHA
    426037c View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2024

  1. stashing

    mariocynicys committed Apr 21, 2024
    Configuration menu
    Copy the full SHA
    94a90aa View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2024

  1. Configuration menu
    Copy the full SHA
    20c70bf View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2024

  1. stashing

    mariocynicys committed Apr 30, 2024
    Configuration menu
    Copy the full SHA
    0471735 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2024

  1. stashing

    mariocynicys committed May 5, 2024
    Configuration menu
    Copy the full SHA
    bf3781f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2129a8f View commit details
    Browse the repository at this point in the history

Commits on May 13, 2024

  1. atomically start connections

    to avoid 2 connections starting in close proximity and cancelling each other (rare race condition)
    
    this essentially merges the `is_connected` & setting the tx end of the conneciton in one guard
    mariocynicys committed May 13, 2024
    Configuration menu
    Copy the full SHA
    dafff72 View commit details
    Browse the repository at this point in the history
  2. fix wasm build

    mariocynicys committed May 13, 2024
    Configuration menu
    Copy the full SHA
    a9a56fe View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7cffd67 View commit details
    Browse the repository at this point in the history
  4. add back scripthash notification sender since it's used to send Subsc…

    …ribeToAddresses notifications
    
    unfortunately :(
    mariocynicys committed May 13, 2024
    Configuration menu
    Copy the full SHA
    1b49971 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2024

  1. multiple connection manager

    still needs refactoring for the tons of warnings there
    
    also selective connection manager is missing
    mariocynicys committed May 17, 2024
    Configuration menu
    Copy the full SHA
    af03de3 View commit details
    Browse the repository at this point in the history
  2. record a fixme

    mariocynicys committed May 17, 2024
    Configuration menu
    Copy the full SHA
    b296728 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. fix lint issues

    mariocynicys committed May 20, 2024
    Configuration menu
    Copy the full SHA
    5a06371 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2024

  1. Configuration menu
    Copy the full SHA
    85c3609 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c2f4488 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dd7cb96 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6bb5e4f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2d72df4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d31f648 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d8c11b9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5f91ca5 View commit details
    Browse the repository at this point in the history

Commits on May 23, 2024

  1. bound establish_connecion_loop method with a timeout

    the total time this method might take is at most the timeout decided in the connection settings, which is the time needed to establish the connection and query for the version
    mariocynicys committed May 23, 2024
    Configuration menu
    Copy the full SHA
    518819b View commit details
    Browse the repository at this point in the history
  2. refactor constant names

    mariocynicys committed May 23, 2024
    Configuration menu
    Copy the full SHA
    2be78df View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dfc4bc7 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2024

  1. Configuration menu
    Copy the full SHA
    769304b View commit details
    Browse the repository at this point in the history

Commits on May 30, 2024

  1. fix some bugs and fixmes

    mariocynicys committed May 30, 2024
    Configuration menu
    Copy the full SHA
    dc47f67 View commit details
    Browse the repository at this point in the history
  2. temp fix: leak the abortable system to keep its children systems alive

    the abortable system that created the children abortable systems for the connections were dropped and that resulted in a non functioning connection abortable systems
    mariocynicys committed May 30, 2024
    Configuration menu
    Copy the full SHA
    cce2ec4 View commit details
    Browse the repository at this point in the history
  3. remove panic

    mariocynicys committed May 30, 2024
    Configuration menu
    Copy the full SHA
    4c76491 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ed6801d View commit details
    Browse the repository at this point in the history

Commits on May 31, 2024

  1. don't query for the version again

    electrum servers don't like it when the same connection query for the vesion again, they expect us to store the version and never ask about it again
    mariocynicys committed May 31, 2024
    Configuration menu
    Copy the full SHA
    3d9680a View commit details
    Browse the repository at this point in the history
  2. don't create an extra child subsystem, use the parent directly

    the middle subsystem wasn't used anywhere, thus was dropped and caused all the connection subsystems to get aborted.
    mariocynicys committed May 31, 2024
    Configuration menu
    Copy the full SHA
    229a809 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1e0e162 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8d9ac1c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4c8d834 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2024

  1. fix wasm issues

    mariocynicys committed Jun 2, 2024
    Configuration menu
    Copy the full SHA
    732e00e View commit details
    Browse the repository at this point in the history

Commits on Jun 3, 2024

  1. merge with origin/dev

    mariocynicys committed Jun 3, 2024
    Configuration menu
    Copy the full SHA
    3185860 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ffa086d View commit details
    Browse the repository at this point in the history

Commits on Jun 4, 2024

  1. Configuration menu
    Copy the full SHA
    d908ec6 View commit details
    Browse the repository at this point in the history
  2. adapt test_unavailable_electrum_proto_version to the new design

    the new design doesn't break the coin initilization if the electrum servers fail for whatever reason.
    Create the coin and make sure that each server fails version check when queried
    mariocynicys committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    eddb9ee View commit details
    Browse the repository at this point in the history
  3. fmt

    mariocynicys committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    c4592fc View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2024

  1. Configuration menu
    Copy the full SHA
    f7297b5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    84fc19d View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2024

  1. Configuration menu
    Copy the full SHA
    76b2f68 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2024

  1. Configuration menu
    Copy the full SHA
    ef4f458 View commit details
    Browse the repository at this point in the history
  2. use hashset instead of vec for the subs list

    execution-wise this should make no difference (we won't ever get the address twice
    and event if we did it should be a benign side-effect), but it makes the code
    logically easier to understand
    mariocynicys committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    a447eff View commit details
    Browse the repository at this point in the history
  3. package disconnected_at and next_suspend_time in one mutex

    These two pieces of info are always used & updated together, put them
    into a single mutex.
    mariocynicys committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    0103f0b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6dab399 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d81bd8b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8ae8d02 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    220d70b View commit details
    Browse the repository at this point in the history
  8. remove fixmes

    we are trying to be easy on the servers anyways, so avoid unrecoverable labelling when possible
    mariocynicys committed Jun 28, 2024
    Configuration menu
    Copy the full SHA
    54acd8e View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. Configuration menu
    Copy the full SHA
    d9549ab View commit details
    Browse the repository at this point in the history
  2. adex cli: use closer versions in cargo toml

    to avoid duplications as much as possible
    mariocynicys committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    260192e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5b92281 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0eedd97 View commit details
    Browse the repository at this point in the history
  5. merge with origin/dev

    mariocynicys committed Jul 1, 2024
    Configuration menu
    Copy the full SHA
    0395e2c View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2024

  1. Configuration menu
    Copy the full SHA
    8513b37 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. merge with origin/dev

    mariocynicys committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    62993a0 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2024

  1. Configuration menu
    Copy the full SHA
    33075e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    064a12d View commit details
    Browse the repository at this point in the history
  3. add important note

    mariocynicys committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    ae04b68 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bf01ba0 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2024

  1. endlessly try electrum_request_multi

    also parallelize it so the overall timeout is reducued (ELECTRUM_REQUEST_TIMEOUT instead of N * ELECTRUM_REQUEST_TIMEOUT, assuming at least one server is actually working)
    mariocynicys committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    21b0799 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22fb7ff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    484143a View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. trigger disconnecting a connection if it errored

    this helps refreshing and trying new connections in selective mode
    mariocynicys committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    6d71546 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2024

  1. Configuration menu
    Copy the full SHA
    6c48485 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4b2464c View commit details
    Browse the repository at this point in the history
  3. some macros to simplify if-let & let-else patterns

    let-else isn't formatabble by cargo fmt and the `Some()` around the variable kind of reduces the importance of it.
    we also execute some important code inside the if-let block but it doesn't look that important since it is inside an if and we continue normally otherwise.
    
    The point is, most of these options should never be None (e.g. `connections().get(address)`), we can either panic there or just ignore
    the error. Ignoring it is safer but fills the code with a lot of if-let let-else patterns.
    
    The added macros makes the refactor somewhat similar to `?` in `ret_option()?`
    mariocynicys committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    1a0058c View commit details
    Browse the repository at this point in the history
  4. only aquire write lock when needed

    over the maintained connections set.
    One could find the change of quesstion would benifit us with a fewer write lock acquisitions when we have a low max_connected value with a lot of very robust servers. The previous code would have acquired the lock periodically for each checked server
    mariocynicys committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    7a458e3 View commit details
    Browse the repository at this point in the history
  5. try connections sequentially on the background task

    this takes more time but respects the number of connections open at a single time by mm2.
    trying all the connections in parallel can cause a lot of open file descriptors on mobile devices
    mariocynicys committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    ced724b View commit details
    Browse the repository at this point in the history
  6. remove trigger_disconnect

    I used trigger disconnect because I thought we don't have access to the event handlers to notify them, so the simplist way then was to just let the connection disconnect on its own when the sender is taken out (in trigger_disconnect). but since we have the event_handlers already in electurm client, we can just disconnect right away and call them
    mariocynicys committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    21fda09 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2024

  1. resolve fixme: version negotiation logic is correct

    looks like after the refactor i miss understood what `negotiate_version` flag is for.
    it's for running a version negotiation actually, i.e. not fail if the versions doesn't match (we will accept the server even though it has a bad version).
    mariocynicys committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    09f34ca View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7e5e8dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4809812 View commit details
    Browse the repository at this point in the history
  4. revert to trying connections in parallel in background task (to some …

    …extent)
    
    so looks like trying connections sequntially introduced a long wait time till we got a valid working connection. this happens when the list of electrums are bunch of faulty ones and the last of them is working fine.
    this didn't hurt the correctness in anyway, but made it kind of slow to bootstrap (finding the first working connection), and since tests doesn't try requests forever (forever-waiting until the request is successful is only used on cfg(not(test)) environments), this meant a lot of tests will fail to find a working connection soon enough and will panic on the first request.
    we might want to find a strong fix for this.
    In this commit, however, the fix to mitigate this issue is to re-intoduce concurrency to the point that the number of open connections at any time is less than or equal `max_connected` specified in the enable request. For multiple policy (min=1, max=len(servers)), this is just trying all the servers concurrently so that's fast, the multiple policy is the one used by default and in tests
    mariocynicys committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    f836f04 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    678601f View commit details
    Browse the repository at this point in the history
  6. merge with origin/dev

    mariocynicys committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    a6e8d69 View commit details
    Browse the repository at this point in the history
  7. fix the qrc20 issue on CI

    So the issue was, we didn't have the = when comparing the number of maintained connections with min_connected.
    But since we never maintain more then min_connected, this means the check without the = will always be false thus skiping the sleep code in the background task.
    The background task was basically looping non-stop and degrading the performance of all other async tasks running on the runtime.
    Very slow tests led to slow connections and timeouting everytime.
    mariocynicys committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    6945ad1 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2024

  1. Configuration menu
    Copy the full SHA
    48f5ddd View commit details
    Browse the repository at this point in the history
  2. refactor expirable map

    This refactors expirable map to make it so that deleting expired entries
    is cheap (not looping over the whole map, but looping only over the
    known expired entries).
    
    This increases the memory requirements though because the key of type
    `K` is now cloned an extra time to be stored in the inverse map.
    
    A solution for the potentially expensive cloning is to wrap the key in
    an Arc, but, looking at the usage of expirable map, it looks like most
    (actually all) of the times, the keys are integer IDs, which are cheaply
    cloned/copied. So leaving this as a direct clone for now until the need
    arises.
    mariocynicys committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    62d26c7 View commit details
    Browse the repository at this point in the history
  3. let the responses map in eletrum connections be expriable

    otherwise responses which timeout are never deleted :O
    
    Also we now send electrum_request_multi in parallel, the first response
    is considered and the others are discarded. This can make up end in a
    case where one connection had the response notifier registered in the
    responses map but the request was never sent, thus a response will never
    be received, thus this entry will never be removed.
    mariocynicys committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    4a16d78 View commit details
    Browse the repository at this point in the history
  4. make wait_till_connected test-only

    not needed in non-test environments since these wait forever till the request is resolved
    mariocynicys committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    ea0cbe3 View commit details
    Browse the repository at this point in the history
  5. split the connection manager into multiple impl blocks

    for organization
    mariocynicys committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    c37cc9b View commit details
    Browse the repository at this point in the history
  6. let connections map inside the manager be dynaimc

    so we can add and remove connections in runtime
    mariocynicys committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    8fd92df View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    122cf7d View commit details
    Browse the repository at this point in the history
  8. resolve the last fixmes

    nothing was changed. seems like the header loop is ran forever but only the notifier is short lived
    mariocynicys committed Sep 4, 2024
    Configuration menu
    Copy the full SHA
    bf3608d View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. simplfying establish_connection_loop method as much as possible

    splitting the big function into smaller ones and sharing the sharable parts between native and wasm
    mariocynicys committed Sep 5, 2024
    Configuration menu
    Copy the full SHA
    3fb958b View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. don't retry forever, and also try all connections when the active one…

    …s fail
    
    this is kind of doing the connection managers work as a last resort fail
    safe mechanisim when electrum request fails, that is, we establish all
    connections sequentially and try them.
    
    things we need to consider:
    - we prolly need to introduce wait_till_connected back (now that we
      don't wait forever)
    - we don't disconnect any of the established connections, they will
      disconnect automatically when not used for a long time, but for this
      long time, we might break the `max_connected` rule.
    mariocynicys committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    69db230 View commit details
    Browse the repository at this point in the history
  2. properly respect the max_connected threshold

    let the background thread of the connection manager respect the
    `max_connected` threshold (not entirely really, we can reach up to
    `max_connected + 1`).
    
    This is done by refactoring the connection establishment to not
    establish all connections but only connections that we know we will
    maintain for sure. This also is lighter overall than the old approach.
    but it's also slower since connections are tried sequentially, we don't
    need the speed here anyways since if an electrum request fails we fail
    back to try all connections which is a logic that isn't controlled by
    the connection manager in any way.
    mariocynicys committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    eead6a8 View commit details
    Browse the repository at this point in the history
  3. suggestion from omar - 1

    mariocynicys committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    ffd2052 View commit details
    Browse the repository at this point in the history
  4. suggestion from omar - 2 - (un)maintain methods

    removed write_maintained_connections and added maintain & unmaintain methods.
    mariocynicys committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    f9866b1 View commit details
    Browse the repository at this point in the history
  5. testing if this would fix tests

    disconnecting like that broke a lot of requests, we probably shouldn't
    disconnect from some thread since we don't know if another thread is
    holding the connection to use it
    mariocynicys committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    d98fd21 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Revert "testing if this would fix tests"

    This reverts commit d98fd21.
    This should make a lot of tests fail again, proving we shouldn't
    randomly just disconnect a connection from different threads.
    mariocynicys committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    ff8833a View commit details
    Browse the repository at this point in the history
  2. bug: don't disconnect the connection we want to connect while version…

    … checking
    
    when doing version checking, the connection isn't marked as maintained yet, this means flagging the not needed will disconnect it immediately.
    a fix for this is to keep a state of `Connecting` for example to avoid disconnecting a connection which is in progress, eaiser solution is to not ask for disconnection for connections that we didn't force connect.
    so only if we caused the connection to connect will we call for it to be not needed anymore
    mariocynicys committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    df2fdcc View commit details
    Browse the repository at this point in the history
  3. don't disconnect immediately

    for the fall back case. But delegate whether to disconnect or not to the connection manager.
    this helps with concurrent requests disconnecting for no reason (so no error) and breaking other requests
    mariocynicys committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    0971d9c View commit details
    Browse the repository at this point in the history
  4. abandon the wait_till_connected test-only method

    this was used to make sure the background task have found a working connection by the time we start querying electrum requests. we don't need this now though. because if there are no working/maintained connections we fall back to using any/all other connections (and we establish the connection inline first)
    mariocynicys committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    fe90391 View commit details
    Browse the repository at this point in the history
  5. fix test_electrum_rpc_client_error

    the test was failing because the expected request id was 0 and not 1. this is becasue the server version request was constructed AFTER the get verbose transaction request. this might not be always the case, so the background thread might in some (rare) instances be fast enough and establish the connection and query for version before get verbose transaction is called, so the id 0 is reserved then for the server version query.
    
    lets just remove the id part in the expected string as we don't really care about it
    mariocynicys committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    69a6810 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9bda46b View commit details
    Browse the repository at this point in the history
  7. yield in both test and non-test environment

    to avoid a potential starvation due to a potential busy waiting loop
    mariocynicys committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    2c61c61 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    25b174a View commit details
    Browse the repository at this point in the history
  9. merge with origin/dev

    mariocynicys committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    b546bbd View commit details
    Browse the repository at this point in the history
  10. add a todo regarding abortablequeue abort vs finish

    This currently isn't really problamatic, but if re-used later could have a hard to debug nightmares
    the solution here would be to totally order both operations favoring abortion over finishing. In `AbortableQueue` we would need to realize this by checking the future ID in question and not call `on_future_finished` if it's already aborted
    mariocynicys committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    49564b3 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2024

  1. patch on_future_finished to not mark id as finished if it was aborted

    this was the side effect we had (described in the previous commit) in abortable queue. on_future_finished was called AFTER the abortable queue has been fully cleared and reset. We need to make sure first that an abort handle the future actually exists in the abort handlers vector and that the future is aborted (i.e. the same future ID wasn't used to run a new future that is still running).
    mariocynicys committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    4c2a5e0 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. add a todo

    mariocynicys committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    2f9c568 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2024

  1. fix test_one_unavailable_electrum_proto_version

    version mismatch was labeled as temporary error by mistake.
    note that when electrum replys successfully for the version query this means there is no version mismatch and we don't need to check for that
    mariocynicys committed Oct 3, 2024
    Configuration menu
    Copy the full SHA
    417d054 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. Configuration menu
    Copy the full SHA
    b791204 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    989ec9e View commit details
    Browse the repository at this point in the history
  3. simplyfy timeouting - handle timeout in establish_connection_loop only

    don't let child helper funcs know about the timeout
    mariocynicys committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    e0e7708 View commit details
    Browse the repository at this point in the history
  4. simplify erroring: handle disconnection in establish_connection_loop …

    …only
    
    let the other helper methods just return the error but not disconnect the connection
    mariocynicys committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    db93005 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d2906ff View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1e92dfd View commit details
    Browse the repository at this point in the history
  7. actually validate min & max connected

    instead of just constructing a string and dumping it into the sea :)
    mariocynicys committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    fc3f172 View commit details
    Browse the repository at this point in the history
  8. merge with origin/dev

    issued yet to be fixed
    mariocynicys committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    dc8a84e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    c93bcb9 View commit details
    Browse the repository at this point in the history
  10. reduce the btree key of json bach request to its hash

    which makes it susbtible to hash conflicts so this might not be a good idea
    mariocynicys committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    be219ee View commit details
    Browse the repository at this point in the history
  11. use a deterministically-selected rpc_id from the batch

    and use it as a batch_id
    mariocynicys committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    556b65f View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2024

  1. Configuration menu
    Copy the full SHA
    72b3ab9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ee7f6a4 View commit details
    Browse the repository at this point in the history
  3. label version mismatch only when the electrum server replys

    to us with a json rpc error. we could have encountered other errors like timeouts and transport errors in the version queries, such errors shouldn't be version mismatch as we never knew the server's reply
    mariocynicys committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    e99fd25 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a2e4348 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    decacb8 View commit details
    Browse the repository at this point in the history
  6. disable the coin if the balance query fails

    otherwise the GUI will get an error and think the coin wasn't enabled successfuly but it was. so disabling the coin to keep consistent with the GUIs expectionations.
    one solution would be to omit the balance field if balance querying fialed, but we would need the GUI to account for that then
    mariocynicys committed Oct 7, 2024
    Configuration menu
    Copy the full SHA
    89bad4f View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

  1. run rpc futures in a tokio thread till completion

    when ran directly inside hyper's service function, it might get aborted mid-way when a client disconnects, leaving the future in complete.
    
    this is an issue as we might have some code that need to be executed atomically inside any part of the code base that could be triggered by an RPC request. if the client disconnects, such a function will abort on the next await call, leaving us with non-atomic state (e.g. partial update for a map and its inverse).
    mariocynicys committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    5e38086 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    643d1f3 View commit details
    Browse the repository at this point in the history
  3. cap the electrum request to 5s

    the balance query by default could take up to 40s:
    20s to establish a connnection with an electrum server &
    20s to perform the electrum request.
    
    the old electrum rpc would timeout in 5s if the electrum servers aren't responsive, and it seems like the desktop GUI accounted only for such timeout. let's use 5s timeout internally for the electrum request to make sure we are compatible with GUIs.
    note that this only caps the timeout for the enable request to 5s, but in normal operations the other configured timeouts are used
    mariocynicys committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    2060704 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2024

  1. mitigate the noisy logs from the endless retries

    don't log (trivial) errors inside establish connection loop, so no connection establishment error no version errors no timeout errors.
    log these errors instead from the manager, but if the manager is in panic mode we don't want to log no further.
    also don't pre-log the 'connected securely/not-securely' message, only print it when the connection is final and ready to be used.
    mariocynicys committed Oct 10, 2024
    Configuration menu
    Copy the full SHA
    d5b2ef3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    00b71c3 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2024

  1. convert async mutexs to sync ones

    this carried over from the usage of these fields in past impl. there is no reason to have these mutexes async. sync mutexs are better for performance.
    one mutex is left async though (establishing_connection) to not cpu-block other threads when they are waiting on the same connection to be established.
    mariocynicys committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    cae9842 View commit details
    Browse the repository at this point in the history
  2. parallelize the request when all connections fail

    as a speed up
    mariocynicys committed Oct 16, 2024
    Configuration menu
    Copy the full SHA
    596cba0 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2024

  1. review(sami): let max & min connected be usize

    and avoid lots of conversions
    mariocynicys committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    2457b96 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2024

  1. Configuration menu
    Copy the full SHA
    24a64e3 View commit details
    Browse the repository at this point in the history