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

Enabling tracing by usage of opentelemetry #99

Open
wants to merge 30 commits into
base: new-index
Choose a base branch
from

Commits on Nov 6, 2024

  1. Configuration menu
    Copy the full SHA
    bb132ee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    80275bd View commit details
    Browse the repository at this point in the history
  3. Instrumenting functions

    mariusz-reichert authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    f813909 View commit details
    Browse the repository at this point in the history
  4. Make telemetry optional

    mariusz-reichert authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    a5dc40a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    28facfd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    26b006c View commit details
    Browse the repository at this point in the history
  7. Restoring log init

    mariusz-reichert authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    ceeee99 View commit details
    Browse the repository at this point in the history
  8. Optimize and refactor lookup_txos()

    - Avoid unnecessary copying of prev outpoints
    
    - When looking for both mempool and on-chain txos, accumulate the set of
      outpoints that remain to be looked up to avoid re-checking for them
      later again in the found set
    
    - Refactored lookup_txos() to use lookup_txo() internally rather than
      the other way around, which was less efficient
    
    - Lookup txos in mempool first, then on-chain
    
    - ChainQuery::lookup_txos() now returns a Result instead of panicking
      when outpoints are missing
    
    - Removed ChainQuery::lookup_avail_txos() and allow_missing, which are
      no longer neceesary
    shesek authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    9fa1add View commit details
    Browse the repository at this point in the history
  9. nix: add binLiquid for flake.nix

    add binLiquid to the inherit list to enable specific builds
    YusukeShimizu authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    3de782f View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ee5ad54 View commit details
    Browse the repository at this point in the history
  11. introduce benchmarking

    Using criterion so that we don't need nightly to run benchmark.
    
    The "bench" features is also introduced as a way to bench private
    methods via public methods feature gated via this feature.
    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    421730f View commit details
    Browse the repository at this point in the history
  12. Avoid recomputing txids

    on my machine:
    
    add_blocks              time:   [4.7562 ms 4.7754 ms 4.7972 ms]
                            change: [-15.059% -14.650% -14.169%] (p = 0.00 < 0.05)
                            Performance has improved.
    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    6c7a8f6 View commit details
    Browse the repository at this point in the history
  13. Avoid recomputing txid in TxConfRow

    add_blocks              time:   [3.9458 ms 3.9586 ms 3.9717 ms]
                            change: [-17.564% -17.103% -16.660%] (p = 0.00 < 0.05)
                            Performance has improved.
    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    0bed9ca View commit details
    Browse the repository at this point in the history
  14. Avoid recomputing txid in TxRow

    add_blocks              time:   [2.9788 ms 2.9938 ms 3.0101 ms]
                            change: [-24.810% -24.373% -23.897%] (p = 0.00 < 0.05)
                            Performance has improved.
    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    f6f4f08 View commit details
    Browse the repository at this point in the history
  15. upgrade electrumd dep

    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    fa2d058 View commit details
    Browse the repository at this point in the history
  16. upgrade electrum, do tests in nix

    Now on nix env we provide the env vars of the executables needed for
    integration testing, so we can enable tests.
    
    To be coherent with the electrum nix version used, upgrade also the
    autodownloaded one.
    
    Note we have to change a test assertion, it seems electrum behaviour
    changed, upgrading balances before confirmation.
    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    345dd14 View commit details
    Browse the repository at this point in the history
  17. Avoid print logs in tests

    to instead have logs like before use `RUST_LOG=debug cargo test`
    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    7e8b2a0 View commit details
    Browse the repository at this point in the history
  18. print test logs in CI

    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    d98e0d3 View commit details
    Browse the repository at this point in the history
  19. Use electrs as default run

    By doing so simply `cargo run` launch the server, while now it is
    required `cargo run --bin electrs`
    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    3038504 View commit details
    Browse the repository at this point in the history
  20. Flag to enable compaction during initial sync

    While compaction during initial sync makes thing much slower, it may be
    preferred to not require to size the disk the double of the final
    required space.
    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    0122580 View commit details
    Browse the repository at this point in the history
  21. improve logging during initial sync

    it is less interesting to see how many rows are written in the db and
    more interesting knowing the last height indexed
    RCasatta authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    3c3a5fc View commit details
    Browse the repository at this point in the history
  22. Don't use RPC batching with bitcoind

    This actually hurts performance because the batched response has to be
    bueffered on the bitcoind side, as @TheBlueMatt explains at
    romanz#373 (comment)
    
    Instead, send multiple individual RPC requests in parallel using a
    thread pool, with a separate RPC TCP connection for each thread.
    
    Also see romanz#374
    shesek authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    cb5cec0 View commit details
    Browse the repository at this point in the history
  23. Don't store mempool txs before all prevouts are available

    The indexing process was adding transactions into the store so that
    prevouts funded & spent within the same batch could be looked up via
    Mempool::lookup_txos(). If the indexing process later failed for any
    reason, these transactions would remain in the store.
    
    With this change, we instead explicitly look for prevouts funded within
    the same batch, then look for the rest in the chain/mempool indexes and
    fail if any are missing, without keeping the transactions in the store.
    shesek authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    e2ca351 View commit details
    Browse the repository at this point in the history
  24. Continuously attempt to fetch mempool transactions

    Previously, if any of the mempool transactions were not available
    because they were evicted between getting the mempool txids and txs
    themselves, the mempool syncing operation would be aborted and tried
    again from scratch.
    
    With this change, we instead keep whatever transactions we were able to
    fetch, then get the updated list of mempool txids and re-try fetching
    missing ones continuously until we're able to get a full snapshot.
    shesek authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    a83cac6 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    bad4061 View commit details
    Browse the repository at this point in the history
  26. Update logging verbosity

    - Reduce logging level for bitcoind's JSONRPC response errors
    
      These can happen pretty often for missing mempool txs and do not
      warrant warn-level logging. Unexpected RPC errors will bubble up and
      be handled appropriately.
    
    - Add more verbose logging for mempool syncing
    shesek authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    803a699 View commit details
    Browse the repository at this point in the history
  27. Reuse RPC threads and TCP connections

    Keep RPC TCP connections open between sync runs and reuse them,
    to reduce TCP connection initialization overhead.
    shesek authored and m-reichert committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    1f68ab0 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    ea061ce View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    ae7b299 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    d1c9fda View commit details
    Browse the repository at this point in the history