Skip to content

(Idea) Feature request: assumed-valid chain #9799

@i-rme

Description

@i-rme

Preamble

Bitcoin Core 0.14 introduces assumed-valid blocks, this feature helps increase the speed of the initial blockchain verification process by acknowledging the software that blocks older than the 'hardcoded' one are valid so the sofware can skip checking scripts for its ancestors.

The actual definition can be read here:
https://github.com/bitcoin/bitcoin/blob/0.14/doc/release-notes.md#introduction-of-assumed-valid-blocks

With my idea, assumed-valid chain, I propose a method to speed up dramatically the blockchain syncing and signature verification for a newly created prunned node.

How would it work?

The process would be as it follows:

  • Bob has already a working and fully-synced Bitcoin Node with prunning disabled
  • He already knows what the valid chain is, the list of unspent outputs and so on
  • Bob wants to set up a prunned node for himself (or for someone else that trusts Bob)
  • Bob tells the software (on the new node) to assume that the chain that he already has is valid.
  • Bob provides the new node with X latests blocks and the list of unspent outputs.
  • The new node can start in prunned mode just by assuming that the chain Bob provides is valid. (Remember, Bob owns the two nodes).
  • The new node just has to verify the latest X blocks (the ones provided by Bob) and download the newer ones (from peers) but never its ancestors.
  • From this point, the new node is just another prunned node in the network, it has the same blockchain as a ordinary prunned node.

Pros

  • Bob can setup a brand new prunned node in few hours, without downloading the whole chain. This can be useful for low end hardware.

Cons

  • Bob needs to know the current state of the chain before setting up the new node.

More explanation

A bitcoin node has to download the chain from the first block because it does not know the current state of the blockchain. This feature is for setting up a second node, it assumes that you already know the state of the chain. This is not initially intended for new users.

When the current Bitcoin Core software is stoped and started it already assuming that the chain that has stored is valid and verified, it just checks latest 100 or so blocks, just to be sure, but it not starts to verify from Genesis Block (because it assumes that blocks in hard-drive were validated when they were downloaded). This also happens when you stop and start a prunned node, without having the old blocks it just assume that they are valid (because they were validated once).

I hope some developer could get interested in my idea and hopefully be discussed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions