Protocol Nairobi#

This page documents the changes brought by protocol Nairobi with respect to Mumbai (see Protocol naming).

The code can be found in directory src/proto_017_PtNairob of the master branch of Octez.

New Environment Version (V9)#

This protocol requires a different protocol environment version than Mumbai. It requires protocol environment V9, compared to V8 for Mumbai. (MR !7178)

Smart Rollups#

  • Add a new kind of outbox messages batches allowing to specify the type of the transaction to execute on the L1. (MR !7941)

  • Add a field "kind" to the outbox message transaction json encoding. (MR !7941)

  • Update gas model for decoding output proofs. (MR !7116)

  • Improve readability of assert_commitment_not_too_far_ahead. (MR !7231)

  • Improve readability of assert_commitment_is_not_past_curfew. (MR !7230)

  • Remove dead code: legacy Internal for Tests signatures (MR !7234)

  • Prefer hex over b58check to encode filenames. (MR !7181)

  • Code quality improvements. (MR !7287)

  • Fix error raised when no commitment can be cemented. (MR !7286)

  • Use Ticket_transfer module in sc_rollup_operations. (MR !7438)

  • Refactor WASM PVM to enable breaking changes such as new host functions and parameterization of maximum call depth. (MRs !7724, !7726, !7910, !7912, !8076, !8280)

  • A new kind of internal message informs kernels when a protocol upgrade occurs. The Protocol_migration message is injected by the economic protocol during a protocol migration. (MRs !7729, !8300).

  • Existing smart rollups can benefit from new protocol improvements. The WASM PVM checks if it needs to upgrade to a new revision when it receives a Protocol_migration message. (MR !7730)

  • Remove the failsafe mechanism in inbox construction, aimed at errors that can never happen at begin application, block finalization, and migration. (MR !7833)

  • The field commitment in the operation Sc_rollup_cement is now deprecated. The protocol computes the valid candidate commitment to cement, and cements it. The provided commitment is omitted by the protocol and unchecked with the found one. (MR !7316)

  • Two new host functions have been added to the WASM PVM: store_delete_value (MR !8307), and store_create (MR !8375).

  • The store_get_nth_key host function is now deprecated, kernels should not use it as it is not fully deterministic (MR !8458).

  • The stack size limit of the WASM PVM has been significantly increased (MRs !7748, !8377).

  • Publishing twice the same commitment is no longer allowed. (MR !8269)

Zero Knowledge Rollups (ongoing)#

Rollups supporting cryptographic proofs of correct execution. (MRs !7342)

Data Availability Layer (ongoing)#

Distribution of rollup operations data off-chain. (MRs !7074, !7102, !7103, !7140, !7182, !7192, !7242, !7315, !7407, !7566, !7606, !7541, !7779)

Distribution of rollups data through reveal data channel. (MRs !7571)

Gas improvements#

Gas for signature checking of manager operations is made much more precise. It is now only consumed when a signature is actually checked (never for internal operations and only once per operation batch) and it depends on both the signature scheme and the length of the signed operation. This change leads to important reductions in the gas cost of manager operations and to considerable increase in transaction throughput. (MR !7591)

Breaking Changes#

Some manager operations such as revelations of public keys used to have constant gas costs. Due to the gas improvements of MR !7591), their gas cost now depends on the signature scheme and the length of the operation. For some schemes, the gas cost may even be larger than in previous protocol versions. In particular, revealing the public key of an implicit account consumed 1000 gas units previously, it now has the following gas costs depending on the signature scheme:

Signature scheme

Gas cost of reveal operation

ed25519 (tz1)

166 gas units

secp256k1 (tz2)

152 gas units

p256 (tz3)

1091 gas units

bls (tz4)

1671 gas units

  • The operation’s result Sc_rollup_cement_result now have a new field commitment, which is the commitment cemented by the application of the operation Sc_rollup_cement. (MR !7316)

RPC Changes#

Operation receipts#

Bug Fixes#

  • Fix consensus watermark encoding roundtrip. (MR !7210)

Minor Changes#

  • Adapt new mempool with proto add_operation. (MR !6749)

  • Relax (pre)endorsements branch condition and allow denunciations of a same endorsement on different branches. (MR !7828)

  • Relax (pre)endorsement checks during mempool validation. The mempool is now able to propagate (pre)endorsements for blocks in the near past or future, and from close cousin branches. Notably, the preendorsements that the baker is able to inject as soon as a block has been validated (without waiting for its full application) can now be immediately propagated by the mempool, allowing for a much faster PQC. (MR !7815)

  • The mempool now accepts and propagates consensus operations with a non-minimal slot (for performance reasons: testing the minimality of the slot there is too costly). Such operations are still invalid in blocks. To avoid mempools getting spammed with operations with various slots, double (pre)endorsement denunciations can now punish multiple operations from the same delegate with distinct slots. (MR !7927)

Internal#

  • Update migration for Mumbai. (MR !7428)

  • Michelson: add a forgotten tailcall annotation (MR !7656)

  • Michelson: the Michelson type “or”, previously referred to as union internally, is now referred to as or if there is no clash with the OCaml keyword “or”. Otherwise it is referred to as or_. (MR !7546)

  • Michelson: normalize all lambdas into optimized mode during elaboration. (MR !7829)

  • Michelson: IConst constructor renamed into IPush. (MR !7954)

  • Refactor and simplify consensus operation validation. (MR !7720)

  • Better documentation for the Token module (MR !7609)

  • Update gas model for hashing a skip list cell. (MR !7737)

  • Update gas cost for upgrading to librustzcash v5.0.0. (MR !7814)

  • Synchronized nodes’ mempool are now able to consider early (pre)endorsements. (MR !7828)

  • Removed obsolete TORU manager operations. (MR !7650)

  • Validate: add preendorsement power and locked round checks during block finalization in Partial_validation mode. (MR !7949)