123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759(*****************************************************************************)(* *)(* Open Source License *)(* Copyright (c) 2022 Nomadic Labs <contact@nomadic-labs.com> *)(* Copyright (c) 2022 TriliTech <contact@trili.tech> *)(* *)(* Permission is hereby granted, free of charge, to any person obtaining a *)(* copy of this software and associated documentation files (the "Software"),*)(* to deal in the Software without restriction, including without limitation *)(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *)(* and/or sell copies of the Software, and to permit persons to whom the *)(* Software is furnished to do so, subject to the following conditions: *)(* *)(* The above copyright notice and this permission notice shall be included *)(* in all copies or substantial portions of the Software. *)(* *)(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*)(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *)(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *)(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*)(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *)(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *)(* DEALINGS IN THE SOFTWARE. *)(* *)(*****************************************************************************)typeerror+=|(* `Temporary *)Sc_rollup_disputed|(* `Temporary *)Sc_rollup_no_valid_commitment_to_cement|(* `Temporary *)Sc_rollup_does_not_existofSc_rollup_repr.t|(* `Temporary *)Sc_rollup_no_conflict|(* `Temporary *)Sc_rollup_no_stakers|(* `Temporary *)Sc_rollup_not_staked|(* `Temporary *)Sc_rollup_not_staked_on_lcc_or_ancestor|(* `Temporary *)Sc_rollup_parent_not_lcc|(* `Temporary *)Sc_rollup_remove_lcc_or_ancestor|(* `Temporary *)Sc_rollup_staker_double_stake|(* `Temporary *)Sc_rollup_too_far_ahead|(* `Temporary *)Sc_rollup_commitment_from_futureof{current_level:Raw_level_repr.t;inbox_level:Raw_level_repr.t;}|(* `Temporary *)Sc_rollup_commitment_too_recentof{current_level:Raw_level_repr.t;min_level:Raw_level_repr.t;}|(* `Temporary *)Sc_rollup_unknown_commitmentofSc_rollup_commitment_repr.Hash.t|(* `Temporary *)Sc_rollup_bad_inbox_level|(* `Temporary *)Sc_rollup_game_already_started|(* `Temporary *)Sc_rollup_max_number_of_parallel_games_reachedofSignature.Public_key_hash.t|(* `Temporary *)Sc_rollup_wrong_turn|(* `Temporary *)Sc_rollup_no_game|(* `Temporary *)Sc_rollup_staker_in_gameof[`RefuterofSignature.public_key_hash|`DefenderofSignature.public_key_hash|`BothofSignature.public_key_hash*Signature.public_key_hash]|(* `Temporary *)Sc_rollup_timeout_level_not_reachedofint32*Signature.public_key_hash|(* `Temporary *)Sc_rollup_max_number_of_messages_reached_for_commitment_period|(* `Permanent *)Sc_rollup_add_zero_messages|(* `Temporary *)Sc_rollup_invalid_outbox_message_index|(* `Temporary *)Sc_rollup_outbox_level_expired|(* `Temporary *)Sc_rollup_outbox_message_already_applied|(* `Temporary *)Sc_rollup_staker_funds_too_lowof{staker:Signature.public_key_hash;sc_rollup:Sc_rollup_repr.t;staker_balance:Tez_repr.t;min_expected_balance:Tez_repr.t;}|(* `Temporary *)Sc_rollup_bad_commitment_serialization|(* `Permanent *)Sc_rollup_address_generation|(* `Permanent *)Sc_rollup_zero_tick_commitment|(* `Permanent *)Sc_rollup_commitment_past_curfew|(* `Permanent *)Sc_rollup_not_valid_commitments_conflictofSc_rollup_commitment_repr.Hash.t*Signature.public_key_hash*Sc_rollup_commitment_repr.Hash.t*Signature.public_key_hash|(* `Permanent *)Sc_rollup_wrong_staker_for_conflict_commitmentofSignature.public_key_hash*Sc_rollup_commitment_repr.Hash.t|(* `Permanent *)Sc_rollup_commitment_too_oldof{last_cemented_inbox_level:Raw_level_repr.t;commitment_inbox_level:Raw_level_repr.t;}|(* `Temporary *)Sc_rollup_no_commitment_to_cementofRaw_level_repr.t|(* `Permanent *)Sc_rollup_double_publishofSc_rollup_commitment_repr.Hash.t|Sc_rollup_empty_whitelist|Sc_rollup_whitelist_disabled|Sc_rollup_staker_not_in_whitelist|Sc_rollup_duplicated_key_in_whitelist|Sc_rollup_is_publiclet()=register_error_kind`Temporary~id:"smart_rollup_staker_in_game"~title:"Staker is already playing a game"~description:"Attempted to start a game where one staker is already busy"~pp:(funppfstaker->letbusyppf=function|`Refutersc->Format.fprintfppf"the refuter (%a) is"Signature.Public_key_hash.ppsc|`Defendersc->Format.fprintfppf"the defender (%a) is"Signature.Public_key_hash.ppsc|`Both(refuter,defender)->Format.fprintfppf"both the refuter (%a) and the defender (%a) are"Signature.Public_key_hash.pprefuterSignature.Public_key_hash.ppdefenderinFormat.fprintfppf"Attempted to start a game where %a already busy."busystaker)Data_encoding.(union[case(Tag0)~title:"Refuter"(obj1(req"refuter"Signature.Public_key_hash.encoding))(function`Refutersc->Somesc|_->None)(funsc->`Refutersc);case(Tag1)~title:"Defender"(obj1(req"defender"Signature.Public_key_hash.encoding))(function`Defendersc->Somesc|_->None)(funsc->`Defendersc);case(Tag2)~title:"Both"(obj2(req"refuter"Signature.Public_key_hash.encoding)(req"defender"Signature.Public_key_hash.encoding))(function|`Both(refuter,defender)->Some(refuter,defender)|_->None)(fun(refuter,defender)->`Both(refuter,defender));])(functionSc_rollup_staker_in_gamex->Somex|_->None)(funx->Sc_rollup_staker_in_gamex);letdescription="Attempt to timeout game too early"inregister_error_kind`Temporary~id:"smart_rollup_timeout_level_not_reached"~title:"Attempt to timeout game too early"~description~pp:(funppf(blocks_left,staker)->Format.fprintfppf"%s. The player %a has %ld left blocks to play."descriptionSignature.Public_key_hash.pp_shortstakerblocks_left)Data_encoding.(obj2(req"level_timeout"int32)(req"staker"Signature.Public_key_hash.encoding))(function|Sc_rollup_timeout_level_not_reached(blocks_left,staker)->Some(blocks_left,staker)|_->None)(fun(blocks_left,staker)->Sc_rollup_timeout_level_not_reached(blocks_left,staker));letdescription="Refutation game already started, must play with is_opening_move = false."inregister_error_kind`Temporary~id:"smart_rollup_game_already_started"~title:"Refutation game already started"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.unit(functionSc_rollup_game_already_started->Some()|_->None)(fun()->Sc_rollup_game_already_started);letdescription="Refutation game does not exist"inregister_error_kind`Temporary~id:"smart_rollup_no_game"~title:"Refutation game does not exist"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.unit(functionSc_rollup_no_game->Some()|_->None)(fun()->Sc_rollup_no_game);letdescription="Attempt to play move but not staker's turn"inregister_error_kind`Temporary~id:"smart_rollup_wrong_turn"~title:"Attempt to play move but not staker's turn"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.unit(functionSc_rollup_wrong_turn->Some()|_->None)(fun()->Sc_rollup_wrong_turn);letdescription="Maximum number of messages reached for commitment period"inregister_error_kind`Temporary~id:"smart_rollup_max_number_of_messages_reached_for_commitment_period"~title:"Maximum number of messages reached for commitment period"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.unit(function|Sc_rollup_max_number_of_messages_reached_for_commitment_period->Some()|_->None)(fun()->Sc_rollup_max_number_of_messages_reached_for_commitment_period);letdescription="Tried to add zero messages to a smart rollup"inregister_error_kind`Permanent~id:"smart_rollup_add_zero_messages"~title:description~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.unit(functionSc_rollup_add_zero_messages->Some()|_->None)(fun()->Sc_rollup_add_zero_messages);letdescription="Attempted to cement a commitment but there is no valid commitment to \
cement."inregister_error_kind`Temporary~id:"smart_rollup_no_valid_commitment_to_cement"~title:"No valid commitment to cement"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_no_valid_commitment_to_cement->Some()|_->None)(fun()->Sc_rollup_no_valid_commitment_to_cement);letdescription="Attempted to cement a disputed commitment."inregister_error_kind`Temporary~id:"smart_rollup_commitment_disputed"~title:"Commitment disputed"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_disputed->Some()|_->None)(fun()->Sc_rollup_disputed);letdescription="Attempted to use a smart rollup that has not been originated."inregister_error_kind`Temporary~id:"smart_rollup_does_not_exist"~title:"Smart rollup does not exist"~description~pp:(funppfx->Format.fprintfppf"Smart rollup %a does not exist"Sc_rollup_repr.ppx)Data_encoding.(obj1(req"rollup"Sc_rollup_repr.encoding))(functionSc_rollup_does_not_existx->Somex|_->None)(funx->Sc_rollup_does_not_existx);letdescription="No conflict."inregister_error_kind`Temporary~id:"smart_rollup_no_conflict"~title:"No conflict"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_no_conflict->Some()|_->None)(fun()->Sc_rollup_no_conflict);letdescription="No stakers for the targeted smart rollup."inregister_error_kind`Temporary~id:"smart_rollup_no_stakers"~title:"No stakers"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_no_stakers->Some()|_->None)(fun()->Sc_rollup_no_stakers);letdescription="This implicit account is not a staker of this smart rollup."inregister_error_kind`Temporary~id:"smart_rollup_not_staked"~title:"Unknown staker"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_not_staked->Some()|_->None)(fun()->Sc_rollup_not_staked);letdescription="Attempted to withdraw while not staked on the last cemented commitment or \
its ancestor."inregister_error_kind`Temporary~id:"smart_rollup_not_staked_on_lcc_or_ancestor"~title:"Smart rollup not staked on LCC or its ancestor"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_not_staked_on_lcc_or_ancestor->Some()|_->None)(fun()->Sc_rollup_not_staked_on_lcc_or_ancestor);letdescription="Parent is not the last cemented commitment."inregister_error_kind`Temporary~id:"smart_rollup_parent_not_lcc"~title:"Parent is not the last cemented commitment"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_parent_not_lcc->Some()|_->None)(fun()->Sc_rollup_parent_not_lcc);letdescription="Can not remove a staker committed on cemented."inregister_error_kind`Temporary~id:"smart_rollup_remove_lcc_or_ancestor"~title:"Can not remove a staker"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_remove_lcc_or_ancestor->Some()|_->None)(fun()->Sc_rollup_remove_lcc_or_ancestor);letdescription="Staker tried to double stake."inregister_error_kind`Temporary~id:"smart_rollup_staker_double_stake"~title:description~description~pp:(funppf()->Format.pp_print_stringppf"The staker tried to double stake, that is, it tried to publish a \
commitment for an inbox level where it already published another \
conflicting commitment. The staker is not allowed to changed its \
mind.")Data_encoding.empty(functionSc_rollup_staker_double_stake->Some()|_->None)(fun()->Sc_rollup_staker_double_stake);letdescription="Commitment is too far ahead of the last cemented commitment."inregister_error_kind`Temporary~id:"smart_rollup_too_far_ahead"~title:"Commitment too far ahead"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_too_far_ahead->Some()|_->None)(fun()->Sc_rollup_too_far_ahead);letdescription="Attempted to cement a commitment before its refutation deadline."inregister_error_kind`Temporary~id:"smart_rollup_commitment_too_recent"~title:"Commitment too recent"~description~pp:(funppf(current_level,min_level)->Format.fprintfppf"%s@ Current level: %a,@ minimal level: %a"descriptionRaw_level_repr.ppcurrent_levelRaw_level_repr.ppmin_level)Data_encoding.(obj2(req"current_level"Raw_level_repr.encoding)(req"min_level"Raw_level_repr.encoding))(function|Sc_rollup_commitment_too_recent{current_level;min_level}->Some(current_level,min_level)|_->None)(fun(current_level,min_level)->Sc_rollup_commitment_too_recent{current_level;min_level});letdescription="Unknown commitment."inregister_error_kind`Temporary~id:"smart_rollup_unknown_commitment"~title:"Unknown commitment"~description~pp:(funppfx->Format.fprintfppf"Commitment %a does not exist"Sc_rollup_commitment_repr.Hash.ppx)Data_encoding.(obj1(req"commitment"Sc_rollup_commitment_repr.Hash.encoding))(functionSc_rollup_unknown_commitmentx->Somex|_->None)(funx->Sc_rollup_unknown_commitmentx);letdescription="Attempted to commit to a bad inbox level."inregister_error_kind`Temporary~id:"smart_rollup_bad_inbox_level"~title:"Committing to a bad inbox level"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_bad_inbox_level->Some()|_->None)(fun()->Sc_rollup_bad_inbox_level);letdescription="Invalid rollup outbox message index"inregister_error_kind`Temporary~id:"smart_rollup_invalid_outbox_message_index"~title:"Invalid rollup outbox message index"~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_invalid_outbox_message_index->Some()|_->None)(fun()->Sc_rollup_invalid_outbox_message_index);letdescription="Outbox level expired"inregister_error_kind`Temporary~id:"smart_rollup_outbox_level_expired"~title:description~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_outbox_level_expired->Some()|_->None)(fun()->Sc_rollup_outbox_level_expired);letdescription="Outbox message already applied"inregister_error_kind`Temporary~id:"smart_rollup_outbox_message_already_applied"~title:description~description~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_outbox_message_already_applied->Some()|_->None)(fun()->Sc_rollup_outbox_message_already_applied);register_error_kind`Temporary~id:"smart_rollup_staker_funds_too_low"~title:"Staker does not have enough funds to make a deposit"~description:"Staker doesn't have enough funds to make a smart rollup deposit."~pp:(funppf(staker,sc_rollup,staker_balance,min_expected_balance)->Format.fprintfppf"Staker (%a) doesn't have enough funds to make the deposit for smart \
rollup (%a). Staker's balance is %a while a balance of at least %a is \
required."Signature.Public_key_hash.ppstakerSc_rollup_repr.ppsc_rollupTez_repr.ppstaker_balanceTez_repr.ppmin_expected_balance)Data_encoding.(obj4(req"staker"Signature.Public_key_hash.encoding)(req"smart_rollup"Sc_rollup_repr.encoding)(req"staker_balance"Tez_repr.encoding)(req"min_expected_balance"Tez_repr.encoding))(function|Sc_rollup_staker_funds_too_low{staker;sc_rollup;staker_balance;min_expected_balance}->Some(staker,sc_rollup,staker_balance,min_expected_balance)|_->None)(fun(staker,sc_rollup,staker_balance,min_expected_balance)->Sc_rollup_staker_funds_too_low{staker;sc_rollup;staker_balance;min_expected_balance});letdescription="Could not serialize commitment."inregister_error_kind`Temporary~id:"smart_rollup_bad_commitment_serialization"~title:"Could not serialize commitment."~description:"Unable to hash the commitment serialization."~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_bad_commitment_serialization->Some()|_->None)(fun()->Sc_rollup_bad_commitment_serialization);letdescription="Commitment inbox level is greater or equal than current level"inregister_error_kind`Temporary~id:"smart_rollup_commitment_from_future"~title:"Commitment from future"~description~pp:(funppf(current_level,inbox_level)->Format.fprintfppf"%s@ Current level: %a,@ commitment inbox level: %a"descriptionRaw_level_repr.ppcurrent_levelRaw_level_repr.ppinbox_level)Data_encoding.(obj2(req"current_level"Raw_level_repr.encoding)(req"inbox_level"Raw_level_repr.encoding))(function|Sc_rollup_commitment_from_future{current_level;inbox_level}->Some(current_level,inbox_level)|_->None)(fun(current_level,inbox_level)->Sc_rollup_commitment_from_future{current_level;inbox_level});letdescription="Commitment is past the curfew for this level."inregister_error_kind`Permanent~id:"smart_rollup_commitment_past_curfew"~title:"Commitment past curfew."~description:"A commitment exists for this inbox level for longer than the curfew \
period."~pp:(funppf()->Format.fprintfppf"%s"description)Data_encoding.empty(functionSc_rollup_commitment_past_curfew->Some()|_->None)(fun()->Sc_rollup_commitment_past_curfew);letdescription="Error while generating a smart rollup address"inregister_error_kind`Permanent~id:"smart_rollup_address_generation"~title:description~pp:(funppf()->Format.fprintfppf"%s"description)~descriptionData_encoding.empty(functionSc_rollup_address_generation->Some()|_->None)(fun()->Sc_rollup_address_generation);letdescription="Tried to publish a 0 tick commitment"inregister_error_kind`Permanent~id:"smart_rollup_zero_tick_commitment"~title:description~pp:(funppf()->Format.fprintfppf"%s"description)~descriptionData_encoding.empty(functionSc_rollup_zero_tick_commitment->Some()|_->None)(fun()->Sc_rollup_zero_tick_commitment);letdescription="Maximal number of parallel games reached"inregister_error_kind`Temporary~id:"smart_rollup_maximal_number_of_parallel_games_reached"~title:description~pp:(funppfstaker->Format.fprintfppf"%a has reached the limit for number of parallel games"Signature.Public_key_hash.ppstaker)~descriptionData_encoding.(obj1(req"staker"Signature.Public_key_hash.encoding))(function|Sc_rollup_max_number_of_parallel_games_reachedstaker->Somestaker|_->None)(funstaker->Sc_rollup_max_number_of_parallel_games_reachedstaker);letdescription="Conflicting commitments do not have a common ancestor"inregister_error_kind`Permanent~id:"smart_rollup_not_valid_commitments_conflict"~title:description~pp:(funppf(c1,s1,c2,s2)->Format.fprintfppf"The two commitments %a, staked by %a, and %a, staked by %a, does not \
have a common predecessor. Two commitments are in conflict when there \
direct predecessor is the same."Sc_rollup_commitment_repr.Hash.ppc1Signature.Public_key_hash.pp_shorts1Sc_rollup_commitment_repr.Hash.ppc2Signature.Public_key_hash.pp_shorts2)~descriptionData_encoding.(obj4(req"commitment"Sc_rollup_commitment_repr.Hash.encoding)(req"player"Signature.Public_key_hash.encoding)(req"opponent_commitment"Sc_rollup_commitment_repr.Hash.encoding)(req"opponent"Signature.Public_key_hash.encoding))(function|Sc_rollup_not_valid_commitments_conflict(c1,s1,c2,s2)->Some(c1,s1,c2,s2)|_->None)(fun(c1,s1,c2,s2)->Sc_rollup_not_valid_commitments_conflict(c1,s1,c2,s2));letdescription="Given commitment is not staked by given staker"inregister_error_kind`Permanent~id:"smart_rollup_wrong_staker_for_conflict_commitment"~title:description~pp:(funppf(staker,commitment)->Format.fprintfppf"The staker %a has not staked commitment %a"Signature.Public_key_hash.ppstakerSc_rollup_commitment_repr.Hash.ppcommitment)~descriptionData_encoding.(obj2(req"player"Signature.Public_key_hash.encoding)(req"commitment"Sc_rollup_commitment_repr.Hash.encoding))(function|Sc_rollup_wrong_staker_for_conflict_commitment(staker,commitment)->Some(staker,commitment)|_->None)(fun(staker,commitment)->Sc_rollup_wrong_staker_for_conflict_commitment(staker,commitment));letdescription="Published commitment is too old"inregister_error_kind`Permanent~id:"smart_rollup_commitment_too_old"~title:description~pp:(funppf(last_cemented_inbox_level,commitment_inbox_level)->Format.fprintfppf"The published commitment is for the inbox level %a, the last cemented \
commitment inbox level is %a. You cannot publish a commitment behind \
the last cemented commitment."Raw_level_repr.pplast_cemented_inbox_levelRaw_level_repr.ppcommitment_inbox_level)~descriptionData_encoding.(obj2(req"last_cemented_inbox_level"Raw_level_repr.encoding)(req"commitment_inbox_level"Raw_level_repr.encoding))(function|Sc_rollup_commitment_too_old{last_cemented_inbox_level;commitment_inbox_level}->Some(last_cemented_inbox_level,commitment_inbox_level)|_->None)(fun(last_cemented_inbox_level,commitment_inbox_level)->Sc_rollup_commitment_too_old{last_cemented_inbox_level;commitment_inbox_level});letdescription="No commitment to cement"inregister_error_kind`Permanent~id:"smart_rollup_no_commitment_to_cement"~title:description~pp:(funppfinbox_level->Format.fprintfppf"There is no commitment to cement at inbox level %a."Raw_level_repr.ppinbox_level)~descriptionData_encoding.(obj1(req"inbox_level"Raw_level_repr.encoding))(function|Sc_rollup_no_commitment_to_cementinbox_level->Someinbox_level|_->None)(funinbox_level->Sc_rollup_no_commitment_to_cementinbox_level);register_error_kind`Permanent~id:"smart_rollup_double_publish"~title:"The commitment was published twice by the operator"~pp:(funppfcommitment_hash->Format.fprintfppf"The operator publishing %a already published this commitment."Sc_rollup_commitment_repr.Hash.ppcommitment_hash)~descriptionData_encoding.(obj1(req"commitment_hash"Sc_rollup_commitment_repr.Hash.encoding))(function|Sc_rollup_double_publishcommitment_hash->Somecommitment_hash|_->None)(funcommitment_hash->Sc_rollup_double_publishcommitment_hash);register_error_kind`Permanent~id:"smart_rollup_empty_whitelist"~title:"Invalid whitelist: whitelist cannot be empty"~description:"Smart rollup whitelist cannot be empty"~pp:(funppf()->Format.fprintfppf"Smart rollup whitelist cannot be empty.")Data_encoding.empty(functionSc_rollup_empty_whitelist->Some()|_->None)(fun()->Sc_rollup_empty_whitelist);register_error_kind`Permanent~id:"smart_rollup_whitelist_disabled"~title:"Invalid whitelist: must be None when the feature is deactivated"~description:"The whitelist must be None when the feature is deactivated."~pp:(funppf()->Format.fprintfppf"Private smart rollup with whitelist ACL is disabled.")Data_encoding.empty(functionSc_rollup_whitelist_disabled->Some()|_->None)(fun()->Sc_rollup_whitelist_disabled);register_error_kind`Temporary~id:"smart_rollup_staker_not_in_whitelist"~title:description~description~pp:(funppf()->Format.pp_print_stringppf"The rollup is private and the submitter of the commitment is not \
present in the whitelist.")Data_encoding.empty(functionSc_rollup_staker_not_in_whitelist->Some()|_->None)(fun()->Sc_rollup_staker_not_in_whitelist);register_error_kind`Temporary~id:"smart_rollup_duplicated_key_in_whitelist"~title:description~description~pp:(funppf()->Format.pp_print_stringppf"The whitelist contains twice the same key. This is forbidden and all \
keys in the whitelist should be disctinct.")Data_encoding.empty(functionSc_rollup_duplicated_key_in_whitelist->Some()|_->None)(fun()->Sc_rollup_duplicated_key_in_whitelist);register_error_kind`Permanent~id:"smart_rollup_rollup_is_public"~title:description~description~pp:(funppf()->Format.pp_print_stringppf"The rollup is public, no update whitelist message can be executed.")Data_encoding.empty(functionSc_rollup_is_public->Some()|_->None)(fun()->Sc_rollup_is_public)