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

Changes in Quebec #508

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
11 changes: 6 additions & 5 deletions docs/architecture/bakers.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Bakers
authors: "Tim McMackin"
last_update:
date: 12 April 2024
date: 13 January 2025
---

Baking is the process of creating new blocks in the Tezos blockchain.
Expand Down Expand Up @@ -39,7 +39,7 @@ Similarly, when tez are unstaked, they are unlocked after a certain number of cy
Staked tez may be slashed by the protocol if the baker misbehaves (e.g., proposes or attests two different blocks for the same level).

A delegate participates in consensus in proportion to their _baking power_: the more baking power a delegate has, the more likely it is to be selected to bake or to validate blocks and thus receive the rewards.
The baking power of a delegate is computed from the amounts of tez staked (by its own and by all its stakers) and owned (by its own and by all its delegators), knowing that non-staked tez are weighted half as much as staked tez in the sum.
The baking power of a delegate is computed from the amounts of tez staked (by its own and by all its stakers) and owned (by its own and by all its delegators), knowing that non-staked tez are weighted one-third as much as staked tez in the sum.

The delegate must have a baking power of at least 6,000 tez to be allowed to bake.

Expand All @@ -52,7 +52,8 @@ These services must run at all times with a stable power source and internet con
## Delegating to a baker

If you don't have enough tez to become a baker or don't want to run a baking node, you can choose a baker as your delegate, which makes you a _delegator_.
The delegate doesn't have control over your tez and you can spend your tez at any time or withdraw your delegation, but half of the tez that you delegate counts toward the baking power of the delegate. Also, delegated tez increase the voting power of your baker: a delegate's voting power is the sum of its own tez plus the tez delegated to it.
The delegate doesn't have control over your tez and you can spend your tez at any time or withdraw your delegation, but one-third of the tez that you delegate counts toward the baking power of the delegate.
Similarly, delegated tez increase the voting power of your baker: a delegate's voting power is the sum of its own tez plus one-third of the tez delegated to it.

In exchange, delegates may share some part of their rewards with you, in proportion to the amount of available tez in your account (technically, the minimal balance during each cycle).
Check your delegate's conditions for distributing rewards.
Expand Down Expand Up @@ -80,8 +81,8 @@ In summary, here is a comparison betwen the staking and delegating options above

  | Staking | Delegating
--- | --- | ---
Increase baking power | 100% | 50%
Increase voting power | 100% | 100%
Increase baking power | 100% | 33%
Increase voting power | 100% | 33%
NicNomadic marked this conversation as resolved.
Show resolved Hide resolved
Reward delay | None | 2 cycles (about 6 days)
Reward route | Direct to staker | To baker who manually sends to delegator
Funds availability | Frozen (locked) | Liquid (unlocked)
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/governance.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If a quorum is met, the top-voted proposal moves to the next period.
1. Promotion period: Users make a final vote on whether to apply the proposal
1. Adoption period: Users adapt their code and infrastructure to the proposal, and at the end of the period it is activated automatically

Each period lasts five blockchain cycles (40,960 blocks at 30-second intervals or roughly 14 days, 5 hours), comprising roughly 2 months and 10 days.
Each period lasts five blockchain cycles.

