Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bound history size #4444

Merged
merged 5 commits into from
Nov 11, 2021
Merged

Bound history size #4444

merged 5 commits into from
Nov 11, 2021

Conversation

lightclient
Copy link
Member

Clients must stop serving historical blocks/receipts that are older than a year on the p2p layer. Clients may prune such historical data.

@eth-bot
Copy link
Collaborator

eth-bot commented Nov 9, 2021

All tests passed; auto-merging...

Copy link
Contributor

@MicahZoltu MicahZoltu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A ballsy proposal, in need of a discussions-to link and I think a category change.

EIPS/eip-4444.md Outdated Show resolved Hide resolved
EIPS/eip-4444.md Show resolved Hide resolved
EIPS/eip-4444.md Outdated Show resolved Hide resolved
| - | - | - |
| `HISTORY_PRUNE_EPOCHS` | 82125 | A year in beacon chain epochs |

Clients MUST NOT serve blocks/states/receipts that are older than `HISTORY_PRUNE_EPOCHS` epochs on the p2p network.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not everyone will agree on what time it is, should we have a bit of a no-mans-land between the time clients are expected to stop requesting ancient data and when clients are expected to stop providing ancient data? This could be minutes/hours/days, just enough to deal with time synchronization issues.

Presumably, under such a regime any peer that requests data older than the longer of the two SHOULD be kicked. Meanwhile, clients SHOULD be programmed to never ask for anything older than the shorter of the two.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I can/should locally prune after these epochs, and thus I can be in a situation where our clocks have a disparity (within reason) and you make what you think is an honest request that I do not have. Are you suggesting in such a situation that although I cannot respond to the request, I should not consider your request as nefarious? Whereas if you are outside of the window, I can consider this as "bad" behavior and descore/kick you?

under such a regime any peer that requests data older than the longer of the two SHOULD be kicked

I prefer MAY be downscored and/or kicked.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not everyone will agree on what time it is, should we have a bit of a no-mans-land between the time clients are expected to stop requesting ancient data and when clients are expected to stop providing ancient data? This could be minutes/hours/days, just enough to deal with time synchronization issues.

Presumably, under such a regime any peer that requests data older than the longer of the two SHOULD be kicked. Meanwhile, clients SHOULD be programmed to never ask for anything older than the shorter of the two.

@MicahZoltu In my country, MasterCard and Visa while not blockchain related are required to keep past history of the last 10 years for law enforcement and they use a higher transaction throughout.

Comment on lines +25 to +33
## Specification

| Parameter | Value | Description |
| - | - | - |
| `HISTORY_PRUNE_EPOCHS` | 82125 | A year in beacon chain epochs |

Clients MUST NOT serve blocks/states/receipts that are older than `HISTORY_PRUNE_EPOCHS` epochs on the p2p network.

Clients MAY locally prune block/state/receipt history that is older than `HISTORY_PRUNE_EPOCHS` epochs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specification should indicate what behavior should occur if a peer asks for data that is too old (which is why I think this should be a Networking spec).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should anything specific occur? There are a small number of clients, we should work together to ensure that they follow the behavior of the EIP.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been argued that requesting and serving data beyond the limit should be explicitly incorrect. In such a case, you'd need to have devp2p return errors on such requests

@lightclient
Copy link
Member Author

This should be ready to be reviewed again. It would be great to move any outstanding questions regarding the actual EIP to the discussion thread: https://ethereum-magicians.org/t/eip-4444-bound-historical-data-in-execution-clients/7450

@MicahZoltu MicahZoltu closed this Nov 11, 2021
@MicahZoltu MicahZoltu reopened this Nov 11, 2021
@eth-bot eth-bot enabled auto-merge (squash) November 11, 2021 05:27
@eth-bot eth-bot merged commit 4ca9197 into ethereum:master Nov 11, 2021
EIPS/eip-4444.md Show resolved Hide resolved
PhABC pushed a commit to PhABC/EIPs that referenced this pull request Jan 25, 2022
* add draft of eip to bound history size

* a few updates

* add discussion url

* change category to networking

* fix malformed handle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants