Announcing Hangzhou2

As announced in our previous blog post, a critical bug was found in the implemention of views introduced in protocol proposal PtHangzHo. Through the joint efforts of Marigold, Nomadic Labs, and Trilitech, we have developed a patched protocol PtHangz2a that includes a fix to this bug, as well as several other bug fixes implemented after injection of PtHangzHo.

Going Forward

We are currently in the Promotion Period for PtHangzHo. If, at the end of this period on November 18th, PtHangzHo has a quorum and supermajority of approving votes, it will be adopted on Mainnet.

Yesterday, Nomadic Labs has made available a new release candidate for Octez: 11.0~rc2. This version includes a user activated protocol override: nodes running this software will automatically switch to PtHangz2a on Mainnet, if PtHangzHo is adopted.

If PtHangzHo is accepted, all bakers and nodes running v11 of Octez will automatically switch to PtHangz2a. In this event it is crucial for all bakers and nodes to upgrade to v11, or they will find themselves unable to participate in the consensus.

If PtHangzHo is rejected, we will inject either PtHangz2a or a successor in the next cycle.

Changes in PtHangz2a

Fix to Views

The most critical fix was a correction of the semantics of views so that the step constants BALANCE, AMOUNT, SENDER, SELF, and SELF_ADDRESS are properly restored after returning from the view. This fix was introduced in MR 3654.

Fixes to RPC Endpoints

A bug was discovered during the testing of Hangzhou in the entrypoints RPC endpoint related to the new global constants feature such that the endpoint failed for any contracts that used global constants. The bug was fixed in MR 3731.

Additionally, Hangzhou introduced two “fixed” constants cache_layout and michelson_maximum_type_size that were missing from the the context/constants RPC endpoint. This was fixed in MR 3454.

Lastly, the new cache feature introduced a new RPC context/cache/contract_rank. In MR 3717, this path was changed to context/cache/contracts/rank for consistency with other RPC’s.

Gas Related Improvements

Several gas improvements related to the features introduced in H were made in MR 3441 and MR 3724.

Shell-related Improvements

While not part of the protocol, the shell-related improvements in Octez 11.0~rc2 are critical for proper migration. Altogether they cut migration block baking time by a factor of 2 and greatly reduce memory consumption. Those interested in the technical details can see MR’s 3679, 3722, 3383, and 3735.