package tezos-protocol-016-PtMumbai
Tezos protocol 016-PtMumbai package
Install
Dune Dependency
Authors
Maintainers
Sources
tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/src/tezos_raw_protocol_016_PtMumbai/sc_rollup_errors.ml.html
Source file sc_rollup_errors.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678
(*****************************************************************************) (* *) (* 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. *) (* *) (*****************************************************************************) type error += | (* `Temporary *) Sc_rollup_disputed | (* `Temporary *) Sc_rollup_does_not_exist of Sc_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_future of { current_level : Raw_level_repr.t; inbox_level : Raw_level_repr.t; } | (* `Temporary *) Sc_rollup_commitment_too_recent of { current_level : Raw_level_repr.t; min_level : Raw_level_repr.t; } | (* `Temporary *) Sc_rollup_unknown_commitment of Sc_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_reached of Signature.Public_key_hash.t | (* `Temporary *) Sc_rollup_wrong_turn | (* `Temporary *) Sc_rollup_no_game | (* `Temporary *) Sc_rollup_staker_in_game of [ `Refuter of Signature.public_key_hash | `Defender of Signature.public_key_hash | `Both of Signature.public_key_hash * Signature.public_key_hash ] | (* `Temporary *) Sc_rollup_timeout_level_not_reached of int32 * 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_low of { 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_conflict of Sc_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_commitment of Signature.public_key_hash * Sc_rollup_commitment_repr.Hash.t | (* `Permanent *) Sc_rollup_invalid_commitment_to_cement of { valid_candidate : Sc_rollup_commitment_repr.Hash.t; invalid_candidate : Sc_rollup_commitment_repr.Hash.t; } | (* `Permanent *) Sc_rollup_commitment_too_old of { last_cemented_inbox_level : Raw_level_repr.t; commitment_inbox_level : Raw_level_repr.t; } let () = 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:(fun ppf staker -> let busy ppf = function | `Refuter sc -> Format.fprintf ppf "the refuter (%a) is" Signature.Public_key_hash.pp sc | `Defender sc -> Format.fprintf ppf "the defender (%a) is" Signature.Public_key_hash.pp sc | `Both (refuter, defender) -> Format.fprintf ppf "both the refuter (%a) and the defender (%a) are" Signature.Public_key_hash.pp refuter Signature.Public_key_hash.pp defender in Format.fprintf ppf "Attempted to start a game where %a already busy." busy staker) Data_encoding.( union [ case (Tag 0) ~title:"Refuter" (obj1 (req "refuter" Signature.Public_key_hash.encoding)) (function `Refuter sc -> Some sc | _ -> None) (fun sc -> `Refuter sc); case (Tag 1) ~title:"Defender" (obj1 (req "defender" Signature.Public_key_hash.encoding)) (function `Defender sc -> Some sc | _ -> None) (fun sc -> `Defender sc); case (Tag 2) ~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)); ]) (function Sc_rollup_staker_in_game x -> Some x | _ -> None) (fun x -> Sc_rollup_staker_in_game x) ; let description = "Attempt to timeout game too early" in register_error_kind `Temporary ~id:"smart_rollup_timeout_level_not_reached" ~title:"Attempt to timeout game too early" ~description ~pp:(fun ppf (blocks_left, staker) -> Format.fprintf ppf "%s. The player %a has %ld left blocks to play." description Signature.Public_key_hash.pp_short staker blocks_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)) ; let description = "Refutation game already started, must play with is_opening_move = false." in register_error_kind `Temporary ~id:"smart_rollup_game_already_started" ~title:"Refutation game already started" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.unit (function Sc_rollup_game_already_started -> Some () | _ -> None) (fun () -> Sc_rollup_game_already_started) ; let description = "Refutation game does not exist" in register_error_kind `Temporary ~id:"smart_rollup_no_game" ~title:"Refutation game does not exist" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.unit (function Sc_rollup_no_game -> Some () | _ -> None) (fun () -> Sc_rollup_no_game) ; let description = "Attempt to play move but not staker's turn" in register_error_kind `Temporary ~id:"smart_rollup_wrong_turn" ~title:"Attempt to play move but not staker's turn" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.unit (function Sc_rollup_wrong_turn -> Some () | _ -> None) (fun () -> Sc_rollup_wrong_turn) ; let description = "Maximum number of messages reached for commitment period" in register_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:(fun ppf () -> Format.fprintf ppf "%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) ; let description = "Tried to add zero messages to a smart rollup" in register_error_kind `Permanent ~id:"smart_rollup_add_zero_messages" ~title:description ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.unit (function Sc_rollup_add_zero_messages -> Some () | _ -> None) (fun () -> Sc_rollup_add_zero_messages) ; let description = "Attempted to cement a disputed commitment." in register_error_kind `Temporary ~id:"smart_rollup_commitment_disputed" ~title:"Commitment disputed" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_disputed -> Some () | _ -> None) (fun () -> Sc_rollup_disputed) ; let description = "Attempted to use a smart rollup that has not been originated." in register_error_kind `Temporary ~id:"smart_rollup_does_not_exist" ~title:"Smart rollup does not exist" ~description ~pp:(fun ppf x -> Format.fprintf ppf "Smart rollup %a does not exist" Sc_rollup_repr.pp x) Data_encoding.(obj1 (req "rollup" Sc_rollup_repr.encoding)) (function Sc_rollup_does_not_exist x -> Some x | _ -> None) (fun x -> Sc_rollup_does_not_exist x) ; let description = "No conflict." in register_error_kind `Temporary ~id:"smart_rollup_no_conflict" ~title:"No conflict" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_no_conflict -> Some () | _ -> None) (fun () -> Sc_rollup_no_conflict) ; let description = "No stakers for the targeted smart rollup." in register_error_kind `Temporary ~id:"smart_rollup_no_stakers" ~title:"No stakers" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_no_stakers -> Some () | _ -> None) (fun () -> Sc_rollup_no_stakers) ; let description = "This implicit account is not a staker of this smart rollup." in register_error_kind `Temporary ~id:"smart_rollup_not_staked" ~title:"Unknown staker" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_not_staked -> Some () | _ -> None) (fun () -> Sc_rollup_not_staked) ; let description = "Attempted to withdraw while not staked on the last cemented commitment or \ its ancestor." in register_error_kind `Temporary ~id:"smart_rollup_not_staked_on_lcc_or_ancestor" ~title:"Smart rollup not staked on LCC or its ancestor" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_not_staked_on_lcc_or_ancestor -> Some () | _ -> None) (fun () -> Sc_rollup_not_staked_on_lcc_or_ancestor) ; let description = "Parent is not the last cemented commitment." in register_error_kind `Temporary ~id:"smart_rollup_parent_not_lcc" ~title:"Parent is not the last cemented commitment" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_parent_not_lcc -> Some () | _ -> None) (fun () -> Sc_rollup_parent_not_lcc) ; let description = "Can not remove a staker committed on cemented." in register_error_kind `Temporary ~id:"smart_rollup_remove_lcc_or_ancestor" ~title:"Can not remove a staker" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_remove_lcc_or_ancestor -> Some () | _ -> None) (fun () -> Sc_rollup_remove_lcc_or_ancestor) ; let description = "Staker tried to double stake." in register_error_kind `Temporary ~id:"smart_rollup_staker_double_stake" ~title:description ~description ~pp:(fun ppf () -> Format.pp_print_string ppf "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 (function Sc_rollup_staker_double_stake -> Some () | _ -> None) (fun () -> Sc_rollup_staker_double_stake) ; let description = "Commitment is too far ahead of the last cemented commitment." in register_error_kind `Temporary ~id:"smart_rollup_too_far_ahead" ~title:"Commitment too far ahead" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_too_far_ahead -> Some () | _ -> None) (fun () -> Sc_rollup_too_far_ahead) ; let description = "Attempted to cement a commitment before its refutation deadline." in register_error_kind `Temporary ~id:"smart_rollup_commitment_too_recent" ~title:"Commitment too recent" ~description ~pp:(fun ppf (current_level, min_level) -> Format.fprintf ppf "%s@ Current level: %a,@ minimal level: %a" description Raw_level_repr.pp current_level Raw_level_repr.pp min_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}) ; let description = "Unknown commitment." in register_error_kind `Temporary ~id:"smart_rollup_unknown_commitment" ~title:"Unknown commitment" ~description ~pp:(fun ppf x -> Format.fprintf ppf "Commitment %a does not exist" Sc_rollup_commitment_repr.Hash.pp x) Data_encoding.( obj1 (req "commitment" Sc_rollup_commitment_repr.Hash.encoding)) (function Sc_rollup_unknown_commitment x -> Some x | _ -> None) (fun x -> Sc_rollup_unknown_commitment x) ; let description = "Attempted to commit to a bad inbox level." in register_error_kind `Temporary ~id:"smart_rollup_bad_inbox_level" ~title:"Committing to a bad inbox level" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_bad_inbox_level -> Some () | _ -> None) (fun () -> Sc_rollup_bad_inbox_level) ; let description = "Invalid rollup outbox message index" in register_error_kind `Temporary ~id:"smart_rollup_invalid_outbox_message_index" ~title:"Invalid rollup outbox message index" ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_invalid_outbox_message_index -> Some () | _ -> None) (fun () -> Sc_rollup_invalid_outbox_message_index) ; let description = "Outbox level expired" in register_error_kind `Temporary ~id:"smart_rollup_outbox_level_expired" ~title:description ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_outbox_level_expired -> Some () | _ -> None) (fun () -> Sc_rollup_outbox_level_expired) ; let description = "Outbox message already applied" in register_error_kind `Temporary ~id:"smart_rollup_outbox_message_already_applied" ~title:description ~description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_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:(fun ppf (staker, sc_rollup, staker_balance, min_expected_balance) -> Format.fprintf ppf "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.pp staker Sc_rollup_repr.pp sc_rollup Tez_repr.pp staker_balance Tez_repr.pp min_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}) ; let description = "Could not serialize commitment." in register_error_kind `Temporary ~id:"smart_rollup_bad_commitment_serialization" ~title:"Could not serialize commitment." ~description:"Unable to hash the commitment serialization." ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_bad_commitment_serialization -> Some () | _ -> None) (fun () -> Sc_rollup_bad_commitment_serialization) ; let description = "Commitment inbox level is greater or equal than current level" in register_error_kind `Temporary ~id:"smart_rollup_commitment_from_future" ~title:"Commitment from future" ~description ~pp:(fun ppf (current_level, inbox_level) -> Format.fprintf ppf "%s@ Current level: %a,@ commitment inbox level: %a" description Raw_level_repr.pp current_level Raw_level_repr.pp inbox_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}) ; let description = "Commitment is past the curfew for this level." in register_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:(fun ppf () -> Format.fprintf ppf "%s" description) Data_encoding.empty (function Sc_rollup_commitment_past_curfew -> Some () | _ -> None) (fun () -> Sc_rollup_commitment_past_curfew) ; let description = "Error while generating a smart rollup address" in register_error_kind `Permanent ~id:"smart_rollup_address_generation" ~title:description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) ~description Data_encoding.empty (function Sc_rollup_address_generation -> Some () | _ -> None) (fun () -> Sc_rollup_address_generation) ; let description = "Tried to publish a 0 tick commitment" in register_error_kind `Permanent ~id:"smart_rollup_zero_tick_commitment" ~title:description ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) ~description Data_encoding.empty (function Sc_rollup_zero_tick_commitment -> Some () | _ -> None) (fun () -> Sc_rollup_zero_tick_commitment) ; let description = "Maximal number of parallel games reached" in register_error_kind `Temporary ~id:"smart_rollup_maximal_number_of_parallel_games_reached" ~title:description ~pp:(fun ppf staker -> Format.fprintf ppf "%a has reached the limit for number of parallel games" Signature.Public_key_hash.pp staker) ~description Data_encoding.(obj1 (req "staker" Signature.Public_key_hash.encoding)) (function | Sc_rollup_max_number_of_parallel_games_reached staker -> Some staker | _ -> None) (fun staker -> Sc_rollup_max_number_of_parallel_games_reached staker) ; let description = "Conflicting commitments do not have a common ancestor" in register_error_kind `Permanent ~id:"smart_rollup_not_valid_commitments_conflict" ~title:description ~pp:(fun ppf (c1, s1, c2, s2) -> Format.fprintf ppf "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.pp c1 Signature.Public_key_hash.pp_short s1 Sc_rollup_commitment_repr.Hash.pp c2 Signature.Public_key_hash.pp_short s2) ~description Data_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)) ; let description = "Given commitment is not staked by given staker" in register_error_kind `Permanent ~id:"smart_rollup_wrong_staker_for_conflict_commitment" ~title:description ~pp:(fun ppf (staker, commitment) -> Format.fprintf ppf "The staker %a has not staked commitment %a" Signature.Public_key_hash.pp staker Sc_rollup_commitment_repr.Hash.pp commitment) ~description Data_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)) ; let description = "Given commitment cannot be cemented" in register_error_kind `Permanent ~id:"smart_rollup_invalid_commitment_to_cement" ~title:description ~pp:(fun ppf (valid_candidate, invalid_candidate) -> Format.fprintf ppf "The commitment %a cannot be cemented. %a is a valid candidate to \ cementation, but %a is not." Sc_rollup_commitment_repr.Hash.pp invalid_candidate Sc_rollup_commitment_repr.Hash.pp valid_candidate Sc_rollup_commitment_repr.Hash.pp invalid_candidate) ~description Data_encoding.( obj2 (req "valid_candidate" Sc_rollup_commitment_repr.Hash.encoding) (req "invalid_candidate" Sc_rollup_commitment_repr.Hash.encoding)) (function | Sc_rollup_invalid_commitment_to_cement {valid_candidate; invalid_candidate} -> Some (valid_candidate, invalid_candidate) | _ -> None) (fun (valid_candidate, invalid_candidate) -> Sc_rollup_invalid_commitment_to_cement {valid_candidate; invalid_candidate}) ; let description = "Published commitment is too old" in register_error_kind `Permanent ~id:"smart_rollup_commitment_too_old" ~title:description ~pp:(fun ppf (last_cemented_inbox_level, commitment_inbox_level) -> Format.fprintf ppf "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.pp last_cemented_inbox_level Raw_level_repr.pp commitment_inbox_level) ~description Data_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})
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>