Skip to content

Commit 91ee027

Browse files
authored
Portal: mv accumulator based block proof code out of history_legacy (#3599)
1 parent 71de440 commit 91ee027

File tree

45 files changed

+92
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+92
-76
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,16 @@ all_history_network_custom_chain_tests: | build deps
289289
echo -e $(BUILD_MSG) "build/$@" && \
290290
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_log_level=ERROR -d:mergeBlockNumber:38130 -o:build/$@ "portal/tests/legacy_history_network_tests/$@.nim"
291291

292+
all_eth_history_custom_chain_tests: | build deps
293+
echo -e $(BUILD_MSG) "build/$@" && \
294+
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_log_level=ERROR -d:mergeBlockNumber:38130 -o:build/$@ "portal/tests/eth_history_tests/$@.nim"
295+
292296
all_portal_tests: | build deps
293297
echo -e $(BUILD_MSG) "build/$@" && \
294298
$(ENV_SCRIPT) nim c -r $(NIM_PARAMS) -d:chronicles_log_level=ERROR -o:build/$@ "portal/tests/$@.nim"
295299

296300
# builds and runs the Portal test suite
297-
portal-test: | all_portal_tests all_history_network_custom_chain_tests
301+
portal-test: | all_portal_tests all_history_network_custom_chain_tests all_eth_history_custom_chain_tests
298302

299303
# builds the Portal tools, wherever they are
300304
$(PORTAL_TOOLS): | build deps rocksdb

execution_chain/db/era1_db/db_desc.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import
1515
std/[os, parseutils, strutils, tables],
1616
results,
1717
eth/common/blocks,
18-
../../../portal/eth_data/era1
18+
../../../portal/eth_history/era1
1919

2020
export results, blocks
2121

portal/bridge/history/portal_history_bridge.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import
2323
../../network/legacy_history/
2424
[history_content, history_type_conversions, history_validation],
2525
../../network/network_metadata,
26-
../../eth_data/[era1, history_data_ssz_e2s, history_data_seeding],
26+
../../eth_history/[era1, history_data_ssz_e2s, history_data_seeding],
2727
../../database/era1_db,
2828
../common/rpc_helpers,
2929
../nimbus_portal_bridge_conf

portal/bridge/nimbus_portal_bridge_conf.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import
1313
confutils/std/net,
1414
nimcrypto/hash,
1515
../network/network_metadata,
16-
../eth_data/era1,
16+
../eth_history/era1,
1717
../logging
1818

1919
export net

portal/database/era1_db.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import
1212
stew/io2,
1313
results,
1414
eth/common/blocks,
15-
../network/legacy_history/validation/historical_hashes_accumulator,
16-
../eth_data/era1
15+
../eth_history/block_proofs/historical_hashes_accumulator,
16+
../eth_history/era1
1717

1818
type Era1DB* = ref object
1919
## The Era1 database manages a collection of era files that together make up
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import
1111
eth/common/[headers_rlp],
1212
ssz_serialization,
1313
ssz_serialization/[proofs, merkleization],
14-
../../../common/common_types,
15-
../history_content,
14+
../../common/common_types,
15+
../../network/legacy_history/history_content,
1616
./historical_hashes_accumulator
1717

1818
export

portal/network/legacy_history/validation/historical_hashes_accumulator.nim renamed to portal/eth_history/block_proofs/historical_hashes_accumulator.nim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ import
1111
eth/common/[headers_rlp],
1212
ssz_serialization,
1313
ssz_serialization/[proofs, merkleization],
14-
../../../common/common_types,
15-
../history_content
14+
../../common/common_types
1615

1716
from eth/common/eth_types_rlp import rlpHash
1817

1918
export ssz_serialization, merkleization, proofs, common_types
2019

2120
# HistoricalHashesAccumulator, as per specification:
2221
# https://github.com/ethereum/portal-network-specs/blob/31bc7e58e2e8acfba895d5a12a9ae3472894d398/history/history-network.md#the-historical-hashes-accumulator
22+
# EIP-7643::
23+
# https://github.com/ethereum/EIPs/blob/b2bce97a0a6898faf5a37c5948b7bc58a1cd1bc5/EIPS/eip-7643.md
2324

2425
const
2526
EPOCH_SIZE* = 8192 # block roots per epoch record

0 commit comments

Comments
 (0)