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

Merge mysten_infra into sui repo #5955

Merged
merged 291 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
291 commits
Select commit Hold shift + click to select a range
5ce3d82
ci: move cargo-udeps to nightly
huitseeker May 27, 2022
9d37aab
ci: use nextest to run rust tests
huitseeker May 27, 2022
414ae38
tracing: improve default and testing subscribers (MystenLabs/mysten-i…
bmwill May 30, 2022
9f48fb3
chore: update CODEOWNERS
huitseeker May 31, 2022
d6b1f2a
tracing: send logging to stderr instead of stdout by default
bmwill Jun 2, 2022
9fa3ac5
tracing: enable configuration of tracing via env vars
bmwill Jun 3, 2022
d8ba783
network: fix build on windows
bmwill Jun 22, 2022
2c36711
ci: run tests on windows
bmwill Jun 23, 2022
44403e0
network: fix warnings on windows
bmwill Jun 23, 2022
8240310
Remove colors from log output when stdout is not tty; remove useless …
mystenmark Jun 27, 2022
707f637
[mysten_network] add support for metrics reporting (MystenLabs/mysten…
akichidis Jun 29, 2022
85e615d
port to rust 1.62
huitseeker Jul 3, 2022
1dab9ba
refactor: convert exact instances of then_some
huitseeker Jul 3, 2022
22d9671
chore: clippy run
huitseeker Jul 3, 2022
8f39f4c
chore: one round of updates
huitseeker Jul 3, 2022
a2c3bbd
deactivate all-features in doctests
huitseeker Jul 3, 2022
24d6fe4
fix: force http version & remove Lazy
huitseeker Jul 5, 2022
3d7f9a1
Use multi-threaded-cf feature so we can get perf stats (MystenLabs/my…
velvia Jul 7, 2022
48021a9
add iter all function to typed-store (MystenLabs/mysten-infra#91)
lanvidr Jul 12, 2022
f43436a
Add opening as secondary (MystenLabs/mysten-infra#90)
oxade Jul 12, 2022
850b1c6
feat: add an optional predicate to table iteration
huitseeker Jul 13, 2022
8a75646
tracing: wrap EnvFilter layer in reloadable layer (MystenLabs/mysten-…
bmwill Jul 18, 2022
4d81027
chore: allow Unicode-DFS-2016 license
huitseeker Jul 19, 2022
931b369
chore: one round of updates
huitseeker Jul 19, 2022
50986b5
feat: make the log string overridable in TelemetrySubscriber
huitseeker Jul 19, 2022
f9e302e
tracing: improve the panic handler (MystenLabs/mysten-infra#96)
bmwill Jul 21, 2022
f6b8046
[crypto] Create verifier of X.509 `SubjectPublicKeyInfo` against a co…
punwai Jul 29, 2022
280bfbd
Add a ultility function to convert `MultiAddr` to `SocketAddr` (Myste…
mwtian Jul 29, 2022
79eeea0
DBMap utils auto derive: reduce boilerplate functions (MystenLabs/mys…
oxade Aug 1, 2022
98061de
feat(ci): auto-merge certain dependabot PRs
huitseeker Jul 30, 2022
6dd23b0
chore(deps): one round of updates
huitseeker Jul 30, 2022
6fb1afa
Support generics (MystenLabs/mysten-infra#108)
oxade Aug 1, 2022
e3e9292
Set default total memtable size to 512MB per Rocksdb (MystenLabs/myst…
mwtian Aug 5, 2022
1d00935
chore(ci): Auto-mark (and then close) stale issues / PRs (MystenLabs/…
huitseeker Aug 7, 2022
cea9992
chore(deps): update rocksdb requirement from 0.18.0 to 0.19.0 (Mysten…
dependabot[bot] Aug 8, 2022
ae374af
fix: remove the anyhow backtrace feature
huitseeker Aug 8, 2022
5e443ee
Set default max WAL size per RocksDB and allow configuration via env …
mwtian Aug 11, 2022
fbf74b0
chore(deps): update crossterm requirement from 0.24.0 to 0.25.0 (Myst…
dependabot[bot] Aug 15, 2022
961c0c5
chore: bump rust toolchain to 1.63 (MystenLabs/mysten-infra#121)
huitseeker Aug 15, 2022
ffd2d24
Cleanup: use one expression to read usize from env var (MystenLabs/my…
mwtian Aug 15, 2022
db27e0a
refactor: replace anyhow by eyre everywhere (MystenLabs/mysten-infra#…
huitseeker Aug 15, 2022
e6af866
Allow specifying each tables options, and getting mem usage (MystenLa…
oxade Aug 15, 2022
9e4cf87
refactor: fold the typed_store_macros crate inside typed_store (Myste…
huitseeker Aug 23, 2022
0fe5a28
[typed-store] implement the reverse() on iterator (MystenLabs/mysten-…
akichidis Aug 23, 2022
e5097e7
debug print when rocksdb option config not found in env rather than i…
longbowlu Aug 25, 2022
09c6412
utils for Store open and config (MystenLabs/mysten-infra#123)
oxade Aug 26, 2022
3ef83dc
[Feature][Telemetry] Automatic span latency measurement (MystenLabs/m…
velvia Aug 31, 2022
1581d8c
add fn to get raw bytes (MystenLabs/mysten-infra#137)
oxade Sep 2, 2022
0bf4930
rename get_or_insert to indicate unsafe (MystenLabs/mysten-infra#138)
oxade Sep 3, 2022
4e42f3c
Import pared-down version of parity-util-mem into mysten-infra (Myste…
aschran Sep 4, 2022
04c8b91
Add `MallocSizeOf` impl for `RoaringBitmap` (MystenLabs/mysten-infra#…
aschran Sep 6, 2022
cd1ed0c
Add `MallocSizeOf` impl for `Ed25519AggregateSignature` (MystenLabs/m…
aschran Sep 6, 2022
c413347
Allow to track request lifecycle via MetricsCallbackProvider (MystenL…
andll Sep 6, 2022
c30ce03
refactor: rename typed-store-macros -> typed-store-derive
huitseeker Sep 6, 2022
24fe3c6
refactor: rename parity-util-mem -> mysten-util-mem
huitseeker Sep 6, 2022
c8b4b61
Update roaring in mysten-mem-util to 0.10.0 (MystenLabs/mysten-infra#…
aschran Sep 6, 2022
8a21e0a
feat: Publishing tools for mysten-infra crates (MystenLabs/mysten-inf…
huitseeker Sep 7, 2022
dab729b
Update `fastcrypto` in `mysten-util-mem` to 0.1 (MystenLabs/mysten-in…
aschran Sep 7, 2022
5f6fa8a
Update `fastcrypto` in `mysten-util-mem` to 0.1.1 (MystenLabs/mysten-…
aschran Sep 7, 2022
ee17c74
Update to Tonic v0.8.0 (MystenLabs/mysten-infra#139)
macalinao Sep 9, 2022
086587e
Maintenance (repair nightly) (MystenLabs/mysten-infra#151)
huitseeker Sep 12, 2022
5def848
chore(deps): update lru requirement from 0.7 to 0.8 (MystenLabs/myste…
dependabot[bot] Sep 12, 2022
73872ef
Add malloc sizes for BLS crypto types. (MystenLabs/mysten-infra#153)
aschran Sep 13, 2022
67f2f26
Add `README.md` for `mysten-util-mem` (MystenLabs/mysten-infra#155)
aschran Sep 15, 2022
d7c726c
chore(deps): bump codecov/codecov-action from 1 to 3 (MystenLabs/myst…
dependabot[bot] Sep 19, 2022
3333678
chore(deps): bump actions/checkout from 2 to 3 (MystenLabs/mysten-inf…
dependabot[bot] Sep 19, 2022
19af952
[feature] allow verification against externally signed certificates
punwai Jul 30, 2022
775531e
small fixes to publish scripts
huitseeker Sep 19, 2022
4691ff1
Add a `ClosureMetric` for Prometheus (MystenLabs/mysten-infra#160)
aschran Sep 23, 2022
35f9473
chore(deps): bump actions/stale from 5 to 6 (MystenLabs/mysten-infra#…
dependabot[bot] Sep 26, 2022
7e2b3d2
feat(typed-store): default implementations for `Map::multi_*` (Mysten…
erwanor Sep 26, 2022
35eef61
chore(deps): one round of updates (MystenLabs/mysten-infra#166)
huitseeker Sep 27, 2022
a0d3908
chore(deps): update fastcrypto requirement from 0.1.1 to 1.0.0 (Myste…
dependabot[bot] Sep 29, 2022
6ebd66b
[Telemetry-subscribers] Per-layer/separate log and span filtering; fi…
velvia Sep 30, 2022
956d29e
fix(ci): make nightly availablein publish (MystenLabs/mysten-infra#168)
huitseeker Sep 30, 2022
b0e73ac
chore(deps): update rcgen requirement from 0.9.3 to 0.10.0 (MystenLab…
dependabot[bot] Oct 3, 2022
b5445ff
chore(deps): update clap requirement from 3.1.14 to 4.0.8 (MystenLabs…
dependabot[bot] Oct 6, 2022
59db49b
feat: publish mysten-network post MystenLabs/mysten-infra#139 (Mysten…
huitseeker Oct 6, 2022
96ea5b6
Change the dependency on fastcrypto to a specific commit (MystenLabs/…
benr-ml Oct 12, 2022
5ce7e70
Add user metrics for tracking db operations (MystenLabs/mysten-infra#…
sadhansood Oct 12, 2022
b6dd68e
Publish new version of typed store and typed store derive (MystenLabs…
sadhansood Oct 14, 2022
24d9bd7
Blocking write (MystenLabs/mysten-infra#174)
asonnino Oct 16, 2022
6d98c05
chore(deps): upgrade minor versions, fix unused env key (MystenLabs/m…
huitseeker Oct 17, 2022
1a35f7e
chore: update nexlint (MystenLabs/mysten-infra#183)
bmwill Oct 20, 2022
c5a9bdf
trigger new release (MystenLabs/mysten-infra#182)
asonnino Oct 20, 2022
b7c5db1
fix: stop auto-closing issues (MystenLabs/mysten-infra#184)
huitseeker Oct 21, 2022
b51812f
chore(deps): update multiaddr requirement from 0.14.0 to 0.15.0 (Myst…
dependabot[bot] Oct 24, 2022
e2a106a
Add sampling for metrics reporting (MystenLabs/mysten-infra#179)
sadhansood Oct 24, 2022
8d8cf09
Sadhan/add_cf_metrics (MystenLabs/mysten-infra#180)
sadhansood Oct 24, 2022
c3a3f34
Add rocksdb perf context metrics (MystenLabs/mysten-infra#181)
sadhansood Oct 24, 2022
c698c7e
Update fastcrypto (MystenLabs/mysten-infra#191)
benr-ml Oct 25, 2022
5f3a611
Fix how we init db metrics (MystenLabs/mysten-infra#189)
sadhansood Oct 25, 2022
4324756
Make sync use full feature (MystenLabs/mysten-infra#192)
sadhansood Oct 25, 2022
5e39661
ci: run on {windows,ubuntu}-ghcloud (MystenLabs/mysten-infra#190)
brad-mysten Oct 25, 2022
56cc8a9
Publish new typed store (MystenLabs/mysten-infra#188)
sadhansood Oct 25, 2022
abe607d
Update typed-store version to v0.4.0 (MystenLabs/mysten-infra#193)
sadhansood Oct 25, 2022
e7cb601
chore: update fastcrypto (MystenLabs/mysten-infra#194)
joyqvq Oct 27, 2022
f8a0656
codec: use bincode::deserialize instead of deserialize_from (MystenLa…
bmwill Oct 29, 2022
05607f6
Update FastCrypto (MystenLabs/mysten-infra#196)
benr-ml Oct 31, 2022
94a67cd
feat: add MallocSizeOf for OnceCell (MystenLabs/mysten-infra#197)
huitseeker Oct 31, 2022
0f3acbd
chore(deps): remove unused dep (MystenLabs/mysten-infra#199)
huitseeker Nov 5, 2022
282aec9
chore: update fastcrypto (MystenLabs/mysten-infra#198)
joyqvq Nov 6, 2022
b682d2a
Merge mysten infra in sui
sadhansood Nov 7, 2022
821a93d
Initial commit
sblackshear Dec 29, 2021
850db5b
feat: Add DB interface crate
huitseeker Dec 30, 2021
888b33d
chore: activate lto in release / bench
huitseeker Dec 31, 2021
6f09f72
chore: run unused dependency detection in CI
huitseeker Jan 14, 2022
815d1c5
chore: CI to use more reliable actions-rs/install
huitseeker Jan 30, 2022
2f5106f
fix: fix build of rust-rocksdb with a patch dependency (MystenLabs/my…
huitseeker Feb 4, 2022
b104800
feat: add a certificate verifier matching an expecte pre-shared key
huitseeker Jan 19, 2022
89fefd5
fix: clarify licenses for rccheck
huitseeker Jan 19, 2022
a484471
chore: remove obsolete workaround for https://github.com/rust-rocksdb…
huitseeker Feb 7, 2022
d550260
chore: disallow unbounded channels
huitseeker Feb 7, 2022
fb23af9
chore: fix license headers, add checking to CI
huitseeker Feb 20, 2022
cfd8cb9
chore: add dependabot configuration file
huitseeker Feb 24, 2022
b1f3f6d
feat: add crate that allows printing the name of an enum variant
huitseeker Mar 9, 2022
869693a
fix: add benign BSD-2-Clause to allowed licenses
huitseeker Mar 13, 2022
53229c1
Laura/components (MystenLabs/mysten-infra#39)
lanvidr Mar 17, 2022
1d97a81
fix: run clippy on tests as well
huitseeker Mar 18, 2022
2bdab09
New telemetry module: Shared logging/tracing initialization (MystenLa…
velvia Mar 23, 2022
cff0b4c
Rename telemetry module to telemetry-subscribers (MystenLabs/mysten-i…
velvia Mar 29, 2022
b63a104
chore: use a caching crate install
huitseeker Mar 29, 2022
4d3f063
chore: add code coverage
huitseeker Mar 31, 2022
c28c035
ci: improve stability and caching
bmwill Apr 4, 2022
d4c10fa
rust: update to 1.60.0
bmwill Apr 7, 2022
cebfdd7
chore: clean up clippy.toml
huitseeker Apr 15, 2022
153a213
x: introduce nexlint support through
bmwill May 6, 2022
429f0f7
lint: enforce crate names and paths
bmwill May 6, 2022
2e05697
lint: enforce that crates are in the directory
bmwill May 6, 2022
0ad2cc5
lint: enforce no trailing whitespace
bmwill May 6, 2022
82a8c09
rccheck: pin ed25519 version due to semver incompatability with pkcs8…
bmwill May 9, 2022
223c0cf
fix: remove the beta version in codecov job
huitseeker May 9, 2022
e347875
feat: generate & publish code doc
huitseeker May 9, 2022
f39722d
fix: Bump ed25519 to 1.5.0, pkcs8 to 0.9
huitseeker May 10, 2022
2e44eb5
fix: rename pedantic CI job
huitseeker May 10, 2022
3bf63fe
chore: add a basic CODEOWNERS
huitseeker May 10, 2022
44ae60c
mysten-network: add common networking utilities
bmwill May 8, 2022
3bc8640
mysten-network: support cancelation of a server
bmwill May 10, 2022
06da402
mysten-network: add some basic tests for using dns, ip4, ip6, and unix
bmwill May 10, 2022
801e7b6
feat: instrument main RocksDB functions to get tracing output (Mysten…
huitseeker May 13, 2022
6f5caa6
ci: make dependabot update GH actions
huitseeker May 19, 2022
055f230
ci: fix typos in docs
huitseeker May 19, 2022
e569a29
tracing: introduce a logger for testing environments (MystenLabs/myst…
bmwill May 20, 2022
36c4f67
chore: add docs, license, codecov badges
huitseeker May 21, 2022
43178d2
ci: move cargo-udeps to nightly
huitseeker May 27, 2022
3b13ac4
ci: use nextest to run rust tests
huitseeker May 27, 2022
b9c9374
tracing: improve default and testing subscribers (MystenLabs/mysten-i…
bmwill May 30, 2022
0d4d176
chore: update CODEOWNERS
huitseeker May 31, 2022
fc16aa0
tracing: send logging to stderr instead of stdout by default
bmwill Jun 2, 2022
30e8c16
tracing: enable configuration of tracing via env vars
bmwill Jun 3, 2022
04ce477
network: fix build on windows
bmwill Jun 22, 2022
9e3c1db
ci: run tests on windows
bmwill Jun 23, 2022
be1c9ea
network: fix warnings on windows
bmwill Jun 23, 2022
c60c328
Remove colors from log output when stdout is not tty; remove useless …
mystenmark Jun 27, 2022
e1d755b
[mysten_network] add support for metrics reporting (MystenLabs/mysten…
akichidis Jun 29, 2022
2b3e555
port to rust 1.62
huitseeker Jul 3, 2022
6e0e8bf
refactor: convert exact instances of then_some
huitseeker Jul 3, 2022
0066486
chore: clippy run
huitseeker Jul 3, 2022
b5a5a95
chore: one round of updates
huitseeker Jul 3, 2022
1cfe09a
deactivate all-features in doctests
huitseeker Jul 3, 2022
187a6b6
fix: force http version & remove Lazy
huitseeker Jul 5, 2022
eeb4557
Use multi-threaded-cf feature so we can get perf stats (MystenLabs/my…
velvia Jul 7, 2022
2f0662d
add iter all function to typed-store (MystenLabs/mysten-infra#91)
lanvidr Jul 12, 2022
4a6f6c6
Add opening as secondary (MystenLabs/mysten-infra#90)
oxade Jul 12, 2022
de5e27d
feat: add an optional predicate to table iteration
huitseeker Jul 13, 2022
9b9a8b9
tracing: wrap EnvFilter layer in reloadable layer (MystenLabs/mysten-…
bmwill Jul 18, 2022
06377a9
chore: allow Unicode-DFS-2016 license
huitseeker Jul 19, 2022
9e88119
chore: one round of updates
huitseeker Jul 19, 2022
630dea6
feat: make the log string overridable in TelemetrySubscriber
huitseeker Jul 19, 2022
219b841
tracing: improve the panic handler (MystenLabs/mysten-infra#96)
bmwill Jul 21, 2022
57d5dc7
[crypto] Create verifier of X.509 `SubjectPublicKeyInfo` against a co…
punwai Jul 29, 2022
c6f8c01
Add a ultility function to convert `MultiAddr` to `SocketAddr` (Myste…
mwtian Jul 29, 2022
368ae38
DBMap utils auto derive: reduce boilerplate functions (MystenLabs/mys…
oxade Aug 1, 2022
d6915f7
feat(ci): auto-merge certain dependabot PRs
huitseeker Jul 30, 2022
ceba92f
chore(deps): one round of updates
huitseeker Jul 30, 2022
d04daed
Support generics (MystenLabs/mysten-infra#108)
oxade Aug 1, 2022
4b41df9
Set default total memtable size to 512MB per Rocksdb (MystenLabs/myst…
mwtian Aug 5, 2022
92183f9
chore(ci): Auto-mark (and then close) stale issues / PRs (MystenLabs/…
huitseeker Aug 7, 2022
b95dd64
chore(deps): update rocksdb requirement from 0.18.0 to 0.19.0 (Mysten…
dependabot[bot] Aug 8, 2022
b7a27f7
fix: remove the anyhow backtrace feature
huitseeker Aug 8, 2022
8bf9b07
Set default max WAL size per RocksDB and allow configuration via env …
mwtian Aug 11, 2022
ae5739e
chore(deps): update crossterm requirement from 0.24.0 to 0.25.0 (Myst…
dependabot[bot] Aug 15, 2022
2848e73
chore: bump rust toolchain to 1.63 (MystenLabs/mysten-infra#121)
huitseeker Aug 15, 2022
4a633ff
Cleanup: use one expression to read usize from env var (MystenLabs/my…
mwtian Aug 15, 2022
8f4a967
refactor: replace anyhow by eyre everywhere (MystenLabs/mysten-infra#…
huitseeker Aug 15, 2022
7724190
Allow specifying each tables options, and getting mem usage (MystenLa…
oxade Aug 15, 2022
d01c836
refactor: fold the typed_store_macros crate inside typed_store (Myste…
huitseeker Aug 23, 2022
a828c7e
[typed-store] implement the reverse() on iterator (MystenLabs/mysten-…
akichidis Aug 23, 2022
65ad70c
debug print when rocksdb option config not found in env rather than i…
longbowlu Aug 25, 2022
82524bf
utils for Store open and config (MystenLabs/mysten-infra#123)
oxade Aug 26, 2022
cedd7df
[Feature][Telemetry] Automatic span latency measurement (MystenLabs/m…
velvia Aug 31, 2022
b0b53d0
add fn to get raw bytes (MystenLabs/mysten-infra#137)
oxade Sep 2, 2022
7fbae65
rename get_or_insert to indicate unsafe (MystenLabs/mysten-infra#138)
oxade Sep 3, 2022
0879eca
Import pared-down version of parity-util-mem into mysten-infra (Myste…
aschran Sep 4, 2022
4847edc
Add `MallocSizeOf` impl for `RoaringBitmap` (MystenLabs/mysten-infra#…
aschran Sep 6, 2022
160355a
Add `MallocSizeOf` impl for `Ed25519AggregateSignature` (MystenLabs/m…
aschran Sep 6, 2022
d233abd
Allow to track request lifecycle via MetricsCallbackProvider (MystenL…
andll Sep 6, 2022
a5fd896
refactor: rename typed-store-macros -> typed-store-derive
huitseeker Sep 6, 2022
c80c18f
refactor: rename parity-util-mem -> mysten-util-mem
huitseeker Sep 6, 2022
741d4a9
Update roaring in mysten-mem-util to 0.10.0 (MystenLabs/mysten-infra#…
aschran Sep 6, 2022
0362343
feat: Publishing tools for mysten-infra crates (MystenLabs/mysten-inf…
huitseeker Sep 7, 2022
d7f995f
Update `fastcrypto` in `mysten-util-mem` to 0.1 (MystenLabs/mysten-in…
aschran Sep 7, 2022
2c7f41b
Update `fastcrypto` in `mysten-util-mem` to 0.1.1 (MystenLabs/mysten-…
aschran Sep 7, 2022
b290b54
Update to Tonic v0.8.0 (MystenLabs/mysten-infra#139)
macalinao Sep 9, 2022
10d5b6d
Maintenance (repair nightly) (MystenLabs/mysten-infra#151)
huitseeker Sep 12, 2022
6c91215
chore(deps): update lru requirement from 0.7 to 0.8 (MystenLabs/myste…
dependabot[bot] Sep 12, 2022
40a1eb9
Add malloc sizes for BLS crypto types. (MystenLabs/mysten-infra#153)
aschran Sep 13, 2022
d780573
Add `README.md` for `mysten-util-mem` (MystenLabs/mysten-infra#155)
aschran Sep 15, 2022
5bf0487
chore(deps): bump codecov/codecov-action from 1 to 3 (MystenLabs/myst…
dependabot[bot] Sep 19, 2022
864a8f5
chore(deps): bump actions/checkout from 2 to 3 (MystenLabs/mysten-inf…
dependabot[bot] Sep 19, 2022
4b5afaf
[feature] allow verification against externally signed certificates
punwai Jul 30, 2022
4b26952
small fixes to publish scripts
huitseeker Sep 19, 2022
e3197ea
Add a `ClosureMetric` for Prometheus (MystenLabs/mysten-infra#160)
aschran Sep 23, 2022
53a934d
chore(deps): bump actions/stale from 5 to 6 (MystenLabs/mysten-infra#…
dependabot[bot] Sep 26, 2022
2141909
feat(typed-store): default implementations for `Map::multi_*` (Mysten…
erwanor Sep 26, 2022
d9db006
chore(deps): one round of updates (MystenLabs/mysten-infra#166)
huitseeker Sep 27, 2022
c9b4971
chore(deps): update fastcrypto requirement from 0.1.1 to 1.0.0 (Myste…
dependabot[bot] Sep 29, 2022
970a12b
[Telemetry-subscribers] Per-layer/separate log and span filtering; fi…
velvia Sep 30, 2022
82e5f90
fix(ci): make nightly availablein publish (MystenLabs/mysten-infra#168)
huitseeker Sep 30, 2022
a6fa3b7
chore(deps): update rcgen requirement from 0.9.3 to 0.10.0 (MystenLab…
dependabot[bot] Oct 3, 2022
be0c3fa
chore(deps): update clap requirement from 3.1.14 to 4.0.8 (MystenLabs…
dependabot[bot] Oct 6, 2022
d1ade03
feat: publish mysten-network post MystenLabs/mysten-infra#139 (Mysten…
huitseeker Oct 6, 2022
8679b55
Change the dependency on fastcrypto to a specific commit (MystenLabs/…
benr-ml Oct 12, 2022
1ec5519
Add user metrics for tracking db operations (MystenLabs/mysten-infra#…
sadhansood Oct 12, 2022
58eec65
Publish new version of typed store and typed store derive (MystenLabs…
sadhansood Oct 14, 2022
11bd040
Blocking write (MystenLabs/mysten-infra#174)
asonnino Oct 16, 2022
f085eec
chore(deps): upgrade minor versions, fix unused env key (MystenLabs/m…
huitseeker Oct 17, 2022
2d0f708
chore: update nexlint (MystenLabs/mysten-infra#183)
bmwill Oct 20, 2022
b32f174
trigger new release (MystenLabs/mysten-infra#182)
asonnino Oct 20, 2022
153f5f6
fix: stop auto-closing issues (MystenLabs/mysten-infra#184)
huitseeker Oct 21, 2022
d9624ae
chore(deps): update multiaddr requirement from 0.14.0 to 0.15.0 (Myst…
dependabot[bot] Oct 24, 2022
fada6cf
Add sampling for metrics reporting (MystenLabs/mysten-infra#179)
sadhansood Oct 24, 2022
2fe04a4
Sadhan/add_cf_metrics (MystenLabs/mysten-infra#180)
sadhansood Oct 24, 2022
48a298a
Add rocksdb perf context metrics (MystenLabs/mysten-infra#181)
sadhansood Oct 24, 2022
c89a625
Update fastcrypto (MystenLabs/mysten-infra#191)
benr-ml Oct 25, 2022
443ee2d
Fix how we init db metrics (MystenLabs/mysten-infra#189)
sadhansood Oct 25, 2022
2a39eee
Make sync use full feature (MystenLabs/mysten-infra#192)
sadhansood Oct 25, 2022
adb4d1f
ci: run on {windows,ubuntu}-ghcloud (MystenLabs/mysten-infra#190)
brad-mysten Oct 25, 2022
d8bcda9
Publish new typed store (MystenLabs/mysten-infra#188)
sadhansood Oct 25, 2022
b01247f
Update typed-store version to v0.4.0 (MystenLabs/mysten-infra#193)
sadhansood Oct 25, 2022
fcb8143
chore: update fastcrypto (MystenLabs/mysten-infra#194)
joyqvq Oct 27, 2022
d171248
codec: use bincode::deserialize instead of deserialize_from (MystenLa…
bmwill Oct 29, 2022
05a16ad
Update FastCrypto (MystenLabs/mysten-infra#196)
benr-ml Oct 31, 2022
8d2429e
feat: add MallocSizeOf for OnceCell (MystenLabs/mysten-infra#197)
huitseeker Oct 31, 2022
2c58494
chore(deps): remove unused dep (MystenLabs/mysten-infra#199)
huitseeker Nov 5, 2022
063d775
chore: update fastcrypto (MystenLabs/mysten-infra#198)
joyqvq Nov 6, 2022
8bd377b
Resolved merge conflicts
sadhansood Nov 9, 2022
249b1f9
Merge conflicts
sadhansood Nov 9, 2022
cca3f09
Update license to make lint happy
sadhansood Nov 9, 2022
acfcf08
Add .carg/config back
sadhansood Nov 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
network: fix build on windows
  • Loading branch information
bmwill authored and sadhansood committed Nov 9, 2022
commit d8ba7836656ca8de320e41f1f35fb04d43a5c3c6
27 changes: 17 additions & 10 deletions mysten-infra/crates/mysten-network/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use crate::{
config::Config,
multiaddr::{parse_dns, parse_ip4, parse_ip6, parse_unix},
multiaddr::{parse_dns, parse_ip4, parse_ip6},
};
use anyhow::{anyhow, Context, Result};
use multiaddr::{Multiaddr, Protocol};
Expand Down Expand Up @@ -57,7 +57,7 @@ fn endpoint_from_multiaddr(addr: &Multiaddr) -> Result<MyEndpoint> {
// Protocol::Memory(_) => todo!(),
#[cfg(unix)]
Protocol::Unix(_) => {
let (path, http_or_https) = parse_unix(addr)?;
let (path, http_or_https) = crate::multiaddr::parse_unix(addr)?;
let uri = format!("{http_or_https}://localhost");
MyEndpoint::try_from_uri(uri)?.with_uds_connector(path.as_ref().into())
}
Expand All @@ -69,13 +69,15 @@ fn endpoint_from_multiaddr(addr: &Multiaddr) -> Result<MyEndpoint> {

struct MyEndpoint {
endpoint: Endpoint,
#[cfg(unix)]
uds_connector: Option<PathBuf>,
}

impl MyEndpoint {
fn new(endpoint: Endpoint) -> Self {
Self {
endpoint,
#[cfg(unix)]
uds_connector: None,
}
}
Expand All @@ -88,6 +90,7 @@ impl MyEndpoint {
Ok(Self::new(endpoint))
}

#[cfg(unix)]
fn with_uds_connector(self, path: PathBuf) -> Self {
Self {
endpoint: self.endpoint,
Expand All @@ -101,33 +104,37 @@ impl MyEndpoint {
}

fn connect_lazy(self) -> Channel {
#[cfg(unix)]
if let Some(path) = self.uds_connector {
self.endpoint
return self
.endpoint
.connect_with_connector_lazy(tower::service_fn(move |_: Uri| {
let path = path.clone();

// Connect to a Uds socket
tokio::net::UnixStream::connect(path)
}))
} else {
self.endpoint.connect_lazy()
}));
}

self.endpoint.connect_lazy()
}

async fn connect(self) -> Result<Channel> {
#[cfg(unix)]
if let Some(path) = self.uds_connector {
self.endpoint
return self
.endpoint
.connect_with_connector(tower::service_fn(move |_: Uri| {
let path = path.clone();

// Connect to a Uds socket
tokio::net::UnixStream::connect(path)
}))
.await
.map_err(Into::into)
} else {
self.endpoint.connect().await.map_err(Into::into)
.map_err(Into::into);
}

self.endpoint.connect().await.map_err(Into::into)
}
}

Expand Down
12 changes: 6 additions & 6 deletions mysten-infra/crates/mysten-network/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

use crate::{
config::Config,
multiaddr::{parse_dns, parse_ip4, parse_ip6, parse_unix},
multiaddr::{parse_dns, parse_ip4, parse_ip6},
};
use anyhow::{anyhow, Result};
use futures::FutureExt;
use multiaddr::{Multiaddr, Protocol};
use std::{convert::Infallible, net::SocketAddr};
use tokio::net::{TcpListener, ToSocketAddrs, UnixListener};
use tokio_stream::wrappers::{TcpListenerStream, UnixListenerStream};
use tokio::net::{TcpListener, ToSocketAddrs};
use tokio_stream::wrappers::TcpListenerStream;
use tonic::{
body::BoxBody,
codegen::{
Expand Down Expand Up @@ -147,9 +147,9 @@ impl ServerBuilder {
// Protocol::Memory(_) => todo!(),
#[cfg(unix)]
Protocol::Unix(_) => {
let (path, _http_or_https) = parse_unix(addr)?;
let uds = UnixListener::bind(path.as_ref())?;
let uds_stream = UnixListenerStream::new(uds);
let (path, _http_or_https) = crate::multiaddr::parse_unix(addr)?;
let uds = tokio::net::UnixListener::bind(path.as_ref())?;
let uds_stream = tokio_stream::wrappers::UnixListenerStream::new(uds);
let local_addr = addr.to_owned();
let server = Box::pin(
self.router
Expand Down