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

test #1858

Draft
wants to merge 59 commits into
base: main
Choose a base branch
from

Commits on Nov 13, 2024

  1. revamped TokenBucket for rate-limiter:

    - parametrized by TimeProvider instead of taking `now: Instant` as argument for `rate_limit`
    - simplified rate_limit method
    - re-aligned tests of TokenBucket
    - TokenBucket can be set to rate_per_second = 0 - no data will be read
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    9e967ae View commit details
    Browse the repository at this point in the history
  2. rate_limiter:

    - seperate RateLimiter implementations for [`tokio::io::AsyncRead`] and [`futures::AsyncRead`]
    - using [`std::sync::Mutex`] for TokenBucket in RateLimiter - it should allow for `global` rate-limit, not just per connection
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    f896b4c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ab74c45 View commit details
    Browse the repository at this point in the history
  4. custom implementation of Transport with rate-limiting (only read) for…

    … substrate's [`sc_client::network::NetworkWorker`]
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    0b17e45 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    03142e2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2eb7b72 View commit details
    Browse the repository at this point in the history
  7. - s/substrate_bit_rate/substrate_network_bit_rate

    - s/alephbft_bit_rate/alephbft_network_bit_rate
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    fc806fc View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    0a41d22 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    eb6dd52 View commit details
    Browse the repository at this point in the history
  10. removed unecessary pub in pub mod transport; in [`finality-aleph/…

    …src/network/build/mod.rs`]
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    b5937b8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d0b0ce5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    d9fdce1 View commit details
    Browse the repository at this point in the history
  13. removed unecessary .into() conversion of [SleepingRateLimiter] in…

    … [`finality-aleph/src/network/build/transport.rs`]
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    6ce1663 View commit details
    Browse the repository at this point in the history
  14. - build_transport moved to [`finality-aleph/src/network/build/trans…

    …port.rs`]
    
    - removed references to [`libp2p`] from [`finality-aleph/src/network/build/mod.rs`]
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    019f9a9 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    0525c17 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    2dd96c2 View commit details
    Browse the repository at this point in the history
  17. simplified TokenBucket algorithm: using only requested field instea…

    …d of `requeste` and `available`. It should be also easier now to transform it into wait-free version.
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    bbe8e8a View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    e69894b View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    3fe9404 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    7e680da View commit details
    Browse the repository at this point in the history
  21. default rate-limit for the sync network is now 1 MiB per connection…

    … - so far only tested locally using 7 instances of aleph-node.
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    563de02 View commit details
    Browse the repository at this point in the history
  22. fmt for rate_limiter.rs

    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    b049419 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    f88d6ac View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    4fa4dc0 View commit details
    Browse the repository at this point in the history
  25. added type alias for `Box<dyn sc_network::config::NotificationService…

    …>` in `network/substrate.rs`
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    33eb851 View commit details
    Browse the repository at this point in the history
  26. s/substrate_network_bit_rate_per_connection/bit_rate_per_connection i…

    …n `finality-aleph/src/network/build/mod.rs`
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    f791005 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    e9cf1de View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    a2f1eff View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    6fdecaa View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    a379641 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    dbeeca2 View commit details
    Browse the repository at this point in the history
  32. - simpler version of the TokenBucket (rate-limiter)

    - added ShareTokenBucket, AsyncTokenBucket and ShredBandwidthManager - used for sharing bandwidth between multiple connections
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    f0dc89c View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    374a45f View commit details
    Browse the repository at this point in the history
  34. - integration of the new SharedTokenBucket with both Substrate-based …

    …and Socket-based networks (sync + alephbft)
    
    - new default values for rate-limiters (sync + alephbft). 768Kib for alephbft and 5Mib for sync. These values were tested using t3a.xlarge aws instances - nodes were not able to handle more.
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    ba07522 View commit details
    Browse the repository at this point in the history
  35. added ALEPHBFT_NETWORK_BIT_RATE SUBSTRATE_NETWORK_BIT_RATE params to …

    …docker/docker_entrypoint.sh to allow configuration of rate-limiting for both sync and alephbft networks
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    ba90a89 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    6c7404f View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    1f5b787 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    b11b80c View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    fc27ed5 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    fa131da View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    c8db058 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    e2e0bb3 View commit details
    Browse the repository at this point in the history
  43. removed no longer necessary types in rate-limiter crate - helpers rel…

    …ated with impls of AsyncRead, etc.
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    0f26764 View commit details
    Browse the repository at this point in the history
  44. Added verbose share() method to SharedRateLimiter (and to other t…

    …ypes in its hierarchy). It is more readable this way - previous version was using `Clone`.
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    8fd9ba9 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    d12abfd View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    ecce82b View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    e9b5076 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    2e1f074 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    fbbc564 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    19a2759 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    3d12e7f View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    f14095d View commit details
    Browse the repository at this point in the history
  53. explit env vars TIMEOUT_MINUTES="5m" FINALIZATION_WAIT=1 <script> for…

    … before and after finalization tests
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    a1727d6 View commit details
    Browse the repository at this point in the history
  54. e2e-tests: finalization test was await expected finalized block + 1…

    … instead of just `expected finalized block`
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    db3d50d View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    c8d4130 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    cf35e5d View commit details
    Browse the repository at this point in the history
  57. halved rate-limit for the sync-network in flooding e2e-test - docker/…

    …docker-compose_network_flooding_test.yml
    fixxxedpoint committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    6e833d1 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    182d692 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    fbe540c View commit details
    Browse the repository at this point in the history