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

[storage] provide a way to export and import chain database #2997

Closed
jolestar opened this issue Oct 29, 2021 · 1 comment
Closed

[storage] provide a way to export and import chain database #2997

jolestar opened this issue Oct 29, 2021 · 1 comment
Assignees

Comments

@jolestar
Copy link
Member

当前新启动一个节点后同步数据较慢,可以考虑提供一种导入导出数据库的方式,便于快速搭建节点。

方法1: 只提供区块导入导出

  1. 可指定高度范围打包导出区块
  2. 可直接导入打包的区块,导入时可以跳过区块难度校验。

优点:实现比较简单。
缺点:所有区块需要重新执行,不能节省执行时间。

方法2: 提供区块,交易以及状态树数据库的快照功能

  1. 指定高度导出快照。
  2. 导入快照后继续执行后面的区块。

优点:导入速度快。
缺点:实现比较复杂,通过这种方式搭建的节点没有历史状态。

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

2 participants