# Nairobi (PtNairobi)

**URL:** <https://forum.tezosagora.org/t/nairobi-ptnairobi/5320>\
**Category:** Proposals\
**Created:** [April 13, 2023, 3:02pm UTC](https://forum.tezosagora.org/t/nairobi-ptnairobi/5320 "2023-04-13T15:02:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tezosagora](https://forum.tezosagora.org/letter_avatar_proxy/v4/letter/t/e274bd/32.png) [@tezosagora](https://forum.tezosagora.org/u/tezosagora)\
**Post date:** [April 13, 2023, 3:02pm UTC](https://forum.tezosagora.org/t/nairobi-ptnairobi/5320/1 "2023-04-13T15:02:54Z")

</div>

_This is a joint post from Nomadic Labs, Marigold, TriliTech, Oxhead Alpha, Tarides, DaiLambda, & Functori._

Following the successful activation of the [Mumbai protocol upgrade](https://research-development.nomadic-labs.com/Mumbai-is-live.html) on March 29th, we are happy to unveil our latest Tezos protocol proposal, **Nairobi**.

As usual, Nairobi’s “true name” is its hash, `PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf`.

The Nairobi protocol proposal contains several updates and improvements to the Tezos economic protocol, the most prominent being:

- An up to 8x increase in TPS for certain manager operations (including tez transfers and smart contract calls).
- Improved gas model for signatures to reflect the cost of different curves.
- Renaming endorsements to _attestations_.
- Faster propagation of pre-attestations to reach consensus earlier.
- New [host functions](http://tezos.gitlab.io/alpha/smart_rollups.html#host-functions) for Smart Rollups, and new [internal Layer 2 messages](https://tezos.gitlab.io/alpha/smart_rollups.html#internal-messages) allowing rollup kernels to be aware of Tezos protocol upgrades.

In this article, we give a preview into the improvements described above. More in-depth descriptions can be found in [Nairobi’s technical documentation](https://tezos.gitlab.io/nairobi/protocol.html). This protocol proposal includes further minor improvements and other changes – a complete list is provided in the protocol proposal’s [Changelog](https://tezos.gitlab.io/protocols/017_nairobi.html).

## [Increased TPS thanks to a finer-grained gas model](https://research-development.nomadic-labs.com/nairobi-announcement.html#increased-tps-thanks-to-a-finer-grained-gas-model)

Currently, the gas cost of signature verification for manager operations is a flat-tax constant, which over-approximates the required resources. With Nairobi, their cost depends on the cryptographic curve used and the size of the payload.

For instance, the gas cost of checking the signature of a `tz1` or implicit account will be significantly smaller than those for a `tz3`, in order to better reflect the difference in computational costs associated with signature verification when using the `ed25519` (tz1) and `p256` (tz3) cryptographic curves. See [this entry](https://tezos.gitlab.io/protocols/017_nairobi.html#gas-improvements) in Nairobi’s Changelog for further detail (including breaking changes).

Thanks to this finer-grained accounting of the gas costs for signature verification, the maximum number of _[manager operations](https://tezos.gitlab.io/nairobi/blocks_ops.html#manager-operations)_ (transactions, smart contract calls, Smart Rollups maintenance operations, etc.) that can be included in a block has increased by a factor of about 8.

Consequently, we observe a similar 8x increase in performance for certain common operations, such as basic tez transactions between `tz1` or `tz2` accounts[1](https://research-development.nomadic-labs.com/nairobi-announcement.html#fn:1). For smart contract calls the number will be lower, and operations involving ‘tz3’ accounts will see no increase due to their more computationally demanding signature scheme.

## [Renaming Endorsements to Attestations](https://research-development.nomadic-labs.com/nairobi-announcement.html#renaming-endorsements-to-attestations)

The term “endorsement” might incorrectly convey the idea that bakers (validators) approve of the contents of a block – that is, of the transactions and other operations chosen by the payload producer – even though in reality they are merely _attesting_ that a valid block has been produced. Moreover, ongoing work towards a [Data Availability Layer](https://research-development.nomadic-labs.com/smart-rollups-are-coming.html#ready-for-data-availability-solutions) will change the behavior of consensus operations in a way that makes the term “endorsements” less fitting.

We propose thus to rename endorsements into _“attestations”_ – a more precise term, which reflects better past, present, and potentially future semantics of these consensus operations.

With this protocol proposal, we begin this process by launching the deprecation of the `endorsing_rights` RPC endpoint, introducing `attestation_rights` as a replacement. This symbolic step is not breaking, as both old and new names would be available if Nairobi is activated on Mainnet. In future protocol proposals, we intend to go beyond symbolic steps though, and may have to introduce breaking changes in API names – which will be communicated with ample notice.

## [Fine-tuned validation pipelining for faster consensus](https://research-development.nomadic-labs.com/nairobi-announcement.html#fine-tuned-validation-pipelining-for-faster-consensus)

In order to keep Tezos consensus both live and fast, it is paramount to ensure consensus operations are validated and propagated swiftly – especially after Mumbai [halved block time from 30 to 15 seconds](https://research-development.nomadic-labs.com/mumbai-preview.html#pipelining-is-fully-deployed-giving-us-15-second-block-times) on Mainnet. To this end, this protocol proposal fine-tunes its Mempool module, which implements the business logic used by the Octez node’s to validate operations in the _mempool_.

With Nairobi, [an Octez node’s prevalidator](https://tezos.gitlab.io/shell/prevalidation.html) would initialize mempool validation faster, and it would moreover accept consensus operations that are _slightly in the future_ or branched in _cousin_ blocks[2](https://research-development.nomadic-labs.com/nairobi-announcement.html#fn:2). As a result, the node can immediately propagate pre-attestations for blocks which have just been validated but which have not yet been applied. Consequently, bakers participating [in a consensus committee](https://tezos.gitlab.io/nairobi/consensus.html#overview) would be able to communicate their votes in the [pre-attestation voting phase](https://research-development.nomadic-labs.com/a-look-ahead-to-tenderbake.html#levels-are-composed-of-rounds) faster, which should lead to reaching consensus earlier on block proposals.

## [Continuous Improvement of Smart Rollups](https://research-development.nomadic-labs.com/nairobi-announcement.html#continuous-improvement-of-smart-rollups)

Tezos is the constantly evolving blockchain so it is only fitting that Smart Rollups, its general-purpose Layer 2 solution, follow the same path.

This new protocol amendment, if deployed on Mainnet, will enable additional [host functions](http://tezos.gitlab.io/alpha/smart_rollups.html#host-functions) for all Smart Rollups. Nairobi also introduces a new kind of [Layer 2 internal message](https://tezos.gitlab.io/alpha/smart_rollups.html#internal-messages) which allows to broadcast to all originated rollups the activation of new Tezos protocol upgrades on Layer 1.

## [Buckle up, ‘Nairobinet’ test network will launch soon](https://research-development.nomadic-labs.com/nairobi-announcement.html#buckle-up-nairobinet-test-network-will-launch-soon)

Note that if Nairobi is voted in by the community, upgrading to Octez v17.0 (or later) will be necessary for participating in consensus.

In order to allow the community to start testing the Nairobi proposal as soon as possible, a release candidate for Octez v17.0 will be published in the coming days, and a dedicated protocol test network `Nairobinet` is also scheduled to begin soon. More information about this test network will be available on [https://teztnets.xyz/](https://teztnets.xyz/).

Read more about Tezos test networks [here](https://teztnets.xyz/), and don’t hesitate to reach out in the [Tezos Developer Slack](https://tezos-dev.slack.com/) or in the [Tezos Discord](https://discord.com/invite/5v5QVKjvc2) if you need help getting started.

* * *

1. These observations arise from our experiments using the TPS benchmark tool distributed with the Tezos protocol and the Octez suite. See this earlier [blog post](https://research-development.nomadic-labs.com/tps-evaluation.html) for further detail on how to replicate this experiment. [↩](https://research-development.nomadic-labs.com/nairobi-announcement.html#fnref:1)
2. Unpacking the jargon: operations in Tezos are _branched_ (that is, they reference) an earlier block hash. By _“slightly in the future”_, we mean consensus operations not branched in the predecessor of the target block (also known as the _“grandfather block”_) but rather on other close descendants. Then, a _“cousin_ _block”_ is a block who shares a grandfather with another block – usually the successor of a block proposal for a different round than the current mempool head. [↩](https://research-development.nomadic-labs.com/nairobi-announcement.html#fnref:2)
