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

Checkpoints for downloading the blockchain #3043

Open
username1565 opened this issue Apr 7, 2020 · 3 comments
Open

Checkpoints for downloading the blockchain #3043

username1565 opened this issue Apr 7, 2020 · 3 comments
Assignees
Labels

Comments

@username1565
Copy link

Аbstract

Is your feature request related to a problem? Please describe.

Yes. Blockchain is too large for start synchronization, and resynchronize this.

Motivation and Purposes

A clear and concise description of what the problem is. Ex. I'm always frustrated when [need to synchronize all blockchain, with old unactual transactions].

Specification

A clear and concise description of what you want to happen.
Describe alternatives you've considered

I want to you make the checkpoints for the fast synchronization of blockchain + lists of balances for all the tokens, which WavesPlatrofm have.
For example, the block 2000000 is verified, and valid block: https://wavesblockexplorer.com/blocks/200000
The hash of this block can be a checkpoint, and this can be hardcoded for start synchronization.
Then, you can make a snapshoot of all balances, and start the synchronization from block 2000000,
without downloading, and verify all transactions for all 2000000 previous blocks,
without synronize full blockchain, and without store all this old data.

Backwards Compatibility

Can your proposition affect any existing features?

No, this can be optional parameters, and can have full backward-compatibility.
This is something, like half-peer, or half-node, to do mining, and to don't store all blockchain. Also, there is possible to download the part of blockchain.
For example, 500 active nodes can save 500 parts with 2000000 / 500 = 4000 blocks,
and broadcast this in the network, when full blockchain need to downloading for someone.

Examples and Implementation

Examples of implementation in other projects?

Bitcoin blockchain checkpoins for Bitcoin Core.
Also, see the parameter "-prune=N" (Means save no more than N Megabyte of last blocks from blockchain ).
Also, electrum bitcoin-wallet can working without synchronize full blockchain.

@pivoo81
Copy link
Member

pivoo81 commented Apr 7, 2020

Hello. This good point. But it's not in current plans.
Currently we improving time of processing blockchain itself, it's already in stagenet, and will be ready for mainnet in June.
Now if you want to get actual blockchain state fast you can download state. It's not as safe as 'checkpoint feature' you propose. Please read details on this here https://docs.wavesplatform.com/en/waves-node/options-for-getting-actual-blockchain/state-downloading-and-applying

@pivoo81 pivoo81 changed the title Make synchronization and resynchronization faster! Checkpoints for downloading the blockchain Apr 7, 2020
@username1565
Copy link
Author

username1565 commented Apr 7, 2020

Hello, @pivoo81!
I know about this bootstrap .tar-archive, http://blockchain.wavesnodes.com
and to use this, need to download full blockchain inside this .tar-archive,
and after import this on the node, there is running the validation for all blocks again,
beginning from 0 block, and up to last block.
This process of validation is so slow, and validation is processed by 100 blocks from 0-th block,
and all blocks are processed again, within one re-synchronization.
For all 2000000 blocks this take many time, and if database will be corrupted and damaged (for example, after power off), need to make re-syncronization again and again!
Maybe I can skip this validation for ALL BLOCKS, by running the node with some parameters?

@pivoo81
Copy link
Member

pivoo81 commented May 28, 2020

Hi @username1565
Actually you telling about import-file (Look "Import Blocks from Binary file" chapter), but I told you about data-state download.

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

No branches or pull requests

2 participants