From eaed3bca2ec33b5d1ca3bd3252e3318d08903a5c Mon Sep 17 00:00:00 2001 From: lightclient Date: Fri, 16 Feb 2024 08:43:36 -0700 Subject: [PATCH 1/6] wip --- EIPS/pre-merge-history.md | 90 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 EIPS/pre-merge-history.md diff --git a/EIPS/pre-merge-history.md b/EIPS/pre-merge-history.md new file mode 100644 index 00000000000000..17c681bb704641 --- /dev/null +++ b/EIPS/pre-merge-history.md @@ -0,0 +1,90 @@ +--- +title: Cease serving pre-merge history +description: Execution layer clients will no longer serve block data before Paris over p2p. +author: lightclient (@lightclient) +discussions-to: +status: Draft +type: Standards Track +category: Core +created: 2024-02-13 +--- + +## Abstract + +Execution layer clients will no longer request or respond to p2p queries about +block data before the Paris upgrade. + +## Motivation + +TODO disk size. + +## Specification + +Clients must not make or respond to p2p queries about blocks before Paris. + +### History Accumulator + +## Rationale + + + +TBD + +## Backwards Compatibility + + + +No backward compatibility issues found. + +## Test Cases + + + +## Reference Implementation + + + +## Security Considerations + + + +Needs discussion. + +## Copyright + +Copyright and related rights waived via [CC0](../LICENSE.md). From d601d4565048ec133460b3dad160c88a015a7267 Mon Sep 17 00:00:00 2001 From: lightclient Date: Wed, 28 Feb 2024 15:01:18 -0700 Subject: [PATCH 2/6] add eip for pre-merge data --- EIPS/pre-merge-history.md | 92 +++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 51 deletions(-) diff --git a/EIPS/pre-merge-history.md b/EIPS/pre-merge-history.md index 17c681bb704641..a581ead3d92aec 100644 --- a/EIPS/pre-merge-history.md +++ b/EIPS/pre-merge-history.md @@ -1,11 +1,11 @@ --- -title: Cease serving pre-merge history +title: Cease serving history before PoS description: Execution layer clients will no longer serve block data before Paris over p2p. author: lightclient (@lightclient) discussions-to: status: Draft type: Standards Track -category: Core +category: Network created: 2024-02-13 --- @@ -16,74 +16,64 @@ block data before the Paris upgrade. ## Motivation -TODO disk size. +As of 2024, historical data in clients has grown to around 500 GB. Nearly 400 GB +of that is from block data before PoS was activated in the Paris upgrade. Long +term, Ethereum plans to bound the amount of data nodes must store. This EIP +proposes the first steps to achieve such goal. ## Specification -Clients must not make or respond to p2p queries about blocks before Paris. +Clients must not make or respond to p2p queries about blocks before block 15537393. -### History Accumulator +### Header Accumulator -## Rationale - - - -TBD - -## Backwards Compatibility - - +Accumulator = Container[ + historical_epochs: List[bytes32, max_length=MAX_HISTORICAL_EPOCHS], + current_epoch: EpochRecord, +] +``` -No backward compatibility issues found. +The hash tree root of `Accumulator` for data before block 15537393 is +`0xec8e040fd6c557b41ca8ddd38f7e9d58a9281918dc92bdb72342a38fb085e701`. -## Test Cases - - +### Only Pre-PoS data -## Reference Implementation +One might ask why the distinction between pre and post PoS data is made in this +EIP. The simple answer is that the at the moment of the merge, the block +structure changed substantially. Although execution layer client software today +continues on with block data on disk which remains similar to per-PoS data, the +beacon chain is now the canoncial chain definition. Therefore, a beacon block +can be used to both record historical data for execution layer and beacon layer. +Additionally, the beacon chain already has the concept of a history accumulator +via the `historical_roots` field in the state. - +After this EIP is activated, nodes will no longer be able to full sync from the +devp2p network. To continue doing so, they must retrieve the data out-of-band. ## Security Considerations - - -Needs discussion. +TBD ## Copyright From f2983dcd324c5dc890256175f6037b4744f0609c Mon Sep 17 00:00:00 2001 From: lightclient Date: Wed, 28 Feb 2024 15:04:07 -0700 Subject: [PATCH 3/6] add discussions to link --- EIPS/pre-merge-history.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/pre-merge-history.md b/EIPS/pre-merge-history.md index a581ead3d92aec..eacf628740d2c0 100644 --- a/EIPS/pre-merge-history.md +++ b/EIPS/pre-merge-history.md @@ -2,7 +2,7 @@ title: Cease serving history before PoS description: Execution layer clients will no longer serve block data before Paris over p2p. author: lightclient (@lightclient) -discussions-to: +discussions-to: https://ethereum-magicians.org/t/cease-serving-history-before-pos/18991 status: Draft type: Standards Track category: Network From 3ab94a0cc614e4a8be9e2f9606966753bedadd80 Mon Sep 17 00:00:00 2001 From: lightclient Date: Wed, 28 Feb 2024 15:32:55 -0700 Subject: [PATCH 4/6] 7639 nits --- EIPS/{pre-merge-history.md => 7639.md} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename EIPS/{pre-merge-history.md => 7639.md} (98%) diff --git a/EIPS/pre-merge-history.md b/EIPS/7639.md similarity index 98% rename from EIPS/pre-merge-history.md rename to EIPS/7639.md index eacf628740d2c0..d1dbe80c84a7c2 100644 --- a/EIPS/pre-merge-history.md +++ b/EIPS/7639.md @@ -1,11 +1,12 @@ --- +eip: 7639 title: Cease serving history before PoS description: Execution layer clients will no longer serve block data before Paris over p2p. author: lightclient (@lightclient) discussions-to: https://ethereum-magicians.org/t/cease-serving-history-before-pos/18991 status: Draft type: Standards Track -category: Network +category: Networking created: 2024-02-13 --- From bb77d4745c1e210b43325473156589215421e5ca Mon Sep 17 00:00:00 2001 From: lightclient Date: Thu, 29 Feb 2024 10:14:45 -0700 Subject: [PATCH 5/6] 7639: fix filename (again) --- EIPS/{7639.md => eip-7639.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename EIPS/{7639.md => eip-7639.md} (100%) diff --git a/EIPS/7639.md b/EIPS/eip-7639.md similarity index 100% rename from EIPS/7639.md rename to EIPS/eip-7639.md From 787c2486aa96137fb714884ac1e529780241a7d7 Mon Sep 17 00:00:00 2001 From: lightclient Date: Fri, 1 Mar 2024 09:23:54 -0700 Subject: [PATCH 6/6] 7639: rm header accumulator --- EIPS/eip-7639.md | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/EIPS/eip-7639.md b/EIPS/eip-7639.md index d1dbe80c84a7c2..99c07c4ffce974 100644 --- a/EIPS/eip-7639.md +++ b/EIPS/eip-7639.md @@ -26,30 +26,6 @@ proposes the first steps to achieve such goal. Clients must not make or respond to p2p queries about blocks before block 15537393. -### Header Accumulator - -The header accumulator commits to the set of pre-merge headers and their -associated total difficulty. The format for this data is defined as: - -```python -EPOCH_SIZE = 8192 # blocks -MAX_HISTORICAL_EPOCHS = 131072 # 2**17 - -# An individual record for a historical header. -HeaderRecord = Container[block_hash: bytes32, total_difficulty: uint256] - -# The records of the headers from within a single epoch -EpochRecord = List[HeaderRecord, max_length=EPOCH_SIZE] - -Accumulator = Container[ - historical_epochs: List[bytes32, max_length=MAX_HISTORICAL_EPOCHS], - current_epoch: EpochRecord, -] -``` - -The hash tree root of `Accumulator` for data before block 15537393 is -`0xec8e040fd6c557b41ca8ddd38f7e9d58a9281918dc92bdb72342a38fb085e701`. - ## Rationale ### Only Pre-PoS data @@ -60,8 +36,6 @@ structure changed substantially. Although execution layer client software today continues on with block data on disk which remains similar to per-PoS data, the beacon chain is now the canoncial chain definition. Therefore, a beacon block can be used to both record historical data for execution layer and beacon layer. -Additionally, the beacon chain already has the concept of a history accumulator -via the `historical_roots` field in the state. Over the long term, the distinctions of "execution layer" and "consensus layer" may matter less. This EIP tries to be agnostic to client architecture and @@ -74,7 +48,7 @@ devp2p network. To continue doing so, they must retrieve the data out-of-band. ## Security Considerations -TBD +TODO ## Copyright