Protocol Kathmandu#
This page contains all the relevant information for protocol Kathmandu (see Protocol naming).
The code can be found in the src/proto_014_PtKathma directory of the
master
branch of Tezos.
This page documents the changes brought by protocol Kathmandu with respect to Jakarta.
New Environment Version (V6)#
This protocol requires a different protocol environment than Jakarta. It requires protocol environment V6, compared to V5 for Jakarta. (MR !4961)
Smart Contract Optimistic Rollups (ongoing)#
Rollups supporting execution of smart contracts. (MRs !4933, !4812, !4938, !4765, !4699, !4964, !5138, !5070, !5219, !5160, !5218, !5125, !4968, !5305, !5359, !5280, !5202, !5260, !5201, !5349, !5116, !5383, !5360, !5342, !5351, !5369, !5412, !5430, !5379, !5435, !5398, !5362, !5352, !5439, !5396, !5420, !5327, !5416, !5434, !5442, !5395, !5498, !5492, !5465, !5505, !5504, !5443, !5543, !5548, !5399, !5478, !5551, !5493, !5530, !5559, !5519, !5537, !5555, !5544, !5521, !5568, !5609, !5516, !5549)
Data Availability Layer (ongoing)#
Distribution of rollup operations data off-chain. (MRs !5371, !5501, !5508, !5527, !5423)
Updated randomness generation#
Introduce a new randomness generation protocol based on Verifiable Delay Functions (VDFs). See Randomness generation for an explanation of how this protocol works. (MRs !5064, !5848)
Contract Event Logging#
Contracts may now emit events thanks to a new EMIT
instruction.
See Event for more information. (MRs !4656, !5715, !5724, !5731)
Increase_paid_storage#
Increase_paid_storage is a new operation that enable a payer to increase the paid storage of a smart contract by some bytes amount. (MR !5605)
Breaking Changes#
Reveal operations can only occur at the head of a manager operation batch (MR !5182).
Restore all-or-nothing semantics of manager operation batches by enforcing that failing reveal operations do not take effect (MR !5182).
Operations with non-deserializable scripts may now be propagated and included in blocks. If such an operation is in a block, its application will fail so the operation will have no effect, but its fees will still be taken. (MR !5506)
The one-operation-per-manager-per-block restriction (1M) is now enforced in blocks. It was previously (optionally) enforced by the prevalidator using the plugin mempool filters. This meant that a baker could still include several operations from the same manager in its own block. This is no longer possible: the application of a block containing more than one operation from the same manager will now fail. (MR !5557)
VDF phase added after RANDAO in randomness generation. Nonces for generating the random seed must now be revealed in the first 256 blocks of a cycle instead of anytime in a cycle. (MRs !5064, !5848)
RPC Changes#
Add a new RPC for querying data found on the voting listings for a delegate, i.e. voting power, casted ballots and proposals in the current voting period. (MR !4577)
/chains/<chain_id>/blocks/<block>/context/delegates/<delegate_pkh>/voting_info
Add a new RPC to execute contracts’ views offchain. (MR !4810)
/chains/<chain_id>/blocks/<block>/helpers/scripts/run_script_view
Deprecate the
endorsing_rights
RPC for whole cycles, by deprecating thecycle
parameter. (MR !5082)Some contract RPCs working on originated contracts only may return a different error than before on implicit accounts. (MR !5373)
Operation receipts#
Remove field
consumed_gas
, deprecated in Jakarta. Use fieldconsumed_milligas
instead. (MRs !5536, !5703)Operations that are both manager operations and internal operations returned by Michelson scripts now have different names for receipt encodings. This concerns transations, originations and delegations, where the word “internal” explicitly appears in the case of internal operation receipts. (!5149)
Successful contract execution attaches to the transaction receipt a list of contract events. See Event for more information.
New operation
Vdf_revelation
introduced for VDF revelation. See Randomness generation for more details.New operation
Increase_paid_storage
introduced to increase the paid storage of a smart contract. (MR !5605)
Bug Fixes#
Consume constant gas
Michelson_v1_gas.Cost_of.manager_operation
during precheck: this fixes some cases of operations passing precheck even though they obviously do not have enough gas to apply the external operation, e.g. whengas_limit = 0
. (MR !5506)Emptying an implicit account does not cost extra-gas anymore. (MR !5566)
The
helpers/scripts/run_operation
RPC now checks whether all operations in a batch have the same source. (MR !5557)Fix a discrepancy in gas consumption of contract origination between dry run and actual application (MR !5659)
Fix the
delegated_balance
rpc, which reported an incorrect value for delegates that have frozen bonds (MR !5765)
Minor Changes#
New error
Remove_commitment_too_early
in TORU. (MR !4895)New error
Inconsistent_sources
. (MR !5475)Fix name of encoding of round_overflow. (MR !5089)
Split internal transactions. (MR !5195)
Allow implicit accounts to delegate at bootstrap time. (MR !5071)
Fail when attempting to delegate from unrevealed key at bootstrap. (MR !5645)
Allow to register a governance dictator for testnets and private chains. (MRs !4547, !5662, !5612, !5751)
Update gas for K. (MR !5702)
Internal#
Update migration for Jakarta. (MR !5059)
Uncurry some functions in Michelson interpreter. (MR !5406)
Make carbonated maps available to the Raw context (MRs !4815, !4891)
Move Michelson representation modules above the Alpha_context abstraction barrier. (MR !4418)
Further cleanup on Tenderbake code. (MR !4513)
Rename
run_view
intorun_tzip4_view
for consistency withrun_script_view
. Does not affect the existingrun_view
RPC. (MR !4810)Precheck no longer returns the gas it has consumed. Instead of “replaying” the gas from precheck,
apply_manager_contents
consumes the same gas again step by step. (MR !5506)Precheck no longer tries to deserialize scripts. It does still check that the operation has enough gas for these deserializations (by consuming an estimated gas cost based on the bytes size: this has not changed). (MR !5506)
Split precheck into two parts: checks and effects. The checks part is effect-free. The effects part consists of the modifications of the context that happen regardless of whether the application of the operation succeeds: take the fees, increment the account’s counter, and remove the operation’s gas limit from the available block gas. The checks part must ensure that the effects part cannot fail. (MR !5557)
Move the checks part of precheck (see above) to a new file
validate_operation.ml
. The effects part remains inapply_operation
and is renamed totake_fees
. The newValidate_operation.validate_operation
function is called beforeApply.apply_operation
inMain
. It stores its own state inMain.validation_state
and works with the context from the beginning of the block (which is fine thanks to the 1M restriction). For now,validate_operation
does nothing for non-manager operations, but we plan to extend it to all operations in the future. (MR !5557)Remove
Main.check_manager_signature
. Instead,Main.precheck_manager
now takes an additional argument that indicates whether it should check the signature. (MR !5557)Add a type
Validate_operation.stamp
in order to guarantee that an operation is always validated before it is applied. Indeed, a value of this type may only be created inValidate_operation
, and is required byApply.apply_operation
and a few other functions inApply
. (MR !5557)Expose length function in raw-context. (MR !4361)
Optimize parsing of destination. (MR !5317)
Contract-compatible encodings for implicit and originated accounts. (MR !5222)
CPMM address is a smart-contract. (MR !5224)
Improve gas cost of transfer to implicit account. (MR !5261)
Restrict external transfers to non-tx-rollups. (MR !5326)
Fix the size of Micheline code predicted by the size model. (MR !5709)
Internal refactorings in Michelson typechecker and interpreter. (MRs !4722, !4723, !5077, !5104, !5474)
Other internal refactorings or documentation. (MRs !4890, !4721, !5113, !5114, !5005, !5188, !5309, !5310, !5308, !5312, !5313, !5298, !5374, !5381, !5384, !5513, !5494, !5582, !5553)
Invoice#
@g.b.fefe rewarded 3000 ꜩ for code contributions (testnet dictator key) included in this protocol. (MR !5838)