Only delegates can vote on proposals.
A delegate's voting power is the amount of tez that it has staked plus the tez that delegators have delegated to it, also called its _staking balance_.
Expand Down
12 changes: 12 additions & 0 deletions docs/architecture/governance/amendment-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,15 @@ It enables Tezos Layer 1 to attest the publication of data living outside Layer
* [Further proof-of-stake refinements](https://research-development.nomadic-labs.com/paris-announcement.html#further-proof-of-stake-refinements): Simplified computation and faster updates of consensus rights.

For more information, see the blog post from [Nomadic Labs](https://research-development.nomadic-labs.com/paris-announcement.html) and the [reference documentation](https://tezos.gitlab.io/protocols/019_paris.html).

## [Quebec](https://tezos.gitlab.io/protocols/021_quebec.html) (PsQuebec)

*Quebec* was autonomously activated on 20 January 2025.

Quebec's main changes are:

* [8-second block time](https://research-development.nomadic-labs.com/quebec-announcement.html#8-second-block-times-quebec-a-and-quebec-b): Lower latency and faster finality on layer 1 without compromising decentralization or security.
* [Adaptive maximum issuance bound](https://research-development.nomadic-labs.com/quebec-announcement.html#adaptive-maximum-issuance-bound-quebec-a-and-quebec-b): Adjusts staking rewards dynamically to encourage a target ratio of staked tez to liquid tez of 50%.
* [9x limit for external stake](https://forum.tezosagora.org/t/announcing-quebec-tezos-17th-protocol-upgrade-proposal/6418#p-12318-h-9x-limit-for-external-stake-1): Allows bakers to accept staked tez up to 9 times their own staked balance, up from 5 times in Paris.
* [Amending the computation of minimal delegated balances](https://research-development.nomadic-labs.com/quebec-announcement.html#amending-the-computation-of-minimal-delegated-balances-quebec-a-and-quebec-b): Changes how a baker's minimal delegated balance is calculated; now it is calculated only after all operations in a block have been applied.
* [Reducing the weight of delegated funds toward baking power](https://research-development.nomadic-labs.com/quebec-announcement.html#reducing-the-weight-of-delegated-funds-towards-baking-power-quebec-b-only): Reduces the weight of delegated funds toward the computation of baking power from half to one-third.
8 changes: 4 additions & 4 deletions docs/architecture/smart-rollups.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Smart Rollups
authors: 'Nomadic Labs, TriliTech, Tim McMackin'
last_update:
date: 28 November 2024
date: 13 January 2025
---

Smart Rollups play a crucial part in providing high scalability on Tezos.
Expand Down Expand Up @@ -179,9 +179,9 @@ When there is only one commitment left, either because all nodes published ident
The commitments for the next commitment period build on the last cemented commitment.

The refutation period lasts for a set number of blocks based on the `smart_rollup_challenge_window_in_blocks` protocol constant.
For example, currently the refutation period lasts 120,960 blocks on Mainnet.
Mainnet has 10 seconds between blocks as of the Paris protocol upgrade, which means that the refutation period lasts 2 weeks.
Ghostnet has 5 seconds between blocks but its refutation period is twice as many blocks, so its refutation period is also two weeks long.
For example, currently the refutation period lasts 151,200 blocks on Mainnet.
Mainnet has 8 seconds between blocks as of the Quebec protocol upgrade, which means that the refutation period lasts 2 weeks.
Ghostnet has 4 seconds between blocks but its refutation period is twice as many blocks, so its refutation period is also two weeks long.

### Triggering outbox messages

Expand Down
14 changes: 7 additions & 7 deletions docs/tutorials/join-dal-baker/run-baker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Step 4: Run an Octez baking daemon"
authors: Tezos core developers, Tim McMackin
last_update:
date: 31 December 2024
date: 13 January 2025
---

Now that you have a layer 1 node and a DAL node, you can run a baking daemon that can create blocks and attests to DAL data.
Expand All @@ -20,11 +20,11 @@ If you already have a baking daemon, you can restart it to connect to the DAL no
For example:

```bash
octez-baker-PsParisC run with local node "$HOME/.tezos-node" consensus_key --liquidity-baking-toggle-vote pass --adaptive-issuance-vote on --dal-node http://127.0.0.1:10732
octez-baker-PsQuebec run with local node "$HOME/.tezos-node" consensus_key --liquidity-baking-toggle-vote pass --adaptive-issuance-vote on --dal-node http://127.0.0.1:10732
```

Note that the command for the baker depends on the protocol version.
This example uses the ParisC protocol, so the command starts with `octez-baker-PsParisC`.
This example uses the Quebec protocol, so the command starts with `octez-baker-PsQuebec`.
Check the current version of the protocol to see what command to run, and change this command when you upgrade to newer versions of the protocol.

You may append `>>"$HOME/octez-baker.log" 2>&1` to redirect its output in a log file.
Expand All @@ -48,7 +48,7 @@ You can also refer to [Run a persistent baking node](https://opentezos.com/node-
[Service]
Type=simple
User=tezos
ExecStart=octez-baker-PsParisC run with local node "$HOME/.tezos-node" consensus_key --liquidity-baking-toggle-vote pass --adaptive-issuance-vote on --dal-node http://127.0.0.1:10732
ExecStart=octez-baker-PsQuebec run with local node "$HOME/.tezos-node" consensus_key --liquidity-baking-toggle-vote pass --adaptive-issuance-vote on --dal-node http://127.0.0.1:10732
WorkingDirectory=/opt/octez-baker
Restart=on-failure
RestartSec=5
Expand Down Expand Up @@ -114,10 +114,10 @@ Follow these steps to calculate the delay to receive attestation rights:
You may need to install the `jq` program to run these commands.

1. Using the values from the responses, calculate the attestation rights delay in seconds.
For example, if `consensus_rights_delay` is 3, `blocks_per_cycle` is 12,288, and `minimal_block_delay` is 5, a new baker receives attestation rights after a delay of 307,200 seconds.
For example, if `consensus_rights_delay` is 2, `blocks_per_cycle` is 15,360, and `minimal_block_delay` is 4, a new baker receives attestation rights after a delay of 122,880 seconds.

1. Divide the number of seconds by 86,400 to get the attestation delay in days.
For example, if the delay is 307,200 seconds, that time is about 3.5 days.
For example, if the delay is 122,880 seconds, that time is about 1.4 days.

The exact time depends on what time in the current cycle the account staked its tez.

Expand Down Expand Up @@ -165,7 +165,7 @@ WantedBy=multi-user.target
[Service]
Type=simple
User=tezos
ExecStart=octez-accuser-PsParisC run
ExecStart=octez-accuser-PsQuebec run
WorkingDirectory=/opt/octez-accuser
Restart=on-failure
RestartSec=5
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/join-dal-baker/run-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The version of Octez to use depends on the Tezos network that you are using.

```bash
brew tap serokell/tezos-packaging-stable https://github.com/serokell/tezos-packaging-stable.git
brew install tezos-client tezos-node tezos-dal-node tezos-baker-PsParisC
brew install tezos-client tezos-node tezos-dal-node tezos-baker-PsQuebec
```

- On Linux and Windows WSL, download and install the built binaries from the [Octez release page](https://gitlab.com/tezos/tezos/-/releases), as in this example for Ubuntu:
Expand Down
8 changes: 8 additions & 0 deletions docs/using/staking.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ For more information about staking for baking purposes, see [Baking](/architectu
In exchange for staking tez with a baker, users automatically receive a portion of the baker's rewards in proportion to how much they stake.
Users can stake any amount of tez, but there is a limit to how much staked tez a single baker can accept, and bakers must opt in to allow users to stake with them.

:::note How much tez do I receive in return for staking tez?

The amount of tez that you receive for staking tez depends on many factors, including how much you stake and how lucky your baker is.
Due to the mechanism of [adaptive issuance](https://tezos.gitlab.io/active/adaptive_issuance.html), the returns for staking also depend on the ratio of staked tez to total tez in existence, to encourage a balance of staked tez to liquid tez.
You can look up an estimated rate of return on block explorers.

:::

Staking has some similarities to the concept of a Smart Rollup bond, but there are important differences; see [Bonds](/architecture/smart-rollups#bonds).

## Staking as a Tezos user
Expand Down
Loading