-
Notifications
You must be signed in to change notification settings - Fork 94
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
Consensus Layer Wiki Page #246
Merged
Merged
Changes from 59 commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
a0ae153
CL init, Update overview of CL
shyam-patel-kira dd773ff
Update ordering
shyam-patel-kira d10c76e
Update to current changes
shyam-patel-kira ae4124c
Add validators section to overview
shyam-patel-kira e82b698
add iamges; added Beacon chain explainer; checkpoints and finality; s…
shyam-patel-kira 1fef51a
Added validator life cylce
shyam-patel-kira abed432
fix typo; update wordlist
shyam-patel-kira 17656e0
Update state of validators
shyam-patel-kira 55e6a24
Improve flow of the page;added simpler explanations; added some links
shyam-patel-kira b4fd8c7
add introduction; minor fixes
shyam-patel-kira e044716
Minor typos ffix
shyam-patel-kira 93e3671
add introduction; added byzantine generals problem
shyam-patel-kira b0f53d7
revamp overview structure
shyam-patel-kira af6f604
fix dark background in svg
shyam-patel-kira bec30b3
complete overview of CL; added cl-architecture structure
shyam-patel-kira 8a6c63d
Added Blocktree and fork-choice rules
shyam-patel-kira ad71957
Merge branch 'main' of https://github.com/eth-protocol-fellows/protoc…
shyam-patel-kira 9705975
fix some typos; update wordlist
shyam-patel-kira 68087f0
Merge branch 'main' of https://github.com/eth-protocol-fellows/protoc…
shyam-patel-kira 11dbc63
add reorgs and reversion
shyam-patel-kira 107038f
Add liveness and safey comparision
shyam-patel-kira 2750896
Add some more details on consensus protocol
shyam-patel-kira 89d042d
Add architecture and blobs
shyam-patel-kira d516ade
stf; control flow
shyam-patel-kira 9c34f94
fix a broken link; added gasper file
shyam-patel-kira 51cbbbe
Use consistent naming for PoW and PoS
shyam-patel-kira 5d62c91
Complete cl-architecture
shyam-patel-kira 1e1c000
Update structure of cl-networking
shyam-patel-kira 8488571
fix spelling mistake
shyam-patel-kira 9fe39bb
fix typos; added words to wordlist
shyam-patel-kira a0477c2
remove whitespace
shyam-patel-kira 36ad561
address some nits
shyam-patel-kira 2f86faf
Omit some redudant content
shyam-patel-kira 32dd223
remove redundant content; fix broken links
shyam-patel-kira e8d87ec
Update proposer and validator set wording
shyam-patel-kira e4eabfd
Address some more nits
shyam-patel-kira 2fad7dd
Merge branch 'feat/consensus-layer' of https://github.com/eth-protoco…
shyam-patel-kira e67c1e1
Add resources; omit whitespace
shyam-patel-kira d6b78d8
fix typos
shyam-patel-kira 528b7e2
Merge branch 'main' into feat/consensus-layer
shyam-patel-kira 42f3617
Merge branch 'main' into feat/consensus-layer
shyam-patel-kira b664169
Update wordlist
shyam-patel-kira 9d34f18
nit: grammar
shyam-patel-kira ae6fed1
nit: space
shyam-patel-kira 502402b
nit: word
shyam-patel-kira bcd3adc
nit: word
shyam-patel-kira fa8de57
clean up
shyam-patel-kira 45d4a3d
nit: spell
shyam-patel-kira 8669733
Merge branch 'main' of https://github.com/eth-protocol-fellows/protoc…
shyam-patel-kira bec3641
nit: content captilization
shyam-patel-kira a661f2a
Merge branch 'feat/consensus-layer' of https://github.com/eth-protoco…
shyam-patel-kira 3110ef2
Update wordlist
shyam-patel-kira a9bd4ad
nit: diagram name
shyam-patel-kira fd996f4
nit: word
shyam-patel-kira a671998
nit: clean up
shyam-patel-kira 3b5d0bc
nit: clean up
shyam-patel-kira 7bc5acc
nit: title
shyam-patel-kira 8973b79
nit: wording
shyam-patel-kira 0eb994c
nit: title
shyam-patel-kira b25a252
fix flow for the transition
shyam-patel-kira 67061b5
Merge branch 'feat/consensus-layer' of https://github.com/eth-protoco…
shyam-patel-kira c941698
Merge branch 'main' of https://github.com/eth-protocol-fellows/protoc…
shyam-patel-kira bdf947d
Update beacon-api.md
taxmeifyoucan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,59 @@ | ||
# Beacon API | ||
# Beacon Chain Spec and APIs | ||
|
||
> :warning: This article is a [stub](https://en.wikipedia.org/wiki/Wikipedia:Stub), help the wiki by [contributing](/contributing.md) and expanding it. | ||
At the core of Ethereum Proof-of-Stake is a system chain called the "beacon chain". The beacon chain stores and manages the registry of validators. In the initial deployment phases of Proof-of-Stake, the only mechanism to become a validator is to make a one-way(withdrawable after Capella) ETH transaction to a deposit contract on the Ethereum Proof-of-work chain. Activation as a validator happens when deposit receipts are processed by the beacon chain, the activation balance is reached, and a queuing process is completed. Exit is either voluntary or done forcibly as a penalty for misbehavior. The primary source of load on the beacon chain is "attestations". Attestations are simultaneously availability votes for a shard block (in a later upgrade) and proof-of-stake votes for a beacon block (Phase 0). | ||
|
||
Beacon API is the endpoint provided by consensus layer clients. It's the interface for interacting with consensus for users and validators. | ||
This section will cover some important parts of Beacon Chain Spec and APIs. Also checkout complete [Beacon Chain Spec](https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/beacon-chain.md) and [Beacon API reference](https://ethereum.github.io/beacon-APIs/#/). | ||
|
||
Check the [Beacon API reference](https://ethereum.github.io/beacon-APIs/#/). | ||
|
||
## Containers | ||
|
||
`BeaconState` | ||
|
||
```python | ||
class BeaconState(Container): | ||
# Versioning | ||
genesis_time: uint64 | ||
genesis_validators_root: Root | ||
slot: Slot | ||
fork: Fork | ||
# History | ||
latest_block_header: BeaconBlockHeader | ||
block_roots: Vector[Root, SLOTS_PER_HISTORICAL_ROOT] | ||
state_roots: Vector[Root, SLOTS_PER_HISTORICAL_ROOT] | ||
historical_roots: List[Root, HISTORICAL_ROOTS_LIMIT] | ||
# Eth1 | ||
eth1_data: Eth1Data | ||
eth1_deposit_index: uint64 | ||
application_state_root: Bytes32 | ||
# Registry | ||
validators: List[Validator, VALIDATOR_REGISTRY_LIMIT] | ||
balances: List[Gwei, VALIDATOR_REGISTRY_LIMIT] | ||
# Randomness | ||
randao_mixes: Vector[Bytes32, EPOCHS_PER_HISTORICAL_VECTOR] | ||
# Slashings | ||
slashings: Vector[Gwei, EPOCHS_PER_SLASHINGS_VECTOR] | ||
# Attestations | ||
previous_epoch_attestations: List[PendingAttestation, MAX_ATTESTATIONS * SLOTS_PER_EPOCH] | ||
current_epoch_attestations: List[PendingAttestation, MAX_ATTESTATIONS * SLOTS_PER_EPOCH] | ||
# Finality | ||
justification_bits: Bitvector[JUSTIFICATION_BITS_LENGTH] # Bit set for every recent justified epoch | ||
previous_justified_checkpoint: Checkpoint # Previous epoch snapshot | ||
current_justified_checkpoint: Checkpoint | ||
finalized_checkpoint: Checkpoint | ||
``` | ||
|
||
#### `BeaconBlockBody` | ||
|
||
```python | ||
class BeaconBlockBody(Container): | ||
randao_reveal: BLSSignature | ||
eth1_data: Eth1Data # Eth1 data vote | ||
graffiti: Bytes32 # Arbitrary data | ||
# Operations | ||
proposer_slashings: List[ProposerSlashing, MAX_PROPOSER_SLASHINGS] | ||
attester_slashings: List[AttesterSlashing, MAX_ATTESTER_SLASHINGS] | ||
attestations: List[Attestation, MAX_ATTESTATIONS] | ||
deposits: List[Deposit, MAX_DEPOSITS] | ||
voluntary_exits: List[SignedVoluntaryExit, MAX_VOLUNTARY_EXITS] | ||
application_payload: ApplicationPayload | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Gasper | ||
|
||
## LMD GHOST (Latest Message Driven -- Greediest Heaviest Observed SubTree) | ||
|
||
<!-- | ||
- What is lmd-ghost | ||
- How subtree is selected | ||
- fork-choice | ||
- protocol | ||
--> | ||
|
||
## Casper FFG (Friendly Finality Gadget) | ||
|
||
<!-- | ||
- justified chain | ||
- checkpoints and finality | ||
- gst, gat, synchronised | ||
--> | ||
|
||
|
||
- Hybrid Fork-choice (Refer pos-evolution in ethereum post/book) | ||
Possible attacks | ||
- simple ex-ante reorg | ||
- weighted proposer boost | ||
|
||
Solutions: | ||
- view-merge strategy | ||
|
||
|
||
## Resources | ||
|
||
- [Combining GHOST and Casper](https://arxiv.org/pdf/2003.03052) | ||
- [Yang X Zhang- Combining GHOST and Casper](https://www.youtube.com/watch?v=V0RjGmFE35U) | ||
- [Introduction to Gasper from Ethereum.org](https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/gasper/) | ||
- [Evolution of Ethereum PoS Consensus Protocol](https://github.com/ethereum/pos-evolution/blob/master/pos-evolution.md) | ||
- [Goldfish](https://arxiv.org/pdf/2209.03255) | ||
- [Casper FFG](https://arxiv.org/pdf/1710.09437) | ||
- [LMD Ghost](https://inevitableeth.com/home/ethereum/network/consensus/lmd-ghost) | ||
- [RLMD GHOST with Luca Zanolini](https://www.youtube.com/watch?v=F2olypDSVnA) | ||
- [Comparison of different LMD Ghost Implementations by ProtoLambda](https://github.com/protolambda/lmd-ghost) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is WIP? I would remove this from the PR if so or at least added some resources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is not complete but wanted to get the structure out there, I've added some resources for this