Skip to content
Permalink
Browse files

Interledger RS: Futures 0.3 (#594)

* feat(packet): implement From<Fulfill/Reject> for bytes05::BytesMut

ILP-Packet is built using Bytes 0.4. The Futures 0.3 ecosystem's HTTP crates use Bytes 0.5.
Porting this crate to use Bytes 0.5 is non-trivial due to significant breaking changes in the
Bytes API:

tokio-rs/bytes#350
tokio-rs/bytes#288

# Interledger Service: Futures 0.3 Transition (#596)

* feat(service): upgrade to futures 0.3 and async/await

* feat(service): Box wrapper methods to avoid exponential type blowup

Relevant rust-lang issue: rust-lang/rust#68508

* docs(service): add explanation on IlpResult

* chore(service): remove unused associated type

# Interledger Router: Futures 0.3 Transition (#595)

* feat(router): upgrade to futures 0.3 and async/await

# Interledger ILDCP: Futures 0.3 Transition (#597)

* feat(client): convert client to async/await

* docs(ildcp): enhance docs

* feat(server): make the service async

* test(server): add tests

# Interledger CCP: Futures 0.3 Transition (#598)

* feat(ccp): convert store traits to async/await

* feat(ccp-server): make the ccp server async

* test(ccp-server): make tests async

* chore(routing-table): limit api visibility of table methods

# Interledger BTP: Futures 0.3 Transition  (#599)

* feat(btp): update traits to be async

* refactor(btp/wrapped-ws): refactor WsWrap to a separate file

Ideally, we would want to get rid of it by doing a `StreamExt::map_ok` and `SinkExt::with` to map both WebSocket return types to the same value. We also use `filter_map` to get rid of any errors from the WebSocket. The WsError type has been removed as a result of that.

* feat(btp/client): port to async/await

* feat(btp/server): move to async/await

* feat(btp/service): move service to async/await

* We refactored the service to be more readable. Basically, we split the websocket in a Sink (write) and a Stream (read). We also create a `tx`/`rx` pair per account. The rx receiver gets attached to the sink, meaning any data sent over by the `tx` sender will get forwarded to the sink, which will forward it to the other end of the websocket. Unfortunately, due to being unable to combine the read and write sockets, we have to spawn them separately. This means that we have to remove the hook which cancels the streams.

# Interledger HTTP: Futures 0.3 Transition  (#600)

* feat(http): Update HttpStore trait to futures 0.3 and deserialize_json method

* feat(http): Update HTTP Errors and client

* feat(http): Update HTTP Server

* docs(http): extend http docs

# Interledger Stream: Futures 0.3 Transition  (#601)

* feat(stream): Update Stream server

* feat(stream): Update Stream client

* docs(stream): extend stream docs

* fix(stream): add extra limits to ensure all the pending request futures are thread safe

# Interledger Settlement: Futures 0.3 Transition  (#602)

* feat(settlement/core): Upgrade types and idempotency

* feat(settlement/core): Upgrade engines API Warp interface

* feat(settlement/core): Upgrade Redis backend implementation

* feat(settlement/api): Upgrade the message service

* feat(settlement/api): Upgrade the settlement client

* feat(settlement/api): Upgrade the Settlement API exposed by the node

* chore(settlement): remove need to pass future wrapped in closure

* docs(settlement): extend settlement docs

# Interledger SPSP: Futures 0.3 Transition (#603)

* feat(spsp): move to futures 0.3 and async/await

* docs(spsp): extend spsp docs

* fix(spsp): tighten trait bounds to account for stream changes

# Interledger Service Util: Futures 0.3 Transition  (#604)

* feat(service-util): update validator service

* feat(service-util): update rate limit service

* feat(service-util): update max packet amount service

* feat(service-util): update expiry shortener service

* feat(service-util): update exchange rate service and providers

* feat(service-util): update echo service

* feat(service-util): update balance service

# Interledger API: Futures 0.3 Transition  (#605)

* feat(api): update trait definitions and dependencies

* feat(api): update http retry client

* test(api): migrate test helpers

* feat(api): update node-settings route

* test(api): update node-settings route tests

* feat(api): update accounts route

* test(api): update accounts route tests

* chore(api): add missing doc

# Interledger Store: Futures 0.3 Transition (#606)

* feat(store): Update redis reconnect

* feat(store): Update base redis struct

* feat(store): Update AccountStore trait

* feat(store): Update StreamNotificationsStore trait

* feat(store): Update BalanceStore trait

* feat(store): Update BtpStore trait

* feat(store): Update HttpStore trait

* feat(store): Update NodeStore trait

* feat(store): Update AddressStore trait

* feat(store): Update RouteManagerStore trait

* feat(store): Update RateLimitStore trait

* feat(store): Update IdempotentStore trait

* feat(store): Update SettlementStore trait

* feat(store): Update LeftoversStore trait

* feat(store): Update update_routes

* test(store): convert all tests to tokio::test with async/await

* feat(store): update secrecy/bytes/zeroize

* docs(store): add more docs

# ILP CLI: Futures 0.3 Transition (#607)

* feat(ilp-cli): update CLI to async/await

# ILP Node: Futures 0.3 Transition (#608) (#609)

* test(ilp-node): migrate tests to futures 0.3

* feat(ilp-node): move metrics related files to feature-gated module

* feat(ilp-node): remove deprecated insert account function

* feat(ilp-node): make the node run on async/await

* ci(ilp-node): disable some advisories and update README

* fix(ilp-node): spawn prometheus filter
  • Loading branch information
gakonst committed Jan 29, 2020
1 parent 7485916 commit c4a5364d9c269270801f080ba47be222bfd498d7
Showing with 9,435 additions and 9,143 deletions.
  1. +5 −1 .circleci/config.yml
  2. +777 −640 Cargo.lock
  3. +12 −4 README.md
  4. +3 −3 crates/ilp-cli/Cargo.toml
  5. +4 −1 crates/ilp-cli/src/interpreter.rs
  6. +19 −17 crates/ilp-cli/src/main.rs
  7. +27 −14 crates/ilp-node/Cargo.toml
  8. +0 −186 crates/ilp-node/src/google_pubsub.rs
  9. +187 −0 crates/ilp-node/src/instrumentation/google_pubsub.rs
  10. +82 −0 crates/ilp-node/src/instrumentation/metrics.rs
  11. +10 −0 crates/ilp-node/src/instrumentation/mod.rs
  12. +90 −0 crates/ilp-node/src/instrumentation/prometheus.rs
  13. +22 −25 crates/ilp-node/src/{ → instrumentation}/trace.rs
  14. +2 −9 crates/ilp-node/src/lib.rs
  15. +15 −9 crates/ilp-node/src/main.rs
  16. +0 −82 crates/ilp-node/src/metrics.rs
  17. +252 −311 crates/ilp-node/src/node.rs
  18. +9 −37 crates/ilp-node/src/redis_store.rs
  19. +77 −119 crates/ilp-node/tests/redis/btp.rs
  20. +44 −95 crates/ilp-node/tests/redis/exchange_rates.rs
  21. +75 −107 crates/ilp-node/tests/redis/prometheus.rs
  22. +12 −12 crates/ilp-node/tests/redis/redis_helpers.rs
  23. +5 −1 crates/ilp-node/tests/redis/redis_tests.rs
  24. +54 −71 crates/ilp-node/tests/redis/test_helpers.rs
  25. +144 −217 crates/ilp-node/tests/redis/three_nodes.rs
  26. +12 −8 crates/interledger-api/Cargo.toml
  27. +36 −27 crates/interledger-api/src/http_retry.rs
  28. +98 −39 crates/interledger-api/src/lib.rs
  29. +460 −422 crates/interledger-api/src/routes/accounts.rs
  30. +180 −173 crates/interledger-api/src/routes/node_settings.rs
  31. +57 −80 crates/interledger-api/src/routes/test_helpers.rs
  32. +15 −12 crates/interledger-btp/Cargo.toml
  33. +64 −64 crates/interledger-btp/src/client.rs
  34. +133 −140 crates/interledger-btp/src/lib.rs
  35. +104 −181 crates/interledger-btp/src/server.rs
  36. +254 −271 crates/interledger-btp/src/service.rs
  37. +92 −0 crates/interledger-btp/src/wrapped_ws.rs
  38. +3 −3 crates/interledger-ccp/Cargo.toml
  39. +17 −12 crates/interledger-ccp/src/lib.rs
  40. +20 −2 crates/interledger-ccp/src/packet.rs
  41. +15 −15 crates/interledger-ccp/src/routing_table.rs
  42. +506 −492 crates/interledger-ccp/src/server.rs
  43. +29 −39 crates/interledger-ccp/src/test_helpers.rs
  44. +8 −6 crates/interledger-http/Cargo.toml
  45. +78 −69 crates/interledger-http/src/client.rs
  46. +29 −7 crates/interledger-http/src/error/error_types.rs
  47. +44 −15 crates/interledger-http/src/error/mod.rs
  48. +66 −45 crates/interledger-http/src/lib.rs
  49. +121 −79 crates/interledger-http/src/server.rs
  50. +6 −1 crates/interledger-ildcp/Cargo.toml
  51. +15 −18 crates/interledger-ildcp/src/client.rs
  52. +8 −0 crates/interledger-ildcp/src/packet.rs
  53. +69 −8 crates/interledger-ildcp/src/server.rs
  54. +1 −0 crates/interledger-packet/Cargo.toml
  55. +1 −1 crates/interledger-packet/src/errors.rs
  56. +66 −6 crates/interledger-packet/src/packet.rs
  57. +2 −1 crates/interledger-router/Cargo.toml
  58. +50 −61 crates/interledger-router/src/router.rs
  59. +8 −7 crates/interledger-service-util/Cargo.toml
  60. +104 −92 crates/interledger-service-util/src/balance_service.rs
  61. +43 −45 crates/interledger-service-util/src/echo_service.rs
  62. +39 −39 crates/interledger-service-util/src/exchange_rate_providers/coincap.rs
  63. +41 −33 crates/interledger-service-util/src/exchange_rate_providers/cryptocompare.rs
  64. +2 −0 crates/interledger-service-util/src/exchange_rate_providers/mod.rs
  65. +78 −88 crates/interledger-service-util/src/exchange_rates_service.rs
  66. +18 −14 crates/interledger-service-util/src/expiry_shortener_service.rs
  67. +10 −0 crates/interledger-service-util/src/lib.rs
  68. +12 −10 crates/interledger-service-util/src/max_packet_amount_service.rs
  69. +57 −34 crates/interledger-service-util/src/rate_limit_service.rs
  70. +77 −99 crates/interledger-service-util/src/validator_service.rs
  71. +3 −2 crates/interledger-service/Cargo.toml
  72. +289 −67 crates/interledger-service/src/lib.rs
  73. +17 −12 crates/interledger-service/src/trace.rs
  74. +9 −8 crates/interledger-settlement/Cargo.toml
  75. +49 −29 crates/interledger-settlement/src/api/client.rs
  76. +99 −75 crates/interledger-settlement/src/api/message_service.rs
  77. +4 −1 crates/interledger-settlement/src/api/mod.rs
  78. +342 −299 crates/interledger-settlement/src/api/node_api.rs
  79. +84 −99 crates/interledger-settlement/src/api/test_helpers.rs
  80. +168 −171 crates/interledger-settlement/src/core/backends_common/redis/mod.rs
  81. +1 −1 crates/interledger-settlement/src/core/backends_common/redis/test_helpers/mod.rs
  82. +6 −5 crates/interledger-settlement/src/core/backends_common/redis/test_helpers/redis_helpers.rs
  83. +4 −19 crates/interledger-settlement/src/core/backends_common/redis/test_helpers/store_helpers.rs
  84. +188 −191 crates/interledger-settlement/src/core/engines_api.rs
  85. +107 −111 crates/interledger-settlement/src/core/idempotency.rs
  86. +27 −4 crates/interledger-settlement/src/core/mod.rs
  87. +91 −58 crates/interledger-settlement/src/core/types.rs
  88. +3 −1 crates/interledger-settlement/src/lib.rs
  89. +8 −4 crates/interledger-spsp/Cargo.toml
  90. +36 −36 crates/interledger-spsp/src/client.rs
  91. +7 −0 crates/interledger-spsp/src/lib.rs
  92. +20 −21 crates/interledger-spsp/src/server.rs
  93. +8 −9 crates/interledger-store/Cargo.toml
  94. +59 −14 crates/interledger-store/src/account.rs
  95. +6 −6 crates/interledger-store/src/crypto.rs
  96. +3 −0 crates/interledger-store/src/lib.rs
  97. +1,120 −1,249 crates/interledger-store/src/redis/mod.rs
  98. +60 −60 crates/interledger-store/src/redis/reconnect.rs
  99. +227 −435 crates/interledger-store/tests/redis/accounts_test.rs
  100. +167 −274 crates/interledger-store/tests/redis/balances_test.rs
  101. +67 −51 crates/interledger-store/tests/redis/btp_test.rs
  102. +65 −62 crates/interledger-store/tests/redis/http_test.rs
  103. +68 −86 crates/interledger-store/tests/redis/rate_limiting_test.rs
  104. +18 −23 crates/interledger-store/tests/redis/rates_test.rs
  105. +32 −50 crates/interledger-store/tests/redis/redis_tests.rs
  106. +235 −347 crates/interledger-store/tests/redis/routing_test.rs
  107. +229 −366 crates/interledger-store/tests/redis/settlement_test.rs
  108. +4 −2 crates/interledger-stream/Cargo.toml
  109. +183 −112 crates/interledger-stream/src/client.rs
  110. +15 −0 crates/interledger-stream/src/congestion.rs
  111. +36 −0 crates/interledger-stream/src/crypto.rs
  112. +1 −0 crates/interledger-stream/src/error.rs
  113. +23 −28 crates/interledger-stream/src/lib.rs
  114. +136 −9 crates/interledger-stream/src/packet.rs
  115. +36 −27 crates/interledger-stream/src/server.rs
@@ -44,7 +44,11 @@ jobs:
cargo clippy --all-targets --all-features -- -D warnings
- run:
name: Audit Dependencies
command: cargo audit
# Disable:
# 1. lazy_static advisory: https://github.com/interledger-rs/interledger-rs/issues/588
# 2. http/hyper advisory: outdated http due to yup-oauth2 3.1.1, tungstenite 0.9.2
command: cargo audit --ignore RUSTSEC-2019-0033 --ignore RUSTSEC-2019-0034 --ignore RUSTSEC-2019-0031

test-md:
docker:
- image: circleci/rust

0 comments on commit c4a5364

Please sign in to comment.
You can’t perform that action at this time.