Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Duplicate Block Proposal Without Storing Multiple Versions of Slots#7652

Closed
carllin wants to merge 11 commits intosolana-labs:masterfrom
carllin:DuplicateBlock2
Closed

Duplicate Block Proposal Without Storing Multiple Versions of Slots#7652
carllin wants to merge 11 commits intosolana-labs:masterfrom
carllin:DuplicateBlock2

Conversation

@carllin
Copy link
Copy Markdown
Contributor

@carllin carllin commented Jan 1, 2020

Problem

The approach off storing multiple versions of a slot to handle duplicate slots is very messy.

Summary of Changes

There were discussions about alternative approaches to this problem. In an attempt to get more eyes on this problem before we commit to a large change, I've outlined another approach below.

Pros: Introduce a proposal where storing only one version of a slot is sufficient, unless 33% of validators get slashed.

Cons: Proofs are very large, but maybe can be optimized? @rob-solana

Fixes #

Comment thread book/src/proposals/leader-duplicate-block-slashing.md Outdated
Comment thread book/src/proposals/leader-duplicate-block-slashing.md Outdated
Comment thread book/src/proposals/leader-duplicate-block-slashing.md Outdated
Comment thread book/src/proposals/leader-duplicate-block-slashing.md Outdated

* Contains a bank hash `H(B)` for some bank `B` such that `Confirmed(B).slot < S'.slot` (if a supermajority confirmed `S'`, then such a set must exist because there must have been some initial set of validators that voted on `S'` before it was confrmed). This can be confirmed for each vote if the prover provides `state_hash(B)`, `Confirmed(B).slot`, `bank_hash(parent(B))`, `parent(B).slot` such that `H(B) == hash(Confirmed(B).slot, state_hash(B), bank_hash(parent(B)), parent(B).slot)`.

* Show that `V.slot` is descended from `S'` by proving the bank hash `H(B)` can be derived from the bank hash and slot of `S'`. This is done by providing the trail of bank hashes and parent slots to
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does a validator receiving the proof determine the weights of the votes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking we just use the epoch stakes?

Comment thread book/src/proposals/leader-duplicate-block-slashing.md Outdated
Comment thread book/src/proposals/leader-duplicate-block-slashing.md Outdated
Comment thread book/src/proposals/leader-duplicate-block-slashing.md Outdated
@carllin
Copy link
Copy Markdown
Contributor Author

carllin commented Jan 16, 2020

@aeyakovenko @sakridge, I've pushed the design I'm currently implementing. I think it is an appropriate fix for v1 as it does not require slashing, and provides optimal safety without requiring any massive rewrites of existing modules.

@sakridge
Copy link
Copy Markdown
Contributor

How do you match a shred to a given approved_blockhash in the slot?

@carllin
Copy link
Copy Markdown
Contributor Author

carllin commented Jan 16, 2020

@sakridge you mean how do we verify a shred is for a particular approved_blockhash? I think you'll need a merkle proof to be 100% sure, but until then if we're assuming the person returning the responses is not malicious, we can just set a flag in the response saying this is for the approved_blockhash (Cluster should only have one approved_blockhash per slot)

@stale
Copy link
Copy Markdown

stale Bot commented Jan 24, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale Bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Jan 24, 2020
@stale
Copy link
Copy Markdown

stale Bot commented Jan 31, 2020

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale Bot closed this Jan 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

stale [bot only] Added to stale content; results in auto-close after a week.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants