Skip to content

Commit

Permalink
refactor: move crates into crates folder and remove redundant prefixes (
Browse files Browse the repository at this point in the history
  • Loading branch information
KolbyML authored Jan 13, 2025
1 parent 4323283 commit dbdf060
Show file tree
Hide file tree
Showing 279 changed files with 68 additions and 81 deletions.
16 changes: 2 additions & 14 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,11 @@
!Cargo.lock
!Cargo.toml
!/bin
!/e2store
!/ethportal-api
!/crates
!/ethportal-peertest
!/light-client
!/portalnet
!/portal-bridge
!/rpc
!/src
!/trin-beacon
!/trin-evm
!/testing
!/trin-execution
!/trin-history
!/trin-metrics
!/trin-state
!/trin-storage
!/trin-utils
!/trin-validation
!/utp-testing

# include for vergen constants
Expand Down
50 changes: 25 additions & 25 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[workspace]
members = [
"bin/trin",
"ethportal-api",
"crates/ethportal-api",
"crates/e2store",
"crates/evm",
"crates/light-client",
"crates/metrics",
"crates/rpc",
"crates/storage",
"crates/subnetworks/beacon",
"crates/subnetworks/history",
"crates/subnetworks/state",
"crates/utils",
"crates/validation",
"ethportal-peertest",
"e2store",
"light-client",
"trin-metrics",
"portal-bridge",
"rpc",
"testing/ef-tests",
"trin-beacon",
"trin-evm",
"trin-execution",
"trin-history",
"trin-state",
"trin-storage",
"trin-utils",
"trin-validation",
"utp-testing",
]

Expand Down Expand Up @@ -97,19 +97,19 @@ url = "2.3.1"
utp-rs = { tag = "v0.1.0-alpha.14", git = "https://github.com/ethereum/utp" }

# Trin workspace crates
e2store = { path = "e2store" }
ethportal-api = { path = "ethportal-api" }
light-client = { path = "light-client" }
e2store = { path = "crates/e2store" }
ethportal-api = { path = "crates/ethportal-api" }
light-client = { path = "crates/light-client" }
portal-bridge = { path = "portal-bridge" }
portalnet = { path = "portalnet" }
rpc = { path = "rpc"}
portalnet = { path = "crates/portalnet" }
rpc = { path = "crates/rpc"}
trin = { path = "bin/trin"}
trin-beacon = { path = "trin-beacon" }
trin-evm = { path = "trin-evm" }
trin-beacon = { path = "crates/subnetworks/beacon" }
trin-evm = { path = "crates/evm" }
trin-execution = { path = "trin-execution" }
trin-history = { path = "trin-history" }
trin-metrics = { path = "trin-metrics" }
trin-state = { path = "trin-state" }
trin-storage = { path = "trin-storage" }
trin-utils = { path = "trin-utils" }
trin-validation = { path = "trin-validation" }
trin-history = { path = "crates/subnetworks/history" }
trin-metrics = { path = "crates/metrics" }
trin-state = { path = "crates/subnetworks/state" }
trin-storage = { path = "crates/storage" }
trin-utils = { path = "crates/utils" }
trin-validation = { path = "crates/validation" }
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ that the data is canonical.
## Accumulator distribution

The Accumulator is built once and then distributed in Trin (and other clients). It does not
change over time and so can be incorporated into the `trin-validation` (`./trin-validation/src/assets`) and
change over time and so can be incorporated into the `trin-validation` (`./crates/validation/src/assets`) and
included in binary releases.

The History network contains individual epoch hashes from the Master Accumulator and
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions e2store/src/era1.rs → crates/e2store/src/era1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,16 +413,16 @@ mod tests {
use super::*;

#[rstest::rstest]
#[case::era1("../test_assets/era1/mainnet-00000-5ec1ffb8.era1")]
#[case::era1("../test_assets/era1/mainnet-00001-a5364e9a.era1")]
#[case::era1("../../test_assets/era1/mainnet-00000-5ec1ffb8.era1")]
#[case::era1("../../test_assets/era1/mainnet-00001-a5364e9a.era1")]
// epoch #10 contains txs
#[case::era1("../test_assets/era1/mainnet-00010-5f5d4516.era1")]
#[case::era1("../../test_assets/era1/mainnet-00010-5f5d4516.era1")]
// this is a test era1 file that has been amended for size purposes,
// since era1 files that contain typed txs are quite large.
// it was created by copying the `mainnet-01600-c6a9ee35.era1` file
// - the first 10 block tuples are included, unchanged
// - the following 8182 block tuples contain empty bodies and receipts
#[case::era1("../test_assets/era1/test-mainnet-01600-xxxxxxxx.era1")]
#[case::era1("../../test_assets/era1/test-mainnet-01600-xxxxxxxx.era1")]
fn test_era1(#[case] path: &str) {
let era1 = Era1::read_from_file(path.to_string()).unwrap();
let actual = era1.write().unwrap();
Expand All @@ -433,9 +433,9 @@ mod tests {
}

#[rstest::rstest]
#[case("../test_assets/era1/mainnet-00000-5ec1ffb8.era1", 0)]
#[case("../test_assets/era1/mainnet-00001-a5364e9a.era1", 8192)]
#[case("../test_assets/era1/mainnet-00010-5f5d4516.era1", 81920)]
#[case("../../test_assets/era1/mainnet-00000-5ec1ffb8.era1", 0)]
#[case("../../test_assets/era1/mainnet-00001-a5364e9a.era1", 8192)]
#[case("../../test_assets/era1/mainnet-00010-5f5d4516.era1", 81920)]
fn test_era1_index(#[case] path: &str, #[case] index: u64) {
let era1 = Era1::read_from_file(path.to_string()).unwrap();
assert_eq!(era1.block_index.block_index.starting_number, index);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions crates/ethportal-api/src/test_utils/constants.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub const PORTAL_SPEC_TESTS_SUBMODULE_PATH: &str = "../../portal-spec-tests";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ mod test {
#[test]
fn light_client_bootstrap_encode_decode() {
let file = fs::read_to_string(
"../test_assets/portalnet/content/beacon/light_client_bootstrap.json",
"../../test_assets/portalnet/content/beacon/light_client_bootstrap.json",
)
.unwrap();
let json: serde_json::Value = serde_json::from_str(&file).unwrap();
Expand Down Expand Up @@ -587,7 +587,7 @@ mod test {
#[test]
fn light_client_updates_by_range_encode_decode() {
let file = fs::read_to_string(
"../test_assets/portalnet/content/beacon/light_client_updates_by_range.json",
"../../test_assets/portalnet/content/beacon/light_client_updates_by_range.json",
)
.unwrap();
let json: serde_json::Value = serde_json::from_str(&file).unwrap();
Expand Down Expand Up @@ -623,7 +623,7 @@ mod test {
#[test]
fn light_client_optimistic_update_encode_decode() {
let file = fs::read_to_string(
"../test_assets/portalnet/content/beacon/light_client_optimistic_update.json",
"../../test_assets/portalnet/content/beacon/light_client_optimistic_update.json",
)
.unwrap();
let json: serde_json::Value = serde_json::from_str(&file).unwrap();
Expand Down Expand Up @@ -653,7 +653,7 @@ mod test {
#[test]
fn light_client_finality_update_encode_decode() {
let file = fs::read_to_string(
"../test_assets/portalnet/content/beacon/light_client_finality_update.json",
"../../test_assets/portalnet/content/beacon/light_client_finality_update.json",
)
.unwrap();
let json: serde_json::Value = serde_json::from_str(&file).unwrap();
Expand Down Expand Up @@ -682,7 +682,7 @@ mod test {

#[test]
fn historical_summaries_with_proof_encode_decode() {
let file = fs::read_to_string("./../portal-spec-tests/tests/mainnet/beacon_chain/historical_summaries_with_proof/deneb/historical_summaries_with_proof.yaml").unwrap();
let file = fs::read_to_string("./../../portal-spec-tests/tests/mainnet/beacon_chain/historical_summaries_with_proof/deneb/historical_summaries_with_proof.yaml").unwrap();
let value: serde_yaml::Value = serde_yaml::from_str(&file).unwrap();
let content_key = BeaconContentKey::deserialize(&value["content_key"]).unwrap();
let content_bytes = RawContentValue::deserialize(&value["content_value"]).unwrap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ mod test {
#[test]
fn header_with_proof_encode_decode_fluffy() {
let file =
fs::read_to_string("../trin-validation/src/assets/fluffy/header_with_proofs.json")
.unwrap();
fs::read_to_string("../validation/src/assets/fluffy/header_with_proofs.json").unwrap();
let json: Value = serde_json::from_str(&file).unwrap();
let json = json.as_object().unwrap();
for (block_num, obj) in json {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ mod tests {
let encoded = block_body.as_ssz_bytes();

let expected: Vec<u8> =
std::fs::read("../test_assets/mainnet/block_body_14764013.bin").unwrap();
std::fs::read("../../test_assets/mainnet/block_body_14764013.bin").unwrap();
assert_eq!(hex_encode(&encoded), hex_encode(expected));

let decoded = BlockBody::from_ssz_bytes(&encoded).unwrap();
Expand Down Expand Up @@ -601,7 +601,7 @@ mod tests {
#[test_log::test]
fn shanghai_block_body_round_trip() {
// block 17139055
let raw = std::fs::read("../test_assets/mainnet/block_body_17139055.bin").unwrap();
let raw = std::fs::read("../../test_assets/mainnet/block_body_17139055.bin").unwrap();
let body = BlockBodyShanghai::from_ssz_bytes(&raw).unwrap();
assert_eq!(body.withdrawals.len(), 16);
let withdrawals: Vec<Withdrawal> = serde_json::from_str(&shanghai_withdrawals()).unwrap();
Expand All @@ -613,7 +613,7 @@ mod tests {
#[test_log::test]
fn shanghai_block_body_transaction_hashes() {
// block 17139055
let raw = std::fs::read("../test_assets/mainnet/block_body_17139055.bin").unwrap();
let raw = std::fs::read("../../test_assets/mainnet/block_body_17139055.bin").unwrap();
let body = BlockBodyShanghai::from_ssz_bytes(&raw).unwrap();
assert_eq!(body.txs.len(), 117);
// Select a few transactions to compare against hashes from a block explorer:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ mod tests {
#[test_log::test]
fn post_shanghai_header() {
let body =
std::fs::read_to_string("../test_assets/mainnet/block_17034871_value.json").unwrap();
std::fs::read_to_string("../../test_assets/mainnet/block_17034871_value.json").unwrap();
let response: Value = serde_json::from_str(&body).unwrap();
let header: Header = serde_json::from_value(response["result"].clone()).unwrap();
let expected_hash = B256::from_slice(
Expand Down Expand Up @@ -502,7 +502,7 @@ mod tests {
#[case("19433903")]
fn post_dencun_header(#[case] case: &str) {
let body =
std::fs::read_to_string(format!("../test_assets/mainnet/block_{case}_value.json"))
std::fs::read_to_string(format!("../../test_assets/mainnet/block_{case}_value.json"))
.unwrap();
let response: Value = serde_json::from_str(&body).unwrap();
let header: Header = serde_json::from_value(response["result"].clone()).unwrap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ mod tests {
#[test_log::test]
fn decode_encode_header_with_proofs() {
let file =
fs::read_to_string("../trin-validation/src/assets/fluffy/header_with_proofs.json")
.unwrap();
fs::read_to_string("../validation/src/assets/fluffy/header_with_proofs.json").unwrap();
let json: Value = serde_json::from_str(&file).unwrap();
let hwps = json.as_object().unwrap();
for (block_number, obj) in hwps {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ mod tests {
let encoded = receipts.as_ssz_bytes();

let expected: Vec<u8> =
std::fs::read("../test_assets/mainnet/receipts_14764013.bin").unwrap();
std::fs::read("../../test_assets/mainnet/receipts_14764013.bin").unwrap();
assert_eq!(hex_encode(&encoded), hex_encode(expected));

let decoded = Receipts::from_ssz_bytes(&encoded).unwrap();
Expand Down Expand Up @@ -832,7 +832,8 @@ mod tests {
// this block (15573637) was chosen since it contains all tx types (legacy, access list,
// eip1559) as well as contract creation txs
let expected: String =
std::fs::read_to_string("../test_assets/infura_batch/receipts-15573637.json").unwrap();
std::fs::read_to_string("../../test_assets/infura_batch/receipts-15573637.json")
.unwrap();
let receipts: Receipts = serde_json::from_str(&expected).unwrap();
let expected_receipts_root: B256 = B256::from_slice(
&hex_decode("0xc9e543effd8c9708acc53249157c54b0c6aecd69285044bcb9df91cedc6437ad")
Expand All @@ -846,7 +847,8 @@ mod tests {
// batched group of pre-byzantium receipts, containing the "root" field instead of "status"
// sourced from infura.
let expected: String =
std::fs::read_to_string("../test_assets/infura_batch/receipts-1114271.json").unwrap();
std::fs::read_to_string("../../test_assets/infura_batch/receipts-1114271.json")
.unwrap();
let receipts: Receipts = serde_json::from_str(&expected).unwrap();
let expected_receipts_root: B256 = B256::from_slice(
&hex_decode("0xd262fe545cec9ec04f4246334d05437fac8d8dfe201a1f6476fab545878cb251")
Expand All @@ -868,7 +870,7 @@ mod tests {
)]
fn dencun_receipts(#[case] block_number: &str, #[case] expected_root: &str) {
let receipts = std::fs::read_to_string(format!(
"../test_assets/infura_batch/receipts-{block_number}.json"
"../../test_assets/infura_batch/receipts-{block_number}.json"
))
.unwrap();
let receipts: Receipts = serde_json::from_str(&receipts).unwrap();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use tree_hash::TreeHash;
// Valid number range for the test cases is 0..=1
pub fn get_light_client_bootstrap(number: u8) -> ForkVersionedLightClientBootstrap {
let lc_bootstrap = std::fs::read(format!(
"../test_assets/beacon/deneb/LightClientBootstrap/ssz_random/case_{number}/serialized.ssz_snappy"
"../../../test_assets/beacon/deneb/LightClientBootstrap/ssz_random/case_{number}/serialized.ssz_snappy"
))
.expect("cannot find test asset");
let mut decoder = snap::raw::Decoder::new();
Expand All @@ -38,7 +38,7 @@ pub fn get_light_client_bootstrap(number: u8) -> ForkVersionedLightClientBootstr
// Valid number range for the test cases is 0..=1
pub fn get_light_client_update(number: u8) -> ForkVersionedLightClientUpdate {
let lc_update = std::fs::read(format!(
"../test_assets/beacon/deneb/LightClientUpdate/ssz_random/case_{number}/serialized.ssz_snappy"
"../../../test_assets/beacon/deneb/LightClientUpdate/ssz_random/case_{number}/serialized.ssz_snappy"
))
.expect("cannot find test asset");
let mut decoder = snap::raw::Decoder::new();
Expand All @@ -54,7 +54,7 @@ pub fn get_light_client_update(number: u8) -> ForkVersionedLightClientUpdate {
// Valid number range for the test cases is 0..=1
pub fn get_light_client_finality_update(number: u8) -> ForkVersionedLightClientFinalityUpdate {
let lc_finality_update = std::fs::read(format!(
"../test_assets/beacon/deneb/LightClientFinalityUpdate/ssz_random/case_{number}/serialized.ssz_snappy"
"../../../test_assets/beacon/deneb/LightClientFinalityUpdate/ssz_random/case_{number}/serialized.ssz_snappy"
))
.expect("cannot find test asset");
let mut decoder = snap::raw::Decoder::new();
Expand All @@ -71,7 +71,7 @@ pub fn get_light_client_finality_update(number: u8) -> ForkVersionedLightClientF
// Valid number range for the test cases is 0..=1
pub fn get_light_client_optimistic_update(number: u8) -> ForkVersionedLightClientOptimisticUpdate {
let lc_optimistic_update = std::fs::read(format!(
"../test_assets/beacon/deneb/LightClientOptimisticUpdate/ssz_random/case_{number}/serialized.ssz_snappy"
"../../../test_assets/beacon/deneb/LightClientOptimisticUpdate/ssz_random/case_{number}/serialized.ssz_snappy"
))
.expect("cannot find test asset");
let mut decoder = snap::raw::Decoder::new();
Expand All @@ -88,7 +88,7 @@ pub fn get_light_client_optimistic_update(number: u8) -> ForkVersionedLightClien

pub fn get_history_summaries_with_proof() -> (ForkVersionedHistoricalSummariesWithProof, B256) {
let value = std::fs::read(
"../test_assets/beacon/deneb/BeaconState/ssz_random/case_0/serialized.ssz_snappy",
"../../../test_assets/beacon/deneb/BeaconState/ssz_random/case_0/serialized.ssz_snappy",
)
.expect("cannot find test asset");
let mut decoder = snap::raw::Decoder::new();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@ mod tests {
use super::*;

fn get_header_with_proof_ssz() -> Vec<u8> {
let file =
fs::read_to_string("../trin-validation/src/assets/fluffy/header_with_proofs.json")
.unwrap();
let file = fs::read_to_string("../../validation/src/assets/fluffy/header_with_proofs.json")
.unwrap();
let json: Value = serde_json::from_str(&file).unwrap();
let json = json.as_object().unwrap();
let raw_header = json.get("1000001").unwrap().as_object().unwrap();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
path::{Path, PathBuf},
};

pub const PORTAL_SPEC_TESTS_SUBMODULE_PATH: &str = "../portal-spec-tests";
pub const PORTAL_SPEC_TESTS_SUBMODULE_PATH: &str = "../../../portal-spec-tests";

/// Reads a file from a "portal-spec-tests" submodule.
pub fn read_portal_spec_tests_file<P: AsRef<Path>>(path: P) -> io::Result<String> {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ mod test {
let header_validator = get_mainnet_header_validator();

// Read the historical roots block proof from a test file
let file = fs::read_to_string("./../portal-spec-tests/tests/mainnet/history/headers_with_proof/block_proofs_bellatrix/beacon_block_proof-15539558-cdf9ed89b0c43cda17398dc4da9cfc505e5ccd19f7c39e3b43474180f1051e01.yaml").unwrap();
let file = fs::read_to_string("./../../portal-spec-tests/tests/mainnet/history/headers_with_proof/block_proofs_bellatrix/beacon_block_proof-15539558-cdf9ed89b0c43cda17398dc4da9cfc505e5ccd19f7c39e3b43474180f1051e01.yaml").unwrap();
let value: serde_yaml::Value = serde_yaml::from_str(&file).unwrap();
let block_number: u64 = 15539558;
let header_hash = value
Expand Down Expand Up @@ -430,7 +430,7 @@ mod test {
let header_validator = get_mainnet_header_validator();

// Read the historical roots block proof from a test file
let file = fs::read_to_string(format!("./../portal-spec-tests/tests/mainnet/history/headers_with_proof/block_proofs_capella/beacon_block_proof-{block_number}.yaml")).unwrap();
let file = fs::read_to_string(format!("./../../portal-spec-tests/tests/mainnet/history/headers_with_proof/block_proofs_capella/beacon_block_proof-{block_number}.yaml")).unwrap();
let value: serde_yaml::Value = serde_yaml::from_str(&file).unwrap();
let header_hash = value
.get("execution_block_header")
Expand All @@ -442,7 +442,7 @@ mod test {
serde_yaml::from_value(value).unwrap();

// Load historical summaries from ssz file
let historical_summaries_bytes = std::fs::read("./../portal-spec-tests/tests/mainnet/history/headers_with_proof/block_proofs_capella/historical_summaries_at_slot_8953856.ssz"
let historical_summaries_bytes = std::fs::read("./../../portal-spec-tests/tests/mainnet/history/headers_with_proof/block_proofs_capella/historical_summaries_at_slot_8953856.ssz"
).expect("cannot load HistoricalSummaries bytes from test file");
let historical_summaries = HistoricalSummaries::from_ssz_bytes(&historical_summaries_bytes)
.expect("cannot decode HistoricalSummaries bytes");
Expand Down Expand Up @@ -513,7 +513,7 @@ mod test {

fn read_epoch_accumulator_122() -> EpochAccumulator {
let epoch_acc_bytes = fs::read(
"../portal-spec-tests/tests/mainnet/history/accumulator/epoch-record-00122.ssz",
"../../portal-spec-tests/tests/mainnet/history/accumulator/epoch-record-00122.ssz",
)
.unwrap();
EpochAccumulator::from_ssz_bytes(&epoch_acc_bytes).unwrap()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion ethportal-api/src/test_utils/constants.rs

This file was deleted.

Loading

0 comments on commit dbdf060

Please sign in to comment.