2020-09-29 03:46:54 +00:00
|
|
|
[package]
|
|
|
|
name = "eth2"
|
|
|
|
version = "0.1.0"
|
|
|
|
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
2023-09-22 04:30:56 +00:00
|
|
|
edition = { workspace = true }
|
2020-09-29 03:46:54 +00:00
|
|
|
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
|
|
|
|
[dependencies]
|
2023-09-22 04:30:56 +00:00
|
|
|
serde = { workspace = true }
|
|
|
|
serde_json = { workspace = true }
|
2023-09-26 00:32:18 +00:00
|
|
|
ssz_types = { workspace = true }
|
|
|
|
tree_hash = { workspace = true }
|
2023-09-22 04:30:56 +00:00
|
|
|
types = { workspace = true }
|
|
|
|
reqwest = { workspace = true }
|
|
|
|
lighthouse_network = { workspace = true }
|
|
|
|
proto_array = { workspace = true }
|
|
|
|
ethereum_serde_utils = { workspace = true }
|
|
|
|
eth2_keystore = { workspace = true }
|
|
|
|
libsecp256k1 = { workspace = true }
|
|
|
|
ring = { workspace = true }
|
|
|
|
bytes = { workspace = true }
|
|
|
|
account_utils = { workspace = true }
|
|
|
|
sensitive_url = { workspace = true }
|
|
|
|
ethereum_ssz = { workspace = true }
|
|
|
|
ethereum_ssz_derive = { workspace = true }
|
2020-12-04 00:18:58 +00:00
|
|
|
futures-util = "0.3.8"
|
2023-09-22 04:30:56 +00:00
|
|
|
futures = { workspace = true }
|
|
|
|
store = { workspace = true }
|
|
|
|
slashing_protection = { workspace = true }
|
2023-06-13 10:25:27 +00:00
|
|
|
mediatype = "0.19.13"
|
Tidy formatting of `Reqwest` errors (#4336)
## Issue Addressed
NA
## Proposed Changes
Implements the `PrettyReqwestError` to wrap a `reqwest::Error` and give nicer `Debug` formatting. It also wraps the `Url` component in a `SensitiveUrl` to avoid leaking sensitive info in logs.
### Before
```
Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("localhost")), port: Some(9999), path: "/eth/v1/node/version", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })) })
```
### After
```
HttpClient(url: http://localhost:9999/, kind: request, detail: error trying to connect: tcp connect error: Connection refused (os error 61))
```
## Additional Info
I've also renamed the `Reqwest` error enum variants to `HttpClient`, to give people a better chance at knowing what's going on. Reqwest is pretty odd and looks like a typo.
I've implemented it in the `eth2` and `execution_layer` crates. This should affect most logs in the VC and EE-related ones in the BN.
I think the last crate that could benefit from the is the `beacon_node/eth1` crate. I haven't updated it in this PR since its error type is not so amenable to it (everything goes into a `String`). I don't have a whole lot of time to jig around with that at the moment and I feel that this PR as it stands is a significant enough improvement to merge on its own. Leaving it as-is is fine for the time being and we can always come back for it later (or implement in-protocol deposits!).
2023-06-27 01:06:50 +00:00
|
|
|
mime = "0.3.16"
|
2023-09-22 04:30:56 +00:00
|
|
|
pretty_reqwest_error = { workspace = true }
|
Tidy formatting of `Reqwest` errors (#4336)
## Issue Addressed
NA
## Proposed Changes
Implements the `PrettyReqwestError` to wrap a `reqwest::Error` and give nicer `Debug` formatting. It also wraps the `Url` component in a `SensitiveUrl` to avoid leaking sensitive info in logs.
### Before
```
Reqwest(reqwest::Error { kind: Request, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("localhost")), port: Some(9999), path: "/eth/v1/node/version", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })) })
```
### After
```
HttpClient(url: http://localhost:9999/, kind: request, detail: error trying to connect: tcp connect error: Connection refused (os error 61))
```
## Additional Info
I've also renamed the `Reqwest` error enum variants to `HttpClient`, to give people a better chance at knowing what's going on. Reqwest is pretty odd and looks like a typo.
I've implemented it in the `eth2` and `execution_layer` crates. This should affect most logs in the VC and EE-related ones in the BN.
I think the last crate that could benefit from the is the `beacon_node/eth1` crate. I haven't updated it in this PR since its error type is not so amenable to it (everything goes into a `String`). I don't have a whole lot of time to jig around with that at the moment and I feel that this PR as it stands is a significant enough improvement to merge on its own. Leaving it as-is is fine for the time being and we can always come back for it later (or implement in-protocol deposits!).
2023-06-27 01:06:50 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2023-09-22 04:30:56 +00:00
|
|
|
tokio = { workspace = true }
|
2020-09-29 03:46:54 +00:00
|
|
|
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
2024-01-05 19:48:11 +00:00
|
|
|
psutil = { version = "3.3.0", optional = true }
|
2023-08-28 00:55:28 +00:00
|
|
|
procfs = { version = "0.15.1", optional = true }
|
2020-09-29 03:46:54 +00:00
|
|
|
|
|
|
|
[features]
|
|
|
|
default = ["lighthouse"]
|
2023-09-22 04:30:56 +00:00
|
|
|
lighthouse = ["psutil", "procfs"]
|