1. Research & development
  2. > Blog >
  3. Faster finality with Emmy*

Faster finality with Emmy*

announcements
03 May 2021
Nomadic Labs
share:

We are happy to announce that Emmy* is set to be included in the next Tezos protocol proposal Granada,1 replacing the current consensus algorithm Emmy+. If Granada is adopted, Emmy* will generally halve the time between blocks, from 60 seconds to 30 seconds, and allow transactions to achieve significantly faster finality than under the current consensus algorithm, Emmy+.

Specifically, Emmy* updates Emmy+ by:

  • a tweak in the definition of the minimal delay function, and
  • an increase in the number of endorsement slots per block

both of which bring faster times to finality (in other words: shorter transaction settlement times) without compromising security.3 Please see the TZIP for the specification and issue 1027 for the implementation.

Thanks to these changes in Emmy*:

  • a block can be produced with a delay of 30 seconds with respect to the previous block if it has priority 0 and at least 60 percent of the total endorsing power per block;
  • the number of endorsement slots per block is increased from 32 to 256.

With these changes, on a healthy4 chain and for a Byzantine attacker with up to 33% stake for instance, the number of confirmations2 decreases to 2 blocks, therefore 1 minute, a sixfold improvement.

The following plot shows the number of confirmations (in log scale) for Emmy* vs Emmy+ when varying the stake fraction from 0.1 to 0.4. This plot assumes the “forks started in the past” scenario, meaning that we are interested in the finality of a block which already has a number of confirmations on top of it (and therefore, importantly, we know how healthy the chain was in the meanwhile), and we ask ourselves whether this number is sufficient. Here we assume a perfectly healthy chain. In the plot, the highest red point corresponds to 12 confirmations.

Image

To complement the above plot, the following table presents a subset of the data in text form. Each value in the table gives the number of confirmations for a given attacker stake fraction for Emmy* and Emmy+ in a “forks started in the past” scenario.

Attacker stake Emmy* Emmy+
0.1 2 2
0.15 2 3
0.2 2 3
0.25 2 4
0.3 2 5
0.33 2 6
0.35 3 7
0.4 3 12

So the final line above expresses that even if an attacker controls 40% of the stake, in Emmy* we only have to wait three blocks (90 seconds, assuming a good network, because the block time is 30 seconds) to be reasonably sure that our transaction is final, and in Emmy+ we have to wait twelve blocks (12 minutes, because the block time is 60 seconds).

Transaction finality in tezos-indexer

We are also happy to announce that tezos-indexer has a new feature: now it can tell you if your transaction is final in Emmy+.6 For instance: suppose your transaction is included in a block and that the next three blocks get baked in 190 seconds; then the indexer will tell you that your transaction is final with respect to:

  • the security threshold in Emmy+ which is 1e-8 and5
  • an adversary with at most 20% stake.

Note that 190 is just a bit more than 3 * 60 seconds, which is the minimal time needed to bake three blocks.

Now instead suppose that the three blocks get baked in more than 227 seconds: then you will need to check again after one more block/confirmation. Say the fourth block is baked in 60 seconds, so given that 4 blocks have been baked in about 287 seconds, the indexer will tell you that now you can consider your transaction as final.

We are proud to share a web demo for you to experiment for yourself with computing fork probabilities in both Emmy+ and Emmy*. It is based on our previous analysis of Emmy. If you want to dig deeper and are familiar with OCaml and Jupyter notebooks, you are welcome to follow these instructions and let your creativity run free.

Please note our previous disclaimer: Our analysis is based on a certain model of the blockchain and of an attacker. In particular, the model assumes reasonable bounds on the communication delays: that blocks and operations are diffused within 30 seconds. The attacker model is that of a baker not following the rules of the protocol: it may double bake and double endorse as it finds best in order to fork the chain. The attacker model of our analysis does not include a more powerful attacker capable of disturbing the network by blocking or delaying messages between honest participants.

Happy baking!


  1. The Tezos mainnet is currently running the Edo protocol. The Florence protocol is currently being voted on. Assuming all goes well and the Florence upgrade is accepted, the Granada proposal will follow, and Emmy* should be part of that. Subject to this all going well — we add this qualification because this is not something that Nomadic Labs can fully control; the voting process is up to you, our dear Tezos community! — then a further upgrade from Emmy* to Tenderbake is planned for a subsequent H proposal (name not yet fixed). 

  2. A confirmation refers to a block on top of the block with a transaction of interest to the user. 

  3. Emmy* is a Nakamoto-style algorithm (like Bitcoin), which means that its finality is probabilistic. Probabilistic finality means that as time passes we can become “reasonably sure” that a transaction we made is indeed included in the final blockchain (and not on some fork that might die out), where reasonably sure means “with probability of being wrong smaller than some reasonable threshold” — which we quantify as 5 * 1e-9 (five in a trillion). This puts our expectation of being wrong about a block being final at roughly once every two centuries. 

  4. We call a chain healthy over a period of time when in this period blocks have priority 0 and (almost) all endorsement slots are filled. A concrete healthiness measure is the delay of the chain with respect to the ideal chain where each block has a delay of one minute with respect to the previous block. 

  5. In Emmy+ blocks are baked at about 60 seconds, 1e-8 puts our expectation of being wrong about a block being final at the same roughly once every two centuries, which corresponds to the security threshold of 5 * 1e-9 in Emmy*. That is: we use a more rigorous security threshold in Emmy* because it’s faster so we can bake more blocks every two centuries. 

  6. This new feature of tezos-indexer will be updated with respect to Emmy* once Emmy* is adopted.