State Types
TimeslotState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:6.1 (τ) | The most recent block's slot index, combined with helper functions.
Attributes:
| Name | Type | Description |
|---|---|---|
number |
U32
|
GP-0.7.2-eq:6.1 (τ) | The most recent block's slot index. |
Source code in pyjamaz/models/state.py
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 | |
epoch_number() -> int
¶
GP-0.7.2-eq:6.2 (e) | Function that returns the epoch index.
Returns:
| Name | Type | Description |
|---|---|---|
number |
int
|
Epoch index of the timeslot. |
Source code in pyjamaz/models/state.py
49 50 51 52 53 54 55 56 57 58 59 | |
slot_phase_index() -> int
¶
GP-0.7.2-eq:6.2 (m) | Function that returns the phase index into the epoch of the timeslot.
Returns:
| Name | Type | Description |
|---|---|---|
number |
int
|
Phase index into the epoch of the timeslot. |
Source code in pyjamaz/models/state.py
61 62 63 64 65 66 67 68 69 70 71 | |
EntropyState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:6.21 (η) | Entropy partition of the overall state.
Attributes:
| Name | Type | Description |
|---|---|---|
entropy |
Array(H256, 4)
|
GP-0.7.2-eq:6.21 (η) | η[0] serves as an entropy accumulator during the current epoch. η[1], η[2], η[3] retain three historical values of the accumulator at the point of each of the three most recently ended epochs respectively. |
Source code in pyjamaz/models/state.py
74 75 76 77 78 79 80 81 82 83 84 85 86 | |
SafroleState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:6.3 (γ) | Safrole partition of the overall state.
Attributes:
| Name | Type | Description |
|---|---|---|
validators |
Array(ValidatorData, constant_V)
|
GP-0.7.2-eq:6.7 (γ_P) | A fixed size set of keys and metadata for validators of the next epoch. |
ring_commitment |
Array(U8, 144)
|
GP-0.7.2-eq:6.4 (γ_Z) | Bandersnatch ring commitment. |
slot_sealer_series |
SlotSealerSeries
|
GP-0.7.2-eq:6.5 (γ_S) | Sealing-key series of the current epoch. |
ticket_accumulator |
TicketBody
|
GP-0.7.2-eq:6.5 (γ_A) | Sealing-key contest ticket accumulator. |
Source code in pyjamaz/models/state.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
ValidatorQueueState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:6.7 (ι) | Validator keys and metadata to be drawn from next by the Safrole protocol.
Attributes:
| Name | Type | Description |
|---|---|---|
validators |
Array(ValidatorData, constant_V)
|
GP-0.7.2-eq:6.7 (ι) | A fixed size set of validator keys and metadata to be drawn from next by the Safrole protocol. |
Source code in pyjamaz/models/state.py
129 130 131 132 133 134 135 136 137 138 139 140 141 | |
ValidatorPoolState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:6.7 (κ) | Keys and metadata for validators of the current epoch.
Attributes:
| Name | Type | Description |
|---|---|---|
validators |
Array(ValidatorData, constant_V)
|
GP-0.7.2-eq:6.7 (κ) | A fixed size set of keys and metadata for validators of the current epoch. |
Source code in pyjamaz/models/state.py
144 145 146 147 148 149 150 151 152 153 154 155 | |
ValidatorArchiveState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:6.7 (λ) | Keys and metadata for validators of the previous epoch.
Attributes:
| Name | Type | Description |
|---|---|---|
validators |
Array(ValidatorData, constant_V)
|
GP-0.7.2-eq:6.7 (λ) | A fixed size set of keys and metadata for validators of the previous epoch. |
Source code in pyjamaz/models/state.py
158 159 160 161 162 163 164 165 166 167 168 169 | |
AuthorizerPoolsState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:8.1 (α) | A collections of pools of authorizations for all cores.
Attributes:
| Name | Type | Description |
|---|---|---|
authorizer_pools |
Array(Vec(H256), constant_C)
|
GP-0.7.2-eq:8.1 (α) | A collections of pools of authorizations for all cores. |
Source code in pyjamaz/models/state.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | |
Mmr
dataclass
¶
Bases: Serializable
GP-0.7.2-eq:E.8,E.9 (bold_b) | A Merkle Mountain Range.
Attributes:
| Name | Type | Description |
|---|---|---|
peaks |
Vec(Option(H256))
|
GP-0.7.2-eq:7.3 (β_B) | A collection of optional peaks in a Merkle Mountain Range |
Source code in pyjamaz/models/state.py
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
ReportedWorkPackage
dataclass
¶
Bases: Serializable
GP-0.7.2-eq:7.2 (bold_p) | A collection of hashes for each work-report made into the MMR, limited to the number of cores (constant_c=341)
Attributes:
| Name | Type | Description |
|---|---|---|
hash |
H256
|
GP-0.7.2-eq:7.2 (blackboard_H in dictionary) | The segment_tree_lookup_item key. |
exports_root |
H256
|
GP-0.7.2-eq:7.2 (blackboard_H in dictionary) | The segment_tree_lookup_item key. |
Source code in pyjamaz/models/state.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 | |
RecentBlock
dataclass
¶
Bases: Serializable
GP-0.7.2-eq:7.2 (β_H) | A single item in the RecentHistory partition of the overall state.
Attributes:
| Name | Type | Description |
|---|---|---|
header_hash |
H256
|
GP-0.7.2-eq:7.2 (h, blackboard_H) | Header hash of the recent block. |
beefy_root |
H256
|
GP-0.7.2-eq:7.2 (b) | Beefy root of the recent block. |
state_root |
H256
|
GP-0.7.2-eq:7.2 (s, blackboard_H) | State root of the recent block. |
reported |
Vec(ReportedWorkPackage)
|
GP-0.7.2-eq:7.2 (bold_p) | A collection of ReportedWorkPackage for each work-report made into the MMR, limited to the number of cores (constant_c=341) |
Source code in pyjamaz/models/state.py
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 | |
RecentHistoryState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:7.1 (β) | RecentHistory partition of the overall state
Attributes:
| Name | Type | Description |
|---|---|---|
recent_blocks |
Vec(RecentBlock)
|
GP-0.7.2-eq:7.1 (β_H) | A collection of items in the RecentHistory partition of the overall state of up to constant_H (8) items. |
accumulation_output_log |
Vec(Option(H256))
|
GP-0.7.2-eq:7.1 (β_B) | A collection of optional peaks in a Merkle Mountain Range. |
Source code in pyjamaz/models/state.py
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 | |
ServiceAccount
dataclass
¶
Bases: Serializable
GP-0.7.2-eq:9.3 (blackboard_A) | A service account.
Attributes:
| Name | Type | Description |
|---|---|---|
code_hash |
H256
|
GP-0.7.2-eq:9.3 (c) | Hash of the service account's code |
balance |
U64
|
GP-0.7.2-eq:9.3 (b) | Balance of a service account |
gas_limit_accumulate |
U64
|
GP-0.7.2-eq:9.3 (g) | Minimum gas required to execute the Accumulate entry-point of the service account's code. |
gas_limit_on_transfer |
U64
|
GP-0.7.2-eq:9.3 (m) | Minimum gas required to execute the On-Transfer entry-point of the service account's code. |
footprint_storage_bytes |
U64
|
GP-0.7.2-eq:9.8 (o) | Storage footprint of the service account. The total number of bytes used in storage. |
footprint_storage_items |
U32
|
GP-0.7.2-eq:9.8 (i) | Storage footprint of the service account. The number of items in storage. |
threshold_balance |
U64
|
GP-0.7.2-eq:9.8 (t) | Minimum or threshold balance needed for the ServiceAccount in terms of its storage footprint. |
deposit_offset |
U32
|
GP-0.7.2-eq:9.3 (f) | Gratis deposit offset. |
creation_slot |
U32
|
GP-0.7.2-eq:9.3 (r) | Timeslot when created |
last_accumulation_slot |
U64
|
GP-0.7.2-eq:9.3 (a) | Timeslot when last accumulated |
parent_service |
U64
|
GP-0.7.2-eq:9.3 (p) | Parent service. |
storage_items |
Dict(H256, Bytes)
|
GP-0.7.2-eq:9.3 (bold_s) | Storage items dict. Provides storage item data for storage item hash. |
preimages |
Dict(H256, Bytes)
|
GP-0.7.2-eq:9.3 (bold_p) | Preimages dict. Provides preimage data for preimage hash (including: code_hash) |
preimage_availability |
Dict(Tuple(H256,U32), Vec<U32>)
|
GP-0.7.2-eq:9.3 (bold_l) | Preimages availability dict. Provides historical status of preimage availability. |
Source code in pyjamaz/models/state.py
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 | |
from_serialized_bytes(serialized_bytes: bytes) -> ServiceAccount
classmethod
¶
GP-0.7.2-eq:D.2 deserializes bytes into a ServiceAccount
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
serialized_bytes
|
bytes
|
|
required |
Returns:
| Type | Description |
|---|---|
ServiceAccount
|
|
Source code in pyjamaz/models/state.py
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 | |
to_serialized_bytes() -> bytes
¶
GP-0.7.2-eq:D.2 Serialize a ServiceAccount to bytes.
Returns:
| Type | Description |
|---|---|
bytes
|
|
Source code in pyjamaz/models/state.py
424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 | |
update_footprint_add_storage_item(key_len: int, value_len: int) -> None
¶
GP-0.7.2-eq:9.8
Source code in pyjamaz/models/state.py
458 459 460 461 462 463 | |
update_footprint_remove_storage_item(key_len: int, value_len: int) -> None
¶
GP-0.7.2-eq:9.8
Source code in pyjamaz/models/state.py
465 466 467 468 469 470 | |
update_footprint_update_storage_item(old_value_len: int, new_value_len: int) -> None
¶
GP-0.7.2-eq:9.8
Source code in pyjamaz/models/state.py
472 473 474 475 476 | |
update_footprint_add_preimage(size: int) -> None
¶
GP-0.7.2-eq:9.8
Source code in pyjamaz/models/state.py
478 479 480 481 482 483 | |
update_footprint_remove_preimage(size: int) -> None
¶
GP-0.7.2-eq:9.8
Source code in pyjamaz/models/state.py
485 486 487 488 489 490 | |
ServicesState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:9.2 (δ) | Services partition of the overall state.
Attributes:
| Name | Type | Description |
|---|---|---|
services |
Dict(U32, ServiceAccount)
|
GP-0.7.2-eq:9.1,9.2 (δ, blackboard_N_S, blackboard_A) | Services dict. Provides service account data for a service account index. |
Source code in pyjamaz/models/state.py
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 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 | |
store_service_account(service_account_id: int, service_account: ServiceAccount, save_to_tx=False)
¶
Stores a service account
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
int
|
|
required |
service_account
|
ServiceAccount
|
|
required |
save_to_tx
|
|
False
|
Source code in pyjamaz/models/state.py
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 | |
delete_service_account(service_account_id: int, save_to_tx=False)
¶
Deletes a service account
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
int
|
|
required |
Source code in pyjamaz/models/state.py
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 | |
retrieve_preimage(service_account_id: int, preimage_hash: bytes) -> bytes
¶
Host-function OMEGA_L (lookup)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
int
|
|
required |
preimage_hash
|
bytes
|
|
required |
storage_engine
|
|
required |
Returns:
| Type | Description |
|---|---|
bytes
|
|
Source code in pyjamaz/models/state.py
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 | |
historical_preimage_lookup(service_account_id: int, timeslot: int, preimage_hash: bytes) -> Optional[bytes]
¶
historical lookup GP-0.7.2-eq:9.5 GP-0.7.2-eq:9.7
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account
|
|
required | |
timeslot
|
int
|
|
required |
preimage_hash
|
bytes
|
|
required |
storage_engine
|
|
required |
Returns:
| Type | Description |
|---|---|
bytes
|
|
Source code in pyjamaz/models/state.py
705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 | |
is_preimage_needed(preimage: Preimage) -> bool
¶
GP-0.7.2-eq:12.35 | Is preimage needed
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preimage
|
Preimage
|
|
required |
Returns:
| Type | Description |
|---|---|
bool
|
|
Source code in pyjamaz/models/state.py
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 | |
store_preimage(service_account_id: int, preimage_blob: bytes, save_to_tx=False)
¶
Stores a preimage
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
int
|
|
required |
preimage_blob
|
bytes
|
|
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Source code in pyjamaz/models/state.py
776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 | |
retrieve_storage_item(service_account_id: int, storage_item_hash: bytes) -> bytes
¶
Host-function: OMEGA_R (read)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
service_account_id
|
int
|
|
required |
storage_item_hash
|
bytes
|
|
required |
Returns:
| Type | Description |
|---|---|
bytes
|
|
Source code in pyjamaz/models/state.py
912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 | |
store_storage_item(service_account_id: int, storage_key: bytes, value: bytes, save_to_tx=False)
¶
Store a storage item in the storage engine
Source code in pyjamaz/models/state.py
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 | |
delete_storage_item(service_account_id: int, storage_item_hash: bytes, save_to_tx=False)
¶
Delete a storage item in the storage engine
Source code in pyjamaz/models/state.py
965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 | |
AssurancesState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:11.1 (ρ) | Assurances partition of the overall state.
Attributes:
| Name | Type | Description |
|---|---|---|
assurances |
Vec(Option(Assurance))
|
GP-0.7.2-eq:11.1 (ρ) | A collection of optional assurances per core. |
Source code in pyjamaz/models/state.py
1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 | |
AuthorizerQueuesState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:8.1 (𝜙) | A collections of queues of authorizations for all cores.
Attributes:
| Name | Type | Description |
|---|---|---|
authorizer_queues |
Array(Array(H256, constant_Q), constant_C)
|
GP-0.7.2-eq:8.1 (𝜙) | A collections of queues of authorizations for all cores. |
Source code in pyjamaz/models/state.py
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 | |
PrivilegedServicesState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:9.9 (χ) | The PrivilegedServices partition of the overall state.
Attributes:
| Name | Type | Description |
|---|---|---|
manager |
U32
|
GP-0.7.2-eq:9.9 (χ_M) | The service index of the manager service. I.e. the service that allows state transitions of PrivilegedServices (χ). |
assigners |
Array(U32, Constant_C)
|
GP-0.7.2-eq:9.9 (χ_A) | The service index of the assign service. I.e. the service that allows state transitions of AuthorizerQueue (𝜙). |
delegator |
U32
|
GP-0.7.2-eq:9.9 (χ_V) | The service index of the designate service. I.e. the service that allows state transitions of ValidatorQueue (ι). |
registrar |
U32
|
GP-0.7.2-eq:9.9 (χ_R) | The service index of the registrar service. |
always_accumulators |
Dict(U32, U64)
|
GP-0.7.2-eq:9.9 (χ_Z) | Auto Accumulate Services dict. Provides gas limit data for a service account index. |
Source code in pyjamaz/models/state.py
1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 | |
DisputesState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:10.1 (ψ) | A collection of judgements of validators over the validity of work reports.
Attributes:
| Name | Type | Description |
|---|---|---|
good_set |
Vec(H256)
|
GP-0.7.2-eq:10.1,10.16 (ψ_G) | A collection of work reports hashes with a good verdict. |
bad_set |
Vec(H256)
|
GP-0.7.2-eq:10.1,10.17 (ψ_B) | A collection of work reports hashes with a bad verdict. |
wonky_set |
Vec(H256)
|
GP-0.7.2-eq:10.1,10.18 (ψ_W) | A collection of work reports hashes with a wonky verdict. |
offenders |
Vec(H256)
|
GP-0.7.2-eq:10.1,10.19 (ψ_O) | A collection Edwards 25519 keys for validators found guilty of offending. |
Source code in pyjamaz/models/state.py
1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 | |
ActivityRecord
dataclass
¶
Bases: Serializable
GP-0.7.2-eq:13.2 (π_V,π_L) | A set of cumulative metrics for a single validator in a single epochs.
Attributes:
| Name | Type | Description |
|---|---|---|
blocks |
U32
|
GP-0.7.2-eq:13.2 (b) | The number of blocks produced by the validator. |
tickets |
U32
|
GP-0.7.2-eq:13.2 (t) | The number of tickets introduced by the validator. |
pre_images |
U32
|
GP-0.7.2-eq:13.2 (p) | The number of preimages introduced by the validator. |
pre_images_size |
U32
|
GP-0.7.2-eq:13.2 (d) | The number of total number of bytes across all preimages introduced by the validator. |
guarantees |
U32
|
GP-0.7.2-eq:13.2 (g) | The number of reports guaranteed by the validator. |
assurances |
U32
|
GP-0.7.2-eq:13.2 (a) | The number of availability assurances made by the validator. |
Source code in pyjamaz/models/state.py
1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 | |
CoreActivityRecord
dataclass
¶
Bases: Serializable
GP-0.7.2-eq:13.6 (π_C) | Core activity statistics
Attributes:
| Name | Type | Description |
|---|---|---|
da_load |
VarInt64
|
GP-0.7.2-eq:13.6 (d) | Amount of bytes which are placed into either Audits or Segments DA. |
popularity |
VarInt64
|
GP-0.7.2-eq:13.6 (p) | Number of validators which formed super-majority for assurance. |
imports |
VarInt64
|
GP-0.7.2-eq:13.6 (i) | Number of segments imported from DA made by core for reported work. |
exports |
VarInt64
|
GP-0.7.2-eq:13.6 (x) | Number of segments exported into DA made by core for reported work. |
extrinsic_size |
VarInt64
|
GP-0.7.2-eq:13.6 (z) | Total size of extrinsic data used by core for reported work. |
extrinsic_count |
VarInt64
|
GP-0.7.2-eq:13.6 (e) | Total number of extrinsics used by core for reported work. |
bundle_size |
VarInt64
|
GP-0.7.2-eq:13.6 (l) | The work-bundle size. This is the size of data being placed into Audits DA by the core. |
gas_used |
VarInt64
|
GP-0.7.2-eq:13.6 (u) | Total gas consumed by core for reported work. Includes all refinement and authorizations |
Source code in pyjamaz/models/state.py
1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 | |
update(core_index: int, incoming_work_reports: List[WorkReport], available_work_reports: List[WorkReport], extrinsic_assurances: List[ExtrinsicAssurance])
¶
GP-0.7.2-eq:13.8 | Updating core stats for specified core
Source code in pyjamaz/models/state.py
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 | |
update_from_incoming_work_reports(core_index: int, incoming_work_reports: List[WorkReport])
¶
GP-0.7.2-eq:13.9 (R) | Updating core stats using incoming work-reports (bold_I) in extrinsic data (GP-0.7.0-eq:11.28)
Source code in pyjamaz/models/state.py
1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 | |
update_from_available_work_reports(core_index: int, available_work_reports: List[WorkReport])
¶
GP-0.7.2-eq:13.11 (D) | Updating core stats using available work-reports (bold_R) (GP-0.7.0-eq:11.16)
Source code in pyjamaz/models/state.py
1196 1197 1198 1199 1200 1201 1202 1203 | |
ServiceActivityRecord
dataclass
¶
Bases: Serializable
GP-0.7.2-eq:13.7 (π_S) | A collection of statistics for all validators for two epochs.
Attributes:
| Name | Type | Description |
|---|---|---|
provided_count |
VarInt64
|
GP-0.7.2-eq:13.7 (p_0) | Number of preimages provided to this service. |
provided_size |
VarInt64
|
GP-0.7.2-eq:13.7 (p_1)| Total size of preimages provided to this service. |
refinement_count |
VarInt64
|
GP-0.7.2-eq:13.7 (r_0)| Number of work-items refined by service for reported work. |
refinement_gas_used |
VarInt64
|
GP-0.7.2-eq:13.7 (r_1)| Amount of gas used for refinement by service for reported work. |
imports |
VarInt64
|
GP-0.7.2-eq:13.7 (i) | Number of segments imported from the DL by service for reported work. |
extrinsic_count |
VarInt64
|
GP-0.7.2-eq:13.7 (x) | Total number of extrinsics used by service for reported work. |
extrinsic_size |
VarInt64
|
GP-0.7.2-eq:13.7 (z) | Total size of extrinsics used by service for reported work. |
exports |
VarInt64
|
GP-0.7.2-eq:13.7 (e) | Number of segments exported into the DL by service for reported work. |
accumulate_count |
VarInt64
|
GP-0.7.2-eq:13.7 (a_0) | Number of work-items accumulated by service. |
accumulate_gas_used |
VarInt64
|
GP-0.7.2-eq:13.7 (a_1) | Amount of gas used for accumulation by service. |
Source code in pyjamaz/models/state.py
1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 | |
StatisticsState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:13.1 (π) | A collection of statistics for all validators for two epochs.
Attributes:
| Name | Type | Description |
|---|---|---|
vals_current |
Array(Statistic, constant_V)
|
GP-0.7.2-eq:13.1 (π_V) | A collection of statistics for all validators for current epoch. |
vals_last |
Array(Statistic, constant_V)
|
GP-0.7.2-eq:13.1 (π_L) | A collection of statistics for all validators for last epoch. |
cores |
Array(Statistic, constant_C)
|
GP-0.7.2-eq:13.1 (π_C) | Core activity statistics for last block. |
services |
Map(U32, ServiceActivityRecord)
|
GP-0.7.2-eq:13.1 (π_S) | Service activity statistics for last block. |
Source code in pyjamaz/models/state.py
1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 | |
AccumulationQueueWorkPackage
dataclass
¶
Bases: Serializable
GP-0.7.2-eq:13.1 (ω) | A not yet accumulated work package.
Attributes:
| Name | Type | Description |
|---|---|---|
report |
WorkReport
|
GP-0.7.2-eq:12.3 (blackboard_R) | Work Report. |
dependencies |
Vec(H256)
|
GP-0.7.2-eq:12.3 ({blackboard_H}) | Set of Work Package hashes. |
Source code in pyjamaz/models/state.py
1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 | |
AccumulationQueueState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:12.3 (ω) | A collection of unaccumulated work packages.
Attributes:
| Name | Type | Description |
|---|---|---|
accumulation_queue |
Array(Vec(AccumulationQueueWorkPackage), constant_E)
|
GP-0.7.2-eq:12.3 (ω) | A collection of unaccumulated work packages. |
Source code in pyjamaz/models/state.py
1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 | |
AccumulationHistoryState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:12.1 (ξ) | A history of what has been accumulated.
Attributes:
| Name | Type | Description |
|---|---|---|
accumulation_history |
Array(Vec(H256), constant_E)
|
GP-0.7.2-eq:12.1 (ξ) | A history of what has been accumulated. |
Source code in pyjamaz/models/state.py
1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 | |
BeefyCommitmentMap
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:7.4 (θ) | Service-indexed commitment to the accumulation output
Attributes:
| Name | Type | Description |
|---|---|---|
beefy_commitment_map |
List[Tuple[int, bytes]]
|
GP-0.7.2-eq:7.4 (θ) | Beefy Commitment Map dictionary. Provides accumulation result TreeRoot for accumulated services. |
Source code in pyjamaz/models/state.py
1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 | |
get_accumulate_root() -> bytes
¶
GP-0.7.2-eq:7.6,7.7 (r) | The accumulation-result tree root of the beefy commitment map.
Returns:
| Type | Description |
|---|---|
bytes
|
|
Source code in pyjamaz/models/state.py
1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 | |
JamState
dataclass
¶
Bases: State, Serializable
GP-0.7.2-eq:4.4 (σ) | Logically partitioned state into several largely independent segments which can help both visual clutter within the protocol description and provide formality over elements of computation which may be simultaneously calculated (i.e. parallelized).
Attributes:
| Name | Type | Description |
|---|---|---|
authorizer_pools |
AuthorizerPoolsState
|
GP-0.7.2-eq:4.4 (α) | AuthorizerPool partition of the overall state |
recent_history |
RecentHistoryState
|
GP-0.7.2-eq:4.4 (β) | RecentHistory partition of the overall state |
safrole |
SafroleState
|
GP-0.7.2-eq:4.4 (γ) | Safrole partition of the overall state |
services |
ServicesState
|
GP-0.7.2-eq:4.4 (δ) | Services partition of the overall state |
entropy |
EntropyState
|
GP-0.7.2-eq:4.4 (η) | Entropy partition of the overall state |
validator_queue |
ValidatorQueueState
|
GP-0.7.2-eq:4.4 (ι) | ValidatorQueue partition of the overall state |
validator_pool |
ValidatorPoolState
|
GP-0.7.2-eq:4.4 (κ) | ValidatorPool partition of the overall state |
validator_archive |
ValidatorArchiveState
|
GP-0.7.2-eq:4.4 (λ) | ValidatorArchive partition of the overall state |
assurances |
AssurancesState
|
GP-0.7.2-eq:4.4 (ρ) | Assurances partition of the overall state |
timeslot |
TimeslotState
|
GP-0.7.2-eq:4.4 (τ) | Timeslot partition of the overall state |
authorizer_queues |
AuthorizerQueuesState
|
GP-0.7.2-eq:4.4 (𝜙) | AuthorizerQueue partition of the overall state |
privileged_services |
PrivilegedServicesState
|
GP-0.7.2-eq:4.4 (χ) | PrivilegedServices partition of the overall state |
disputes |
DisputesState
|
GP-0.7.2-eq:4.4 (ψ) | Disputes partition of the overall state |
statistics |
StatisticsState
|
GP-0.7.2-eq:4.4 (π) | Statistics partition of the overall state |
accumulation_queue |
AccumulationQueueState
|
GP-0.7.2-eq:4.4 (ω) | AccumulationQueue partition of the overall state |
accumulation_history |
AccumulationHistoryState
|
GP-0.7.2-eq:4.4 (ξ) | AccumulationHistory partition of the overall state |
recent_accumulation_outputs |
BeefyCommitmentMap
|
GP-0.7.2-eq:4.4 (θ) | The most recent Accumulation outputs |
Source code in pyjamaz/models/state.py
1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 | |
DeferredTransfers
dataclass
¶
Bases: Serializable
GP-0.7.2-eq:12.23 (Vec(blackboard_X)) | A collection of deferred transfers.
Attributes:
| Name | Type | Description |
|---|---|---|
deferred_transfers |
Vec(DeferredTransfer)
|
GP-0.7.2-eq:12.23 (Vec(blackboard_X)) | A collection of deferred transfers. |
Source code in pyjamaz/models/state.py
1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 | |
AccumulationStateComponents
dataclass
¶
Bases: Serializable
GP-0.7.2-eq:12.16 (blackboard_S) | State components which are needed and mutable by the accumulation process.
Attributes:
| Name | Type | Description |
|---|---|---|
services |
ServicesState
|
GP-0.7.2-eq:12.16 (bold_d) | Dictionary with services state. |
validator_queue |
ValidatorQueueState
|
GP-0.7.2-eq:12.16 (bold_i) | Validator Queue state. |
authorizer_queues |
AuthorizerQueuesState
|
GP-0.7.2-eq:12.16 (bold_q) | Authorizer Queues state. |
privileged_services |
PrivilegedServicesState
|
GP-0.7.2-eq:9.9 (bold_x) | Privileged Services state. |
Source code in pyjamaz/models/state.py
1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 | |
check_service_id(service_id: int) -> int
¶
GP-0.7.2-eq:B.14 | Find an unused service id
Source code in pyjamaz/models/state.py
1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 | |
to_invocation_context(service_account_id: int, entropy: bytes, timeslot: int) -> AccumulateInvocationContext
¶
GP-0.7.2-eq:B.10 (I)
entropy: eta_0 timeslot: int post_state
Source code in pyjamaz/models/state.py
1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 | |
AccumulateContextItem
dataclass
¶
GP-0.7.2-eq:B.7 (blackboard_L) | Invocation Result Context
TODO check service_account_id in state_context.services
Source code in pyjamaz/models/state.py
1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 | |
AccumulateInvocationContext
dataclass
¶
Bases: InvocationContext
GP-0.7.2-eq:B.8 (blackboard_L) | Invocation Result Context
Source code in pyjamaz/models/state.py
1612 1613 1614 1615 1616 1617 1618 1619 | |
ParallelAccumulationOutput
dataclass
¶
GP-0.7.2-eq:12.19
Source code in pyjamaz/models/state.py
1658 1659 1660 1661 1662 1663 1664 1665 1666 | |
FullAccumulationOutput
dataclass
¶
GP-0.7.2-eq:12.25
Source code in pyjamaz/models/state.py
1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 | |