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

1426 Cleanup old Highway and rewards references #1434

Merged
merged 24 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8fb79b5
Initial file setup
ipopescu Apr 5, 2024
e236693
Merge branch 'zug_introduction' of https://github.com/ipopescu/docs i…
ipopescu Apr 9, 2024
4241352
Merge branch 'zug_introduction' of https://github.com/ipopescu/docs i…
ipopescu Apr 9, 2024
a6b513e
High-level rewards explanation with png
ipopescu Apr 11, 2024
4cc0c94
Updated index page
ipopescu Apr 11, 2024
c5e79f0
Cleanup concepts/economics/staking
ipopescu Apr 11, 2024
56730a3
Clean up concepts/economics .md files: index,consensus, runtime
ipopescu Apr 11, 2024
c311adc
Replace Highway with Zug in the remaining files
ipopescu Apr 11, 2024
8ae221c
Update chain-spec.md with settings for rewards
ipopescu Apr 11, 2024
4182020
Minor edits
ipopescu Apr 11, 2024
d1f16cf
Merge branch 'zug_rewards_PR' of https://github.com/ipopescu/docs int…
ipopescu Apr 16, 2024
1b80c7f
Remove old content in concepts/economics
ipopescu Apr 18, 2024
1079ec4
Remove links to old CEPs + minor rewording
ipopescu Apr 18, 2024
5e9b395
Added TODOs from review feedback
ipopescu Apr 23, 2024
c538805
Removed some TODOs
ipopescu Apr 23, 2024
44815bc
Merge branch 'zug_rewards_PR' of https://github.com/ipopescu/docs int…
ipopescu Apr 23, 2024
e53d032
Merge branch 'feat-2.0_docs' into 1426_cleanup
ipopescu Apr 25, 2024
0c652ae
Add note re. rewards
ipopescu Apr 25, 2024
3af70d4
Fix formatting issue in delegation.md
ipopescu Apr 25, 2024
a02f53a
Answer todo's in consensus.md
ipopescu Apr 26, 2024
42e4195
Address todo's in index.md
ipopescu Apr 26, 2024
a2e2b88
Address some todo's in concepts and runtime
ipopescu Apr 26, 2024
8ca79be
Updates based on feedback from BK
ipopescu May 2, 2024
9aa306d
Merge branch 'feat-2.0_docs' of https://github.com/ipopescu/docs into…
ipopescu May 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/docs/casper/concepts/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ slug: /

## What is Casper? {#what-is-casper}

