Protocol Alpha#

This page lists the changes brought by protocol Alpha with respect to Seoul (see Protocol naming). For the list of changes brought by Seoul with respect to Rio, see Protocol Seoul.

For a higher-level overview of the most salient new features see the announcement blog.

The code can be found in directory src/proto_alpha of the master branch of Octez and the full documentation in this page.

Environment Version#

Smart Rollups#

Data Availability Layer#

Adaptive Issuance#

Michelson#

  • A new instruction named INDEX_ADDRESS has been added, it provides a unique identifier of type nat for values of type address, stored in the context. (MR !18866)

  • A new instruction named GET_ADDRESS_INDEX has been added, and returns the unique identifier of type nat option for values of type address, if the address has already been indexed through INDEX_ADDRESS. Returns None otherwise. (MR !18866)

Gas improvements#

Breaking Changes#

  • Updated GET /chains/<chain_id>/blocks/<block_id>/helpers/validators to group delegates by level. The returned list contains one element for each queried level (by default, only the current level), and contains four fields: the level itself, the consensus_threshold required for the current level, the consensus_committee of the current level, and delegates which is the list of validators for that level. Each element of this last list contains the fields present in the previous version of this RPC: delegate, “slots” which have been renamed to rounds, consensus_key, and companion_key (optional). Also include new fields for delegates, attesting_power, with their attesting power for the level, and attestation_slot, their slot for the given level. (MR !18931, !18959, !18984)

  • Updated GET /chains/<chain_id>/blocks/<block_id>/context/issuance/expected_issuance, changing baking_reward_bonus_per_slot with baking_reward_bonus_per_block, and attesting_reward_per_slot with attesting_reward_per_block. (MR !18959)

RPC Changes#

  • Added GET /chains/<chain_id>/blocks/<block_id>/helpers/stake_info, which returns the staking power distribution for all the active delegates at the current cycle. (MR !18019)

  • Added GET /chains/<chain_id>/blocks/<block_id>/context/destination/<destination>/index which returns the index of the given destination (e.g. tz1, Smart Rollup addresses, etc.) or null if the destination has not been indexed by the opcode INDEX_ADDRESS yet. (MR !18944)

  • Added GET /chains/<chain_id>/blocks/<block_id>/helpers/tz4_staker_number_ratio?cycle=<cycle> which returns the portion of active delegates that sign with a BLS key. The cycle argument, if omitted, defaults to the current cycle. (MR !19093)

Operation receipts#

  • Added address_registry_diff field in metadata for newly indexed addresses from the opcode INDEX_ADDRESS in the operation. (MR !18870)

Errors#

Protocol parameters#

  • Lowered the number of blocks per cycle (blocks_per_cycle) from 10800 (~1 day) to 1800 (~4 hours) on mainnet (with 8-second minimal block time). (MR !17583)

    • On ghostnet where minimal block time is 4s, lowered blocks_per_cycle from 10800 (~12 hours) to 3600 (~4 hours). (MR !17583)

  • In order for the duration of voting periods to stay about the same, updated the number of cycles per voting period (cycles_per_voting_period) on mainnet from 14 cycles (that is, ~14 days with old cycle duration) to 84 cycles (~14 days with new cycle duration). (MR !17583)

  • In order to keep the same duration in days for the activation of delegate parameters, updated the number of cycles after which submitted delegate parameters take effect (delegate_parameters_activation_delay) on mainnet from 5 cycles (that is, ~5 days with old cycle duration) to 30 cycles (~5 days with new cycle duration). (MR !17583)

  • Reduced blocks per commitment (blocks_per_commitment) to 14 to keep the number of nonces per cycle to 128. (!17583)

  • Reduced the nonce revelation period (nonce_revelation_threshold) from 300 blocks to 150 blocks. Reduced accordingly the VDF difficulty (vdf_difficulty) as well. (!17583)

  • Lowered the consensus_rights_delay protocol constant from 2 cycles to 1 cycle. (MR !18783)

  • Reduced the cache_stake_distribution_cycles and cache_sampler_state_cycles protocol constants from 5 cycles to 4 cycles, in order to reduce memory consumption. Only consensus_rights_delay + slashing_delay + 2 = 1 + 1 + 2 = 4 cycles are needed. (MR !18783)

  • Replaced the tolerated_inactivity_period protocol constant with three new protocol constants: tolerated_inactivity_period_low, tolerated_inactivity_period_high and tolerated_inactivity_period_threshold. The tolerated inactivity period now depends on the delegate’s stake ratio over the total active stake. If the ratio is greater than the tolerated_inactivity_period_threshold = 10 (expressed in ‘per thousand’), we apply a low tolerance tolerated_inactivity_period_low = 1. Otherwise, we apply a high tolerance tolerated_inactivity_period_high = 12. If the stake is unknown, we apply a low tolerance (e.g., after the delegate’s registration, reactivation, or decreasing its stake below minimal_stake). (MR !17582)

Bug Fixes#

  • Updated cache functions to include the context when needed. Previously backtracked gas costs for some cache calls are now properly accounted for, increasing by at most 2 units of gas per function call. Notably, the ``set delegate`` operation now has a slightly higher gas cost. (MR !19134)

Minor Changes#

Internal#

  • When activating this protocol directly from Genesis (so only in tests and on some test networks), baking rights of bootstrap accounts for the first few cycles are now computed with Adaptive Issuance enabled, meaning that delegated tez are already weighted less than staked tez. (MR !16945)

  • Remove obsolete internal field related to Adaptive Issuance activation. (MR !15789)

  • Added internal field related to All Bakers Attest All Blocks activation. (MR !19093)