Protocol Paris#
This page documents the changes brought by protocol Paris with respect to Oxford (see Protocol naming).
The code can be found in directory src/proto_020_PsParisC of the master
branch of Octez.
Environment Version#
This protocol requires a different protocol environment version than Oxford. It requires protocol environment V12, compared to V11 for Oxford.
Removed
Z.extract
andZ.extract_signed
from all inactive protocols environments.
Smart Rollups#
Data Availability Layer#
Introduced a new optional field
dal_content
to consensus attestation operations. The existing encoding of consensus attestations remains unchanged when this field is not present. A new encoding was introduced for the case when the field is present. The two cases are distinguished via an encoding tag. The newly introduced tag “23” must be used for attestations containing a DAL payload. (MR !11462).Introduced a new manager operation
dal_publish_commitment
. This operation can be used to send a commitment over the data (to be send) over the DAL network. Do note that this operation itself does not contain the data themselves. Instead, it contains the slot index, the commitment over the data, and a proof regarding the size for those data. The data must be sent using the DAL node. For more information on how it works, please read the DAL documentation.Optimize the DAL commitment publication operation by memoizing the cryptobox. (MR !11594)
For smart-rollups: Introduced two reveal inputs. One for importing the data, called
dal_page
. Data can be fed to the kernel by page of size 4096 bytes. Another reveal input nameddal_parameters
enables kernel to read the DAL parameters. This should ease the writing of smart rollups kernels to make them generic over the values of those parameters. For more information on how it works, please read the DAL smart rollup integration.
Adaptive Issuance#
Active-delegates update and autostaking are now done before staking-rights computation at cycle end. (MR !11972)
The staking balance is now explicitly initialized when a delegate is registered. (MR !11197)
The issuance reward coeff is now computed only once. It used to be computed twice, once for the bonus, assuming a zero bonus, and once afterwards taking the bonus into account. (MR !10935)
The minimal frozen stake is now checked before applying limits and then re-checked after applying limits and edge. (MR !11086)
Min/max issuance bounds evolve progressively over the first 6 months after the eventual activation of Adaptive Issuance. (MR !11293)
The slashing from denunciations is delayed to the end of the cycle ending the denunciation period. (MR !11684, !11879)
A delegate denounced for double baking or double attesting is now always forbidden from baking and attesting in the near future (previously, they were only forbidden if recent and incoming slashes summed up to at least 51% of their stake). This interdiction is lifted once all pending slashes have been applied and the delegate has enough frozen deposits to insure their baking rights for the next cycle. This will happen automatically
consensus_right_delays
(which is 2) cycles when rights computed right after the slash take effect, or possibly sooner if the delegate was overstaked or actively stakes more funds to match their previously computed rights. This change aims to protect bakers from incurring further penalties if a faulty configuration causes them to double bake/attest, by giving them some time to fix it. (MR !11704)Denunciations are now applied in chronological order of the denounced double signing events, instead of chronological order of denunciation inclusion. (MR !11854)
Under the new slashing feature flag, the amount slashed for a double attestation or pre-attestation depends on the number of slots owned by misbehaving delegates in the exact block this double signing event occurred. This greatly diminishes potential losses in cases of legitimate accidents that do not threaten the chain, while keeping a strong incentive against potential consensus attacks. (MR !11854)
Autostaking now happens only after pending denunciations are applied. (MR !11880)
Activated per-block vote for Adaptive Issuance. (MR !11935)
Added a feature flag which would force enabling Adaptive Issuance upon protocol activation. (MR !11559)
Updated the estimation for Mainnet’s total tez supply which would be used while eventually migrating from Oxford to protocol P. (MR !11996)
Added a
min_delegated_in_current_cycle
field to the delegates’ information reported viaGET /chains/<chain_id>/blocks/<block_id>/context/delegates/<delegate_id>
. (MR !12018)Activating new slashing flag. (MR !12013)
Breaking Changes#
A new
dal_attestation
field has been added to theblock_metadata
indicating the attested slots. The slots being attested are the slots that were publishedattestation_lag
levels ago (MRs !11903, !12063) (see DAL documentation for more context).The protocol no longer relies on stake snapshots to compute rights. Instead:
Rights originating from staked tez are computed from the value at the end of the cycle;
Rights originating from delegated tez are computing using the minimum value over the cycle. (MR !10455)
Attestation
is now the default for operations encoding. (MR !11861)
RPC Changes#
Make
liquidity_baking_subsidy
a protocol constant independent of Adaptive Issuance (MR !11971). This changes the JSON from the RPC/chains/<chain_id>/blocks/<block_id>/context/constants
and/chains/<chain_id>/blocks/<block_id>/context/issuance/expected_issuance
.Add RPC to get contract’s estimated own pending slashed amount according to the currently available denunciations.
GET /chains/<chain_id>/blocks/<block_id>/context/contracts/<contract_id>/estimated_own_pending_slashed_amount
. (MR !12016)Add RPC to get delegate’s estimated shared pending slashed amount according to the currently available denunciations.
GET /chains/<chain_id>/blocks/<block_id>/context/delegates/<delegate_id>/estimated_shared_pending_slashed_amount
. (MR !12016)Extend the delegate info RPC response by adding a new boolean field named
pending_denunciations
. This field is set to true if there are any pending denunciations associated with the specified delegate, and set to false otherwise.GET /chains/<chain_id>/blocks/<block_id>/context/delegates/<delegate_id>/
. (MR !12042)Added RPC to get
min_delegated_in_current_cycle
for a delegate usingGET '/chains/<chain_id>/blocks/<block_id>/context/delegates/<delegate_id>/min_delegated_in_current_cycle'
. (MR !12018)New RPC to list the pending denunciations of a given delegate.
GET /chains/<chain_id>/blocks/<block_id>/context/delegates/<delegate_id>/denunciations
. (MR !11885)Removed RPC related to stake snapshot.
GET /chains/<chain_id>/blocks/<block_id>/context/selected_snapshot
. (MR !11390)Updated the description of delegates’
frozen_deposits
queried viaGET '/chains/<chain_id>/blocks/<block_id>/context/delegates/<delegate_id>/frozen_deposits'
. (MR !12010)Added RPC
GET '/chains/<chain>/blocks/<block>/context/dal/commitments_history'
returning the current last skip list cell. (MR !12420)Added RPC
GET '/chains/<chain>/blocks/<block>/context/dal/published_slot_headers'
that returns the published slot headers of a given level. (MR !12204)
Protocol parameters#
Replaced
preserved_cycles
with 3 constantsconsensus_rights_delay
,blocks_preservation_cycles
anddelegate_parameters_activation_delay
. (MR !11188, !11280, !11279, !11220, !11562, !11629)Updated
consensus_rights_delay
from5
to2
. (MR !11568)Set the number of blocks preservation cycles to 1. (MR !11325)
Set
liquidity_baking_subsidy
to 5 tez issued per minute (MR !11971)Removed
blocks_per_stake_snapshot
. (MR !11393)Adapted Smart Rollups constants to account for 10s minimal block time. (MR !11445)
Added feature flag to force AI activation at protocol activation. (MR !11559)
Operation receipts#
To better differentiate Deposits coming from ‘rewards from bakers own stakes’ from ‘the edge bakers may take from their stakers rewards’, the balance updates field has been specialized. The field {“staker”:{“baker”: <delegate_pkh>}} is now split into {“staker”:{“baker_own_stake”: <delegate_pkh>}} and {“staker”:{“baker_edge”: <delegate_pkh>}}. (MR !12258)
10s Blocks Time (MR !11288)#
Blocks time have been reduced from 15 seconds to 10 seconds. That is, a block can be produced with a delay of 10 seconds with respect to the previous block, if both blocks have round 0. This change comes with updating many related protocol parameters in order to match the reduced blocks time. In particular, the following quantities are kept the same:
the minimal time period of a cycle (namely, 2 days, 20 hours, and 16 minutes),
the length of the nonce revelation period (namely, around 2 hours and 8 minutes)
the number of nonce commitments per cycle (namely, 128),
the maximum rewards per minute (namely 80 tez), and therefore roughly the same inflation,
the minimal “time to live” of an operation (namely, 1 hour),
the block gas limit per minute (namely 10400000 gas),
the ratio between the liquidity baking subsidy and the maximum rewards per block (namely, 1/16).
Parameter (unit) |
Old (oxford) value |
New value |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Minor Changes#
Michelson error traces for elaboration of invalid data was made more consistent by adding errors in some cases (BLS12-381 values, Sapling transactions, and timelocks). (MR !10227)
At every level, a delegate may now be slashed for one double baking per round, one double attesting per round, and one double preattesting per round. Previously, it was at most one double baking for the whole level, and one double operation (either attestation or preattestation) for the whole level. (MRs !11826, !11844, !11898)
Added the
D_Ticket
Michelson primitives. (MR !11599)set_deposits_limit
operation is disabled when autostaking is off. (MR !11866)Added the
D_Ticket
Michelson primitives. (MR !11599)
Internal#
On top of the 3 new parametric constants
consensus_rights_delay
,blocks_preservation_cycles
anddelegate_parameters_activation_delay
which replacepreserved_cycles
, we added pseudo-constants that derive from them :issuance_modification_delay
,adaptive_issuance_activation_delay
,tolerated_inactivity_period
,consensus_key_activation_delay
,slashable_deposits_period
. (MR !11188, !11280, !11279, !11627, !11629)The staking balance is now explicitly initialized when a delegate is registered. (MR !11197)
The issuance reward coefficient is now computed only once. It used to be computed twice, once for the bonus, assuming a zero bonus, and once afterwards taking the bonus into account. (MR !10935)
The shell uses LPBL instead of LAFL to trigger history clean-up. LPBL is
blocks_preservation_cycles
in the past. (MR !11201)Enforced the 2 blocks finality of Tenderbake in the storage. (MR !11262)
Frozen deposits are cleaned during stitching for
P
. (MR !11341)Moved context’s subtree
staking_balance/current
tostaking_balance
at stiching for protocol P. (MR !11391)During the eventual context stitching for protocol P’s activation, the
last_snapshot
entry will be removed from the context, as it would be no longer needed. (MR !11394)sc_rollup parametric constants update consistency is now checked. (MR !11555)
Pending denunciations are cleaned at protocol stitching. (MR !11833)
Add tooling to devtools to compute total tez supply offline. (MR !11978)