mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-04 05:14:33 +00:00
Fix cargo audit RUSTSEC-2024-0336 (#5612)
* replace unmaintained rust_yaml with serde_yml * update warp
This commit is contained in:
1209
Cargo.lock
generated
1209
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -174,7 +174,7 @@ tree_hash = "0.5"
|
|||||||
tree_hash_derive = "0.5"
|
tree_hash_derive = "0.5"
|
||||||
url = "2"
|
url = "2"
|
||||||
uuid = { version = "0.8", features = ["serde", "v4"] }
|
uuid = { version = "0.8", features = ["serde", "v4"] }
|
||||||
warp = { version = "0.3.6", default-features = false, features = ["tls"] }
|
warp = { version = "0.3.7", default-features = false, features = ["tls"] }
|
||||||
zeroize = { version = "1", features = ["zeroize_derive"] }
|
zeroize = { version = "1", features = ["zeroize_derive"] }
|
||||||
zip = "0.6"
|
zip = "0.6"
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ zip = "0.6"
|
|||||||
account_utils = { path = "common/account_utils" }
|
account_utils = { path = "common/account_utils" }
|
||||||
beacon_chain = { path = "beacon_node/beacon_chain" }
|
beacon_chain = { path = "beacon_node/beacon_chain" }
|
||||||
beacon_node = { path = "beacon_node" }
|
beacon_node = { path = "beacon_node" }
|
||||||
beacon_processor = { path = "beacon_node/beacon_processor" }
|
beacon_processor = { path = "beacon_node/beacon_processor" }
|
||||||
bls = { path = "crypto/bls" }
|
bls = { path = "crypto/bls" }
|
||||||
cached_tree_hash = { path = "consensus/cached_tree_hash" }
|
cached_tree_hash = { path = "consensus/cached_tree_hash" }
|
||||||
clap_utils = { path = "common/clap_utils" }
|
clap_utils = { path = "common/clap_utils" }
|
||||||
@@ -219,7 +219,7 @@ network = { path = "beacon_node/network" }
|
|||||||
operation_pool = { path = "beacon_node/operation_pool" }
|
operation_pool = { path = "beacon_node/operation_pool" }
|
||||||
pretty_reqwest_error = { path = "common/pretty_reqwest_error" }
|
pretty_reqwest_error = { path = "common/pretty_reqwest_error" }
|
||||||
proto_array = { path = "consensus/proto_array" }
|
proto_array = { path = "consensus/proto_array" }
|
||||||
safe_arith = {path = "consensus/safe_arith"}
|
safe_arith = { path = "consensus/safe_arith" }
|
||||||
sensitive_url = { path = "common/sensitive_url" }
|
sensitive_url = { path = "common/sensitive_url" }
|
||||||
slasher = { path = "slasher" }
|
slasher = { path = "slasher" }
|
||||||
slashing_protection = { path = "validator_client/slashing_protection" }
|
slashing_protection = { path = "validator_client/slashing_protection" }
|
||||||
|
|||||||
@@ -8,5 +8,5 @@ edition = { workspace = true }
|
|||||||
bytes = { workspace = true }
|
bytes = { workspace = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
yaml-rust = "0.4.4"
|
|
||||||
hex = { workspace = true }
|
hex = { workspace = true }
|
||||||
|
serde_yml = "0.0.4"
|
||||||
|
|||||||
@@ -78,8 +78,7 @@ pub fn int_to_bytes96(int: u64) -> Vec<u8> {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use std::{fs::File, io::prelude::*, path::PathBuf};
|
use std::{collections::HashMap, fs::File, io::prelude::*, path::PathBuf};
|
||||||
use yaml_rust::yaml;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn fixed_bytes32() {
|
fn fixed_bytes32() {
|
||||||
@@ -111,14 +110,13 @@ mod tests {
|
|||||||
|
|
||||||
file.read_to_string(&mut yaml_str).unwrap();
|
file.read_to_string(&mut yaml_str).unwrap();
|
||||||
|
|
||||||
let docs = yaml::YamlLoader::load_from_str(&yaml_str).unwrap();
|
let docs: HashMap<String, serde_yml::Value> = serde_yml::from_str(&yaml_str).unwrap();
|
||||||
let doc = &docs[0];
|
let test_cases = docs["test_cases"].as_sequence().unwrap();
|
||||||
let test_cases = doc["test_cases"].as_vec().unwrap();
|
|
||||||
|
|
||||||
for test_case in test_cases {
|
for test_case in test_cases {
|
||||||
let byte_length = test_case["byte_length"].as_i64().unwrap() as u64;
|
let byte_length = test_case["byte_length"].as_i64().unwrap() as u64;
|
||||||
let int = test_case["int"].as_i64().unwrap() as u64;
|
let int = test_case["int"].as_i64().unwrap() as u64;
|
||||||
let bytes_string = test_case["bytes"].clone().into_string().unwrap();
|
let bytes_string = test_case["bytes"].as_str().unwrap();
|
||||||
let bytes = hex::decode(bytes_string.replace("0x", "")).unwrap();
|
let bytes = hex::decode(bytes_string.replace("0x", "")).unwrap();
|
||||||
|
|
||||||
match byte_length {
|
match byte_length {
|
||||||
|
|||||||
Reference in New Issue
Block a user