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

Optimize block links #148

Open
Gilthoniel opened this issue Oct 8, 2020 · 2 comments
Open

Optimize block links #148

Gilthoniel opened this issue Oct 8, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Gilthoniel
Copy link
Contributor

Gilthoniel commented Oct 8, 2020

Currently, a link to a block is signed from the digest of the previous block. This is fine but not optimal because it's the block with the current roster that should sign it so that a chain to a block (the proof of consistency) is shaped with the smallest possible number of blocks. In other words, a proof to a block should look like this:

Genesis[R] --> Block[R'] --> Block[R''] --> Block[R'']

Basically, every block that has a change in the roster is a new checkpoint for the chain. New blocks should always be signed with the most recent roster to prevent a group of malicious nodes to take over the chain (i.e. an old roster with few nodes thus a small failure threshold).

@pierluca pierluca added the enhancement New feature or request label Mar 8, 2022
@nkcr
Copy link
Contributor

nkcr commented Jun 29, 2022

For a more visual representation, where X denotes a roster change:

Before:
┌───┐    ┌───┐    ┌───┐    ┌───┐    ┌───┐    ┌───┐    ┌───┐
│ X ├───►│   ├───►│ X ├───►│   ├───►│   ├───►│ X ├───►│   │
└───┘    └───┘    └───┘    └───┘    └───┘    └───┘    └───┘

After:
┌───┐    ┌───┐    ┌───┐    ┌───┐    ┌───┐    ┌───┐    ┌───┐
│ X │    │   │    │ X │    │   │    │   │    │ X │    │   │
└─┬─┘    └─┬─┘    └─┬─┘    └─┬─┘    └─┬─┘    └─┬─┘    └─┬─┘
  │───────►│        │───────►│        │        ├───────►│
  └────────────────►│────────────────►│        │
                    └─────────────────────────►│

@ineiti
Copy link
Member

ineiti commented Sep 4, 2023

Hmm - the original Chainiac paper presenting the skipchain idea propose two chains:

  • one key chain with updates to the roster
  • one data chain with the actual data

Both chains contain not only links from block N to block N+1, but also higher-level skips. So if the client has block 0, and wants to proof that block 400'000 is valid, it has to download only a subset of blocks. Whether there was a roster change or not.

In the cothority-skipchain, the key and data chain have been merged into one chain. So roster changes can happen in any block. But the higher level skips are implemented and allowed a new client to get from block 0 to block 400'000 in about a second by downloading 30 something blocks, IRRC.

So does Dela have anything like skipchains? Are higher-level skips implemented? Because if we have 100 elections with 2000 votes each, it will take a long time for a client to catch up.

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

No branches or pull requests

4 participants