Commit Graph
1227 Commits
Author SHA1 Message Date
dependabot[bot]andLee Smet 4f96c9a6d8 Bump serde from 1.0.203 to 1.0.207
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.203 to 1.0.207.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.207)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 10:49:31 +02:00
dependabot[bot]andLee Smet 028b80eafa Bump quinn from 0.11.2 to 0.11.3
Bumps [quinn](https://github.com/quinn-rs/quinn) from 0.11.2 to 0.11.3.
- [Release notes](https://github.com/quinn-rs/quinn/releases)
- [Commits](https://github.com/quinn-rs/quinn/compare/quinn-0.11.2...quinn-0.11.3)

---
updated-dependencies:
- dependency-name: quinn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 10:48:56 +02:00
dependabot[bot]andLee Smet 1a281e9e0e Bump bytes from 1.6.1 to 1.7.1
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.6.1 to 1.7.1.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.6.1...v1.7.1)

---
updated-dependencies:
- dependency-name: bytes
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 10:48:29 +02:00
Florian KlinkandLee Smet cdde7a04e8 bump tracing-logfmt to 0.3.5, enable ansi_logs feature
This will cause to be outputted with color in case the output is a
terminal, but will refrain from doing so if it's run by a service
manager.

Follow-up to #316, unblocked by
https://github.com/EmbarkStudios/tracing-logfmt/pull/16
2024-08-19 10:48:05 +02:00
Lee Smet c5ac0a8cf3 Update CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet dbe1606d57 Add validaton in Router::new to update_workers argument
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet 7a5209d325 Expose flag to configure amount of update workers
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet f5e3d7ba8e Limit mobile to a single update worker for now
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet ba3f8f4e89 Make amount of update workers configurable
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet c4ce92fea0 Return dedicated read guards instead of plain Arc
When getting read-only access, return a read guard which wraps an
arc_swap::Guard, and derefs to the Arc<RouteList>. This allows us to use
the ususually (in our usecase) faster ArcSwap::load instead of
ArcSwap::load_full.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet 70b5c3f301 Remove flume dependency
No longer used since last update

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet f3b7686799 Route updates for same subnet to the same worker
Change from using a SPMC setup with rendez-vous channel to a setup where
each worker has a dedicated queue, and route the update to a worker
based on the hash of the update subnet. This avoids multiple workers
doing updates to the same subnet. While mulitple updates to a subnet
could be queued, and an update packet was only processed by an update
worker once, multiple consecutive updates to the same subnet could
collide, leading to the RCU firing multiple times for an update. In this
scenario, workers are effectively doing useless work, since it has to be
redone anyway. In the metrics of the public peers, we could see that
despite having more workers, the node processed less updates initially.
Local testing confirmed that multipe updates did conflict, and this
change removes those issues.

It should be noted that this could cause update workers to be starved of
updates to process. We will consider this not an issue, since the law of
large numbers suggests that for a large volume, the hash should be
roughly equal. Also note that the hash is derived on the subnet, which
is not user definieable, so not using a cryptographic hash function here
is not an issue. In case there are a low number of updates in the queues
we also don't have a problem, as low volumes are not the inherent
problem here.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet b6d56f12ef Use custom AbortHandle to cancel timers on drop
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet 55b5481024 Add AbortHandle abstraction with cancel-on-drop semantics
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet 20cb088e84 Create guard to avoid useless expiration handle resets
Previously we just reset all expiration timers of all routes after every
update to a subnet. In practice only 1 entry gets updated per time,
which means we did a lot of useless work. This still needs some
improvements, ideally we would abstract away the channel and token.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet 9afb87db0e Use multiple update processor
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Lee Smet c62b655f0b Use ArcSwap for subnet route entries
Instead of holding an Arc over the RouteList, hold an
Arc<ArcSwap<RouteList>>. This acts like an AtomicPtr to the RouteList.
This is mainly usefull for updates to existing subnets, since those
won't need to hold a write lock over the writer for the entire routing
table. In effect, this makes most writes executable in parralel to allow
scaling out the update processor to multiple tasks/threads.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Florian KlinkandLee Smet e4d7be8556 mycelium-api: use log fields
This makes it easier to filter for certain fields.
2024-07-31 12:18:06 +02:00
dependabot[bot]andLee Smet 26b1ffcef2 Bump serde_json from 1.0.120 to 1.0.121 in /myceliumd-private
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.120 to 1.0.121.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.120...v1.0.121)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 11:56:54 +02:00
dependabot[bot]andLee Smet 14a1c6f7f1 Bump serde_json from 1.0.120 to 1.0.121 in /myceliumd
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.120 to 1.0.121.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.120...v1.0.121)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 11:56:23 +02:00
dependabot[bot]andLee Smet 005b8282ef Bump serde_json from 1.0.117 to 1.0.121
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.117 to 1.0.121.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.117...v1.0.121)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 11:02:51 +02:00
dependabot[bot]andLee Smet 774dae1e89 Bump clap from 4.5.9 to 4.5.11 in /myceliumd-private
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.9 to 4.5.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.9...clap_complete-v4.5.11)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 11:02:14 +02:00
dependabot[bot]andLee Smet 698ea2051b Bump tokio from 1.38.1 to 1.39.2 in /myceliumd-private
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.38.1 to 1.39.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.1...tokio-1.39.2)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 11:01:53 +02:00
dependabot[bot]andLee Smet bb83e0de83 Bump rustls from 0.23.11 to 0.23.12
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.11 to 0.23.12.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.23.11...v/0.23.12)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 11:01:25 +02:00
dependabot[bot]andLee Smet d4ec56977c Bump tokio from 1.38.1 to 1.39.2
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.38.1 to 1.39.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.1...tokio-1.39.2)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 11:00:46 +02:00
dependabot[bot]andLee Smet 49cd8e03e5 Bump tokio from 1.38.1 to 1.39.2 in /myceliumd
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.38.1 to 1.39.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.1...tokio-1.39.2)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 10:59:58 +02:00
dependabot[bot]andLee Smet 45de91c4f9 Bump clap from 4.5.9 to 4.5.11 in /myceliumd
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.9 to 4.5.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.9...clap_complete-v4.5.11)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-31 10:59:37 +02:00
Lee Smet 9791af4ea9 Update time crate to v0.3.36
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-29 10:48:13 +02:00
Lee Smet 2c3dd55fe6 Update myceliumd lock file
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-23 13:11:11 +02:00
Lee Smet d091311e93 Bump openssl to v0.10.66
Fixes a security warning

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-23 13:00:28 +02:00
Lee Smet 67819f3564 Demote next-hop changed log to debug lvl
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-23 12:46:52 +02:00
Lee Smet f35eb1eafb Demote route retraction log to debug lvl
When propagating the selected routes, if the route is retracted, don't
use info but rather a debug log.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-23 12:44:57 +02:00
Lee Smet 3d2106fc01 Update myceliumd-private lock file
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-23 12:43:27 +02:00
dependabot[bot]andLee Smet 3e728fd6a1 Bump tokio from 1.38.0 to 1.38.1
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.38.0 to 1.38.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.38.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 12:41:17 +02:00
dependabot[bot]andLee Smet 9505c23680 Bump wintun from 0.4.0 to 0.5.0
Bumps [wintun](https://github.com/nulldotblack/wintun) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/nulldotblack/wintun/releases)
- [Changelog](https://github.com/nulldotblack/wintun/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nulldotblack/wintun/commits)

---
updated-dependencies:
- dependency-name: wintun
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 12:06:05 +02:00
dependabot[bot]andLee Smet be29b38da1 Bump thiserror from 1.0.62 to 1.0.63
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.62 to 1.0.63.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.62...1.0.63)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 12:05:09 +02:00
dependabot[bot]andLee Smet 41aeed9fa0 Bump tokio from 1.38.0 to 1.38.1 in /myceliumd-private
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.38.0 to 1.38.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.38.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 12:04:51 +02:00
dependabot[bot]andLee Smet 1b51255fe6 Bump tokio from 1.38.0 to 1.38.1 in /myceliumd
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.38.0 to 1.38.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.38.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 12:04:30 +02:00
dependabot[bot]andLee Smet 0bb1835b4a Bump openssl from 0.10.64 to 0.10.66 in /myceliumd-private
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.64 to 0.10.66.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.64...openssl-v0.10.66)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-23 12:02:33 +02:00
Lee Smet 7f66fd7117 Update binary lockfiles
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-19 12:20:28 +02:00
dependabot[bot]andLee Smet 151771a261 Bump bytes from 1.6.0 to 1.6.1
Bumps [bytes](https://github.com/tokio-rs/bytes) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/tokio-rs/bytes/releases)
- [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/bytes/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: bytes
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-19 11:49:01 +02:00
dependabot[bot]andLee Smet 6b23640e5e Bump blake3 from 1.5.1 to 1.5.3
Bumps [blake3](https://github.com/BLAKE3-team/BLAKE3) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/BLAKE3-team/BLAKE3/releases)
- [Commits](https://github.com/BLAKE3-team/BLAKE3/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: blake3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-19 11:48:32 +02:00
dependabot[bot]andLee Smet e614e10ba3 Bump clap from 4.5.8 to 4.5.9 in /myceliumd-private
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.8 to 4.5.9.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.8...v4.5.9)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-18 21:07:23 +02:00
dependabot[bot]andLee Smet de6d5b6146 Bump clap from 4.5.8 to 4.5.9 in /myceliumd
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.8 to 4.5.9.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.8...v4.5.9)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-18 21:07:03 +02:00
dependabot[bot]andLee Smet d40727e015 Bump thiserror from 1.0.61 to 1.0.62
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.61 to 1.0.62.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.61...1.0.62)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-18 21:06:40 +02:00
Lee Smet 767060eb8b Add metric for unfeasbile update to unknown subnet
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-17 12:04:36 +02:00
Lee Smet e67a111cd8 Fix debug log indentation
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-17 11:57:19 +02:00
Lee Smet aa8eca71b0 Only notify interested peers for seqno changes
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-17 11:55:06 +02:00
Lee Smet 825ee8e2c9 Use send_update function more
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-17 11:05:47 +02:00
Lee Smet 301102586c Also exit early from update on retractions
If we don't know the subnet, and the update is a retraction, we can also
exit early

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-07-17 11:02:31 +02:00