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

[PoC] Let lotus fetch any non-local block from IPFS. #221

Open
taoshengshi opened this issue Jan 29, 2023 · 1 comment
Open

[PoC] Let lotus fetch any non-local block from IPFS. #221

taoshengshi opened this issue Jan 29, 2023 · 1 comment

Comments

@taoshengshi
Copy link
Member

What we need is for someone to take existing archival snapshots and make them available via IPFS/Filecoin.

Second step is to stop relying on archival snapshots and just ingest directly by following the chain.

Third step is to let lotus fetch any non-local block from IPFS.

This unlocks that everyone needing chain data can build on top of the IPFS-data-lake and not have to worry about snapshots, initializations, copying the data they need before being able to work with it etc.

@taoshengshi
Copy link
Member Author

Once you have all chain data in a data lake. You can provide snapshot-download by CAR-ifying stateroots + block headers. You can have several flavours of snapshots (minimal/archive etc.).

But the best would be to remove the concept of "snapshot" completely. The data would be accessible from IPFS, so the Lotus node runs an IPFS-client and fetches any non-locally-present block that it needs from IPFS.

Right now, minimal snapshots need to include 900 epochs worth of past state because those 900 epochs have not reached finality. That means, that Lotus may need to jump to a different branch that started 899 ago and undo everything that happened on the wrong branch, so all the states are needed. However, this is very unlikely and most the information in those 899 previous epochs is never going to be used.

If the Lotus daemon knows it can fetch any missing stateroot information at any time from IPFS when it needs it, then "minimal" snapshots could be really minimal (including only minimal amount of epochs). For this to be possible, however, the chain should be very reliably accessible on IPFS.

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

No branches or pull requests

1 participant