Casper is a new [Turing-complete](../concepts/glossary/T.md#turing-complete-blockchain) smart-contracting platform, backed by a Proof-of-Stake (PoS) consensus algorithm and WebAssembly (Wasm). The network is a [permissionless](../concepts/glossary/P.md#permissionless), decentralized, public blockchain.
Casper is a [Turing-complete](../concepts/glossary/T.md#turing-complete-blockchain) smart-contracting platform, backed by a Proof-of-Stake (PoS) consensus algorithm and WebAssembly (Wasm). The network is a [permissionless](../concepts/glossary/P.md#permissionless), decentralized, public blockchain.

The network's consensus protocol is called [Highway](https://arxiv.org/pdf/2101.02159.pdf), and it has several benefits over classic Byzantine Fault Tolerant (BFT) consensus protocols. First, Highway allows networks to reach higher thresholds of _finality_, meaning that more blocks are finalized, and validators agree to add them to the blockchain. Second, the protocol achieves flexibility by expressing block finality in ways not possible in BFT models. This protocol is built on the [correct-by-construction (CBC) Casper](https://github.com/cbc-casper/cbc-casper-paper) research.
The network's consensus protocol is called [Zug](./design/zug.md), and it has several benefits over classic Byzantine Fault Tolerant (BFT) consensus protocols. First, Zug allows networks to reach higher thresholds of _finality_, meaning that every block gets finalized within seconds, as fast as the network connections allow. Second, the protocol achieves flexibility by expressing block finality in ways not possible in BFT models. This protocol is built on the following research: [From Weakly-terminating Binary Agreement and Reliable Broadcast to Atomic Broadcast](https://arxiv.org/abs/2205.06314).
ipopescu marked this conversation as resolved.
Show resolved Hide resolved

Additionally, the Casper Network is optimized for enterprise and developer adoption. While leveraging blockchain technology, the network seeks to accelerate business operations via unique features like predictable network fees, upgradeable contracts, on-chain governance, privacy flexibility, and developer-friendly languages. Casper's [core features and strengths](../resources/build-on-casper.md) enable developers and enterprises to reap the benefits of blockchain technology.

Expand Down
2 changes: 1 addition & 1 deletion source/docs/casper/concepts/design/casper-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Refer to the [Serialization Standard](../serialization-standard.md) for addition

## Tokens {#tokens-head}

Casper is a decentralized Proof-of-Stake blockchain platform that uses a consensus algorithm called [Highway](./highway.md). Having a unit of value is required to make this system work because users must pay for computation, and validators must have [stake](../economics/staking/staking.md) to bond. In the blockchain space, this unit of value is a _token_.
Casper is a decentralized Proof-of-Stake blockchain platform that uses a consensus algorithm called [Zug](./zug.md). Having a unit of value is required to make this system work because users must pay for computation, and validators must have [stake](../economics/staking/staking.md) to bond. In the blockchain space, this unit of value is a _token_.
ipopescu marked this conversation as resolved.
Show resolved Hide resolved

This chapter describes tokens and how one can use them on the Casper platform.

Expand Down
2 changes: 1 addition & 1 deletion source/docs/casper/concepts/design/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ slug: /design
| [Zug Consensus](./zug.md) | An overview of the Zug consensus used in Mainnet and Testnet |
| [Highway Consensus](./highway.md) | Brief overview of the Highway consensus available as an alternative to Zug |
| [Validator Rewards](./rewards.md) | Overview of how rewards are calculated and distributed |
| [Reading and Writing Data to Global State](./reading-and-writing-to-the-blockchain.md) | Storing and reading data from the blockchain |
| [Reading and Writing Data to Global State](./reading-and-writing-to-the-blockchain.md) | Storing and reading data from the blockchain |
2 changes: 1 addition & 1 deletion source/docs/casper/concepts/design/networking-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ struct GossipedAddress(SocketAddr);

### Consensus

A consensus message is sent exclusively between instances of the consensus component, from one peer to another. A precise description of the Highway consensus protocol is out of scope of this document, see the `consensus::Message` type or an appropriate description of the underlying protocol for details.
A [consensus](./consensus.md) message is sent exclusively between instances of the consensus component, from one peer to another.

### Gossiping

Expand Down
3 changes: 1 addition & 2 deletions source/docs/casper/concepts/design/rewards.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Validators receive rewards for participating in consensus and thus securing the

Like other Proof-of-Stake chains, a Casper network rewards validators for participating in building a linear chain of blocks, each containing ordered state changes and ensuring that the entire ecosystem of validators, builders, and users eventually achieve common knowledge of the chain's history. External, non-validator participants in the ecosystem can thus have a high degree of confidence on the canonical history of the blockchain's state, thus making the blockchain economically useful.

<!-- TODO link to Zug and Highway once PR 1427 merges-->
The network uses a new reward scheme that does not depend on the details of the consensus protocol and is compatible with both Zug and Highway. The current reward scheme has the following properties:
The network uses a new reward scheme that does not depend on the details of the consensus protocol and is compatible with both [Zug](./zug.md) and [Highway](./highway.md). The current reward scheme has the following properties:

- Rewards are proportional to a validator's weight.
- The reward scheme incentivizes cooperation.
Expand Down
16 changes: 12 additions & 4 deletions source/docs/casper/concepts/economics/consensus.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ title: Consensus

# Consensus Economics

[Highway consensus](../design/highway.md) is a continuous, trust-less process where a fixed set of validators engage in scheduled communication to advance the linear chain of finalized blocks, representing the history of changes to the global state of the blockchain. The fixed set of validators may change at each era boundary. The economics of this layer revolve around validator selection and incentivization of participation according to the schedule.
<!--TODO review this entire page with AL/BK/AS-->
<!--TODO Is Zug a Correct-by-construction (CBC) protocol (async liveness, provable safety)?-->

[Casper consensus](../design/consensus.md) is a continuous, trustless process where a fixed set of validators engage in scheduled communication to advance the linear chain of finalized blocks, representing the history of changes in the global state of the blockchain. The fixed set of validators may change at each era boundary. The economics of this layer revolve around validator selection and incentivization of participation according to the schedule.

## Entry {#entry}

Expand All @@ -27,7 +30,7 @@ Currently, delegation is unrestricted. Please visit [Delegation details](./staki

## Incentives {#incentives}

Correct operation of the Highway protocol requires the economics of the platform to discourage equivocation for safety and incentivize participation for liveness. Participation consists of on-time block proposals and timely responses to block proposals.
Correct operation of the consensus protocol requires the economics of the platform to discourage equivocation (signing conflicting consensus messages) for safety and incentivize participation for liveness. Participation consists of on-time block proposals and timely responses to block proposals.

Safety may be incentivized through slashing for equivocation. This feature is currently disabled but may be reactivated in the future.

AlexanderLimonov marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -71,15 +74,17 @@ This value gives us the maximum amount of CSPR that the validators can collectiv

#### Distribution {#distribution}

Validators receive tokens for proposing and finalizing blocks according to their performance. The concept of weight is crucial for understanding this distribution scheme:
Validators receive rewards for proposing and finalizing blocks according to their performance. The concept of weight is crucial for understanding this distribution scheme:
AlexanderLimonov marked this conversation as resolved.
Show resolved Hide resolved

- **Weight:** A validator's bonded stake, used in consensus
- **Assigned weight of a block/round:** The total stake of validators scheduled to participate in a block
- **Participated weight of a block/round:** The total stake of validators that end up participating or sending messages to finalize a block before the end of their respective round

To determine eligibility, we look at **on-time finalization (OTF)**. Validators should finalize blocks on time by sending required messages before the end of their respective round.

Switch blocks are not visible to the issuance calculation (as this calculation is performed in the switch block itself for each era), and, consequently, no tokens are issued for switch blocks.
Switch blocks are not visible to the issuance calculation (as this calculation is performed in the switch block itself for each era), and, consequently, no rewards are issued for switch blocks.
AlexanderLimonov marked this conversation as resolved.
Show resolved Hide resolved

<!-- TODO participation and eligibility seem to be too specific to Highway. Work with AL/BK to add new explanations or confirm that we can remove these.

##### Participation schedule {#participation-schedule}

Expand All @@ -90,15 +95,18 @@ Each validator is assessed according to its round exponent. All assigned validat
##### Eligibility {#eligibility}

Once a block has been proposed and enough time has passed, the history of protocol messages can be examined to detect whether the block was finalized on time, according to the conditions given above. If the block was _not_ finalized on time, validators receive a fraction of the expected tokens, governed by the `reduced_reward_multiplier` chainspec parameter. If the block was finalized on time, assigned validators share the reward proportionally to their stake, regardless of whether they have sent messages or not.
-->

### Inactivity {#inactivity}

Validators who send no messages during an entire era are marked as inactive and cease participating in the auction until they send a special deploy that reactivates their bid.

<!--TODO remove this? It is too old
AlexanderLimonov marked this conversation as resolved.
Show resolved Hide resolved
### Slashing {#slashing}

Please review our [Equivocator Policy](https://github.com/casper-network/ceps/blob/master/text/0038-equivocator-policy.md). We are currently conducting research into the utility of slashing as an incentive mechanism.

## Founding validators {#founding-validators}

Founding validators are subject to token lock-up, which prevents them from withdrawing any tokens from their bids for 90 days, then releases their genesis bid tokens in weekly steps, linearly, over an additional 90 days.
-->
Loading
Loading