Protocol 004_Pt24m4xi

The main changes in this protocol are:

  • reduction of roll size to ꜩ8k from the ꜩ10k that were required in protocol 003
  • different gas accounting, leading to changes in minimal fee for operations
  • increase of gas limits per operation and per block
  • forbid the origination of new spendable smart-contracts
  • disable the re-activation of a delegate by crediting its account, the only way to re-activate a delegate is to register again as delegate
  • minor changes to RPCs

The breaking changes are listed in more details in the changelog.

Gas and fees

In protocol 003 the cost of IOs was slightly underestimated, and thus the balance between IOs and computation has been adjusted in this update. As a result, the number of IOs performed in a block stays unchanged, while the number of computation steps is doubled.

The formula to compute the required fees per operation has not changed:

fees >= minimal_fees +
        minimal_nanotez_per_byte * size +
        minimal_nanotez_per_gas_unit * gas

however, as a consequence of the increased gas accounting, the required fees have changed.

Operation Gas Fees Burn
transfer 1ꜩ 10200 0.001281ꜩ 0 or 0.257 (*)
transfer 1Mꜩ 10200 0.001284ꜩ 0 or 0.257 (*)
origination 10000 0.001265ꜩ 0.257
delegation 10000 0.001257ꜩ 0
revealing 10000 0.001268ꜩ 0

(*) if the recipient is a new address

It should be noted that a transfer has a slightly higher cost for larger amounts. The reason is that the amount is encoded using a binary representation with dynamic size and thus in the above formula size is slightly larger.

In all cases, it is recommended to simulate an operation before injecting it on the chain. Using tezos-client, it is possible to run only a simulation using the --dry-run option.


Breaking changes

  • [Alpha/Delegation: set the tokens_per_roll constant to 8000 tez](

    This patch sets the new default roll size to 8000 tez.

  • [Alpha/Delegation: do not activate delegate when crediting](

    Remove the unneeded method for a delegate to reactivate itself by provisioning its account. The delegate should simply re-register as delegate.

  • [Alpha/Michelson: double gas limit, except for I/Os that stay unchanged](

    This change doubles the maximum amount of gas for the block and for each transaction. The cost of I/Os is updated accordingly, so that the number of computation steps is increased, while the number of possible I/Os in a block stays unchanged.

  • [Alpha/Michelson: do not allow spendable smart contracts](

    This patches forbids the creation of spendable smart contracts, a current feature that is not necessary (it can be implemented from the contract’s code) and prevents some possible future optimisations.

    It also prevents the creation of non spendable non scripted contracts, which was mostly a design flaw that could let people inadvertantly lock funds.

    This is done by checking the flag in the origination operation rather than removing it so the change is lighter for third party software.

  • [Alpha/RPCs: fix wrong encoding name fields](

    This patch fixes a mislabeled field in the JSON encoding of operation receipts. The balance updates had a field level that actually contained a cycle. It is now named cycle.

    Third party software that make use of receipts such as block explorers or wallets may need to be updated accordingly. A simple solution is to support both during the protocol change period.

  • [Alpha/RPCs: change managerPubkey to underscores in json field names](

    This renames a field in the JSON format of origination operations to make it consistent with the others.

    Third party software must be updated to support this change. For applications that just consume this format, it is enough to just recognise both field names during the protocol change period. For applications that send this format to the node, it is necessary to send the right one depending on the next_protocol field of the interrogated block.

  • [Alpha/RPCs: rename field labels in Michelson typechecker output](

    This is a change in field names in the Michelson typechecking RPC output. A simple solution for third party tools to handle the change is to recognise both field names during the protocol update period.

  • [Alpha/RPCs: rename Michelson interpreter diagnostics field names](

    This patch changes some error IDs and error attributes to make it consistent with the rest of the codebase.

    Third party development tools that recognise errors based on this should be updated. As errors are only read, a simple solution is to support both during the protocol change period.

Minor changes