From 61369bf087c80c3b59fbaaf2451d7430da5eb9a0 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 22 Jul 2024 16:19:40 -0400 Subject: [PATCH 01/59] `MACOSX_DEPLOYMENT_TARGET: "13.0"` --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 006c20dfb..fd6f27ee9 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -149,7 +149,7 @@ jobs: - name: Build MacOs with maturin on Python ${{ matrix.python }} if: matrix.os.matrix == 'macos' env: - MACOSX_DEPLOYMENT_TARGET: "11.0" + MACOSX_DEPLOYMENT_TARGET: "13.0" run: | python${{ matrix.python.major-dot-minor }} -m venv venv . venv/bin/activate From f1407ecf159068fe206a9f3f28349a35d7ed9b04 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 12 Aug 2024 14:37:14 -0400 Subject: [PATCH 02/59] include license-file in wheel --- wheel/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/wheel/Cargo.toml b/wheel/Cargo.toml index 01250aaeb..9b79ea924 100644 --- a/wheel/Cargo.toml +++ b/wheel/Cargo.toml @@ -4,6 +4,7 @@ version = "0.11.0" authors = ["Richard Kiss "] edition = "2021" license = "Apache-2.0" +license-file = "../LICENSE" description = "Code useful for implementing chia consensus." homepage = "https://github.com/Chia-Network/chia_rs" repository = "https://github.com/Chia-Network/chia_rs" From 31e516c55d80b91f9f248acca8205d7c1c39e2f0 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Mon, 19 Aug 2024 19:54:03 -0400 Subject: [PATCH 03/59] runs-on 13 for macos intel --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index fd6f27ee9..ca37a125e 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -31,7 +31,7 @@ jobs: matrix: macos runs-on: arm: [macOS, ARM64] - intel: [macos-12] + intel: [macos-13] - name: Ubuntu matrix: ubuntu runs-on: From 1ef72726f66b22bd1d561815ca9693ddeabac209 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 27 Aug 2024 14:10:36 -0400 Subject: [PATCH 04/59] add stubtest --- .github/workflows/benchmark.yml | 12 + wheel/generate_type_stubs.py | 10 +- wheel/python/chia_rs/chia_rs.pyi | 3566 +----------------------------- 3 files changed, 37 insertions(+), 3551 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index cf1ad22fd..6407d8073 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -60,6 +60,18 @@ jobs: run: | mypy --ignore-missing-imports tests + - name: python mypy stubtest concise + run: | + stubtest --concise chia_rs + + - name: python mypy stubtest + run: | + stubtest chia_rs + + - name: python mypy stubtest filtered + run: | + stubtest --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' + - name: python black run: | black --check tests diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index 089e388ed..c57dbb251 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -28,6 +28,8 @@ def print_class( # f-strings don't allow backslashes, which makes it a bit tricky to # manipulate strings with newlines nl = "\n" + if name == "FeeEstimate": + 1/0 def add_indent(x: str): return "\n " + x @@ -44,8 +46,10 @@ def add_indent(x: str): if extra is not None: members.extend(extra) + # TODO: don't let me merge this hardcoded SpendBundle @final exception file.write( f""" +{"@final" if name != "SpendBundle" else ""} class {name}:{"".join(map(add_indent, members))} def __init__( self{init_args} @@ -259,7 +263,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s # this file is generated by generate_type_stubs.py # -from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar +from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar, final from .sized_bytes import bytes32, bytes100 from .sized_ints import uint8, uint16, uint32, uint64, uint128, int8, int16, int32, int64 from chia.types.blockchain_format.program import Program as ChiaProgram @@ -330,8 +334,6 @@ def get_flags_for_height_and_constants( LIMIT_HEAP: int = ... DISALLOW_INFINITY_G1: int = ... MEMPOOL_MODE: int = ... -ENABLE_BLS_OPS: int = ... -ENABLE_SECP_OPS: int = ... ENABLE_BLS_OPS_OUTSIDE_GUARD: int = ... ENABLE_FIXED_DIV: int = ... ALLOW_BACKREFS: int = ... @@ -354,6 +356,7 @@ def tree_hash(program: ReadableBuffer) -> bytes32: ... def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuffer, max_cost: int, find_parent: bytes32, find_amount: int, find_ph: bytes32, flags: int) -> Tuple[bytes, bytes]: ... def get_puzzle_and_solution_for_coin2(program: Program, block_refs: List[ReadableBuffer], max_cost: int, find_coin: Coin, flags: int) -> Tuple[Program, Program]: ... +@final class BLSCache: def __init__(self, cache_size: Optional[int] = 50000) -> None: ... def len(self) -> int: ... @@ -361,6 +364,7 @@ def aggregate_verify(self, pks: List[G1Element], msgs: List[bytes], sig: G2Eleme def items(self) -> List[Tuple[bytes, bytes]]: ... def update(self, other: List[Tuple[bytes, bytes]]) -> None: ... +@final class AugSchemeMPL: @staticmethod def sign(pk: PrivateKey, msg: bytes, prepend_pk: Optional[G1Element] = None) -> G2Element: ... diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index c6d6b1e57..1bcba11d1 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -3,7 +3,7 @@ # this file is generated by generate_type_stubs.py # -from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar +from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar, final from .sized_bytes import bytes32, bytes100 from .sized_ints import uint8, uint16, uint32, uint64, uint128, int8, int16, int32, int64 from chia.types.blockchain_format.program import Program as ChiaProgram @@ -74,8 +74,6 @@ STRICT_ARGS_COUNT: int = ... LIMIT_HEAP: int = ... DISALLOW_INFINITY_G1: int = ... MEMPOOL_MODE: int = ... -ENABLE_BLS_OPS: int = ... -ENABLE_SECP_OPS: int = ... ENABLE_BLS_OPS_OUTSIDE_GUARD: int = ... ENABLE_FIXED_DIV: int = ... ALLOW_BACKREFS: int = ... @@ -98,6 +96,7 @@ def tree_hash(program: ReadableBuffer) -> bytes32: ... def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuffer, max_cost: int, find_parent: bytes32, find_amount: int, find_ph: bytes32, flags: int) -> Tuple[bytes, bytes]: ... def get_puzzle_and_solution_for_coin2(program: Program, block_refs: List[ReadableBuffer], max_cost: int, find_coin: Coin, flags: int) -> Tuple[Program, Program]: ... +@final class BLSCache: def __init__(self, cache_size: Optional[int] = 50000) -> None: ... def len(self) -> int: ... @@ -105,6 +104,7 @@ class BLSCache: def items(self) -> List[Tuple[bytes, bytes]]: ... def update(self, other: List[Tuple[bytes, bytes]]) -> None: ... +@final class AugSchemeMPL: @staticmethod def sign(pk: PrivateKey, msg: bytes, prepend_pk: Optional[G1Element] = None) -> G2Element: ... @@ -133,6 +133,7 @@ class MerkleSet: leafs: List[bytes32], ) -> None: ... +@final class G1Element: SIZE: ClassVar[int] = ... def __new__(cls) -> G1Element: ... @@ -167,6 +168,7 @@ class G1Element: @staticmethod def from_json_dict(json_dict: Any) -> G1Element: ... +@final class G2Element: SIZE: ClassVar[int] = ... def __new__(cls) -> G2Element: ... @@ -198,6 +200,7 @@ class G2Element: @staticmethod def from_json_dict(json_dict: Any) -> G2Element: ... +@final class GTElement: SIZE: ClassVar[int] = ... def __str__(self) -> str: ... @@ -225,6 +228,7 @@ class GTElement: @staticmethod def from_json_dict(json_dict: Any) -> GTElement: ... +@final class PrivateKey: PRIVATE_KEY_SIZE: ClassVar[int] = ... def sign(self, msg: bytes, final_pk: Optional[G1Element] = None) -> G2Element: ... @@ -257,6 +261,7 @@ class PrivateKey: @staticmethod def from_json_dict(json_dict: Any) -> PrivateKey: ... +@final class SpendConditions: coin_id: bytes parent_id: bytes @@ -337,6 +342,7 @@ class SpendConditions: agg_sig_parent_puzzle: Union[ List[Tuple[G1Element, bytes]], _Unspec] = _Unspec(), flags: Union[ int, _Unspec] = _Unspec()) -> SpendConditions: ... +@final class SpendBundleConditions: spends: List[SpendConditions] reserve_fee: int @@ -390,6 +396,7 @@ class SpendBundleConditions: removal_amount: Union[ int, _Unspec] = _Unspec(), addition_amount: Union[ int, _Unspec] = _Unspec()) -> SpendBundleConditions: ... +@final class BlockRecord: header_hash: bytes32 prev_hash: bytes32 @@ -496,6 +503,7 @@ class BlockRecord: finished_reward_slot_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec(), sub_epoch_summary_included: Union[ Optional[SubEpochSummary], _Unspec] = _Unspec()) -> BlockRecord: ... +@final class Message: msg_type: int id: Optional[uint16] @@ -528,6 +536,7 @@ class Message: id: Union[ Optional[uint16], _Unspec] = _Unspec(), data: Union[ bytes, _Unspec] = _Unspec()) -> Message: ... +@final class Handshake: network_id: str protocol_version: str @@ -569,6 +578,7 @@ class Handshake: node_type: Union[ int, _Unspec] = _Unspec(), capabilities: Union[ List[Tuple[uint16, str]], _Unspec] = _Unspec()) -> Handshake: ... +@final class ClassgroupElement: data: bytes100 @staticmethod @@ -601,6 +611,7 @@ class ClassgroupElement: def from_json_dict(json_dict: Any) -> ClassgroupElement: ... def replace(self, *, data: Union[ bytes100, _Unspec] = _Unspec()) -> ClassgroupElement: ... +@final class Coin: parent_coin_info: bytes32 puzzle_hash: bytes32 @@ -634,6 +645,7 @@ class Coin: puzzle_hash: Union[ bytes32, _Unspec] = _Unspec(), amount: Union[ uint64, _Unspec] = _Unspec()) -> Coin: ... +@final class CoinSpend: coin: Coin puzzle_reveal: Program @@ -666,6 +678,7 @@ class CoinSpend: puzzle_reveal: Union[ Program, _Unspec] = _Unspec(), solution: Union[ Program, _Unspec] = _Unspec()) -> CoinSpend: ... +@final class CoinState: coin: Coin spent_height: Optional[uint32] @@ -698,6 +711,7 @@ class CoinState: spent_height: Union[ Optional[uint32], _Unspec] = _Unspec(), created_height: Union[ Optional[uint32], _Unspec] = _Unspec()) -> CoinState: ... +@final class EndOfSubSlotBundle: challenge_chain: ChallengeChainSubSlot infused_challenge_chain: Optional[InfusedChallengeChainSubSlot] @@ -733,6 +747,7 @@ class EndOfSubSlotBundle: reward_chain: Union[ RewardChainSubSlot, _Unspec] = _Unspec(), proofs: Union[ SubSlotProofs, _Unspec] = _Unspec()) -> EndOfSubSlotBundle: ... +@final class FeeRate: mojos_per_clvm_cost: uint64 def __init__( @@ -758,3548 +773,3 @@ class FeeRate: @staticmethod def from_json_dict(json_dict: Any) -> FeeRate: ... def replace(self, *, mojos_per_clvm_cost: Union[ uint64, _Unspec] = _Unspec()) -> FeeRate: ... - -class FeeEstimate: - error: Optional[str] - time_target: uint64 - estimated_fee_rate: FeeRate - def __init__( - self, - error: Optional[str], - time_target: uint64, - estimated_fee_rate: FeeRate - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FeeEstimate: ... - def __copy__(self) -> FeeEstimate: ... - @staticmethod - def from_bytes(bytes) -> FeeEstimate: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FeeEstimate: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FeeEstimate, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FeeEstimate: ... - def replace(self, *, error: Union[ Optional[str], _Unspec] = _Unspec(), - time_target: Union[ uint64, _Unspec] = _Unspec(), - estimated_fee_rate: Union[ FeeRate, _Unspec] = _Unspec()) -> FeeEstimate: ... - -class FeeEstimateGroup: - error: Optional[str] - estimates: List[FeeEstimate] - def __init__( - self, - error: Optional[str], - estimates: Sequence[FeeEstimate] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FeeEstimateGroup: ... - def __copy__(self) -> FeeEstimateGroup: ... - @staticmethod - def from_bytes(bytes) -> FeeEstimateGroup: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FeeEstimateGroup: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FeeEstimateGroup, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FeeEstimateGroup: ... - def replace(self, *, error: Union[ Optional[str], _Unspec] = _Unspec(), - estimates: Union[ List[FeeEstimate], _Unspec] = _Unspec()) -> FeeEstimateGroup: ... - -class TransactionsInfo: - generator_root: bytes32 - generator_refs_root: bytes32 - aggregated_signature: G2Element - fees: uint64 - cost: uint64 - reward_claims_incorporated: List[Coin] - def __init__( - self, - generator_root: bytes, - generator_refs_root: bytes, - aggregated_signature: G2Element, - fees: uint64, - cost: uint64, - reward_claims_incorporated: Sequence[Coin] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> TransactionsInfo: ... - def __copy__(self) -> TransactionsInfo: ... - @staticmethod - def from_bytes(bytes) -> TransactionsInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> TransactionsInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[TransactionsInfo, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> TransactionsInfo: ... - def replace(self, *, generator_root: Union[ bytes32, _Unspec] = _Unspec(), - generator_refs_root: Union[ bytes32, _Unspec] = _Unspec(), - aggregated_signature: Union[ G2Element, _Unspec] = _Unspec(), - fees: Union[ uint64, _Unspec] = _Unspec(), - cost: Union[ uint64, _Unspec] = _Unspec(), - reward_claims_incorporated: Union[ List[Coin], _Unspec] = _Unspec()) -> TransactionsInfo: ... - -class FoliageTransactionBlock: - prev_transaction_block_hash: bytes32 - timestamp: uint64 - filter_hash: bytes32 - additions_root: bytes32 - removals_root: bytes32 - transactions_info_hash: bytes32 - def __init__( - self, - prev_transaction_block_hash: bytes, - timestamp: uint64, - filter_hash: bytes, - additions_root: bytes, - removals_root: bytes, - transactions_info_hash: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FoliageTransactionBlock: ... - def __copy__(self) -> FoliageTransactionBlock: ... - @staticmethod - def from_bytes(bytes) -> FoliageTransactionBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FoliageTransactionBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FoliageTransactionBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FoliageTransactionBlock: ... - def replace(self, *, prev_transaction_block_hash: Union[ bytes32, _Unspec] = _Unspec(), - timestamp: Union[ uint64, _Unspec] = _Unspec(), - filter_hash: Union[ bytes32, _Unspec] = _Unspec(), - additions_root: Union[ bytes32, _Unspec] = _Unspec(), - removals_root: Union[ bytes32, _Unspec] = _Unspec(), - transactions_info_hash: Union[ bytes32, _Unspec] = _Unspec()) -> FoliageTransactionBlock: ... - -class FoliageBlockData: - unfinished_reward_block_hash: bytes32 - pool_target: PoolTarget - pool_signature: Optional[G2Element] - farmer_reward_puzzle_hash: bytes32 - extension_data: bytes32 - def __init__( - self, - unfinished_reward_block_hash: bytes, - pool_target: PoolTarget, - pool_signature: Optional[G2Element], - farmer_reward_puzzle_hash: bytes, - extension_data: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FoliageBlockData: ... - def __copy__(self) -> FoliageBlockData: ... - @staticmethod - def from_bytes(bytes) -> FoliageBlockData: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FoliageBlockData: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FoliageBlockData, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FoliageBlockData: ... - def replace(self, *, unfinished_reward_block_hash: Union[ bytes32, _Unspec] = _Unspec(), - pool_target: Union[ PoolTarget, _Unspec] = _Unspec(), - pool_signature: Union[ Optional[G2Element], _Unspec] = _Unspec(), - farmer_reward_puzzle_hash: Union[ bytes32, _Unspec] = _Unspec(), - extension_data: Union[ bytes32, _Unspec] = _Unspec()) -> FoliageBlockData: ... - -class Foliage: - prev_block_hash: bytes32 - reward_block_hash: bytes32 - foliage_block_data: FoliageBlockData - foliage_block_data_signature: G2Element - foliage_transaction_block_hash: Optional[bytes32] - foliage_transaction_block_signature: Optional[G2Element] - def __init__( - self, - prev_block_hash: bytes, - reward_block_hash: bytes, - foliage_block_data: FoliageBlockData, - foliage_block_data_signature: G2Element, - foliage_transaction_block_hash: Optional[bytes32], - foliage_transaction_block_signature: Optional[G2Element] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> Foliage: ... - def __copy__(self) -> Foliage: ... - @staticmethod - def from_bytes(bytes) -> Foliage: ... - @staticmethod - def from_bytes_unchecked(bytes) -> Foliage: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Foliage, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> Foliage: ... - def replace(self, *, prev_block_hash: Union[ bytes32, _Unspec] = _Unspec(), - reward_block_hash: Union[ bytes32, _Unspec] = _Unspec(), - foliage_block_data: Union[ FoliageBlockData, _Unspec] = _Unspec(), - foliage_block_data_signature: Union[ G2Element, _Unspec] = _Unspec(), - foliage_transaction_block_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), - foliage_transaction_block_signature: Union[ Optional[G2Element], _Unspec] = _Unspec()) -> Foliage: ... - -class NewPeak: - header_hash: bytes32 - height: uint32 - weight: uint128 - fork_point_with_previous_peak: uint32 - unfinished_reward_block_hash: bytes32 - def __init__( - self, - header_hash: bytes, - height: uint32, - weight: uint128, - fork_point_with_previous_peak: uint32, - unfinished_reward_block_hash: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewPeak: ... - def __copy__(self) -> NewPeak: ... - @staticmethod - def from_bytes(bytes) -> NewPeak: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewPeak: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewPeak, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewPeak: ... - def replace(self, *, header_hash: Union[ bytes32, _Unspec] = _Unspec(), - height: Union[ uint32, _Unspec] = _Unspec(), - weight: Union[ uint128, _Unspec] = _Unspec(), - fork_point_with_previous_peak: Union[ uint32, _Unspec] = _Unspec(), - unfinished_reward_block_hash: Union[ bytes32, _Unspec] = _Unspec()) -> NewPeak: ... - -class NewTransaction: - transaction_id: bytes32 - cost: uint64 - fees: uint64 - def __init__( - self, - transaction_id: bytes, - cost: uint64, - fees: uint64 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewTransaction: ... - def __copy__(self) -> NewTransaction: ... - @staticmethod - def from_bytes(bytes) -> NewTransaction: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewTransaction: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewTransaction, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewTransaction: ... - def replace(self, *, transaction_id: Union[ bytes32, _Unspec] = _Unspec(), - cost: Union[ uint64, _Unspec] = _Unspec(), - fees: Union[ uint64, _Unspec] = _Unspec()) -> NewTransaction: ... - -class RequestTransaction: - transaction_id: bytes32 - def __init__( - self, - transaction_id: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestTransaction: ... - def __copy__(self) -> RequestTransaction: ... - @staticmethod - def from_bytes(bytes) -> RequestTransaction: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestTransaction: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestTransaction, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestTransaction: ... - def replace(self, *, transaction_id: Union[ bytes32, _Unspec] = _Unspec()) -> RequestTransaction: ... - -class RespondTransaction: - transaction: SpendBundle - def __init__( - self, - transaction: SpendBundle - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondTransaction: ... - def __copy__(self) -> RespondTransaction: ... - @staticmethod - def from_bytes(bytes) -> RespondTransaction: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondTransaction: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondTransaction, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondTransaction: ... - def replace(self, *, transaction: Union[ SpendBundle, _Unspec] = _Unspec()) -> RespondTransaction: ... - -class RequestProofOfWeight: - total_number_of_blocks: uint32 - tip: bytes32 - def __init__( - self, - total_number_of_blocks: uint32, - tip: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestProofOfWeight: ... - def __copy__(self) -> RequestProofOfWeight: ... - @staticmethod - def from_bytes(bytes) -> RequestProofOfWeight: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestProofOfWeight: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestProofOfWeight, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestProofOfWeight: ... - def replace(self, *, total_number_of_blocks: Union[ uint32, _Unspec] = _Unspec(), - tip: Union[ bytes32, _Unspec] = _Unspec()) -> RequestProofOfWeight: ... - -class RespondProofOfWeight: - wp: WeightProof - tip: bytes32 - def __init__( - self, - wp: WeightProof, - tip: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondProofOfWeight: ... - def __copy__(self) -> RespondProofOfWeight: ... - @staticmethod - def from_bytes(bytes) -> RespondProofOfWeight: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondProofOfWeight: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondProofOfWeight, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondProofOfWeight: ... - def replace(self, *, wp: Union[ WeightProof, _Unspec] = _Unspec(), - tip: Union[ bytes32, _Unspec] = _Unspec()) -> RespondProofOfWeight: ... - -class RequestBlock: - height: uint32 - include_transaction_block: bool - def __init__( - self, - height: uint32, - include_transaction_block: bool - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestBlock: ... - def __copy__(self) -> RequestBlock: ... - @staticmethod - def from_bytes(bytes) -> RequestBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestBlock: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - include_transaction_block: Union[ bool, _Unspec] = _Unspec()) -> RequestBlock: ... - -class RejectBlock: - height: uint32 - def __init__( - self, - height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectBlock: ... - def __copy__(self) -> RejectBlock: ... - @staticmethod - def from_bytes(bytes) -> RejectBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectBlock: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlock: ... - -class RequestBlocks: - start_height: uint32 - end_height: uint32 - include_transaction_block: bool - def __init__( - self, - start_height: uint32, - end_height: uint32, - include_transaction_block: bool - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestBlocks: ... - def __copy__(self) -> RequestBlocks: ... - @staticmethod - def from_bytes(bytes) -> RequestBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlocks, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestBlocks: ... - def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), - end_height: Union[ uint32, _Unspec] = _Unspec(), - include_transaction_block: Union[ bool, _Unspec] = _Unspec()) -> RequestBlocks: ... - -class RespondBlocks: - start_height: uint32 - end_height: uint32 - blocks: List[FullBlock] - def __init__( - self, - start_height: uint32, - end_height: uint32, - blocks: Sequence[FullBlock] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondBlocks: ... - def __copy__(self) -> RespondBlocks: ... - @staticmethod - def from_bytes(bytes) -> RespondBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlocks, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondBlocks: ... - def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), - end_height: Union[ uint32, _Unspec] = _Unspec(), - blocks: Union[ List[FullBlock], _Unspec] = _Unspec()) -> RespondBlocks: ... - -class RejectBlocks: - start_height: uint32 - end_height: uint32 - def __init__( - self, - start_height: uint32, - end_height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectBlocks: ... - def __copy__(self) -> RejectBlocks: ... - @staticmethod - def from_bytes(bytes) -> RejectBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlocks, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectBlocks: ... - def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), - end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlocks: ... - -class RespondBlock: - block: FullBlock - def __init__( - self, - block: FullBlock - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondBlock: ... - def __copy__(self) -> RespondBlock: ... - @staticmethod - def from_bytes(bytes) -> RespondBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondBlock: ... - def replace(self, *, block: Union[ FullBlock, _Unspec] = _Unspec()) -> RespondBlock: ... - -class NewUnfinishedBlock: - unfinished_reward_hash: bytes32 - def __init__( - self, - unfinished_reward_hash: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewUnfinishedBlock: ... - def __copy__(self) -> NewUnfinishedBlock: ... - @staticmethod - def from_bytes(bytes) -> NewUnfinishedBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewUnfinishedBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewUnfinishedBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewUnfinishedBlock: ... - def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec()) -> NewUnfinishedBlock: ... - -class RequestUnfinishedBlock: - unfinished_reward_hash: bytes32 - def __init__( - self, - unfinished_reward_hash: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestUnfinishedBlock: ... - def __copy__(self) -> RequestUnfinishedBlock: ... - @staticmethod - def from_bytes(bytes) -> RequestUnfinishedBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestUnfinishedBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestUnfinishedBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestUnfinishedBlock: ... - def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RequestUnfinishedBlock: ... - -class RespondUnfinishedBlock: - unfinished_block: UnfinishedBlock - def __init__( - self, - unfinished_block: UnfinishedBlock - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondUnfinishedBlock: ... - def __copy__(self) -> RespondUnfinishedBlock: ... - @staticmethod - def from_bytes(bytes) -> RespondUnfinishedBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondUnfinishedBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondUnfinishedBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondUnfinishedBlock: ... - def replace(self, *, unfinished_block: Union[ UnfinishedBlock, _Unspec] = _Unspec()) -> RespondUnfinishedBlock: ... - -class NewSignagePointOrEndOfSubSlot: - prev_challenge_hash: Optional[bytes32] - challenge_hash: bytes32 - index_from_challenge: uint8 - last_rc_infusion: bytes32 - def __init__( - self, - prev_challenge_hash: Optional[bytes32], - challenge_hash: bytes, - index_from_challenge: uint8, - last_rc_infusion: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewSignagePointOrEndOfSubSlot: ... - def __copy__(self) -> NewSignagePointOrEndOfSubSlot: ... - @staticmethod - def from_bytes(bytes) -> NewSignagePointOrEndOfSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewSignagePointOrEndOfSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewSignagePointOrEndOfSubSlot, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewSignagePointOrEndOfSubSlot: ... - def replace(self, *, prev_challenge_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), - challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), - index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), - last_rc_infusion: Union[ bytes32, _Unspec] = _Unspec()) -> NewSignagePointOrEndOfSubSlot: ... - -class RequestSignagePointOrEndOfSubSlot: - challenge_hash: bytes32 - index_from_challenge: uint8 - last_rc_infusion: bytes32 - def __init__( - self, - challenge_hash: bytes, - index_from_challenge: uint8, - last_rc_infusion: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestSignagePointOrEndOfSubSlot: ... - def __copy__(self) -> RequestSignagePointOrEndOfSubSlot: ... - @staticmethod - def from_bytes(bytes) -> RequestSignagePointOrEndOfSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestSignagePointOrEndOfSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestSignagePointOrEndOfSubSlot, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestSignagePointOrEndOfSubSlot: ... - def replace(self, *, challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), - index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), - last_rc_infusion: Union[ bytes32, _Unspec] = _Unspec()) -> RequestSignagePointOrEndOfSubSlot: ... - -class RespondSignagePoint: - index_from_challenge: uint8 - challenge_chain_vdf: VDFInfo - challenge_chain_proof: VDFProof - reward_chain_vdf: VDFInfo - reward_chain_proof: VDFProof - def __init__( - self, - index_from_challenge: uint8, - challenge_chain_vdf: VDFInfo, - challenge_chain_proof: VDFProof, - reward_chain_vdf: VDFInfo, - reward_chain_proof: VDFProof - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondSignagePoint: ... - def __copy__(self) -> RespondSignagePoint: ... - @staticmethod - def from_bytes(bytes) -> RespondSignagePoint: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondSignagePoint: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondSignagePoint, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondSignagePoint: ... - def replace(self, *, index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), - challenge_chain_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), - challenge_chain_proof: Union[ VDFProof, _Unspec] = _Unspec(), - reward_chain_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), - reward_chain_proof: Union[ VDFProof, _Unspec] = _Unspec()) -> RespondSignagePoint: ... - -class RespondEndOfSubSlot: - end_of_slot_bundle: EndOfSubSlotBundle - def __init__( - self, - end_of_slot_bundle: EndOfSubSlotBundle - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondEndOfSubSlot: ... - def __copy__(self) -> RespondEndOfSubSlot: ... - @staticmethod - def from_bytes(bytes) -> RespondEndOfSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondEndOfSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondEndOfSubSlot, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondEndOfSubSlot: ... - def replace(self, *, end_of_slot_bundle: Union[ EndOfSubSlotBundle, _Unspec] = _Unspec()) -> RespondEndOfSubSlot: ... - -class RequestMempoolTransactions: - filter: bytes - def __init__( - self, - filter: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestMempoolTransactions: ... - def __copy__(self) -> RequestMempoolTransactions: ... - @staticmethod - def from_bytes(bytes) -> RequestMempoolTransactions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestMempoolTransactions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestMempoolTransactions, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestMempoolTransactions: ... - def replace(self, *, filter: Union[ bytes, _Unspec] = _Unspec()) -> RequestMempoolTransactions: ... - -class NewCompactVDF: - height: uint32 - header_hash: bytes32 - field_vdf: uint8 - vdf_info: VDFInfo - def __init__( - self, - height: uint32, - header_hash: bytes, - field_vdf: uint8, - vdf_info: VDFInfo - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewCompactVDF: ... - def __copy__(self) -> NewCompactVDF: ... - @staticmethod - def from_bytes(bytes) -> NewCompactVDF: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewCompactVDF: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewCompactVDF, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewCompactVDF: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec(), - field_vdf: Union[ uint8, _Unspec] = _Unspec(), - vdf_info: Union[ VDFInfo, _Unspec] = _Unspec()) -> NewCompactVDF: ... - -class RequestCompactVDF: - height: uint32 - header_hash: bytes32 - field_vdf: uint8 - vdf_info: VDFInfo - def __init__( - self, - height: uint32, - header_hash: bytes, - field_vdf: uint8, - vdf_info: VDFInfo - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestCompactVDF: ... - def __copy__(self) -> RequestCompactVDF: ... - @staticmethod - def from_bytes(bytes) -> RequestCompactVDF: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestCompactVDF: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestCompactVDF, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestCompactVDF: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec(), - field_vdf: Union[ uint8, _Unspec] = _Unspec(), - vdf_info: Union[ VDFInfo, _Unspec] = _Unspec()) -> RequestCompactVDF: ... - -class RespondCompactVDF: - height: uint32 - header_hash: bytes32 - field_vdf: uint8 - vdf_info: VDFInfo - vdf_proof: VDFProof - def __init__( - self, - height: uint32, - header_hash: bytes, - field_vdf: uint8, - vdf_info: VDFInfo, - vdf_proof: VDFProof - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondCompactVDF: ... - def __copy__(self) -> RespondCompactVDF: ... - @staticmethod - def from_bytes(bytes) -> RespondCompactVDF: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondCompactVDF: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondCompactVDF, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondCompactVDF: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec(), - field_vdf: Union[ uint8, _Unspec] = _Unspec(), - vdf_info: Union[ VDFInfo, _Unspec] = _Unspec(), - vdf_proof: Union[ VDFProof, _Unspec] = _Unspec()) -> RespondCompactVDF: ... - -class RequestPeers: - def __init__( - self - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestPeers: ... - def __copy__(self) -> RequestPeers: ... - @staticmethod - def from_bytes(bytes) -> RequestPeers: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestPeers: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPeers, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestPeers: ... - -class RespondPeers: - peer_list: List[TimestampedPeerInfo] - def __init__( - self, - peer_list: Sequence[TimestampedPeerInfo] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondPeers: ... - def __copy__(self) -> RespondPeers: ... - @staticmethod - def from_bytes(bytes) -> RespondPeers: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondPeers: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPeers, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondPeers: ... - def replace(self, *, peer_list: Union[ List[TimestampedPeerInfo], _Unspec] = _Unspec()) -> RespondPeers: ... - -class NewUnfinishedBlock2: - unfinished_reward_hash: bytes32 - foliage_hash: Optional[bytes32] - def __init__( - self, - unfinished_reward_hash: bytes, - foliage_hash: Optional[bytes32] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewUnfinishedBlock2: ... - def __copy__(self) -> NewUnfinishedBlock2: ... - @staticmethod - def from_bytes(bytes) -> NewUnfinishedBlock2: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewUnfinishedBlock2: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewUnfinishedBlock2, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewUnfinishedBlock2: ... - def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec(), - foliage_hash: Union[ Optional[bytes32], _Unspec] = _Unspec()) -> NewUnfinishedBlock2: ... - -class RequestUnfinishedBlock2: - unfinished_reward_hash: bytes32 - foliage_hash: Optional[bytes32] - def __init__( - self, - unfinished_reward_hash: bytes, - foliage_hash: Optional[bytes32] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestUnfinishedBlock2: ... - def __copy__(self) -> RequestUnfinishedBlock2: ... - @staticmethod - def from_bytes(bytes) -> RequestUnfinishedBlock2: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestUnfinishedBlock2: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestUnfinishedBlock2, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestUnfinishedBlock2: ... - def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec(), - foliage_hash: Union[ Optional[bytes32], _Unspec] = _Unspec()) -> RequestUnfinishedBlock2: ... - -class FullBlock: - finished_sub_slots: List[EndOfSubSlotBundle] - reward_chain_block: RewardChainBlock - challenge_chain_sp_proof: Optional[VDFProof] - challenge_chain_ip_proof: VDFProof - reward_chain_sp_proof: Optional[VDFProof] - reward_chain_ip_proof: VDFProof - infused_challenge_chain_ip_proof: Optional[VDFProof] - foliage: Foliage - foliage_transaction_block: Optional[FoliageTransactionBlock] - transactions_info: Optional[TransactionsInfo] - transactions_generator: Optional[Program] - transactions_generator_ref_list: List[uint32] - prev_header_hash: bytes32 - header_hash: bytes32 - def is_transaction_block(self) -> bool: ... - total_iters: uint128 - height: uint32 - weight: uint128 - def get_included_reward_coins(self) -> List[Coin]: ... - def is_fully_compactified(self) -> bool: ... - def __init__( - self, - finished_sub_slots: Sequence[EndOfSubSlotBundle], - reward_chain_block: RewardChainBlock, - challenge_chain_sp_proof: Optional[VDFProof], - challenge_chain_ip_proof: VDFProof, - reward_chain_sp_proof: Optional[VDFProof], - reward_chain_ip_proof: VDFProof, - infused_challenge_chain_ip_proof: Optional[VDFProof], - foliage: Foliage, - foliage_transaction_block: Optional[FoliageTransactionBlock], - transactions_info: Optional[TransactionsInfo], - transactions_generator: Optional[Program], - transactions_generator_ref_list: Sequence[uint32] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FullBlock: ... - def __copy__(self) -> FullBlock: ... - @staticmethod - def from_bytes(bytes) -> FullBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FullBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FullBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FullBlock: ... - def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), - reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec(), - challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - challenge_chain_ip_proof: Union[ VDFProof, _Unspec] = _Unspec(), - reward_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - reward_chain_ip_proof: Union[ VDFProof, _Unspec] = _Unspec(), - infused_challenge_chain_ip_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - foliage: Union[ Foliage, _Unspec] = _Unspec(), - foliage_transaction_block: Union[ Optional[FoliageTransactionBlock], _Unspec] = _Unspec(), - transactions_info: Union[ Optional[TransactionsInfo], _Unspec] = _Unspec(), - transactions_generator: Union[ Optional[Program], _Unspec] = _Unspec(), - transactions_generator_ref_list: Union[ List[uint32], _Unspec] = _Unspec()) -> FullBlock: ... - -class HeaderBlock: - finished_sub_slots: List[EndOfSubSlotBundle] - reward_chain_block: RewardChainBlock - challenge_chain_sp_proof: Optional[VDFProof] - challenge_chain_ip_proof: VDFProof - reward_chain_sp_proof: Optional[VDFProof] - reward_chain_ip_proof: VDFProof - infused_challenge_chain_ip_proof: Optional[VDFProof] - foliage: Foliage - foliage_transaction_block: Optional[FoliageTransactionBlock] - transactions_filter: bytes - transactions_info: Optional[TransactionsInfo] - prev_header_hash: bytes32 - prev_hash: bytes32 - height: uint32 - weight: uint128 - header_hash: bytes32 - total_iters: uint128 - log_string: str - is_transaction_block: bool - first_in_sub_slot: bool - def __init__( - self, - finished_sub_slots: Sequence[EndOfSubSlotBundle], - reward_chain_block: RewardChainBlock, - challenge_chain_sp_proof: Optional[VDFProof], - challenge_chain_ip_proof: VDFProof, - reward_chain_sp_proof: Optional[VDFProof], - reward_chain_ip_proof: VDFProof, - infused_challenge_chain_ip_proof: Optional[VDFProof], - foliage: Foliage, - foliage_transaction_block: Optional[FoliageTransactionBlock], - transactions_filter: bytes, - transactions_info: Optional[TransactionsInfo] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> HeaderBlock: ... - def __copy__(self) -> HeaderBlock: ... - @staticmethod - def from_bytes(bytes) -> HeaderBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> HeaderBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[HeaderBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> HeaderBlock: ... - def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), - reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec(), - challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - challenge_chain_ip_proof: Union[ VDFProof, _Unspec] = _Unspec(), - reward_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - reward_chain_ip_proof: Union[ VDFProof, _Unspec] = _Unspec(), - infused_challenge_chain_ip_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - foliage: Union[ Foliage, _Unspec] = _Unspec(), - foliage_transaction_block: Union[ Optional[FoliageTransactionBlock], _Unspec] = _Unspec(), - transactions_filter: Union[ bytes, _Unspec] = _Unspec(), - transactions_info: Union[ Optional[TransactionsInfo], _Unspec] = _Unspec()) -> HeaderBlock: ... - -class TimestampedPeerInfo: - host: str - port: uint16 - timestamp: uint64 - def __init__( - self, - host: str, - port: uint16, - timestamp: uint64 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> TimestampedPeerInfo: ... - def __copy__(self) -> TimestampedPeerInfo: ... - @staticmethod - def from_bytes(bytes) -> TimestampedPeerInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> TimestampedPeerInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[TimestampedPeerInfo, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> TimestampedPeerInfo: ... - def replace(self, *, host: Union[ str, _Unspec] = _Unspec(), - port: Union[ uint16, _Unspec] = _Unspec(), - timestamp: Union[ uint64, _Unspec] = _Unspec()) -> TimestampedPeerInfo: ... - -class PoolTarget: - puzzle_hash: bytes32 - max_height: uint32 - def __init__( - self, - puzzle_hash: bytes, - max_height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> PoolTarget: ... - def __copy__(self) -> PoolTarget: ... - @staticmethod - def from_bytes(bytes) -> PoolTarget: ... - @staticmethod - def from_bytes_unchecked(bytes) -> PoolTarget: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[PoolTarget, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> PoolTarget: ... - def replace(self, *, puzzle_hash: Union[ bytes32, _Unspec] = _Unspec(), - max_height: Union[ uint32, _Unspec] = _Unspec()) -> PoolTarget: ... - -class Program: - a0: bytes - def get_tree_hash(self) -> bytes32: ... - @staticmethod - def default() -> Program: ... - @staticmethod - def fromhex(hex) -> Program: ... - def run_mempool_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ... - def run_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ... - def _run(self, max_cost: int, flags: int, args: object) -> Tuple[int, ChiaProgram]: ... - @staticmethod - def to(o: object) -> Program: ... - @staticmethod - def from_program(p: ChiaProgram) -> Program: ... - def to_program(self) -> ChiaProgram: ... - def uncurry(self) -> Tuple[ChiaProgram, ChiaProgram]: ... - def __init__( - self, - a0: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> Program: ... - def __copy__(self) -> Program: ... - @staticmethod - def from_bytes(bytes) -> Program: ... - @staticmethod - def from_bytes_unchecked(bytes) -> Program: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Program, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> Program: ... - def replace(self, *, a0: Union[ bytes, _Unspec] = _Unspec()) -> Program: ... - -class ProofOfSpace: - challenge: bytes32 - pool_public_key: Optional[G1Element] - pool_contract_puzzle_hash: Optional[bytes32] - plot_public_key: G1Element - size: uint8 - proof: bytes - def __init__( - self, - challenge: bytes, - pool_public_key: Optional[G1Element], - pool_contract_puzzle_hash: Optional[bytes32], - plot_public_key: G1Element, - size: uint8, - proof: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ProofOfSpace: ... - def __copy__(self) -> ProofOfSpace: ... - @staticmethod - def from_bytes(bytes) -> ProofOfSpace: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ProofOfSpace: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ProofOfSpace, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ProofOfSpace: ... - def replace(self, *, challenge: Union[ bytes32, _Unspec] = _Unspec(), - pool_public_key: Union[ Optional[G1Element], _Unspec] = _Unspec(), - pool_contract_puzzle_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), - plot_public_key: Union[ G1Element, _Unspec] = _Unspec(), - size: Union[ uint8, _Unspec] = _Unspec(), - proof: Union[ bytes, _Unspec] = _Unspec()) -> ProofOfSpace: ... - -class RewardChainBlockUnfinished: - total_iters: uint128 - signage_point_index: uint8 - pos_ss_cc_challenge_hash: bytes32 - proof_of_space: ProofOfSpace - challenge_chain_sp_vdf: Optional[VDFInfo] - challenge_chain_sp_signature: G2Element - reward_chain_sp_vdf: Optional[VDFInfo] - reward_chain_sp_signature: G2Element - def __init__( - self, - total_iters: uint128, - signage_point_index: uint8, - pos_ss_cc_challenge_hash: bytes, - proof_of_space: ProofOfSpace, - challenge_chain_sp_vdf: Optional[VDFInfo], - challenge_chain_sp_signature: G2Element, - reward_chain_sp_vdf: Optional[VDFInfo], - reward_chain_sp_signature: G2Element - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RewardChainBlockUnfinished: ... - def __copy__(self) -> RewardChainBlockUnfinished: ... - @staticmethod - def from_bytes(bytes) -> RewardChainBlockUnfinished: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RewardChainBlockUnfinished: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainBlockUnfinished, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RewardChainBlockUnfinished: ... - def replace(self, *, total_iters: Union[ uint128, _Unspec] = _Unspec(), - signage_point_index: Union[ uint8, _Unspec] = _Unspec(), - pos_ss_cc_challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), - proof_of_space: Union[ ProofOfSpace, _Unspec] = _Unspec(), - challenge_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - challenge_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec(), - reward_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - reward_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec()) -> RewardChainBlockUnfinished: ... - -class RewardChainBlock: - weight: uint128 - height: uint32 - total_iters: uint128 - signage_point_index: uint8 - pos_ss_cc_challenge_hash: bytes32 - proof_of_space: ProofOfSpace - challenge_chain_sp_vdf: Optional[VDFInfo] - challenge_chain_sp_signature: G2Element - challenge_chain_ip_vdf: VDFInfo - reward_chain_sp_vdf: Optional[VDFInfo] - reward_chain_sp_signature: G2Element - reward_chain_ip_vdf: VDFInfo - infused_challenge_chain_ip_vdf: Optional[VDFInfo] - is_transaction_block: bool - def get_unfinished(self) -> RewardChainBlockUnfinished: ... - def __init__( - self, - weight: uint128, - height: uint32, - total_iters: uint128, - signage_point_index: uint8, - pos_ss_cc_challenge_hash: bytes, - proof_of_space: ProofOfSpace, - challenge_chain_sp_vdf: Optional[VDFInfo], - challenge_chain_sp_signature: G2Element, - challenge_chain_ip_vdf: VDFInfo, - reward_chain_sp_vdf: Optional[VDFInfo], - reward_chain_sp_signature: G2Element, - reward_chain_ip_vdf: VDFInfo, - infused_challenge_chain_ip_vdf: Optional[VDFInfo], - is_transaction_block: bool - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RewardChainBlock: ... - def __copy__(self) -> RewardChainBlock: ... - @staticmethod - def from_bytes(bytes) -> RewardChainBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RewardChainBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RewardChainBlock: ... - def replace(self, *, weight: Union[ uint128, _Unspec] = _Unspec(), - height: Union[ uint32, _Unspec] = _Unspec(), - total_iters: Union[ uint128, _Unspec] = _Unspec(), - signage_point_index: Union[ uint8, _Unspec] = _Unspec(), - pos_ss_cc_challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), - proof_of_space: Union[ ProofOfSpace, _Unspec] = _Unspec(), - challenge_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - challenge_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec(), - challenge_chain_ip_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), - reward_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - reward_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec(), - reward_chain_ip_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), - infused_challenge_chain_ip_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - is_transaction_block: Union[ bool, _Unspec] = _Unspec()) -> RewardChainBlock: ... - -class ChallengeBlockInfo: - proof_of_space: ProofOfSpace - challenge_chain_sp_vdf: Optional[VDFInfo] - challenge_chain_sp_signature: G2Element - challenge_chain_ip_vdf: VDFInfo - def __init__( - self, - proof_of_space: ProofOfSpace, - challenge_chain_sp_vdf: Optional[VDFInfo], - challenge_chain_sp_signature: G2Element, - challenge_chain_ip_vdf: VDFInfo - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ChallengeBlockInfo: ... - def __copy__(self) -> ChallengeBlockInfo: ... - @staticmethod - def from_bytes(bytes) -> ChallengeBlockInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ChallengeBlockInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ChallengeBlockInfo, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ChallengeBlockInfo: ... - def replace(self, *, proof_of_space: Union[ ProofOfSpace, _Unspec] = _Unspec(), - challenge_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - challenge_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec(), - challenge_chain_ip_vdf: Union[ VDFInfo, _Unspec] = _Unspec()) -> ChallengeBlockInfo: ... - -class ChallengeChainSubSlot: - challenge_chain_end_of_slot_vdf: VDFInfo - infused_challenge_chain_sub_slot_hash: Optional[bytes32] - subepoch_summary_hash: Optional[bytes32] - new_sub_slot_iters: Optional[uint64] - new_difficulty: Optional[uint64] - def __init__( - self, - challenge_chain_end_of_slot_vdf: VDFInfo, - infused_challenge_chain_sub_slot_hash: Optional[bytes32], - subepoch_summary_hash: Optional[bytes32], - new_sub_slot_iters: Optional[uint64], - new_difficulty: Optional[uint64] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ChallengeChainSubSlot: ... - def __copy__(self) -> ChallengeChainSubSlot: ... - @staticmethod - def from_bytes(bytes) -> ChallengeChainSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ChallengeChainSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ChallengeChainSubSlot, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ChallengeChainSubSlot: ... - def replace(self, *, challenge_chain_end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), - infused_challenge_chain_sub_slot_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), - subepoch_summary_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), - new_sub_slot_iters: Union[ Optional[uint64], _Unspec] = _Unspec(), - new_difficulty: Union[ Optional[uint64], _Unspec] = _Unspec()) -> ChallengeChainSubSlot: ... - -class InfusedChallengeChainSubSlot: - infused_challenge_chain_end_of_slot_vdf: VDFInfo - def __init__( - self, - infused_challenge_chain_end_of_slot_vdf: VDFInfo - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> InfusedChallengeChainSubSlot: ... - def __copy__(self) -> InfusedChallengeChainSubSlot: ... - @staticmethod - def from_bytes(bytes) -> InfusedChallengeChainSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> InfusedChallengeChainSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[InfusedChallengeChainSubSlot, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> InfusedChallengeChainSubSlot: ... - def replace(self, *, infused_challenge_chain_end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec()) -> InfusedChallengeChainSubSlot: ... - -class RewardChainSubSlot: - end_of_slot_vdf: VDFInfo - challenge_chain_sub_slot_hash: bytes32 - infused_challenge_chain_sub_slot_hash: Optional[bytes32] - deficit: uint8 - def __init__( - self, - end_of_slot_vdf: VDFInfo, - challenge_chain_sub_slot_hash: bytes, - infused_challenge_chain_sub_slot_hash: Optional[bytes32], - deficit: uint8 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RewardChainSubSlot: ... - def __copy__(self) -> RewardChainSubSlot: ... - @staticmethod - def from_bytes(bytes) -> RewardChainSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RewardChainSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainSubSlot, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RewardChainSubSlot: ... - def replace(self, *, end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), - challenge_chain_sub_slot_hash: Union[ bytes32, _Unspec] = _Unspec(), - infused_challenge_chain_sub_slot_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), - deficit: Union[ uint8, _Unspec] = _Unspec()) -> RewardChainSubSlot: ... - -class SubSlotProofs: - challenge_chain_slot_proof: VDFProof - infused_challenge_chain_slot_proof: Optional[VDFProof] - reward_chain_slot_proof: VDFProof - def __init__( - self, - challenge_chain_slot_proof: VDFProof, - infused_challenge_chain_slot_proof: Optional[VDFProof], - reward_chain_slot_proof: VDFProof - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubSlotProofs: ... - def __copy__(self) -> SubSlotProofs: ... - @staticmethod - def from_bytes(bytes) -> SubSlotProofs: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubSlotProofs: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubSlotProofs, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubSlotProofs: ... - def replace(self, *, challenge_chain_slot_proof: Union[ VDFProof, _Unspec] = _Unspec(), - infused_challenge_chain_slot_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - reward_chain_slot_proof: Union[ VDFProof, _Unspec] = _Unspec()) -> SubSlotProofs: ... - -class SpendBundle: - coin_spends: List[CoinSpend] - aggregated_signature: G2Element - @staticmethod - def aggregate(sbs: List[SpendBundle]) -> SpendBundle: ... - def name(self) -> bytes32: ... - def removals(self) -> List[Coin]: ... - def additions(self) -> List[Coin]: ... - def __init__( - self, - coin_spends: Sequence[CoinSpend], - aggregated_signature: G2Element - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SpendBundle: ... - def __copy__(self) -> SpendBundle: ... - @staticmethod - def from_bytes(bytes) -> SpendBundle: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SpendBundle: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SpendBundle, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SpendBundle: ... - def replace(self, *, coin_spends: Union[ List[CoinSpend], _Unspec] = _Unspec(), - aggregated_signature: Union[ G2Element, _Unspec] = _Unspec()) -> SpendBundle: ... - -class SubEpochSummary: - prev_subepoch_summary_hash: bytes32 - reward_chain_hash: bytes32 - num_blocks_overflow: uint8 - new_difficulty: Optional[uint64] - new_sub_slot_iters: Optional[uint64] - def __init__( - self, - prev_subepoch_summary_hash: bytes, - reward_chain_hash: bytes, - num_blocks_overflow: uint8, - new_difficulty: Optional[uint64], - new_sub_slot_iters: Optional[uint64] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubEpochSummary: ... - def __copy__(self) -> SubEpochSummary: ... - @staticmethod - def from_bytes(bytes) -> SubEpochSummary: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochSummary: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochSummary, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubEpochSummary: ... - def replace(self, *, prev_subepoch_summary_hash: Union[ bytes32, _Unspec] = _Unspec(), - reward_chain_hash: Union[ bytes32, _Unspec] = _Unspec(), - num_blocks_overflow: Union[ uint8, _Unspec] = _Unspec(), - new_difficulty: Union[ Optional[uint64], _Unspec] = _Unspec(), - new_sub_slot_iters: Union[ Optional[uint64], _Unspec] = _Unspec()) -> SubEpochSummary: ... - -class UnfinishedBlock: - finished_sub_slots: List[EndOfSubSlotBundle] - reward_chain_block: RewardChainBlockUnfinished - challenge_chain_sp_proof: Optional[VDFProof] - reward_chain_sp_proof: Optional[VDFProof] - foliage: Foliage - foliage_transaction_block: Optional[FoliageTransactionBlock] - transactions_info: Optional[TransactionsInfo] - transactions_generator: Optional[Program] - transactions_generator_ref_list: List[uint32] - prev_header_hash: bytes32 - partial_hash: bytes32 - def is_transaction_block(self) -> bool: ... - total_iters: uint128 - def __init__( - self, - finished_sub_slots: Sequence[EndOfSubSlotBundle], - reward_chain_block: RewardChainBlockUnfinished, - challenge_chain_sp_proof: Optional[VDFProof], - reward_chain_sp_proof: Optional[VDFProof], - foliage: Foliage, - foliage_transaction_block: Optional[FoliageTransactionBlock], - transactions_info: Optional[TransactionsInfo], - transactions_generator: Optional[Program], - transactions_generator_ref_list: Sequence[uint32] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> UnfinishedBlock: ... - def __copy__(self) -> UnfinishedBlock: ... - @staticmethod - def from_bytes(bytes) -> UnfinishedBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> UnfinishedBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[UnfinishedBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> UnfinishedBlock: ... - def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), - reward_chain_block: Union[ RewardChainBlockUnfinished, _Unspec] = _Unspec(), - challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - reward_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - foliage: Union[ Foliage, _Unspec] = _Unspec(), - foliage_transaction_block: Union[ Optional[FoliageTransactionBlock], _Unspec] = _Unspec(), - transactions_info: Union[ Optional[TransactionsInfo], _Unspec] = _Unspec(), - transactions_generator: Union[ Optional[Program], _Unspec] = _Unspec(), - transactions_generator_ref_list: Union[ List[uint32], _Unspec] = _Unspec()) -> UnfinishedBlock: ... - -class UnfinishedHeaderBlock: - finished_sub_slots: List[EndOfSubSlotBundle] - reward_chain_block: RewardChainBlockUnfinished - challenge_chain_sp_proof: Optional[VDFProof] - reward_chain_sp_proof: Optional[VDFProof] - foliage: Foliage - foliage_transaction_block: Optional[FoliageTransactionBlock] - transactions_filter: bytes - prev_header_hash: bytes32 - header_hash: bytes32 - total_iters: uint128 - def __init__( - self, - finished_sub_slots: Sequence[EndOfSubSlotBundle], - reward_chain_block: RewardChainBlockUnfinished, - challenge_chain_sp_proof: Optional[VDFProof], - reward_chain_sp_proof: Optional[VDFProof], - foliage: Foliage, - foliage_transaction_block: Optional[FoliageTransactionBlock], - transactions_filter: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> UnfinishedHeaderBlock: ... - def __copy__(self) -> UnfinishedHeaderBlock: ... - @staticmethod - def from_bytes(bytes) -> UnfinishedHeaderBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> UnfinishedHeaderBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[UnfinishedHeaderBlock, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> UnfinishedHeaderBlock: ... - def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), - reward_chain_block: Union[ RewardChainBlockUnfinished, _Unspec] = _Unspec(), - challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - reward_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - foliage: Union[ Foliage, _Unspec] = _Unspec(), - foliage_transaction_block: Union[ Optional[FoliageTransactionBlock], _Unspec] = _Unspec(), - transactions_filter: Union[ bytes, _Unspec] = _Unspec()) -> UnfinishedHeaderBlock: ... - -class VDFInfo: - challenge: bytes32 - number_of_iterations: uint64 - output: ClassgroupElement - def __init__( - self, - challenge: bytes, - number_of_iterations: uint64, - output: ClassgroupElement - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> VDFInfo: ... - def __copy__(self) -> VDFInfo: ... - @staticmethod - def from_bytes(bytes) -> VDFInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> VDFInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[VDFInfo, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> VDFInfo: ... - def replace(self, *, challenge: Union[ bytes32, _Unspec] = _Unspec(), - number_of_iterations: Union[ uint64, _Unspec] = _Unspec(), - output: Union[ ClassgroupElement, _Unspec] = _Unspec()) -> VDFInfo: ... - -class VDFProof: - witness_type: uint8 - witness: bytes - normalized_to_identity: bool - def __init__( - self, - witness_type: uint8, - witness: bytes, - normalized_to_identity: bool - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> VDFProof: ... - def __copy__(self) -> VDFProof: ... - @staticmethod - def from_bytes(bytes) -> VDFProof: ... - @staticmethod - def from_bytes_unchecked(bytes) -> VDFProof: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[VDFProof, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> VDFProof: ... - def replace(self, *, witness_type: Union[ uint8, _Unspec] = _Unspec(), - witness: Union[ bytes, _Unspec] = _Unspec(), - normalized_to_identity: Union[ bool, _Unspec] = _Unspec()) -> VDFProof: ... - -class RequestPuzzleSolution: - coin_name: bytes32 - height: uint32 - def __init__( - self, - coin_name: bytes, - height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestPuzzleSolution: ... - def __copy__(self) -> RequestPuzzleSolution: ... - @staticmethod - def from_bytes(bytes) -> RequestPuzzleSolution: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestPuzzleSolution: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPuzzleSolution, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestPuzzleSolution: ... - def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), - height: Union[ uint32, _Unspec] = _Unspec()) -> RequestPuzzleSolution: ... - -class PuzzleSolutionResponse: - coin_name: bytes32 - height: uint32 - puzzle: Program - solution: Program - def __init__( - self, - coin_name: bytes, - height: uint32, - puzzle: Program, - solution: Program - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> PuzzleSolutionResponse: ... - def __copy__(self) -> PuzzleSolutionResponse: ... - @staticmethod - def from_bytes(bytes) -> PuzzleSolutionResponse: ... - @staticmethod - def from_bytes_unchecked(bytes) -> PuzzleSolutionResponse: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[PuzzleSolutionResponse, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> PuzzleSolutionResponse: ... - def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), - height: Union[ uint32, _Unspec] = _Unspec(), - puzzle: Union[ Program, _Unspec] = _Unspec(), - solution: Union[ Program, _Unspec] = _Unspec()) -> PuzzleSolutionResponse: ... - -class RespondPuzzleSolution: - response: PuzzleSolutionResponse - def __init__( - self, - response: PuzzleSolutionResponse - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondPuzzleSolution: ... - def __copy__(self) -> RespondPuzzleSolution: ... - @staticmethod - def from_bytes(bytes) -> RespondPuzzleSolution: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondPuzzleSolution: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPuzzleSolution, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondPuzzleSolution: ... - def replace(self, *, response: Union[ PuzzleSolutionResponse, _Unspec] = _Unspec()) -> RespondPuzzleSolution: ... - -class RejectPuzzleSolution: - coin_name: bytes32 - height: uint32 - def __init__( - self, - coin_name: bytes, - height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectPuzzleSolution: ... - def __copy__(self) -> RejectPuzzleSolution: ... - @staticmethod - def from_bytes(bytes) -> RejectPuzzleSolution: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectPuzzleSolution: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectPuzzleSolution, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectPuzzleSolution: ... - def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), - height: Union[ uint32, _Unspec] = _Unspec()) -> RejectPuzzleSolution: ... - -class SendTransaction: - transaction: SpendBundle - def __init__( - self, - transaction: SpendBundle - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SendTransaction: ... - def __copy__(self) -> SendTransaction: ... - @staticmethod - def from_bytes(bytes) -> SendTransaction: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SendTransaction: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SendTransaction, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SendTransaction: ... - def replace(self, *, transaction: Union[ SpendBundle, _Unspec] = _Unspec()) -> SendTransaction: ... - -class TransactionAck: - txid: bytes32 - status: uint8 - error: Optional[str] - def __init__( - self, - txid: bytes, - status: uint8, - error: Optional[str] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> TransactionAck: ... - def __copy__(self) -> TransactionAck: ... - @staticmethod - def from_bytes(bytes) -> TransactionAck: ... - @staticmethod - def from_bytes_unchecked(bytes) -> TransactionAck: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[TransactionAck, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> TransactionAck: ... - def replace(self, *, txid: Union[ bytes32, _Unspec] = _Unspec(), - status: Union[ uint8, _Unspec] = _Unspec(), - error: Union[ Optional[str], _Unspec] = _Unspec()) -> TransactionAck: ... - -class NewPeakWallet: - header_hash: bytes32 - height: uint32 - weight: uint128 - fork_point_with_previous_peak: uint32 - def __init__( - self, - header_hash: bytes, - height: uint32, - weight: uint128, - fork_point_with_previous_peak: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewPeakWallet: ... - def __copy__(self) -> NewPeakWallet: ... - @staticmethod - def from_bytes(bytes) -> NewPeakWallet: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewPeakWallet: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewPeakWallet, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewPeakWallet: ... - def replace(self, *, header_hash: Union[ bytes32, _Unspec] = _Unspec(), - height: Union[ uint32, _Unspec] = _Unspec(), - weight: Union[ uint128, _Unspec] = _Unspec(), - fork_point_with_previous_peak: Union[ uint32, _Unspec] = _Unspec()) -> NewPeakWallet: ... - -class RequestBlockHeader: - height: uint32 - def __init__( - self, - height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestBlockHeader: ... - def __copy__(self) -> RequestBlockHeader: ... - @staticmethod - def from_bytes(bytes) -> RequestBlockHeader: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlockHeader: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlockHeader, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestBlockHeader: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RequestBlockHeader: ... - -class RespondBlockHeader: - header_block: HeaderBlock - def __init__( - self, - header_block: HeaderBlock - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondBlockHeader: ... - def __copy__(self) -> RespondBlockHeader: ... - @staticmethod - def from_bytes(bytes) -> RespondBlockHeader: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlockHeader: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlockHeader, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondBlockHeader: ... - def replace(self, *, header_block: Union[ HeaderBlock, _Unspec] = _Unspec()) -> RespondBlockHeader: ... - -class RejectHeaderRequest: - height: uint32 - def __init__( - self, - height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectHeaderRequest: ... - def __copy__(self) -> RejectHeaderRequest: ... - @staticmethod - def from_bytes(bytes) -> RejectHeaderRequest: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectHeaderRequest: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectHeaderRequest, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectHeaderRequest: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RejectHeaderRequest: ... - -class RequestRemovals: - height: uint32 - header_hash: bytes32 - coin_names: Optional[List[bytes32]] - def __init__( - self, - height: uint32, - header_hash: bytes, - coin_names: Optional[Sequence[bytes32]] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestRemovals: ... - def __copy__(self) -> RequestRemovals: ... - @staticmethod - def from_bytes(bytes) -> RequestRemovals: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestRemovals: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemovals, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestRemovals: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec(), - coin_names: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemovals: ... - -class RespondRemovals: - height: uint32 - header_hash: bytes32 - coins: List[Tuple[bytes32, Optional[Coin]]] - proofs: Optional[List[Tuple[bytes32, bytes]]] - def __init__( - self, - height: uint32, - header_hash: bytes, - coins: Sequence[Tuple[bytes32, Optional[Coin]]], - proofs: Optional[Sequence[Tuple[bytes32, bytes]]] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondRemovals: ... - def __copy__(self) -> RespondRemovals: ... - @staticmethod - def from_bytes(bytes) -> RespondRemovals: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondRemovals: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemovals, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondRemovals: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec(), - coins: Union[ List[Tuple[bytes32, Optional[Coin]]], _Unspec] = _Unspec(), - proofs: Union[ Optional[List[Tuple[bytes32, bytes]]], _Unspec] = _Unspec()) -> RespondRemovals: ... - -class RejectRemovalsRequest: - height: uint32 - header_hash: bytes32 - def __init__( - self, - height: uint32, - header_hash: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectRemovalsRequest: ... - def __copy__(self) -> RejectRemovalsRequest: ... - @staticmethod - def from_bytes(bytes) -> RejectRemovalsRequest: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectRemovalsRequest: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectRemovalsRequest, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectRemovalsRequest: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RejectRemovalsRequest: ... - -class RequestAdditions: - height: uint32 - header_hash: Optional[bytes32] - puzzle_hashes: Optional[List[bytes32]] - def __init__( - self, - height: uint32, - header_hash: Optional[bytes32], - puzzle_hashes: Optional[Sequence[bytes32]] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestAdditions: ... - def __copy__(self) -> RequestAdditions: ... - @staticmethod - def from_bytes(bytes) -> RequestAdditions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestAdditions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestAdditions, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestAdditions: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - header_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), - puzzle_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestAdditions: ... - -class RespondAdditions: - height: uint32 - header_hash: bytes32 - coins: List[Tuple[bytes32, List[Coin]]] - proofs: Optional[List[Tuple[bytes32, bytes, Optional[bytes]]]] - def __init__( - self, - height: uint32, - header_hash: bytes, - coins: Sequence[Tuple[bytes32, Sequence[Coin]]], - proofs: Optional[Sequence[Tuple[bytes32, bytes, Optional[bytes]]]] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondAdditions: ... - def __copy__(self) -> RespondAdditions: ... - @staticmethod - def from_bytes(bytes) -> RespondAdditions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondAdditions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondAdditions, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondAdditions: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec(), - coins: Union[ List[Tuple[bytes32, List[Coin]]], _Unspec] = _Unspec(), - proofs: Union[ Optional[List[Tuple[bytes32, bytes, Optional[bytes]]]], _Unspec] = _Unspec()) -> RespondAdditions: ... - -class RejectAdditionsRequest: - height: uint32 - header_hash: bytes32 - def __init__( - self, - height: uint32, - header_hash: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectAdditionsRequest: ... - def __copy__(self) -> RejectAdditionsRequest: ... - @staticmethod - def from_bytes(bytes) -> RejectAdditionsRequest: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectAdditionsRequest: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectAdditionsRequest, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectAdditionsRequest: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RejectAdditionsRequest: ... - -class RespondBlockHeaders: - start_height: uint32 - end_height: uint32 - header_blocks: List[HeaderBlock] - def __init__( - self, - start_height: uint32, - end_height: uint32, - header_blocks: Sequence[HeaderBlock] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondBlockHeaders: ... - def __copy__(self) -> RespondBlockHeaders: ... - @staticmethod - def from_bytes(bytes) -> RespondBlockHeaders: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlockHeaders: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlockHeaders, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondBlockHeaders: ... - def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), - end_height: Union[ uint32, _Unspec] = _Unspec(), - header_blocks: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RespondBlockHeaders: ... - -class RejectBlockHeaders: - start_height: uint32 - end_height: uint32 - def __init__( - self, - start_height: uint32, - end_height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectBlockHeaders: ... - def __copy__(self) -> RejectBlockHeaders: ... - @staticmethod - def from_bytes(bytes) -> RejectBlockHeaders: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectBlockHeaders: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlockHeaders, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectBlockHeaders: ... - def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), - end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlockHeaders: ... - -class RequestBlockHeaders: - start_height: uint32 - end_height: uint32 - return_filter: bool - def __init__( - self, - start_height: uint32, - end_height: uint32, - return_filter: bool - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestBlockHeaders: ... - def __copy__(self) -> RequestBlockHeaders: ... - @staticmethod - def from_bytes(bytes) -> RequestBlockHeaders: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlockHeaders: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlockHeaders, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestBlockHeaders: ... - def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), - end_height: Union[ uint32, _Unspec] = _Unspec(), - return_filter: Union[ bool, _Unspec] = _Unspec()) -> RequestBlockHeaders: ... - -class RequestHeaderBlocks: - start_height: uint32 - end_height: uint32 - def __init__( - self, - start_height: uint32, - end_height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestHeaderBlocks: ... - def __copy__(self) -> RequestHeaderBlocks: ... - @staticmethod - def from_bytes(bytes) -> RequestHeaderBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestHeaderBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestHeaderBlocks, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestHeaderBlocks: ... - def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), - end_height: Union[ uint32, _Unspec] = _Unspec()) -> RequestHeaderBlocks: ... - -class RejectHeaderBlocks: - start_height: uint32 - end_height: uint32 - def __init__( - self, - start_height: uint32, - end_height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectHeaderBlocks: ... - def __copy__(self) -> RejectHeaderBlocks: ... - @staticmethod - def from_bytes(bytes) -> RejectHeaderBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectHeaderBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectHeaderBlocks, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectHeaderBlocks: ... - def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), - end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectHeaderBlocks: ... - -class RespondHeaderBlocks: - start_height: uint32 - end_height: uint32 - header_blocks: List[HeaderBlock] - def __init__( - self, - start_height: uint32, - end_height: uint32, - header_blocks: Sequence[HeaderBlock] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondHeaderBlocks: ... - def __copy__(self) -> RespondHeaderBlocks: ... - @staticmethod - def from_bytes(bytes) -> RespondHeaderBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondHeaderBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondHeaderBlocks, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondHeaderBlocks: ... - def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), - end_height: Union[ uint32, _Unspec] = _Unspec(), - header_blocks: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RespondHeaderBlocks: ... - -class RegisterForPhUpdates: - puzzle_hashes: List[bytes32] - min_height: uint32 - def __init__( - self, - puzzle_hashes: Sequence[bytes32], - min_height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RegisterForPhUpdates: ... - def __copy__(self) -> RegisterForPhUpdates: ... - @staticmethod - def from_bytes(bytes) -> RegisterForPhUpdates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RegisterForPhUpdates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RegisterForPhUpdates, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RegisterForPhUpdates: ... - def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), - min_height: Union[ uint32, _Unspec] = _Unspec()) -> RegisterForPhUpdates: ... - -class RespondToPhUpdates: - puzzle_hashes: List[bytes32] - min_height: uint32 - coin_states: List[CoinState] - def __init__( - self, - puzzle_hashes: Sequence[bytes32], - min_height: uint32, - coin_states: Sequence[CoinState] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondToPhUpdates: ... - def __copy__(self) -> RespondToPhUpdates: ... - @staticmethod - def from_bytes(bytes) -> RespondToPhUpdates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondToPhUpdates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondToPhUpdates, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondToPhUpdates: ... - def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), - min_height: Union[ uint32, _Unspec] = _Unspec(), - coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondToPhUpdates: ... - -class RegisterForCoinUpdates: - coin_ids: List[bytes32] - min_height: uint32 - def __init__( - self, - coin_ids: Sequence[bytes32], - min_height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RegisterForCoinUpdates: ... - def __copy__(self) -> RegisterForCoinUpdates: ... - @staticmethod - def from_bytes(bytes) -> RegisterForCoinUpdates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RegisterForCoinUpdates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RegisterForCoinUpdates, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RegisterForCoinUpdates: ... - def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), - min_height: Union[ uint32, _Unspec] = _Unspec()) -> RegisterForCoinUpdates: ... - -class RespondToCoinUpdates: - coin_ids: List[bytes32] - min_height: uint32 - coin_states: List[CoinState] - def __init__( - self, - coin_ids: Sequence[bytes32], - min_height: uint32, - coin_states: Sequence[CoinState] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondToCoinUpdates: ... - def __copy__(self) -> RespondToCoinUpdates: ... - @staticmethod - def from_bytes(bytes) -> RespondToCoinUpdates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondToCoinUpdates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondToCoinUpdates, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondToCoinUpdates: ... - def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), - min_height: Union[ uint32, _Unspec] = _Unspec(), - coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondToCoinUpdates: ... - -class CoinStateUpdate: - height: uint32 - fork_height: uint32 - peak_hash: bytes32 - items: List[CoinState] - def __init__( - self, - height: uint32, - fork_height: uint32, - peak_hash: bytes, - items: Sequence[CoinState] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> CoinStateUpdate: ... - def __copy__(self) -> CoinStateUpdate: ... - @staticmethod - def from_bytes(bytes) -> CoinStateUpdate: ... - @staticmethod - def from_bytes_unchecked(bytes) -> CoinStateUpdate: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinStateUpdate, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> CoinStateUpdate: ... - def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), - fork_height: Union[ uint32, _Unspec] = _Unspec(), - peak_hash: Union[ bytes32, _Unspec] = _Unspec(), - items: Union[ List[CoinState], _Unspec] = _Unspec()) -> CoinStateUpdate: ... - -class RequestChildren: - coin_name: bytes32 - def __init__( - self, - coin_name: bytes - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestChildren: ... - def __copy__(self) -> RequestChildren: ... - @staticmethod - def from_bytes(bytes) -> RequestChildren: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestChildren: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestChildren, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestChildren: ... - def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec()) -> RequestChildren: ... - -class RespondChildren: - coin_states: List[CoinState] - def __init__( - self, - coin_states: Sequence[CoinState] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondChildren: ... - def __copy__(self) -> RespondChildren: ... - @staticmethod - def from_bytes(bytes) -> RespondChildren: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondChildren: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondChildren, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondChildren: ... - def replace(self, *, coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondChildren: ... - -class RequestSesInfo: - start_height: uint32 - end_height: uint32 - def __init__( - self, - start_height: uint32, - end_height: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestSesInfo: ... - def __copy__(self) -> RequestSesInfo: ... - @staticmethod - def from_bytes(bytes) -> RequestSesInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestSesInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestSesInfo, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestSesInfo: ... - def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), - end_height: Union[ uint32, _Unspec] = _Unspec()) -> RequestSesInfo: ... - -class RespondSesInfo: - reward_chain_hash: List[bytes32] - heights: List[List[uint32]] - def __init__( - self, - reward_chain_hash: Sequence[bytes32], - heights: Sequence[Sequence[uint32]] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondSesInfo: ... - def __copy__(self) -> RespondSesInfo: ... - @staticmethod - def from_bytes(bytes) -> RespondSesInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondSesInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondSesInfo, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondSesInfo: ... - def replace(self, *, reward_chain_hash: Union[ List[bytes32], _Unspec] = _Unspec(), - heights: Union[ List[List[uint32]], _Unspec] = _Unspec()) -> RespondSesInfo: ... - -class RequestFeeEstimates: - time_targets: List[uint64] - def __init__( - self, - time_targets: Sequence[uint64] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestFeeEstimates: ... - def __copy__(self) -> RequestFeeEstimates: ... - @staticmethod - def from_bytes(bytes) -> RequestFeeEstimates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestFeeEstimates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestFeeEstimates, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestFeeEstimates: ... - def replace(self, *, time_targets: Union[ List[uint64], _Unspec] = _Unspec()) -> RequestFeeEstimates: ... - -class RespondFeeEstimates: - estimates: FeeEstimateGroup - def __init__( - self, - estimates: FeeEstimateGroup - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondFeeEstimates: ... - def __copy__(self) -> RespondFeeEstimates: ... - @staticmethod - def from_bytes(bytes) -> RespondFeeEstimates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondFeeEstimates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondFeeEstimates, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondFeeEstimates: ... - def replace(self, *, estimates: Union[ FeeEstimateGroup, _Unspec] = _Unspec()) -> RespondFeeEstimates: ... - -class RequestRemovePuzzleSubscriptions: - puzzle_hashes: Optional[List[bytes32]] - def __init__( - self, - puzzle_hashes: Optional[Sequence[bytes32]] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestRemovePuzzleSubscriptions: ... - def __copy__(self) -> RequestRemovePuzzleSubscriptions: ... - @staticmethod - def from_bytes(bytes) -> RequestRemovePuzzleSubscriptions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestRemovePuzzleSubscriptions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemovePuzzleSubscriptions, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestRemovePuzzleSubscriptions: ... - def replace(self, *, puzzle_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemovePuzzleSubscriptions: ... - -class RespondRemovePuzzleSubscriptions: - puzzle_hashes: List[bytes32] - def __init__( - self, - puzzle_hashes: Sequence[bytes32] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondRemovePuzzleSubscriptions: ... - def __copy__(self) -> RespondRemovePuzzleSubscriptions: ... - @staticmethod - def from_bytes(bytes) -> RespondRemovePuzzleSubscriptions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondRemovePuzzleSubscriptions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemovePuzzleSubscriptions, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondRemovePuzzleSubscriptions: ... - def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec()) -> RespondRemovePuzzleSubscriptions: ... - -class RequestRemoveCoinSubscriptions: - coin_ids: Optional[List[bytes32]] - def __init__( - self, - coin_ids: Optional[Sequence[bytes32]] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestRemoveCoinSubscriptions: ... - def __copy__(self) -> RequestRemoveCoinSubscriptions: ... - @staticmethod - def from_bytes(bytes) -> RequestRemoveCoinSubscriptions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestRemoveCoinSubscriptions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemoveCoinSubscriptions, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestRemoveCoinSubscriptions: ... - def replace(self, *, coin_ids: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemoveCoinSubscriptions: ... - -class RespondRemoveCoinSubscriptions: - coin_ids: List[bytes32] - def __init__( - self, - coin_ids: Sequence[bytes32] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondRemoveCoinSubscriptions: ... - def __copy__(self) -> RespondRemoveCoinSubscriptions: ... - @staticmethod - def from_bytes(bytes) -> RespondRemoveCoinSubscriptions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondRemoveCoinSubscriptions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemoveCoinSubscriptions, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondRemoveCoinSubscriptions: ... - def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec()) -> RespondRemoveCoinSubscriptions: ... - -class CoinStateFilters: - include_spent: bool - include_unspent: bool - include_hinted: bool - min_amount: uint64 - def __init__( - self, - include_spent: bool, - include_unspent: bool, - include_hinted: bool, - min_amount: uint64 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> CoinStateFilters: ... - def __copy__(self) -> CoinStateFilters: ... - @staticmethod - def from_bytes(bytes) -> CoinStateFilters: ... - @staticmethod - def from_bytes_unchecked(bytes) -> CoinStateFilters: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinStateFilters, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> CoinStateFilters: ... - def replace(self, *, include_spent: Union[ bool, _Unspec] = _Unspec(), - include_unspent: Union[ bool, _Unspec] = _Unspec(), - include_hinted: Union[ bool, _Unspec] = _Unspec(), - min_amount: Union[ uint64, _Unspec] = _Unspec()) -> CoinStateFilters: ... - -class RequestPuzzleState: - puzzle_hashes: List[bytes32] - previous_height: Optional[uint32] - header_hash: bytes32 - filters: CoinStateFilters - subscribe_when_finished: bool - def __init__( - self, - puzzle_hashes: Sequence[bytes32], - previous_height: Optional[uint32], - header_hash: bytes, - filters: CoinStateFilters, - subscribe_when_finished: bool - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestPuzzleState: ... - def __copy__(self) -> RequestPuzzleState: ... - @staticmethod - def from_bytes(bytes) -> RequestPuzzleState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestPuzzleState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPuzzleState, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestPuzzleState: ... - def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), - previous_height: Union[ Optional[uint32], _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec(), - filters: Union[ CoinStateFilters, _Unspec] = _Unspec(), - subscribe_when_finished: Union[ bool, _Unspec] = _Unspec()) -> RequestPuzzleState: ... - -class RespondPuzzleState: - puzzle_hashes: List[bytes32] - height: uint32 - header_hash: bytes32 - is_finished: bool - coin_states: List[CoinState] - def __init__( - self, - puzzle_hashes: Sequence[bytes32], - height: uint32, - header_hash: bytes, - is_finished: bool, - coin_states: Sequence[CoinState] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondPuzzleState: ... - def __copy__(self) -> RespondPuzzleState: ... - @staticmethod - def from_bytes(bytes) -> RespondPuzzleState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondPuzzleState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPuzzleState, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondPuzzleState: ... - def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), - height: Union[ uint32, _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec(), - is_finished: Union[ bool, _Unspec] = _Unspec(), - coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondPuzzleState: ... - -class RejectPuzzleState: - reason: int - def __init__( - self, - reason: int - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectPuzzleState: ... - def __copy__(self) -> RejectPuzzleState: ... - @staticmethod - def from_bytes(bytes) -> RejectPuzzleState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectPuzzleState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectPuzzleState, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectPuzzleState: ... - def replace(self, *, reason: Union[ int, _Unspec] = _Unspec()) -> RejectPuzzleState: ... - -class RequestCoinState: - coin_ids: List[bytes32] - previous_height: Optional[uint32] - header_hash: bytes32 - subscribe: bool - def __init__( - self, - coin_ids: Sequence[bytes32], - previous_height: Optional[uint32], - header_hash: bytes, - subscribe: bool - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestCoinState: ... - def __copy__(self) -> RequestCoinState: ... - @staticmethod - def from_bytes(bytes) -> RequestCoinState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestCoinState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestCoinState, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestCoinState: ... - def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), - previous_height: Union[ Optional[uint32], _Unspec] = _Unspec(), - header_hash: Union[ bytes32, _Unspec] = _Unspec(), - subscribe: Union[ bool, _Unspec] = _Unspec()) -> RequestCoinState: ... - -class RespondCoinState: - coin_ids: List[bytes32] - coin_states: List[CoinState] - def __init__( - self, - coin_ids: Sequence[bytes32], - coin_states: Sequence[CoinState] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondCoinState: ... - def __copy__(self) -> RespondCoinState: ... - @staticmethod - def from_bytes(bytes) -> RespondCoinState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondCoinState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondCoinState, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondCoinState: ... - def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), - coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondCoinState: ... - -class RejectCoinState: - reason: int - def __init__( - self, - reason: int - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectCoinState: ... - def __copy__(self) -> RejectCoinState: ... - @staticmethod - def from_bytes(bytes) -> RejectCoinState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectCoinState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectCoinState, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectCoinState: ... - def replace(self, *, reason: Union[ int, _Unspec] = _Unspec()) -> RejectCoinState: ... - -class SubEpochData: - reward_chain_hash: bytes32 - num_blocks_overflow: uint8 - new_sub_slot_iters: Optional[uint64] - new_difficulty: Optional[uint64] - def __init__( - self, - reward_chain_hash: bytes, - num_blocks_overflow: uint8, - new_sub_slot_iters: Optional[uint64], - new_difficulty: Optional[uint64] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubEpochData: ... - def __copy__(self) -> SubEpochData: ... - @staticmethod - def from_bytes(bytes) -> SubEpochData: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochData: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochData, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubEpochData: ... - def replace(self, *, reward_chain_hash: Union[ bytes32, _Unspec] = _Unspec(), - num_blocks_overflow: Union[ uint8, _Unspec] = _Unspec(), - new_sub_slot_iters: Union[ Optional[uint64], _Unspec] = _Unspec(), - new_difficulty: Union[ Optional[uint64], _Unspec] = _Unspec()) -> SubEpochData: ... - -class SubSlotData: - proof_of_space: Optional[ProofOfSpace] - cc_signage_point: Optional[VDFProof] - cc_infusion_point: Optional[VDFProof] - icc_infusion_point: Optional[VDFProof] - cc_sp_vdf_info: Optional[VDFInfo] - signage_point_index: Optional[uint8] - cc_slot_end: Optional[VDFProof] - icc_slot_end: Optional[VDFProof] - cc_slot_end_info: Optional[VDFInfo] - icc_slot_end_info: Optional[VDFInfo] - cc_ip_vdf_info: Optional[VDFInfo] - icc_ip_vdf_info: Optional[VDFInfo] - total_iters: Optional[uint128] - def is_end_of_slot(self) -> bool: ... - def is_challenge(self) -> bool: ... - def __init__( - self, - proof_of_space: Optional[ProofOfSpace], - cc_signage_point: Optional[VDFProof], - cc_infusion_point: Optional[VDFProof], - icc_infusion_point: Optional[VDFProof], - cc_sp_vdf_info: Optional[VDFInfo], - signage_point_index: Optional[uint8], - cc_slot_end: Optional[VDFProof], - icc_slot_end: Optional[VDFProof], - cc_slot_end_info: Optional[VDFInfo], - icc_slot_end_info: Optional[VDFInfo], - cc_ip_vdf_info: Optional[VDFInfo], - icc_ip_vdf_info: Optional[VDFInfo], - total_iters: Optional[uint128] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubSlotData: ... - def __copy__(self) -> SubSlotData: ... - @staticmethod - def from_bytes(bytes) -> SubSlotData: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubSlotData: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubSlotData, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubSlotData: ... - def replace(self, *, proof_of_space: Union[ Optional[ProofOfSpace], _Unspec] = _Unspec(), - cc_signage_point: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - cc_infusion_point: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - icc_infusion_point: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - cc_sp_vdf_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - signage_point_index: Union[ Optional[uint8], _Unspec] = _Unspec(), - cc_slot_end: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - icc_slot_end: Union[ Optional[VDFProof], _Unspec] = _Unspec(), - cc_slot_end_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - icc_slot_end_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - cc_ip_vdf_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - icc_ip_vdf_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), - total_iters: Union[ Optional[uint128], _Unspec] = _Unspec()) -> SubSlotData: ... - -class SubEpochChallengeSegment: - sub_epoch_n: uint32 - sub_slots: List[SubSlotData] - rc_slot_end_info: Optional[VDFInfo] - def __init__( - self, - sub_epoch_n: uint32, - sub_slots: Sequence[SubSlotData], - rc_slot_end_info: Optional[VDFInfo] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubEpochChallengeSegment: ... - def __copy__(self) -> SubEpochChallengeSegment: ... - @staticmethod - def from_bytes(bytes) -> SubEpochChallengeSegment: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochChallengeSegment: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochChallengeSegment, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubEpochChallengeSegment: ... - def replace(self, *, sub_epoch_n: Union[ uint32, _Unspec] = _Unspec(), - sub_slots: Union[ List[SubSlotData], _Unspec] = _Unspec(), - rc_slot_end_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec()) -> SubEpochChallengeSegment: ... - -class SubEpochSegments: - challenge_segments: List[SubEpochChallengeSegment] - def __init__( - self, - challenge_segments: Sequence[SubEpochChallengeSegment] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubEpochSegments: ... - def __copy__(self) -> SubEpochSegments: ... - @staticmethod - def from_bytes(bytes) -> SubEpochSegments: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochSegments: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochSegments, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubEpochSegments: ... - def replace(self, *, challenge_segments: Union[ List[SubEpochChallengeSegment], _Unspec] = _Unspec()) -> SubEpochSegments: ... - -class RecentChainData: - recent_chain_data: List[HeaderBlock] - def __init__( - self, - recent_chain_data: Sequence[HeaderBlock] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RecentChainData: ... - def __copy__(self) -> RecentChainData: ... - @staticmethod - def from_bytes(bytes) -> RecentChainData: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RecentChainData: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RecentChainData, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RecentChainData: ... - def replace(self, *, recent_chain_data: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RecentChainData: ... - -class ProofBlockHeader: - finished_sub_slots: List[EndOfSubSlotBundle] - reward_chain_block: RewardChainBlock - def __init__( - self, - finished_sub_slots: Sequence[EndOfSubSlotBundle], - reward_chain_block: RewardChainBlock - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ProofBlockHeader: ... - def __copy__(self) -> ProofBlockHeader: ... - @staticmethod - def from_bytes(bytes) -> ProofBlockHeader: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ProofBlockHeader: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ProofBlockHeader, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ProofBlockHeader: ... - def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), - reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec()) -> ProofBlockHeader: ... - -class WeightProof: - sub_epochs: List[SubEpochData] - sub_epoch_segments: List[SubEpochChallengeSegment] - recent_chain_data: List[HeaderBlock] - def __init__( - self, - sub_epochs: Sequence[SubEpochData], - sub_epoch_segments: Sequence[SubEpochChallengeSegment], - recent_chain_data: Sequence[HeaderBlock] - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> WeightProof: ... - def __copy__(self) -> WeightProof: ... - @staticmethod - def from_bytes(bytes) -> WeightProof: ... - @staticmethod - def from_bytes_unchecked(bytes) -> WeightProof: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[WeightProof, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> WeightProof: ... - def replace(self, *, sub_epochs: Union[ List[SubEpochData], _Unspec] = _Unspec(), - sub_epoch_segments: Union[ List[SubEpochChallengeSegment], _Unspec] = _Unspec(), - recent_chain_data: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> WeightProof: ... - -class ConsensusConstants: - SLOT_BLOCKS_TARGET: uint32 - MIN_BLOCKS_PER_CHALLENGE_BLOCK: uint8 - MAX_SUB_SLOT_BLOCKS: uint32 - NUM_SPS_SUB_SLOT: uint32 - SUB_SLOT_ITERS_STARTING: uint64 - DIFFICULTY_CONSTANT_FACTOR: uint128 - DIFFICULTY_STARTING: uint64 - DIFFICULTY_CHANGE_MAX_FACTOR: uint32 - SUB_EPOCH_BLOCKS: uint32 - EPOCH_BLOCKS: uint32 - SIGNIFICANT_BITS: uint8 - DISCRIMINANT_SIZE_BITS: uint16 - NUMBER_ZERO_BITS_PLOT_FILTER: uint8 - MIN_PLOT_SIZE: uint8 - MAX_PLOT_SIZE: uint8 - SUB_SLOT_TIME_TARGET: uint16 - NUM_SP_INTERVALS_EXTRA: uint8 - MAX_FUTURE_TIME2: uint32 - NUMBER_OF_TIMESTAMPS: uint8 - GENESIS_CHALLENGE: bytes32 - AGG_SIG_ME_ADDITIONAL_DATA: bytes32 - AGG_SIG_PARENT_ADDITIONAL_DATA: bytes32 - AGG_SIG_PUZZLE_ADDITIONAL_DATA: bytes32 - AGG_SIG_AMOUNT_ADDITIONAL_DATA: bytes32 - AGG_SIG_PUZZLE_AMOUNT_ADDITIONAL_DATA: bytes32 - AGG_SIG_PARENT_AMOUNT_ADDITIONAL_DATA: bytes32 - AGG_SIG_PARENT_PUZZLE_ADDITIONAL_DATA: bytes32 - GENESIS_PRE_FARM_POOL_PUZZLE_HASH: bytes32 - GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: bytes32 - MAX_VDF_WITNESS_SIZE: uint8 - MEMPOOL_BLOCK_BUFFER: uint8 - MAX_COIN_AMOUNT: uint64 - MAX_BLOCK_COST_CLVM: uint64 - COST_PER_BYTE: uint64 - WEIGHT_PROOF_THRESHOLD: uint8 - WEIGHT_PROOF_RECENT_BLOCKS: uint32 - MAX_BLOCK_COUNT_PER_REQUESTS: uint32 - BLOCKS_CACHE_SIZE: uint32 - MAX_GENERATOR_SIZE: uint32 - MAX_GENERATOR_REF_LIST_SIZE: uint32 - POOL_SUB_SLOT_ITERS: uint64 - SOFT_FORK2_HEIGHT: uint32 - SOFT_FORK4_HEIGHT: uint32 - SOFT_FORK5_HEIGHT: uint32 - HARD_FORK_HEIGHT: uint32 - HARD_FORK_FIX_HEIGHT: uint32 - PLOT_FILTER_128_HEIGHT: uint32 - PLOT_FILTER_64_HEIGHT: uint32 - PLOT_FILTER_32_HEIGHT: uint32 - def __init__( - self, - SLOT_BLOCKS_TARGET: uint32, - MIN_BLOCKS_PER_CHALLENGE_BLOCK: uint8, - MAX_SUB_SLOT_BLOCKS: uint32, - NUM_SPS_SUB_SLOT: uint32, - SUB_SLOT_ITERS_STARTING: uint64, - DIFFICULTY_CONSTANT_FACTOR: uint128, - DIFFICULTY_STARTING: uint64, - DIFFICULTY_CHANGE_MAX_FACTOR: uint32, - SUB_EPOCH_BLOCKS: uint32, - EPOCH_BLOCKS: uint32, - SIGNIFICANT_BITS: uint8, - DISCRIMINANT_SIZE_BITS: uint16, - NUMBER_ZERO_BITS_PLOT_FILTER: uint8, - MIN_PLOT_SIZE: uint8, - MAX_PLOT_SIZE: uint8, - SUB_SLOT_TIME_TARGET: uint16, - NUM_SP_INTERVALS_EXTRA: uint8, - MAX_FUTURE_TIME2: uint32, - NUMBER_OF_TIMESTAMPS: uint8, - GENESIS_CHALLENGE: bytes, - AGG_SIG_ME_ADDITIONAL_DATA: bytes, - AGG_SIG_PARENT_ADDITIONAL_DATA: bytes, - AGG_SIG_PUZZLE_ADDITIONAL_DATA: bytes, - AGG_SIG_AMOUNT_ADDITIONAL_DATA: bytes, - AGG_SIG_PUZZLE_AMOUNT_ADDITIONAL_DATA: bytes, - AGG_SIG_PARENT_AMOUNT_ADDITIONAL_DATA: bytes, - AGG_SIG_PARENT_PUZZLE_ADDITIONAL_DATA: bytes, - GENESIS_PRE_FARM_POOL_PUZZLE_HASH: bytes, - GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: bytes, - MAX_VDF_WITNESS_SIZE: uint8, - MEMPOOL_BLOCK_BUFFER: uint8, - MAX_COIN_AMOUNT: uint64, - MAX_BLOCK_COST_CLVM: uint64, - COST_PER_BYTE: uint64, - WEIGHT_PROOF_THRESHOLD: uint8, - WEIGHT_PROOF_RECENT_BLOCKS: uint32, - MAX_BLOCK_COUNT_PER_REQUESTS: uint32, - BLOCKS_CACHE_SIZE: uint32, - MAX_GENERATOR_SIZE: uint32, - MAX_GENERATOR_REF_LIST_SIZE: uint32, - POOL_SUB_SLOT_ITERS: uint64, - SOFT_FORK2_HEIGHT: uint32, - SOFT_FORK4_HEIGHT: uint32, - SOFT_FORK5_HEIGHT: uint32, - HARD_FORK_HEIGHT: uint32, - HARD_FORK_FIX_HEIGHT: uint32, - PLOT_FILTER_128_HEIGHT: uint32, - PLOT_FILTER_64_HEIGHT: uint32, - PLOT_FILTER_32_HEIGHT: uint32 - ) -> None: ... - def __hash__(self) -> int: ... - def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ConsensusConstants: ... - def __copy__(self) -> ConsensusConstants: ... - @staticmethod - def from_bytes(bytes) -> ConsensusConstants: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ConsensusConstants: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ConsensusConstants, int]: ... - def to_bytes(self) -> bytes: ... - def __bytes__(self) -> bytes: ... - def stream_to_bytes(self) -> bytes: ... - def get_hash(self) -> bytes32: ... - def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ConsensusConstants: ... - def replace(self, *, SLOT_BLOCKS_TARGET: Union[ uint32, _Unspec] = _Unspec(), - MIN_BLOCKS_PER_CHALLENGE_BLOCK: Union[ uint8, _Unspec] = _Unspec(), - MAX_SUB_SLOT_BLOCKS: Union[ uint32, _Unspec] = _Unspec(), - NUM_SPS_SUB_SLOT: Union[ uint32, _Unspec] = _Unspec(), - SUB_SLOT_ITERS_STARTING: Union[ uint64, _Unspec] = _Unspec(), - DIFFICULTY_CONSTANT_FACTOR: Union[ uint128, _Unspec] = _Unspec(), - DIFFICULTY_STARTING: Union[ uint64, _Unspec] = _Unspec(), - DIFFICULTY_CHANGE_MAX_FACTOR: Union[ uint32, _Unspec] = _Unspec(), - SUB_EPOCH_BLOCKS: Union[ uint32, _Unspec] = _Unspec(), - EPOCH_BLOCKS: Union[ uint32, _Unspec] = _Unspec(), - SIGNIFICANT_BITS: Union[ uint8, _Unspec] = _Unspec(), - DISCRIMINANT_SIZE_BITS: Union[ uint16, _Unspec] = _Unspec(), - NUMBER_ZERO_BITS_PLOT_FILTER: Union[ uint8, _Unspec] = _Unspec(), - MIN_PLOT_SIZE: Union[ uint8, _Unspec] = _Unspec(), - MAX_PLOT_SIZE: Union[ uint8, _Unspec] = _Unspec(), - SUB_SLOT_TIME_TARGET: Union[ uint16, _Unspec] = _Unspec(), - NUM_SP_INTERVALS_EXTRA: Union[ uint8, _Unspec] = _Unspec(), - MAX_FUTURE_TIME2: Union[ uint32, _Unspec] = _Unspec(), - NUMBER_OF_TIMESTAMPS: Union[ uint8, _Unspec] = _Unspec(), - GENESIS_CHALLENGE: Union[ bytes32, _Unspec] = _Unspec(), - AGG_SIG_ME_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), - AGG_SIG_PARENT_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), - AGG_SIG_PUZZLE_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), - AGG_SIG_AMOUNT_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), - AGG_SIG_PUZZLE_AMOUNT_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), - AGG_SIG_PARENT_AMOUNT_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), - AGG_SIG_PARENT_PUZZLE_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), - GENESIS_PRE_FARM_POOL_PUZZLE_HASH: Union[ bytes32, _Unspec] = _Unspec(), - GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: Union[ bytes32, _Unspec] = _Unspec(), - MAX_VDF_WITNESS_SIZE: Union[ uint8, _Unspec] = _Unspec(), - MEMPOOL_BLOCK_BUFFER: Union[ uint8, _Unspec] = _Unspec(), - MAX_COIN_AMOUNT: Union[ uint64, _Unspec] = _Unspec(), - MAX_BLOCK_COST_CLVM: Union[ uint64, _Unspec] = _Unspec(), - COST_PER_BYTE: Union[ uint64, _Unspec] = _Unspec(), - WEIGHT_PROOF_THRESHOLD: Union[ uint8, _Unspec] = _Unspec(), - WEIGHT_PROOF_RECENT_BLOCKS: Union[ uint32, _Unspec] = _Unspec(), - MAX_BLOCK_COUNT_PER_REQUESTS: Union[ uint32, _Unspec] = _Unspec(), - BLOCKS_CACHE_SIZE: Union[ uint32, _Unspec] = _Unspec(), - MAX_GENERATOR_SIZE: Union[ uint32, _Unspec] = _Unspec(), - MAX_GENERATOR_REF_LIST_SIZE: Union[ uint32, _Unspec] = _Unspec(), - POOL_SUB_SLOT_ITERS: Union[ uint64, _Unspec] = _Unspec(), - SOFT_FORK2_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), - SOFT_FORK4_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), - SOFT_FORK5_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), - HARD_FORK_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), - HARD_FORK_FIX_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), - PLOT_FILTER_128_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), - PLOT_FILTER_64_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), - PLOT_FILTER_32_HEIGHT: Union[ uint32, _Unspec] = _Unspec()) -> ConsensusConstants: ... From 9f6e97da0b73b441ce7e060edb1a8dc49846b53b Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 27 Aug 2024 14:13:25 -0400 Subject: [PATCH 05/59] oops --- wheel/generate_type_stubs.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index c57dbb251..0623ba211 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -28,8 +28,6 @@ def print_class( # f-strings don't allow backslashes, which makes it a bit tricky to # manipulate strings with newlines nl = "\n" - if name == "FeeEstimate": - 1/0 def add_indent(x: str): return "\n " + x From 4ce70043929398850ec9ac5113155e9e66026554 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 27 Aug 2024 14:17:38 -0400 Subject: [PATCH 06/59] now --- wheel/generate_type_stubs.py | 2 + wheel/python/chia_rs/chia_rs.pyi | 3651 ++++++++++++++++++++++++++++++ 2 files changed, 3653 insertions(+) diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index 0623ba211..da473a3d2 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -345,6 +345,7 @@ def run_chia_program( program: bytes, args: bytes, max_cost: int, flags: int ) -> Tuple[int, LazyNode]: ... +@final class LazyNode: pair: Optional[Tuple[LazyNode, LazyNode]] atom: Optional[bytes] @@ -383,6 +384,7 @@ def derive_child_sk_unhardened(pk: PrivateKey, index: int) -> PrivateKey: ... @staticmethod def derive_child_pk_unhardened(pk: G1Element, index: int) -> G1Element: ... +@final class MerkleSet: def get_root(self) -> bytes32: ... def is_included_already_hashed(self, to_check: bytes) -> Tuple[bool, bytes]: ... diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 1bcba11d1..f6fb1963a 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -87,6 +87,7 @@ def run_chia_program( program: bytes, args: bytes, max_cost: int, flags: int ) -> Tuple[int, LazyNode]: ... +@final class LazyNode: pair: Optional[Tuple[LazyNode, LazyNode]] atom: Optional[bytes] @@ -125,6 +126,7 @@ class AugSchemeMPL: @staticmethod def derive_child_pk_unhardened(pk: G1Element, index: int) -> G1Element: ... +@final class MerkleSet: def get_root(self) -> bytes32: ... def is_included_already_hashed(self, to_check: bytes) -> Tuple[bool, bytes]: ... @@ -773,3 +775,3652 @@ class FeeRate: @staticmethod def from_json_dict(json_dict: Any) -> FeeRate: ... def replace(self, *, mojos_per_clvm_cost: Union[ uint64, _Unspec] = _Unspec()) -> FeeRate: ... + +@final +class FeeEstimate: + error: Optional[str] + time_target: uint64 + estimated_fee_rate: FeeRate + def __init__( + self, + error: Optional[str], + time_target: uint64, + estimated_fee_rate: FeeRate + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> FeeEstimate: ... + def __copy__(self) -> FeeEstimate: ... + @staticmethod + def from_bytes(bytes) -> FeeEstimate: ... + @staticmethod + def from_bytes_unchecked(bytes) -> FeeEstimate: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[FeeEstimate, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> FeeEstimate: ... + def replace(self, *, error: Union[ Optional[str], _Unspec] = _Unspec(), + time_target: Union[ uint64, _Unspec] = _Unspec(), + estimated_fee_rate: Union[ FeeRate, _Unspec] = _Unspec()) -> FeeEstimate: ... + +@final +class FeeEstimateGroup: + error: Optional[str] + estimates: List[FeeEstimate] + def __init__( + self, + error: Optional[str], + estimates: Sequence[FeeEstimate] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> FeeEstimateGroup: ... + def __copy__(self) -> FeeEstimateGroup: ... + @staticmethod + def from_bytes(bytes) -> FeeEstimateGroup: ... + @staticmethod + def from_bytes_unchecked(bytes) -> FeeEstimateGroup: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[FeeEstimateGroup, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> FeeEstimateGroup: ... + def replace(self, *, error: Union[ Optional[str], _Unspec] = _Unspec(), + estimates: Union[ List[FeeEstimate], _Unspec] = _Unspec()) -> FeeEstimateGroup: ... + +@final +class TransactionsInfo: + generator_root: bytes32 + generator_refs_root: bytes32 + aggregated_signature: G2Element + fees: uint64 + cost: uint64 + reward_claims_incorporated: List[Coin] + def __init__( + self, + generator_root: bytes, + generator_refs_root: bytes, + aggregated_signature: G2Element, + fees: uint64, + cost: uint64, + reward_claims_incorporated: Sequence[Coin] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> TransactionsInfo: ... + def __copy__(self) -> TransactionsInfo: ... + @staticmethod + def from_bytes(bytes) -> TransactionsInfo: ... + @staticmethod + def from_bytes_unchecked(bytes) -> TransactionsInfo: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[TransactionsInfo, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> TransactionsInfo: ... + def replace(self, *, generator_root: Union[ bytes32, _Unspec] = _Unspec(), + generator_refs_root: Union[ bytes32, _Unspec] = _Unspec(), + aggregated_signature: Union[ G2Element, _Unspec] = _Unspec(), + fees: Union[ uint64, _Unspec] = _Unspec(), + cost: Union[ uint64, _Unspec] = _Unspec(), + reward_claims_incorporated: Union[ List[Coin], _Unspec] = _Unspec()) -> TransactionsInfo: ... + +@final +class FoliageTransactionBlock: + prev_transaction_block_hash: bytes32 + timestamp: uint64 + filter_hash: bytes32 + additions_root: bytes32 + removals_root: bytes32 + transactions_info_hash: bytes32 + def __init__( + self, + prev_transaction_block_hash: bytes, + timestamp: uint64, + filter_hash: bytes, + additions_root: bytes, + removals_root: bytes, + transactions_info_hash: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> FoliageTransactionBlock: ... + def __copy__(self) -> FoliageTransactionBlock: ... + @staticmethod + def from_bytes(bytes) -> FoliageTransactionBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> FoliageTransactionBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[FoliageTransactionBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> FoliageTransactionBlock: ... + def replace(self, *, prev_transaction_block_hash: Union[ bytes32, _Unspec] = _Unspec(), + timestamp: Union[ uint64, _Unspec] = _Unspec(), + filter_hash: Union[ bytes32, _Unspec] = _Unspec(), + additions_root: Union[ bytes32, _Unspec] = _Unspec(), + removals_root: Union[ bytes32, _Unspec] = _Unspec(), + transactions_info_hash: Union[ bytes32, _Unspec] = _Unspec()) -> FoliageTransactionBlock: ... + +@final +class FoliageBlockData: + unfinished_reward_block_hash: bytes32 + pool_target: PoolTarget + pool_signature: Optional[G2Element] + farmer_reward_puzzle_hash: bytes32 + extension_data: bytes32 + def __init__( + self, + unfinished_reward_block_hash: bytes, + pool_target: PoolTarget, + pool_signature: Optional[G2Element], + farmer_reward_puzzle_hash: bytes, + extension_data: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> FoliageBlockData: ... + def __copy__(self) -> FoliageBlockData: ... + @staticmethod + def from_bytes(bytes) -> FoliageBlockData: ... + @staticmethod + def from_bytes_unchecked(bytes) -> FoliageBlockData: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[FoliageBlockData, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> FoliageBlockData: ... + def replace(self, *, unfinished_reward_block_hash: Union[ bytes32, _Unspec] = _Unspec(), + pool_target: Union[ PoolTarget, _Unspec] = _Unspec(), + pool_signature: Union[ Optional[G2Element], _Unspec] = _Unspec(), + farmer_reward_puzzle_hash: Union[ bytes32, _Unspec] = _Unspec(), + extension_data: Union[ bytes32, _Unspec] = _Unspec()) -> FoliageBlockData: ... + +@final +class Foliage: + prev_block_hash: bytes32 + reward_block_hash: bytes32 + foliage_block_data: FoliageBlockData + foliage_block_data_signature: G2Element + foliage_transaction_block_hash: Optional[bytes32] + foliage_transaction_block_signature: Optional[G2Element] + def __init__( + self, + prev_block_hash: bytes, + reward_block_hash: bytes, + foliage_block_data: FoliageBlockData, + foliage_block_data_signature: G2Element, + foliage_transaction_block_hash: Optional[bytes32], + foliage_transaction_block_signature: Optional[G2Element] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> Foliage: ... + def __copy__(self) -> Foliage: ... + @staticmethod + def from_bytes(bytes) -> Foliage: ... + @staticmethod + def from_bytes_unchecked(bytes) -> Foliage: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[Foliage, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> Foliage: ... + def replace(self, *, prev_block_hash: Union[ bytes32, _Unspec] = _Unspec(), + reward_block_hash: Union[ bytes32, _Unspec] = _Unspec(), + foliage_block_data: Union[ FoliageBlockData, _Unspec] = _Unspec(), + foliage_block_data_signature: Union[ G2Element, _Unspec] = _Unspec(), + foliage_transaction_block_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), + foliage_transaction_block_signature: Union[ Optional[G2Element], _Unspec] = _Unspec()) -> Foliage: ... + +@final +class NewPeak: + header_hash: bytes32 + height: uint32 + weight: uint128 + fork_point_with_previous_peak: uint32 + unfinished_reward_block_hash: bytes32 + def __init__( + self, + header_hash: bytes, + height: uint32, + weight: uint128, + fork_point_with_previous_peak: uint32, + unfinished_reward_block_hash: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> NewPeak: ... + def __copy__(self) -> NewPeak: ... + @staticmethod + def from_bytes(bytes) -> NewPeak: ... + @staticmethod + def from_bytes_unchecked(bytes) -> NewPeak: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewPeak, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> NewPeak: ... + def replace(self, *, header_hash: Union[ bytes32, _Unspec] = _Unspec(), + height: Union[ uint32, _Unspec] = _Unspec(), + weight: Union[ uint128, _Unspec] = _Unspec(), + fork_point_with_previous_peak: Union[ uint32, _Unspec] = _Unspec(), + unfinished_reward_block_hash: Union[ bytes32, _Unspec] = _Unspec()) -> NewPeak: ... + +@final +class NewTransaction: + transaction_id: bytes32 + cost: uint64 + fees: uint64 + def __init__( + self, + transaction_id: bytes, + cost: uint64, + fees: uint64 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> NewTransaction: ... + def __copy__(self) -> NewTransaction: ... + @staticmethod + def from_bytes(bytes) -> NewTransaction: ... + @staticmethod + def from_bytes_unchecked(bytes) -> NewTransaction: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewTransaction, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> NewTransaction: ... + def replace(self, *, transaction_id: Union[ bytes32, _Unspec] = _Unspec(), + cost: Union[ uint64, _Unspec] = _Unspec(), + fees: Union[ uint64, _Unspec] = _Unspec()) -> NewTransaction: ... + +@final +class RequestTransaction: + transaction_id: bytes32 + def __init__( + self, + transaction_id: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestTransaction: ... + def __copy__(self) -> RequestTransaction: ... + @staticmethod + def from_bytes(bytes) -> RequestTransaction: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestTransaction: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestTransaction, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestTransaction: ... + def replace(self, *, transaction_id: Union[ bytes32, _Unspec] = _Unspec()) -> RequestTransaction: ... + +@final +class RespondTransaction: + transaction: SpendBundle + def __init__( + self, + transaction: SpendBundle + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondTransaction: ... + def __copy__(self) -> RespondTransaction: ... + @staticmethod + def from_bytes(bytes) -> RespondTransaction: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondTransaction: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondTransaction, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondTransaction: ... + def replace(self, *, transaction: Union[ SpendBundle, _Unspec] = _Unspec()) -> RespondTransaction: ... + +@final +class RequestProofOfWeight: + total_number_of_blocks: uint32 + tip: bytes32 + def __init__( + self, + total_number_of_blocks: uint32, + tip: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestProofOfWeight: ... + def __copy__(self) -> RequestProofOfWeight: ... + @staticmethod + def from_bytes(bytes) -> RequestProofOfWeight: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestProofOfWeight: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestProofOfWeight, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestProofOfWeight: ... + def replace(self, *, total_number_of_blocks: Union[ uint32, _Unspec] = _Unspec(), + tip: Union[ bytes32, _Unspec] = _Unspec()) -> RequestProofOfWeight: ... + +@final +class RespondProofOfWeight: + wp: WeightProof + tip: bytes32 + def __init__( + self, + wp: WeightProof, + tip: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondProofOfWeight: ... + def __copy__(self) -> RespondProofOfWeight: ... + @staticmethod + def from_bytes(bytes) -> RespondProofOfWeight: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondProofOfWeight: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondProofOfWeight, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondProofOfWeight: ... + def replace(self, *, wp: Union[ WeightProof, _Unspec] = _Unspec(), + tip: Union[ bytes32, _Unspec] = _Unspec()) -> RespondProofOfWeight: ... + +@final +class RequestBlock: + height: uint32 + include_transaction_block: bool + def __init__( + self, + height: uint32, + include_transaction_block: bool + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestBlock: ... + def __copy__(self) -> RequestBlock: ... + @staticmethod + def from_bytes(bytes) -> RequestBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestBlock: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + include_transaction_block: Union[ bool, _Unspec] = _Unspec()) -> RequestBlock: ... + +@final +class RejectBlock: + height: uint32 + def __init__( + self, + height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RejectBlock: ... + def __copy__(self) -> RejectBlock: ... + @staticmethod + def from_bytes(bytes) -> RejectBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RejectBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RejectBlock: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlock: ... + +@final +class RequestBlocks: + start_height: uint32 + end_height: uint32 + include_transaction_block: bool + def __init__( + self, + start_height: uint32, + end_height: uint32, + include_transaction_block: bool + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestBlocks: ... + def __copy__(self) -> RequestBlocks: ... + @staticmethod + def from_bytes(bytes) -> RequestBlocks: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestBlocks: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlocks, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestBlocks: ... + def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), + end_height: Union[ uint32, _Unspec] = _Unspec(), + include_transaction_block: Union[ bool, _Unspec] = _Unspec()) -> RequestBlocks: ... + +@final +class RespondBlocks: + start_height: uint32 + end_height: uint32 + blocks: List[FullBlock] + def __init__( + self, + start_height: uint32, + end_height: uint32, + blocks: Sequence[FullBlock] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondBlocks: ... + def __copy__(self) -> RespondBlocks: ... + @staticmethod + def from_bytes(bytes) -> RespondBlocks: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondBlocks: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlocks, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondBlocks: ... + def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), + end_height: Union[ uint32, _Unspec] = _Unspec(), + blocks: Union[ List[FullBlock], _Unspec] = _Unspec()) -> RespondBlocks: ... + +@final +class RejectBlocks: + start_height: uint32 + end_height: uint32 + def __init__( + self, + start_height: uint32, + end_height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RejectBlocks: ... + def __copy__(self) -> RejectBlocks: ... + @staticmethod + def from_bytes(bytes) -> RejectBlocks: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RejectBlocks: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlocks, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RejectBlocks: ... + def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), + end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlocks: ... + +@final +class RespondBlock: + block: FullBlock + def __init__( + self, + block: FullBlock + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondBlock: ... + def __copy__(self) -> RespondBlock: ... + @staticmethod + def from_bytes(bytes) -> RespondBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondBlock: ... + def replace(self, *, block: Union[ FullBlock, _Unspec] = _Unspec()) -> RespondBlock: ... + +@final +class NewUnfinishedBlock: + unfinished_reward_hash: bytes32 + def __init__( + self, + unfinished_reward_hash: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> NewUnfinishedBlock: ... + def __copy__(self) -> NewUnfinishedBlock: ... + @staticmethod + def from_bytes(bytes) -> NewUnfinishedBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> NewUnfinishedBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewUnfinishedBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> NewUnfinishedBlock: ... + def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec()) -> NewUnfinishedBlock: ... + +@final +class RequestUnfinishedBlock: + unfinished_reward_hash: bytes32 + def __init__( + self, + unfinished_reward_hash: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestUnfinishedBlock: ... + def __copy__(self) -> RequestUnfinishedBlock: ... + @staticmethod + def from_bytes(bytes) -> RequestUnfinishedBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestUnfinishedBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestUnfinishedBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestUnfinishedBlock: ... + def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RequestUnfinishedBlock: ... + +@final +class RespondUnfinishedBlock: + unfinished_block: UnfinishedBlock + def __init__( + self, + unfinished_block: UnfinishedBlock + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondUnfinishedBlock: ... + def __copy__(self) -> RespondUnfinishedBlock: ... + @staticmethod + def from_bytes(bytes) -> RespondUnfinishedBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondUnfinishedBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondUnfinishedBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondUnfinishedBlock: ... + def replace(self, *, unfinished_block: Union[ UnfinishedBlock, _Unspec] = _Unspec()) -> RespondUnfinishedBlock: ... + +@final +class NewSignagePointOrEndOfSubSlot: + prev_challenge_hash: Optional[bytes32] + challenge_hash: bytes32 + index_from_challenge: uint8 + last_rc_infusion: bytes32 + def __init__( + self, + prev_challenge_hash: Optional[bytes32], + challenge_hash: bytes, + index_from_challenge: uint8, + last_rc_infusion: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> NewSignagePointOrEndOfSubSlot: ... + def __copy__(self) -> NewSignagePointOrEndOfSubSlot: ... + @staticmethod + def from_bytes(bytes) -> NewSignagePointOrEndOfSubSlot: ... + @staticmethod + def from_bytes_unchecked(bytes) -> NewSignagePointOrEndOfSubSlot: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewSignagePointOrEndOfSubSlot, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> NewSignagePointOrEndOfSubSlot: ... + def replace(self, *, prev_challenge_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), + challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), + index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), + last_rc_infusion: Union[ bytes32, _Unspec] = _Unspec()) -> NewSignagePointOrEndOfSubSlot: ... + +@final +class RequestSignagePointOrEndOfSubSlot: + challenge_hash: bytes32 + index_from_challenge: uint8 + last_rc_infusion: bytes32 + def __init__( + self, + challenge_hash: bytes, + index_from_challenge: uint8, + last_rc_infusion: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestSignagePointOrEndOfSubSlot: ... + def __copy__(self) -> RequestSignagePointOrEndOfSubSlot: ... + @staticmethod + def from_bytes(bytes) -> RequestSignagePointOrEndOfSubSlot: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestSignagePointOrEndOfSubSlot: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestSignagePointOrEndOfSubSlot, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestSignagePointOrEndOfSubSlot: ... + def replace(self, *, challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), + index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), + last_rc_infusion: Union[ bytes32, _Unspec] = _Unspec()) -> RequestSignagePointOrEndOfSubSlot: ... + +@final +class RespondSignagePoint: + index_from_challenge: uint8 + challenge_chain_vdf: VDFInfo + challenge_chain_proof: VDFProof + reward_chain_vdf: VDFInfo + reward_chain_proof: VDFProof + def __init__( + self, + index_from_challenge: uint8, + challenge_chain_vdf: VDFInfo, + challenge_chain_proof: VDFProof, + reward_chain_vdf: VDFInfo, + reward_chain_proof: VDFProof + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondSignagePoint: ... + def __copy__(self) -> RespondSignagePoint: ... + @staticmethod + def from_bytes(bytes) -> RespondSignagePoint: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondSignagePoint: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondSignagePoint, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondSignagePoint: ... + def replace(self, *, index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), + challenge_chain_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), + challenge_chain_proof: Union[ VDFProof, _Unspec] = _Unspec(), + reward_chain_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), + reward_chain_proof: Union[ VDFProof, _Unspec] = _Unspec()) -> RespondSignagePoint: ... + +@final +class RespondEndOfSubSlot: + end_of_slot_bundle: EndOfSubSlotBundle + def __init__( + self, + end_of_slot_bundle: EndOfSubSlotBundle + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondEndOfSubSlot: ... + def __copy__(self) -> RespondEndOfSubSlot: ... + @staticmethod + def from_bytes(bytes) -> RespondEndOfSubSlot: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondEndOfSubSlot: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondEndOfSubSlot, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondEndOfSubSlot: ... + def replace(self, *, end_of_slot_bundle: Union[ EndOfSubSlotBundle, _Unspec] = _Unspec()) -> RespondEndOfSubSlot: ... + +@final +class RequestMempoolTransactions: + filter: bytes + def __init__( + self, + filter: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestMempoolTransactions: ... + def __copy__(self) -> RequestMempoolTransactions: ... + @staticmethod + def from_bytes(bytes) -> RequestMempoolTransactions: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestMempoolTransactions: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestMempoolTransactions, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestMempoolTransactions: ... + def replace(self, *, filter: Union[ bytes, _Unspec] = _Unspec()) -> RequestMempoolTransactions: ... + +@final +class NewCompactVDF: + height: uint32 + header_hash: bytes32 + field_vdf: uint8 + vdf_info: VDFInfo + def __init__( + self, + height: uint32, + header_hash: bytes, + field_vdf: uint8, + vdf_info: VDFInfo + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> NewCompactVDF: ... + def __copy__(self) -> NewCompactVDF: ... + @staticmethod + def from_bytes(bytes) -> NewCompactVDF: ... + @staticmethod + def from_bytes_unchecked(bytes) -> NewCompactVDF: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewCompactVDF, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> NewCompactVDF: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec(), + field_vdf: Union[ uint8, _Unspec] = _Unspec(), + vdf_info: Union[ VDFInfo, _Unspec] = _Unspec()) -> NewCompactVDF: ... + +@final +class RequestCompactVDF: + height: uint32 + header_hash: bytes32 + field_vdf: uint8 + vdf_info: VDFInfo + def __init__( + self, + height: uint32, + header_hash: bytes, + field_vdf: uint8, + vdf_info: VDFInfo + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestCompactVDF: ... + def __copy__(self) -> RequestCompactVDF: ... + @staticmethod + def from_bytes(bytes) -> RequestCompactVDF: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestCompactVDF: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestCompactVDF, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestCompactVDF: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec(), + field_vdf: Union[ uint8, _Unspec] = _Unspec(), + vdf_info: Union[ VDFInfo, _Unspec] = _Unspec()) -> RequestCompactVDF: ... + +@final +class RespondCompactVDF: + height: uint32 + header_hash: bytes32 + field_vdf: uint8 + vdf_info: VDFInfo + vdf_proof: VDFProof + def __init__( + self, + height: uint32, + header_hash: bytes, + field_vdf: uint8, + vdf_info: VDFInfo, + vdf_proof: VDFProof + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondCompactVDF: ... + def __copy__(self) -> RespondCompactVDF: ... + @staticmethod + def from_bytes(bytes) -> RespondCompactVDF: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondCompactVDF: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondCompactVDF, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondCompactVDF: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec(), + field_vdf: Union[ uint8, _Unspec] = _Unspec(), + vdf_info: Union[ VDFInfo, _Unspec] = _Unspec(), + vdf_proof: Union[ VDFProof, _Unspec] = _Unspec()) -> RespondCompactVDF: ... + +@final +class RequestPeers: + def __init__( + self + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestPeers: ... + def __copy__(self) -> RequestPeers: ... + @staticmethod + def from_bytes(bytes) -> RequestPeers: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestPeers: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPeers, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestPeers: ... + +@final +class RespondPeers: + peer_list: List[TimestampedPeerInfo] + def __init__( + self, + peer_list: Sequence[TimestampedPeerInfo] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondPeers: ... + def __copy__(self) -> RespondPeers: ... + @staticmethod + def from_bytes(bytes) -> RespondPeers: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondPeers: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPeers, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondPeers: ... + def replace(self, *, peer_list: Union[ List[TimestampedPeerInfo], _Unspec] = _Unspec()) -> RespondPeers: ... + +@final +class NewUnfinishedBlock2: + unfinished_reward_hash: bytes32 + foliage_hash: Optional[bytes32] + def __init__( + self, + unfinished_reward_hash: bytes, + foliage_hash: Optional[bytes32] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> NewUnfinishedBlock2: ... + def __copy__(self) -> NewUnfinishedBlock2: ... + @staticmethod + def from_bytes(bytes) -> NewUnfinishedBlock2: ... + @staticmethod + def from_bytes_unchecked(bytes) -> NewUnfinishedBlock2: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewUnfinishedBlock2, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> NewUnfinishedBlock2: ... + def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec(), + foliage_hash: Union[ Optional[bytes32], _Unspec] = _Unspec()) -> NewUnfinishedBlock2: ... + +@final +class RequestUnfinishedBlock2: + unfinished_reward_hash: bytes32 + foliage_hash: Optional[bytes32] + def __init__( + self, + unfinished_reward_hash: bytes, + foliage_hash: Optional[bytes32] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestUnfinishedBlock2: ... + def __copy__(self) -> RequestUnfinishedBlock2: ... + @staticmethod + def from_bytes(bytes) -> RequestUnfinishedBlock2: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestUnfinishedBlock2: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestUnfinishedBlock2, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestUnfinishedBlock2: ... + def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec(), + foliage_hash: Union[ Optional[bytes32], _Unspec] = _Unspec()) -> RequestUnfinishedBlock2: ... + +@final +class FullBlock: + finished_sub_slots: List[EndOfSubSlotBundle] + reward_chain_block: RewardChainBlock + challenge_chain_sp_proof: Optional[VDFProof] + challenge_chain_ip_proof: VDFProof + reward_chain_sp_proof: Optional[VDFProof] + reward_chain_ip_proof: VDFProof + infused_challenge_chain_ip_proof: Optional[VDFProof] + foliage: Foliage + foliage_transaction_block: Optional[FoliageTransactionBlock] + transactions_info: Optional[TransactionsInfo] + transactions_generator: Optional[Program] + transactions_generator_ref_list: List[uint32] + prev_header_hash: bytes32 + header_hash: bytes32 + def is_transaction_block(self) -> bool: ... + total_iters: uint128 + height: uint32 + weight: uint128 + def get_included_reward_coins(self) -> List[Coin]: ... + def is_fully_compactified(self) -> bool: ... + def __init__( + self, + finished_sub_slots: Sequence[EndOfSubSlotBundle], + reward_chain_block: RewardChainBlock, + challenge_chain_sp_proof: Optional[VDFProof], + challenge_chain_ip_proof: VDFProof, + reward_chain_sp_proof: Optional[VDFProof], + reward_chain_ip_proof: VDFProof, + infused_challenge_chain_ip_proof: Optional[VDFProof], + foliage: Foliage, + foliage_transaction_block: Optional[FoliageTransactionBlock], + transactions_info: Optional[TransactionsInfo], + transactions_generator: Optional[Program], + transactions_generator_ref_list: Sequence[uint32] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> FullBlock: ... + def __copy__(self) -> FullBlock: ... + @staticmethod + def from_bytes(bytes) -> FullBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> FullBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[FullBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> FullBlock: ... + def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), + reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec(), + challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + challenge_chain_ip_proof: Union[ VDFProof, _Unspec] = _Unspec(), + reward_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + reward_chain_ip_proof: Union[ VDFProof, _Unspec] = _Unspec(), + infused_challenge_chain_ip_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + foliage: Union[ Foliage, _Unspec] = _Unspec(), + foliage_transaction_block: Union[ Optional[FoliageTransactionBlock], _Unspec] = _Unspec(), + transactions_info: Union[ Optional[TransactionsInfo], _Unspec] = _Unspec(), + transactions_generator: Union[ Optional[Program], _Unspec] = _Unspec(), + transactions_generator_ref_list: Union[ List[uint32], _Unspec] = _Unspec()) -> FullBlock: ... + +@final +class HeaderBlock: + finished_sub_slots: List[EndOfSubSlotBundle] + reward_chain_block: RewardChainBlock + challenge_chain_sp_proof: Optional[VDFProof] + challenge_chain_ip_proof: VDFProof + reward_chain_sp_proof: Optional[VDFProof] + reward_chain_ip_proof: VDFProof + infused_challenge_chain_ip_proof: Optional[VDFProof] + foliage: Foliage + foliage_transaction_block: Optional[FoliageTransactionBlock] + transactions_filter: bytes + transactions_info: Optional[TransactionsInfo] + prev_header_hash: bytes32 + prev_hash: bytes32 + height: uint32 + weight: uint128 + header_hash: bytes32 + total_iters: uint128 + log_string: str + is_transaction_block: bool + first_in_sub_slot: bool + def __init__( + self, + finished_sub_slots: Sequence[EndOfSubSlotBundle], + reward_chain_block: RewardChainBlock, + challenge_chain_sp_proof: Optional[VDFProof], + challenge_chain_ip_proof: VDFProof, + reward_chain_sp_proof: Optional[VDFProof], + reward_chain_ip_proof: VDFProof, + infused_challenge_chain_ip_proof: Optional[VDFProof], + foliage: Foliage, + foliage_transaction_block: Optional[FoliageTransactionBlock], + transactions_filter: bytes, + transactions_info: Optional[TransactionsInfo] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> HeaderBlock: ... + def __copy__(self) -> HeaderBlock: ... + @staticmethod + def from_bytes(bytes) -> HeaderBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> HeaderBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[HeaderBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> HeaderBlock: ... + def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), + reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec(), + challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + challenge_chain_ip_proof: Union[ VDFProof, _Unspec] = _Unspec(), + reward_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + reward_chain_ip_proof: Union[ VDFProof, _Unspec] = _Unspec(), + infused_challenge_chain_ip_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + foliage: Union[ Foliage, _Unspec] = _Unspec(), + foliage_transaction_block: Union[ Optional[FoliageTransactionBlock], _Unspec] = _Unspec(), + transactions_filter: Union[ bytes, _Unspec] = _Unspec(), + transactions_info: Union[ Optional[TransactionsInfo], _Unspec] = _Unspec()) -> HeaderBlock: ... + +@final +class TimestampedPeerInfo: + host: str + port: uint16 + timestamp: uint64 + def __init__( + self, + host: str, + port: uint16, + timestamp: uint64 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> TimestampedPeerInfo: ... + def __copy__(self) -> TimestampedPeerInfo: ... + @staticmethod + def from_bytes(bytes) -> TimestampedPeerInfo: ... + @staticmethod + def from_bytes_unchecked(bytes) -> TimestampedPeerInfo: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[TimestampedPeerInfo, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> TimestampedPeerInfo: ... + def replace(self, *, host: Union[ str, _Unspec] = _Unspec(), + port: Union[ uint16, _Unspec] = _Unspec(), + timestamp: Union[ uint64, _Unspec] = _Unspec()) -> TimestampedPeerInfo: ... + +@final +class PoolTarget: + puzzle_hash: bytes32 + max_height: uint32 + def __init__( + self, + puzzle_hash: bytes, + max_height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> PoolTarget: ... + def __copy__(self) -> PoolTarget: ... + @staticmethod + def from_bytes(bytes) -> PoolTarget: ... + @staticmethod + def from_bytes_unchecked(bytes) -> PoolTarget: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[PoolTarget, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> PoolTarget: ... + def replace(self, *, puzzle_hash: Union[ bytes32, _Unspec] = _Unspec(), + max_height: Union[ uint32, _Unspec] = _Unspec()) -> PoolTarget: ... + +@final +class Program: + a0: bytes + def get_tree_hash(self) -> bytes32: ... + @staticmethod + def default() -> Program: ... + @staticmethod + def fromhex(hex) -> Program: ... + def run_mempool_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ... + def run_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ... + def _run(self, max_cost: int, flags: int, args: object) -> Tuple[int, ChiaProgram]: ... + @staticmethod + def to(o: object) -> Program: ... + @staticmethod + def from_program(p: ChiaProgram) -> Program: ... + def to_program(self) -> ChiaProgram: ... + def uncurry(self) -> Tuple[ChiaProgram, ChiaProgram]: ... + def __init__( + self, + a0: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> Program: ... + def __copy__(self) -> Program: ... + @staticmethod + def from_bytes(bytes) -> Program: ... + @staticmethod + def from_bytes_unchecked(bytes) -> Program: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[Program, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> Program: ... + def replace(self, *, a0: Union[ bytes, _Unspec] = _Unspec()) -> Program: ... + +@final +class ProofOfSpace: + challenge: bytes32 + pool_public_key: Optional[G1Element] + pool_contract_puzzle_hash: Optional[bytes32] + plot_public_key: G1Element + size: uint8 + proof: bytes + def __init__( + self, + challenge: bytes, + pool_public_key: Optional[G1Element], + pool_contract_puzzle_hash: Optional[bytes32], + plot_public_key: G1Element, + size: uint8, + proof: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> ProofOfSpace: ... + def __copy__(self) -> ProofOfSpace: ... + @staticmethod + def from_bytes(bytes) -> ProofOfSpace: ... + @staticmethod + def from_bytes_unchecked(bytes) -> ProofOfSpace: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[ProofOfSpace, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> ProofOfSpace: ... + def replace(self, *, challenge: Union[ bytes32, _Unspec] = _Unspec(), + pool_public_key: Union[ Optional[G1Element], _Unspec] = _Unspec(), + pool_contract_puzzle_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), + plot_public_key: Union[ G1Element, _Unspec] = _Unspec(), + size: Union[ uint8, _Unspec] = _Unspec(), + proof: Union[ bytes, _Unspec] = _Unspec()) -> ProofOfSpace: ... + +@final +class RewardChainBlockUnfinished: + total_iters: uint128 + signage_point_index: uint8 + pos_ss_cc_challenge_hash: bytes32 + proof_of_space: ProofOfSpace + challenge_chain_sp_vdf: Optional[VDFInfo] + challenge_chain_sp_signature: G2Element + reward_chain_sp_vdf: Optional[VDFInfo] + reward_chain_sp_signature: G2Element + def __init__( + self, + total_iters: uint128, + signage_point_index: uint8, + pos_ss_cc_challenge_hash: bytes, + proof_of_space: ProofOfSpace, + challenge_chain_sp_vdf: Optional[VDFInfo], + challenge_chain_sp_signature: G2Element, + reward_chain_sp_vdf: Optional[VDFInfo], + reward_chain_sp_signature: G2Element + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RewardChainBlockUnfinished: ... + def __copy__(self) -> RewardChainBlockUnfinished: ... + @staticmethod + def from_bytes(bytes) -> RewardChainBlockUnfinished: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RewardChainBlockUnfinished: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainBlockUnfinished, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RewardChainBlockUnfinished: ... + def replace(self, *, total_iters: Union[ uint128, _Unspec] = _Unspec(), + signage_point_index: Union[ uint8, _Unspec] = _Unspec(), + pos_ss_cc_challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), + proof_of_space: Union[ ProofOfSpace, _Unspec] = _Unspec(), + challenge_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + challenge_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec(), + reward_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + reward_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec()) -> RewardChainBlockUnfinished: ... + +@final +class RewardChainBlock: + weight: uint128 + height: uint32 + total_iters: uint128 + signage_point_index: uint8 + pos_ss_cc_challenge_hash: bytes32 + proof_of_space: ProofOfSpace + challenge_chain_sp_vdf: Optional[VDFInfo] + challenge_chain_sp_signature: G2Element + challenge_chain_ip_vdf: VDFInfo + reward_chain_sp_vdf: Optional[VDFInfo] + reward_chain_sp_signature: G2Element + reward_chain_ip_vdf: VDFInfo + infused_challenge_chain_ip_vdf: Optional[VDFInfo] + is_transaction_block: bool + def get_unfinished(self) -> RewardChainBlockUnfinished: ... + def __init__( + self, + weight: uint128, + height: uint32, + total_iters: uint128, + signage_point_index: uint8, + pos_ss_cc_challenge_hash: bytes, + proof_of_space: ProofOfSpace, + challenge_chain_sp_vdf: Optional[VDFInfo], + challenge_chain_sp_signature: G2Element, + challenge_chain_ip_vdf: VDFInfo, + reward_chain_sp_vdf: Optional[VDFInfo], + reward_chain_sp_signature: G2Element, + reward_chain_ip_vdf: VDFInfo, + infused_challenge_chain_ip_vdf: Optional[VDFInfo], + is_transaction_block: bool + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RewardChainBlock: ... + def __copy__(self) -> RewardChainBlock: ... + @staticmethod + def from_bytes(bytes) -> RewardChainBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RewardChainBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RewardChainBlock: ... + def replace(self, *, weight: Union[ uint128, _Unspec] = _Unspec(), + height: Union[ uint32, _Unspec] = _Unspec(), + total_iters: Union[ uint128, _Unspec] = _Unspec(), + signage_point_index: Union[ uint8, _Unspec] = _Unspec(), + pos_ss_cc_challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), + proof_of_space: Union[ ProofOfSpace, _Unspec] = _Unspec(), + challenge_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + challenge_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec(), + challenge_chain_ip_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), + reward_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + reward_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec(), + reward_chain_ip_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), + infused_challenge_chain_ip_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + is_transaction_block: Union[ bool, _Unspec] = _Unspec()) -> RewardChainBlock: ... + +@final +class ChallengeBlockInfo: + proof_of_space: ProofOfSpace + challenge_chain_sp_vdf: Optional[VDFInfo] + challenge_chain_sp_signature: G2Element + challenge_chain_ip_vdf: VDFInfo + def __init__( + self, + proof_of_space: ProofOfSpace, + challenge_chain_sp_vdf: Optional[VDFInfo], + challenge_chain_sp_signature: G2Element, + challenge_chain_ip_vdf: VDFInfo + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> ChallengeBlockInfo: ... + def __copy__(self) -> ChallengeBlockInfo: ... + @staticmethod + def from_bytes(bytes) -> ChallengeBlockInfo: ... + @staticmethod + def from_bytes_unchecked(bytes) -> ChallengeBlockInfo: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[ChallengeBlockInfo, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> ChallengeBlockInfo: ... + def replace(self, *, proof_of_space: Union[ ProofOfSpace, _Unspec] = _Unspec(), + challenge_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + challenge_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec(), + challenge_chain_ip_vdf: Union[ VDFInfo, _Unspec] = _Unspec()) -> ChallengeBlockInfo: ... + +@final +class ChallengeChainSubSlot: + challenge_chain_end_of_slot_vdf: VDFInfo + infused_challenge_chain_sub_slot_hash: Optional[bytes32] + subepoch_summary_hash: Optional[bytes32] + new_sub_slot_iters: Optional[uint64] + new_difficulty: Optional[uint64] + def __init__( + self, + challenge_chain_end_of_slot_vdf: VDFInfo, + infused_challenge_chain_sub_slot_hash: Optional[bytes32], + subepoch_summary_hash: Optional[bytes32], + new_sub_slot_iters: Optional[uint64], + new_difficulty: Optional[uint64] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> ChallengeChainSubSlot: ... + def __copy__(self) -> ChallengeChainSubSlot: ... + @staticmethod + def from_bytes(bytes) -> ChallengeChainSubSlot: ... + @staticmethod + def from_bytes_unchecked(bytes) -> ChallengeChainSubSlot: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[ChallengeChainSubSlot, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> ChallengeChainSubSlot: ... + def replace(self, *, challenge_chain_end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), + infused_challenge_chain_sub_slot_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), + subepoch_summary_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), + new_sub_slot_iters: Union[ Optional[uint64], _Unspec] = _Unspec(), + new_difficulty: Union[ Optional[uint64], _Unspec] = _Unspec()) -> ChallengeChainSubSlot: ... + +@final +class InfusedChallengeChainSubSlot: + infused_challenge_chain_end_of_slot_vdf: VDFInfo + def __init__( + self, + infused_challenge_chain_end_of_slot_vdf: VDFInfo + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> InfusedChallengeChainSubSlot: ... + def __copy__(self) -> InfusedChallengeChainSubSlot: ... + @staticmethod + def from_bytes(bytes) -> InfusedChallengeChainSubSlot: ... + @staticmethod + def from_bytes_unchecked(bytes) -> InfusedChallengeChainSubSlot: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[InfusedChallengeChainSubSlot, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> InfusedChallengeChainSubSlot: ... + def replace(self, *, infused_challenge_chain_end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec()) -> InfusedChallengeChainSubSlot: ... + +@final +class RewardChainSubSlot: + end_of_slot_vdf: VDFInfo + challenge_chain_sub_slot_hash: bytes32 + infused_challenge_chain_sub_slot_hash: Optional[bytes32] + deficit: uint8 + def __init__( + self, + end_of_slot_vdf: VDFInfo, + challenge_chain_sub_slot_hash: bytes, + infused_challenge_chain_sub_slot_hash: Optional[bytes32], + deficit: uint8 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RewardChainSubSlot: ... + def __copy__(self) -> RewardChainSubSlot: ... + @staticmethod + def from_bytes(bytes) -> RewardChainSubSlot: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RewardChainSubSlot: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainSubSlot, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RewardChainSubSlot: ... + def replace(self, *, end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), + challenge_chain_sub_slot_hash: Union[ bytes32, _Unspec] = _Unspec(), + infused_challenge_chain_sub_slot_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), + deficit: Union[ uint8, _Unspec] = _Unspec()) -> RewardChainSubSlot: ... + +@final +class SubSlotProofs: + challenge_chain_slot_proof: VDFProof + infused_challenge_chain_slot_proof: Optional[VDFProof] + reward_chain_slot_proof: VDFProof + def __init__( + self, + challenge_chain_slot_proof: VDFProof, + infused_challenge_chain_slot_proof: Optional[VDFProof], + reward_chain_slot_proof: VDFProof + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> SubSlotProofs: ... + def __copy__(self) -> SubSlotProofs: ... + @staticmethod + def from_bytes(bytes) -> SubSlotProofs: ... + @staticmethod + def from_bytes_unchecked(bytes) -> SubSlotProofs: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubSlotProofs, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> SubSlotProofs: ... + def replace(self, *, challenge_chain_slot_proof: Union[ VDFProof, _Unspec] = _Unspec(), + infused_challenge_chain_slot_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + reward_chain_slot_proof: Union[ VDFProof, _Unspec] = _Unspec()) -> SubSlotProofs: ... + + +class SpendBundle: + coin_spends: List[CoinSpend] + aggregated_signature: G2Element + @staticmethod + def aggregate(sbs: List[SpendBundle]) -> SpendBundle: ... + def name(self) -> bytes32: ... + def removals(self) -> List[Coin]: ... + def additions(self) -> List[Coin]: ... + def __init__( + self, + coin_spends: Sequence[CoinSpend], + aggregated_signature: G2Element + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> SpendBundle: ... + def __copy__(self) -> SpendBundle: ... + @staticmethod + def from_bytes(bytes) -> SpendBundle: ... + @staticmethod + def from_bytes_unchecked(bytes) -> SpendBundle: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[SpendBundle, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> SpendBundle: ... + def replace(self, *, coin_spends: Union[ List[CoinSpend], _Unspec] = _Unspec(), + aggregated_signature: Union[ G2Element, _Unspec] = _Unspec()) -> SpendBundle: ... + +@final +class SubEpochSummary: + prev_subepoch_summary_hash: bytes32 + reward_chain_hash: bytes32 + num_blocks_overflow: uint8 + new_difficulty: Optional[uint64] + new_sub_slot_iters: Optional[uint64] + def __init__( + self, + prev_subepoch_summary_hash: bytes, + reward_chain_hash: bytes, + num_blocks_overflow: uint8, + new_difficulty: Optional[uint64], + new_sub_slot_iters: Optional[uint64] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> SubEpochSummary: ... + def __copy__(self) -> SubEpochSummary: ... + @staticmethod + def from_bytes(bytes) -> SubEpochSummary: ... + @staticmethod + def from_bytes_unchecked(bytes) -> SubEpochSummary: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochSummary, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> SubEpochSummary: ... + def replace(self, *, prev_subepoch_summary_hash: Union[ bytes32, _Unspec] = _Unspec(), + reward_chain_hash: Union[ bytes32, _Unspec] = _Unspec(), + num_blocks_overflow: Union[ uint8, _Unspec] = _Unspec(), + new_difficulty: Union[ Optional[uint64], _Unspec] = _Unspec(), + new_sub_slot_iters: Union[ Optional[uint64], _Unspec] = _Unspec()) -> SubEpochSummary: ... + +@final +class UnfinishedBlock: + finished_sub_slots: List[EndOfSubSlotBundle] + reward_chain_block: RewardChainBlockUnfinished + challenge_chain_sp_proof: Optional[VDFProof] + reward_chain_sp_proof: Optional[VDFProof] + foliage: Foliage + foliage_transaction_block: Optional[FoliageTransactionBlock] + transactions_info: Optional[TransactionsInfo] + transactions_generator: Optional[Program] + transactions_generator_ref_list: List[uint32] + prev_header_hash: bytes32 + partial_hash: bytes32 + def is_transaction_block(self) -> bool: ... + total_iters: uint128 + def __init__( + self, + finished_sub_slots: Sequence[EndOfSubSlotBundle], + reward_chain_block: RewardChainBlockUnfinished, + challenge_chain_sp_proof: Optional[VDFProof], + reward_chain_sp_proof: Optional[VDFProof], + foliage: Foliage, + foliage_transaction_block: Optional[FoliageTransactionBlock], + transactions_info: Optional[TransactionsInfo], + transactions_generator: Optional[Program], + transactions_generator_ref_list: Sequence[uint32] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> UnfinishedBlock: ... + def __copy__(self) -> UnfinishedBlock: ... + @staticmethod + def from_bytes(bytes) -> UnfinishedBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> UnfinishedBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[UnfinishedBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> UnfinishedBlock: ... + def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), + reward_chain_block: Union[ RewardChainBlockUnfinished, _Unspec] = _Unspec(), + challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + reward_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + foliage: Union[ Foliage, _Unspec] = _Unspec(), + foliage_transaction_block: Union[ Optional[FoliageTransactionBlock], _Unspec] = _Unspec(), + transactions_info: Union[ Optional[TransactionsInfo], _Unspec] = _Unspec(), + transactions_generator: Union[ Optional[Program], _Unspec] = _Unspec(), + transactions_generator_ref_list: Union[ List[uint32], _Unspec] = _Unspec()) -> UnfinishedBlock: ... + +@final +class UnfinishedHeaderBlock: + finished_sub_slots: List[EndOfSubSlotBundle] + reward_chain_block: RewardChainBlockUnfinished + challenge_chain_sp_proof: Optional[VDFProof] + reward_chain_sp_proof: Optional[VDFProof] + foliage: Foliage + foliage_transaction_block: Optional[FoliageTransactionBlock] + transactions_filter: bytes + prev_header_hash: bytes32 + header_hash: bytes32 + total_iters: uint128 + def __init__( + self, + finished_sub_slots: Sequence[EndOfSubSlotBundle], + reward_chain_block: RewardChainBlockUnfinished, + challenge_chain_sp_proof: Optional[VDFProof], + reward_chain_sp_proof: Optional[VDFProof], + foliage: Foliage, + foliage_transaction_block: Optional[FoliageTransactionBlock], + transactions_filter: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> UnfinishedHeaderBlock: ... + def __copy__(self) -> UnfinishedHeaderBlock: ... + @staticmethod + def from_bytes(bytes) -> UnfinishedHeaderBlock: ... + @staticmethod + def from_bytes_unchecked(bytes) -> UnfinishedHeaderBlock: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[UnfinishedHeaderBlock, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> UnfinishedHeaderBlock: ... + def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), + reward_chain_block: Union[ RewardChainBlockUnfinished, _Unspec] = _Unspec(), + challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + reward_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + foliage: Union[ Foliage, _Unspec] = _Unspec(), + foliage_transaction_block: Union[ Optional[FoliageTransactionBlock], _Unspec] = _Unspec(), + transactions_filter: Union[ bytes, _Unspec] = _Unspec()) -> UnfinishedHeaderBlock: ... + +@final +class VDFInfo: + challenge: bytes32 + number_of_iterations: uint64 + output: ClassgroupElement + def __init__( + self, + challenge: bytes, + number_of_iterations: uint64, + output: ClassgroupElement + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> VDFInfo: ... + def __copy__(self) -> VDFInfo: ... + @staticmethod + def from_bytes(bytes) -> VDFInfo: ... + @staticmethod + def from_bytes_unchecked(bytes) -> VDFInfo: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[VDFInfo, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> VDFInfo: ... + def replace(self, *, challenge: Union[ bytes32, _Unspec] = _Unspec(), + number_of_iterations: Union[ uint64, _Unspec] = _Unspec(), + output: Union[ ClassgroupElement, _Unspec] = _Unspec()) -> VDFInfo: ... + +@final +class VDFProof: + witness_type: uint8 + witness: bytes + normalized_to_identity: bool + def __init__( + self, + witness_type: uint8, + witness: bytes, + normalized_to_identity: bool + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> VDFProof: ... + def __copy__(self) -> VDFProof: ... + @staticmethod + def from_bytes(bytes) -> VDFProof: ... + @staticmethod + def from_bytes_unchecked(bytes) -> VDFProof: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[VDFProof, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> VDFProof: ... + def replace(self, *, witness_type: Union[ uint8, _Unspec] = _Unspec(), + witness: Union[ bytes, _Unspec] = _Unspec(), + normalized_to_identity: Union[ bool, _Unspec] = _Unspec()) -> VDFProof: ... + +@final +class RequestPuzzleSolution: + coin_name: bytes32 + height: uint32 + def __init__( + self, + coin_name: bytes, + height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestPuzzleSolution: ... + def __copy__(self) -> RequestPuzzleSolution: ... + @staticmethod + def from_bytes(bytes) -> RequestPuzzleSolution: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestPuzzleSolution: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPuzzleSolution, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestPuzzleSolution: ... + def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), + height: Union[ uint32, _Unspec] = _Unspec()) -> RequestPuzzleSolution: ... + +@final +class PuzzleSolutionResponse: + coin_name: bytes32 + height: uint32 + puzzle: Program + solution: Program + def __init__( + self, + coin_name: bytes, + height: uint32, + puzzle: Program, + solution: Program + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> PuzzleSolutionResponse: ... + def __copy__(self) -> PuzzleSolutionResponse: ... + @staticmethod + def from_bytes(bytes) -> PuzzleSolutionResponse: ... + @staticmethod + def from_bytes_unchecked(bytes) -> PuzzleSolutionResponse: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[PuzzleSolutionResponse, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> PuzzleSolutionResponse: ... + def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), + height: Union[ uint32, _Unspec] = _Unspec(), + puzzle: Union[ Program, _Unspec] = _Unspec(), + solution: Union[ Program, _Unspec] = _Unspec()) -> PuzzleSolutionResponse: ... + +@final +class RespondPuzzleSolution: + response: PuzzleSolutionResponse + def __init__( + self, + response: PuzzleSolutionResponse + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondPuzzleSolution: ... + def __copy__(self) -> RespondPuzzleSolution: ... + @staticmethod + def from_bytes(bytes) -> RespondPuzzleSolution: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondPuzzleSolution: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPuzzleSolution, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondPuzzleSolution: ... + def replace(self, *, response: Union[ PuzzleSolutionResponse, _Unspec] = _Unspec()) -> RespondPuzzleSolution: ... + +@final +class RejectPuzzleSolution: + coin_name: bytes32 + height: uint32 + def __init__( + self, + coin_name: bytes, + height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RejectPuzzleSolution: ... + def __copy__(self) -> RejectPuzzleSolution: ... + @staticmethod + def from_bytes(bytes) -> RejectPuzzleSolution: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RejectPuzzleSolution: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectPuzzleSolution, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RejectPuzzleSolution: ... + def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), + height: Union[ uint32, _Unspec] = _Unspec()) -> RejectPuzzleSolution: ... + +@final +class SendTransaction: + transaction: SpendBundle + def __init__( + self, + transaction: SpendBundle + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> SendTransaction: ... + def __copy__(self) -> SendTransaction: ... + @staticmethod + def from_bytes(bytes) -> SendTransaction: ... + @staticmethod + def from_bytes_unchecked(bytes) -> SendTransaction: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[SendTransaction, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> SendTransaction: ... + def replace(self, *, transaction: Union[ SpendBundle, _Unspec] = _Unspec()) -> SendTransaction: ... + +@final +class TransactionAck: + txid: bytes32 + status: uint8 + error: Optional[str] + def __init__( + self, + txid: bytes, + status: uint8, + error: Optional[str] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> TransactionAck: ... + def __copy__(self) -> TransactionAck: ... + @staticmethod + def from_bytes(bytes) -> TransactionAck: ... + @staticmethod + def from_bytes_unchecked(bytes) -> TransactionAck: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[TransactionAck, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> TransactionAck: ... + def replace(self, *, txid: Union[ bytes32, _Unspec] = _Unspec(), + status: Union[ uint8, _Unspec] = _Unspec(), + error: Union[ Optional[str], _Unspec] = _Unspec()) -> TransactionAck: ... + +@final +class NewPeakWallet: + header_hash: bytes32 + height: uint32 + weight: uint128 + fork_point_with_previous_peak: uint32 + def __init__( + self, + header_hash: bytes, + height: uint32, + weight: uint128, + fork_point_with_previous_peak: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> NewPeakWallet: ... + def __copy__(self) -> NewPeakWallet: ... + @staticmethod + def from_bytes(bytes) -> NewPeakWallet: ... + @staticmethod + def from_bytes_unchecked(bytes) -> NewPeakWallet: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewPeakWallet, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> NewPeakWallet: ... + def replace(self, *, header_hash: Union[ bytes32, _Unspec] = _Unspec(), + height: Union[ uint32, _Unspec] = _Unspec(), + weight: Union[ uint128, _Unspec] = _Unspec(), + fork_point_with_previous_peak: Union[ uint32, _Unspec] = _Unspec()) -> NewPeakWallet: ... + +@final +class RequestBlockHeader: + height: uint32 + def __init__( + self, + height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestBlockHeader: ... + def __copy__(self) -> RequestBlockHeader: ... + @staticmethod + def from_bytes(bytes) -> RequestBlockHeader: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestBlockHeader: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlockHeader, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestBlockHeader: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RequestBlockHeader: ... + +@final +class RespondBlockHeader: + header_block: HeaderBlock + def __init__( + self, + header_block: HeaderBlock + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondBlockHeader: ... + def __copy__(self) -> RespondBlockHeader: ... + @staticmethod + def from_bytes(bytes) -> RespondBlockHeader: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondBlockHeader: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlockHeader, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondBlockHeader: ... + def replace(self, *, header_block: Union[ HeaderBlock, _Unspec] = _Unspec()) -> RespondBlockHeader: ... + +@final +class RejectHeaderRequest: + height: uint32 + def __init__( + self, + height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RejectHeaderRequest: ... + def __copy__(self) -> RejectHeaderRequest: ... + @staticmethod + def from_bytes(bytes) -> RejectHeaderRequest: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RejectHeaderRequest: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectHeaderRequest, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RejectHeaderRequest: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RejectHeaderRequest: ... + +@final +class RequestRemovals: + height: uint32 + header_hash: bytes32 + coin_names: Optional[List[bytes32]] + def __init__( + self, + height: uint32, + header_hash: bytes, + coin_names: Optional[Sequence[bytes32]] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestRemovals: ... + def __copy__(self) -> RequestRemovals: ... + @staticmethod + def from_bytes(bytes) -> RequestRemovals: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestRemovals: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemovals, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestRemovals: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec(), + coin_names: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemovals: ... + +@final +class RespondRemovals: + height: uint32 + header_hash: bytes32 + coins: List[Tuple[bytes32, Optional[Coin]]] + proofs: Optional[List[Tuple[bytes32, bytes]]] + def __init__( + self, + height: uint32, + header_hash: bytes, + coins: Sequence[Tuple[bytes32, Optional[Coin]]], + proofs: Optional[Sequence[Tuple[bytes32, bytes]]] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondRemovals: ... + def __copy__(self) -> RespondRemovals: ... + @staticmethod + def from_bytes(bytes) -> RespondRemovals: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondRemovals: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemovals, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondRemovals: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec(), + coins: Union[ List[Tuple[bytes32, Optional[Coin]]], _Unspec] = _Unspec(), + proofs: Union[ Optional[List[Tuple[bytes32, bytes]]], _Unspec] = _Unspec()) -> RespondRemovals: ... + +@final +class RejectRemovalsRequest: + height: uint32 + header_hash: bytes32 + def __init__( + self, + height: uint32, + header_hash: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RejectRemovalsRequest: ... + def __copy__(self) -> RejectRemovalsRequest: ... + @staticmethod + def from_bytes(bytes) -> RejectRemovalsRequest: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RejectRemovalsRequest: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectRemovalsRequest, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RejectRemovalsRequest: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RejectRemovalsRequest: ... + +@final +class RequestAdditions: + height: uint32 + header_hash: Optional[bytes32] + puzzle_hashes: Optional[List[bytes32]] + def __init__( + self, + height: uint32, + header_hash: Optional[bytes32], + puzzle_hashes: Optional[Sequence[bytes32]] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestAdditions: ... + def __copy__(self) -> RequestAdditions: ... + @staticmethod + def from_bytes(bytes) -> RequestAdditions: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestAdditions: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestAdditions, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestAdditions: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + header_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), + puzzle_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestAdditions: ... + +@final +class RespondAdditions: + height: uint32 + header_hash: bytes32 + coins: List[Tuple[bytes32, List[Coin]]] + proofs: Optional[List[Tuple[bytes32, bytes, Optional[bytes]]]] + def __init__( + self, + height: uint32, + header_hash: bytes, + coins: Sequence[Tuple[bytes32, Sequence[Coin]]], + proofs: Optional[Sequence[Tuple[bytes32, bytes, Optional[bytes]]]] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondAdditions: ... + def __copy__(self) -> RespondAdditions: ... + @staticmethod + def from_bytes(bytes) -> RespondAdditions: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondAdditions: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondAdditions, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondAdditions: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec(), + coins: Union[ List[Tuple[bytes32, List[Coin]]], _Unspec] = _Unspec(), + proofs: Union[ Optional[List[Tuple[bytes32, bytes, Optional[bytes]]]], _Unspec] = _Unspec()) -> RespondAdditions: ... + +@final +class RejectAdditionsRequest: + height: uint32 + header_hash: bytes32 + def __init__( + self, + height: uint32, + header_hash: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RejectAdditionsRequest: ... + def __copy__(self) -> RejectAdditionsRequest: ... + @staticmethod + def from_bytes(bytes) -> RejectAdditionsRequest: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RejectAdditionsRequest: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectAdditionsRequest, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RejectAdditionsRequest: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RejectAdditionsRequest: ... + +@final +class RespondBlockHeaders: + start_height: uint32 + end_height: uint32 + header_blocks: List[HeaderBlock] + def __init__( + self, + start_height: uint32, + end_height: uint32, + header_blocks: Sequence[HeaderBlock] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondBlockHeaders: ... + def __copy__(self) -> RespondBlockHeaders: ... + @staticmethod + def from_bytes(bytes) -> RespondBlockHeaders: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondBlockHeaders: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlockHeaders, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondBlockHeaders: ... + def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), + end_height: Union[ uint32, _Unspec] = _Unspec(), + header_blocks: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RespondBlockHeaders: ... + +@final +class RejectBlockHeaders: + start_height: uint32 + end_height: uint32 + def __init__( + self, + start_height: uint32, + end_height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RejectBlockHeaders: ... + def __copy__(self) -> RejectBlockHeaders: ... + @staticmethod + def from_bytes(bytes) -> RejectBlockHeaders: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RejectBlockHeaders: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlockHeaders, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RejectBlockHeaders: ... + def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), + end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlockHeaders: ... + +@final +class RequestBlockHeaders: + start_height: uint32 + end_height: uint32 + return_filter: bool + def __init__( + self, + start_height: uint32, + end_height: uint32, + return_filter: bool + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestBlockHeaders: ... + def __copy__(self) -> RequestBlockHeaders: ... + @staticmethod + def from_bytes(bytes) -> RequestBlockHeaders: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestBlockHeaders: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlockHeaders, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestBlockHeaders: ... + def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), + end_height: Union[ uint32, _Unspec] = _Unspec(), + return_filter: Union[ bool, _Unspec] = _Unspec()) -> RequestBlockHeaders: ... + +@final +class RequestHeaderBlocks: + start_height: uint32 + end_height: uint32 + def __init__( + self, + start_height: uint32, + end_height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestHeaderBlocks: ... + def __copy__(self) -> RequestHeaderBlocks: ... + @staticmethod + def from_bytes(bytes) -> RequestHeaderBlocks: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestHeaderBlocks: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestHeaderBlocks, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestHeaderBlocks: ... + def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), + end_height: Union[ uint32, _Unspec] = _Unspec()) -> RequestHeaderBlocks: ... + +@final +class RejectHeaderBlocks: + start_height: uint32 + end_height: uint32 + def __init__( + self, + start_height: uint32, + end_height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RejectHeaderBlocks: ... + def __copy__(self) -> RejectHeaderBlocks: ... + @staticmethod + def from_bytes(bytes) -> RejectHeaderBlocks: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RejectHeaderBlocks: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectHeaderBlocks, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RejectHeaderBlocks: ... + def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), + end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectHeaderBlocks: ... + +@final +class RespondHeaderBlocks: + start_height: uint32 + end_height: uint32 + header_blocks: List[HeaderBlock] + def __init__( + self, + start_height: uint32, + end_height: uint32, + header_blocks: Sequence[HeaderBlock] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondHeaderBlocks: ... + def __copy__(self) -> RespondHeaderBlocks: ... + @staticmethod + def from_bytes(bytes) -> RespondHeaderBlocks: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondHeaderBlocks: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondHeaderBlocks, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondHeaderBlocks: ... + def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), + end_height: Union[ uint32, _Unspec] = _Unspec(), + header_blocks: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RespondHeaderBlocks: ... + +@final +class RegisterForPhUpdates: + puzzle_hashes: List[bytes32] + min_height: uint32 + def __init__( + self, + puzzle_hashes: Sequence[bytes32], + min_height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RegisterForPhUpdates: ... + def __copy__(self) -> RegisterForPhUpdates: ... + @staticmethod + def from_bytes(bytes) -> RegisterForPhUpdates: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RegisterForPhUpdates: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RegisterForPhUpdates, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RegisterForPhUpdates: ... + def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), + min_height: Union[ uint32, _Unspec] = _Unspec()) -> RegisterForPhUpdates: ... + +@final +class RespondToPhUpdates: + puzzle_hashes: List[bytes32] + min_height: uint32 + coin_states: List[CoinState] + def __init__( + self, + puzzle_hashes: Sequence[bytes32], + min_height: uint32, + coin_states: Sequence[CoinState] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondToPhUpdates: ... + def __copy__(self) -> RespondToPhUpdates: ... + @staticmethod + def from_bytes(bytes) -> RespondToPhUpdates: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondToPhUpdates: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondToPhUpdates, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondToPhUpdates: ... + def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), + min_height: Union[ uint32, _Unspec] = _Unspec(), + coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondToPhUpdates: ... + +@final +class RegisterForCoinUpdates: + coin_ids: List[bytes32] + min_height: uint32 + def __init__( + self, + coin_ids: Sequence[bytes32], + min_height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RegisterForCoinUpdates: ... + def __copy__(self) -> RegisterForCoinUpdates: ... + @staticmethod + def from_bytes(bytes) -> RegisterForCoinUpdates: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RegisterForCoinUpdates: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RegisterForCoinUpdates, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RegisterForCoinUpdates: ... + def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), + min_height: Union[ uint32, _Unspec] = _Unspec()) -> RegisterForCoinUpdates: ... + +@final +class RespondToCoinUpdates: + coin_ids: List[bytes32] + min_height: uint32 + coin_states: List[CoinState] + def __init__( + self, + coin_ids: Sequence[bytes32], + min_height: uint32, + coin_states: Sequence[CoinState] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondToCoinUpdates: ... + def __copy__(self) -> RespondToCoinUpdates: ... + @staticmethod + def from_bytes(bytes) -> RespondToCoinUpdates: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondToCoinUpdates: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondToCoinUpdates, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondToCoinUpdates: ... + def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), + min_height: Union[ uint32, _Unspec] = _Unspec(), + coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondToCoinUpdates: ... + +@final +class CoinStateUpdate: + height: uint32 + fork_height: uint32 + peak_hash: bytes32 + items: List[CoinState] + def __init__( + self, + height: uint32, + fork_height: uint32, + peak_hash: bytes, + items: Sequence[CoinState] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> CoinStateUpdate: ... + def __copy__(self) -> CoinStateUpdate: ... + @staticmethod + def from_bytes(bytes) -> CoinStateUpdate: ... + @staticmethod + def from_bytes_unchecked(bytes) -> CoinStateUpdate: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinStateUpdate, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> CoinStateUpdate: ... + def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), + fork_height: Union[ uint32, _Unspec] = _Unspec(), + peak_hash: Union[ bytes32, _Unspec] = _Unspec(), + items: Union[ List[CoinState], _Unspec] = _Unspec()) -> CoinStateUpdate: ... + +@final +class RequestChildren: + coin_name: bytes32 + def __init__( + self, + coin_name: bytes + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestChildren: ... + def __copy__(self) -> RequestChildren: ... + @staticmethod + def from_bytes(bytes) -> RequestChildren: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestChildren: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestChildren, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestChildren: ... + def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec()) -> RequestChildren: ... + +@final +class RespondChildren: + coin_states: List[CoinState] + def __init__( + self, + coin_states: Sequence[CoinState] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondChildren: ... + def __copy__(self) -> RespondChildren: ... + @staticmethod + def from_bytes(bytes) -> RespondChildren: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondChildren: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondChildren, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondChildren: ... + def replace(self, *, coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondChildren: ... + +@final +class RequestSesInfo: + start_height: uint32 + end_height: uint32 + def __init__( + self, + start_height: uint32, + end_height: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestSesInfo: ... + def __copy__(self) -> RequestSesInfo: ... + @staticmethod + def from_bytes(bytes) -> RequestSesInfo: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestSesInfo: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestSesInfo, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestSesInfo: ... + def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), + end_height: Union[ uint32, _Unspec] = _Unspec()) -> RequestSesInfo: ... + +@final +class RespondSesInfo: + reward_chain_hash: List[bytes32] + heights: List[List[uint32]] + def __init__( + self, + reward_chain_hash: Sequence[bytes32], + heights: Sequence[Sequence[uint32]] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondSesInfo: ... + def __copy__(self) -> RespondSesInfo: ... + @staticmethod + def from_bytes(bytes) -> RespondSesInfo: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondSesInfo: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondSesInfo, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondSesInfo: ... + def replace(self, *, reward_chain_hash: Union[ List[bytes32], _Unspec] = _Unspec(), + heights: Union[ List[List[uint32]], _Unspec] = _Unspec()) -> RespondSesInfo: ... + +@final +class RequestFeeEstimates: + time_targets: List[uint64] + def __init__( + self, + time_targets: Sequence[uint64] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestFeeEstimates: ... + def __copy__(self) -> RequestFeeEstimates: ... + @staticmethod + def from_bytes(bytes) -> RequestFeeEstimates: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestFeeEstimates: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestFeeEstimates, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestFeeEstimates: ... + def replace(self, *, time_targets: Union[ List[uint64], _Unspec] = _Unspec()) -> RequestFeeEstimates: ... + +@final +class RespondFeeEstimates: + estimates: FeeEstimateGroup + def __init__( + self, + estimates: FeeEstimateGroup + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondFeeEstimates: ... + def __copy__(self) -> RespondFeeEstimates: ... + @staticmethod + def from_bytes(bytes) -> RespondFeeEstimates: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondFeeEstimates: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondFeeEstimates, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondFeeEstimates: ... + def replace(self, *, estimates: Union[ FeeEstimateGroup, _Unspec] = _Unspec()) -> RespondFeeEstimates: ... + +@final +class RequestRemovePuzzleSubscriptions: + puzzle_hashes: Optional[List[bytes32]] + def __init__( + self, + puzzle_hashes: Optional[Sequence[bytes32]] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestRemovePuzzleSubscriptions: ... + def __copy__(self) -> RequestRemovePuzzleSubscriptions: ... + @staticmethod + def from_bytes(bytes) -> RequestRemovePuzzleSubscriptions: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestRemovePuzzleSubscriptions: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemovePuzzleSubscriptions, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestRemovePuzzleSubscriptions: ... + def replace(self, *, puzzle_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemovePuzzleSubscriptions: ... + +@final +class RespondRemovePuzzleSubscriptions: + puzzle_hashes: List[bytes32] + def __init__( + self, + puzzle_hashes: Sequence[bytes32] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondRemovePuzzleSubscriptions: ... + def __copy__(self) -> RespondRemovePuzzleSubscriptions: ... + @staticmethod + def from_bytes(bytes) -> RespondRemovePuzzleSubscriptions: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondRemovePuzzleSubscriptions: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemovePuzzleSubscriptions, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondRemovePuzzleSubscriptions: ... + def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec()) -> RespondRemovePuzzleSubscriptions: ... + +@final +class RequestRemoveCoinSubscriptions: + coin_ids: Optional[List[bytes32]] + def __init__( + self, + coin_ids: Optional[Sequence[bytes32]] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestRemoveCoinSubscriptions: ... + def __copy__(self) -> RequestRemoveCoinSubscriptions: ... + @staticmethod + def from_bytes(bytes) -> RequestRemoveCoinSubscriptions: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestRemoveCoinSubscriptions: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemoveCoinSubscriptions, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestRemoveCoinSubscriptions: ... + def replace(self, *, coin_ids: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemoveCoinSubscriptions: ... + +@final +class RespondRemoveCoinSubscriptions: + coin_ids: List[bytes32] + def __init__( + self, + coin_ids: Sequence[bytes32] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondRemoveCoinSubscriptions: ... + def __copy__(self) -> RespondRemoveCoinSubscriptions: ... + @staticmethod + def from_bytes(bytes) -> RespondRemoveCoinSubscriptions: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondRemoveCoinSubscriptions: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemoveCoinSubscriptions, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondRemoveCoinSubscriptions: ... + def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec()) -> RespondRemoveCoinSubscriptions: ... + +@final +class CoinStateFilters: + include_spent: bool + include_unspent: bool + include_hinted: bool + min_amount: uint64 + def __init__( + self, + include_spent: bool, + include_unspent: bool, + include_hinted: bool, + min_amount: uint64 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> CoinStateFilters: ... + def __copy__(self) -> CoinStateFilters: ... + @staticmethod + def from_bytes(bytes) -> CoinStateFilters: ... + @staticmethod + def from_bytes_unchecked(bytes) -> CoinStateFilters: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinStateFilters, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> CoinStateFilters: ... + def replace(self, *, include_spent: Union[ bool, _Unspec] = _Unspec(), + include_unspent: Union[ bool, _Unspec] = _Unspec(), + include_hinted: Union[ bool, _Unspec] = _Unspec(), + min_amount: Union[ uint64, _Unspec] = _Unspec()) -> CoinStateFilters: ... + +@final +class RequestPuzzleState: + puzzle_hashes: List[bytes32] + previous_height: Optional[uint32] + header_hash: bytes32 + filters: CoinStateFilters + subscribe_when_finished: bool + def __init__( + self, + puzzle_hashes: Sequence[bytes32], + previous_height: Optional[uint32], + header_hash: bytes, + filters: CoinStateFilters, + subscribe_when_finished: bool + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestPuzzleState: ... + def __copy__(self) -> RequestPuzzleState: ... + @staticmethod + def from_bytes(bytes) -> RequestPuzzleState: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestPuzzleState: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPuzzleState, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestPuzzleState: ... + def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), + previous_height: Union[ Optional[uint32], _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec(), + filters: Union[ CoinStateFilters, _Unspec] = _Unspec(), + subscribe_when_finished: Union[ bool, _Unspec] = _Unspec()) -> RequestPuzzleState: ... + +@final +class RespondPuzzleState: + puzzle_hashes: List[bytes32] + height: uint32 + header_hash: bytes32 + is_finished: bool + coin_states: List[CoinState] + def __init__( + self, + puzzle_hashes: Sequence[bytes32], + height: uint32, + header_hash: bytes, + is_finished: bool, + coin_states: Sequence[CoinState] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondPuzzleState: ... + def __copy__(self) -> RespondPuzzleState: ... + @staticmethod + def from_bytes(bytes) -> RespondPuzzleState: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondPuzzleState: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPuzzleState, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondPuzzleState: ... + def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), + height: Union[ uint32, _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec(), + is_finished: Union[ bool, _Unspec] = _Unspec(), + coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondPuzzleState: ... + +@final +class RejectPuzzleState: + reason: int + def __init__( + self, + reason: int + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RejectPuzzleState: ... + def __copy__(self) -> RejectPuzzleState: ... + @staticmethod + def from_bytes(bytes) -> RejectPuzzleState: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RejectPuzzleState: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectPuzzleState, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RejectPuzzleState: ... + def replace(self, *, reason: Union[ int, _Unspec] = _Unspec()) -> RejectPuzzleState: ... + +@final +class RequestCoinState: + coin_ids: List[bytes32] + previous_height: Optional[uint32] + header_hash: bytes32 + subscribe: bool + def __init__( + self, + coin_ids: Sequence[bytes32], + previous_height: Optional[uint32], + header_hash: bytes, + subscribe: bool + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RequestCoinState: ... + def __copy__(self) -> RequestCoinState: ... + @staticmethod + def from_bytes(bytes) -> RequestCoinState: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RequestCoinState: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestCoinState, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RequestCoinState: ... + def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), + previous_height: Union[ Optional[uint32], _Unspec] = _Unspec(), + header_hash: Union[ bytes32, _Unspec] = _Unspec(), + subscribe: Union[ bool, _Unspec] = _Unspec()) -> RequestCoinState: ... + +@final +class RespondCoinState: + coin_ids: List[bytes32] + coin_states: List[CoinState] + def __init__( + self, + coin_ids: Sequence[bytes32], + coin_states: Sequence[CoinState] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RespondCoinState: ... + def __copy__(self) -> RespondCoinState: ... + @staticmethod + def from_bytes(bytes) -> RespondCoinState: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RespondCoinState: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondCoinState, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RespondCoinState: ... + def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), + coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondCoinState: ... + +@final +class RejectCoinState: + reason: int + def __init__( + self, + reason: int + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RejectCoinState: ... + def __copy__(self) -> RejectCoinState: ... + @staticmethod + def from_bytes(bytes) -> RejectCoinState: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RejectCoinState: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectCoinState, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RejectCoinState: ... + def replace(self, *, reason: Union[ int, _Unspec] = _Unspec()) -> RejectCoinState: ... + +@final +class SubEpochData: + reward_chain_hash: bytes32 + num_blocks_overflow: uint8 + new_sub_slot_iters: Optional[uint64] + new_difficulty: Optional[uint64] + def __init__( + self, + reward_chain_hash: bytes, + num_blocks_overflow: uint8, + new_sub_slot_iters: Optional[uint64], + new_difficulty: Optional[uint64] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> SubEpochData: ... + def __copy__(self) -> SubEpochData: ... + @staticmethod + def from_bytes(bytes) -> SubEpochData: ... + @staticmethod + def from_bytes_unchecked(bytes) -> SubEpochData: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochData, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> SubEpochData: ... + def replace(self, *, reward_chain_hash: Union[ bytes32, _Unspec] = _Unspec(), + num_blocks_overflow: Union[ uint8, _Unspec] = _Unspec(), + new_sub_slot_iters: Union[ Optional[uint64], _Unspec] = _Unspec(), + new_difficulty: Union[ Optional[uint64], _Unspec] = _Unspec()) -> SubEpochData: ... + +@final +class SubSlotData: + proof_of_space: Optional[ProofOfSpace] + cc_signage_point: Optional[VDFProof] + cc_infusion_point: Optional[VDFProof] + icc_infusion_point: Optional[VDFProof] + cc_sp_vdf_info: Optional[VDFInfo] + signage_point_index: Optional[uint8] + cc_slot_end: Optional[VDFProof] + icc_slot_end: Optional[VDFProof] + cc_slot_end_info: Optional[VDFInfo] + icc_slot_end_info: Optional[VDFInfo] + cc_ip_vdf_info: Optional[VDFInfo] + icc_ip_vdf_info: Optional[VDFInfo] + total_iters: Optional[uint128] + def is_end_of_slot(self) -> bool: ... + def is_challenge(self) -> bool: ... + def __init__( + self, + proof_of_space: Optional[ProofOfSpace], + cc_signage_point: Optional[VDFProof], + cc_infusion_point: Optional[VDFProof], + icc_infusion_point: Optional[VDFProof], + cc_sp_vdf_info: Optional[VDFInfo], + signage_point_index: Optional[uint8], + cc_slot_end: Optional[VDFProof], + icc_slot_end: Optional[VDFProof], + cc_slot_end_info: Optional[VDFInfo], + icc_slot_end_info: Optional[VDFInfo], + cc_ip_vdf_info: Optional[VDFInfo], + icc_ip_vdf_info: Optional[VDFInfo], + total_iters: Optional[uint128] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> SubSlotData: ... + def __copy__(self) -> SubSlotData: ... + @staticmethod + def from_bytes(bytes) -> SubSlotData: ... + @staticmethod + def from_bytes_unchecked(bytes) -> SubSlotData: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubSlotData, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> SubSlotData: ... + def replace(self, *, proof_of_space: Union[ Optional[ProofOfSpace], _Unspec] = _Unspec(), + cc_signage_point: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + cc_infusion_point: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + icc_infusion_point: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + cc_sp_vdf_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + signage_point_index: Union[ Optional[uint8], _Unspec] = _Unspec(), + cc_slot_end: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + icc_slot_end: Union[ Optional[VDFProof], _Unspec] = _Unspec(), + cc_slot_end_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + icc_slot_end_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + cc_ip_vdf_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + icc_ip_vdf_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), + total_iters: Union[ Optional[uint128], _Unspec] = _Unspec()) -> SubSlotData: ... + +@final +class SubEpochChallengeSegment: + sub_epoch_n: uint32 + sub_slots: List[SubSlotData] + rc_slot_end_info: Optional[VDFInfo] + def __init__( + self, + sub_epoch_n: uint32, + sub_slots: Sequence[SubSlotData], + rc_slot_end_info: Optional[VDFInfo] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> SubEpochChallengeSegment: ... + def __copy__(self) -> SubEpochChallengeSegment: ... + @staticmethod + def from_bytes(bytes) -> SubEpochChallengeSegment: ... + @staticmethod + def from_bytes_unchecked(bytes) -> SubEpochChallengeSegment: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochChallengeSegment, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> SubEpochChallengeSegment: ... + def replace(self, *, sub_epoch_n: Union[ uint32, _Unspec] = _Unspec(), + sub_slots: Union[ List[SubSlotData], _Unspec] = _Unspec(), + rc_slot_end_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec()) -> SubEpochChallengeSegment: ... + +@final +class SubEpochSegments: + challenge_segments: List[SubEpochChallengeSegment] + def __init__( + self, + challenge_segments: Sequence[SubEpochChallengeSegment] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> SubEpochSegments: ... + def __copy__(self) -> SubEpochSegments: ... + @staticmethod + def from_bytes(bytes) -> SubEpochSegments: ... + @staticmethod + def from_bytes_unchecked(bytes) -> SubEpochSegments: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochSegments, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> SubEpochSegments: ... + def replace(self, *, challenge_segments: Union[ List[SubEpochChallengeSegment], _Unspec] = _Unspec()) -> SubEpochSegments: ... + +@final +class RecentChainData: + recent_chain_data: List[HeaderBlock] + def __init__( + self, + recent_chain_data: Sequence[HeaderBlock] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> RecentChainData: ... + def __copy__(self) -> RecentChainData: ... + @staticmethod + def from_bytes(bytes) -> RecentChainData: ... + @staticmethod + def from_bytes_unchecked(bytes) -> RecentChainData: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[RecentChainData, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> RecentChainData: ... + def replace(self, *, recent_chain_data: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RecentChainData: ... + +@final +class ProofBlockHeader: + finished_sub_slots: List[EndOfSubSlotBundle] + reward_chain_block: RewardChainBlock + def __init__( + self, + finished_sub_slots: Sequence[EndOfSubSlotBundle], + reward_chain_block: RewardChainBlock + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> ProofBlockHeader: ... + def __copy__(self) -> ProofBlockHeader: ... + @staticmethod + def from_bytes(bytes) -> ProofBlockHeader: ... + @staticmethod + def from_bytes_unchecked(bytes) -> ProofBlockHeader: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[ProofBlockHeader, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> ProofBlockHeader: ... + def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), + reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec()) -> ProofBlockHeader: ... + +@final +class WeightProof: + sub_epochs: List[SubEpochData] + sub_epoch_segments: List[SubEpochChallengeSegment] + recent_chain_data: List[HeaderBlock] + def __init__( + self, + sub_epochs: Sequence[SubEpochData], + sub_epoch_segments: Sequence[SubEpochChallengeSegment], + recent_chain_data: Sequence[HeaderBlock] + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> WeightProof: ... + def __copy__(self) -> WeightProof: ... + @staticmethod + def from_bytes(bytes) -> WeightProof: ... + @staticmethod + def from_bytes_unchecked(bytes) -> WeightProof: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[WeightProof, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> WeightProof: ... + def replace(self, *, sub_epochs: Union[ List[SubEpochData], _Unspec] = _Unspec(), + sub_epoch_segments: Union[ List[SubEpochChallengeSegment], _Unspec] = _Unspec(), + recent_chain_data: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> WeightProof: ... + +@final +class ConsensusConstants: + SLOT_BLOCKS_TARGET: uint32 + MIN_BLOCKS_PER_CHALLENGE_BLOCK: uint8 + MAX_SUB_SLOT_BLOCKS: uint32 + NUM_SPS_SUB_SLOT: uint32 + SUB_SLOT_ITERS_STARTING: uint64 + DIFFICULTY_CONSTANT_FACTOR: uint128 + DIFFICULTY_STARTING: uint64 + DIFFICULTY_CHANGE_MAX_FACTOR: uint32 + SUB_EPOCH_BLOCKS: uint32 + EPOCH_BLOCKS: uint32 + SIGNIFICANT_BITS: uint8 + DISCRIMINANT_SIZE_BITS: uint16 + NUMBER_ZERO_BITS_PLOT_FILTER: uint8 + MIN_PLOT_SIZE: uint8 + MAX_PLOT_SIZE: uint8 + SUB_SLOT_TIME_TARGET: uint16 + NUM_SP_INTERVALS_EXTRA: uint8 + MAX_FUTURE_TIME2: uint32 + NUMBER_OF_TIMESTAMPS: uint8 + GENESIS_CHALLENGE: bytes32 + AGG_SIG_ME_ADDITIONAL_DATA: bytes32 + AGG_SIG_PARENT_ADDITIONAL_DATA: bytes32 + AGG_SIG_PUZZLE_ADDITIONAL_DATA: bytes32 + AGG_SIG_AMOUNT_ADDITIONAL_DATA: bytes32 + AGG_SIG_PUZZLE_AMOUNT_ADDITIONAL_DATA: bytes32 + AGG_SIG_PARENT_AMOUNT_ADDITIONAL_DATA: bytes32 + AGG_SIG_PARENT_PUZZLE_ADDITIONAL_DATA: bytes32 + GENESIS_PRE_FARM_POOL_PUZZLE_HASH: bytes32 + GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: bytes32 + MAX_VDF_WITNESS_SIZE: uint8 + MEMPOOL_BLOCK_BUFFER: uint8 + MAX_COIN_AMOUNT: uint64 + MAX_BLOCK_COST_CLVM: uint64 + COST_PER_BYTE: uint64 + WEIGHT_PROOF_THRESHOLD: uint8 + WEIGHT_PROOF_RECENT_BLOCKS: uint32 + MAX_BLOCK_COUNT_PER_REQUESTS: uint32 + BLOCKS_CACHE_SIZE: uint32 + MAX_GENERATOR_SIZE: uint32 + MAX_GENERATOR_REF_LIST_SIZE: uint32 + POOL_SUB_SLOT_ITERS: uint64 + SOFT_FORK2_HEIGHT: uint32 + SOFT_FORK4_HEIGHT: uint32 + SOFT_FORK5_HEIGHT: uint32 + HARD_FORK_HEIGHT: uint32 + HARD_FORK_FIX_HEIGHT: uint32 + PLOT_FILTER_128_HEIGHT: uint32 + PLOT_FILTER_64_HEIGHT: uint32 + PLOT_FILTER_32_HEIGHT: uint32 + def __init__( + self, + SLOT_BLOCKS_TARGET: uint32, + MIN_BLOCKS_PER_CHALLENGE_BLOCK: uint8, + MAX_SUB_SLOT_BLOCKS: uint32, + NUM_SPS_SUB_SLOT: uint32, + SUB_SLOT_ITERS_STARTING: uint64, + DIFFICULTY_CONSTANT_FACTOR: uint128, + DIFFICULTY_STARTING: uint64, + DIFFICULTY_CHANGE_MAX_FACTOR: uint32, + SUB_EPOCH_BLOCKS: uint32, + EPOCH_BLOCKS: uint32, + SIGNIFICANT_BITS: uint8, + DISCRIMINANT_SIZE_BITS: uint16, + NUMBER_ZERO_BITS_PLOT_FILTER: uint8, + MIN_PLOT_SIZE: uint8, + MAX_PLOT_SIZE: uint8, + SUB_SLOT_TIME_TARGET: uint16, + NUM_SP_INTERVALS_EXTRA: uint8, + MAX_FUTURE_TIME2: uint32, + NUMBER_OF_TIMESTAMPS: uint8, + GENESIS_CHALLENGE: bytes, + AGG_SIG_ME_ADDITIONAL_DATA: bytes, + AGG_SIG_PARENT_ADDITIONAL_DATA: bytes, + AGG_SIG_PUZZLE_ADDITIONAL_DATA: bytes, + AGG_SIG_AMOUNT_ADDITIONAL_DATA: bytes, + AGG_SIG_PUZZLE_AMOUNT_ADDITIONAL_DATA: bytes, + AGG_SIG_PARENT_AMOUNT_ADDITIONAL_DATA: bytes, + AGG_SIG_PARENT_PUZZLE_ADDITIONAL_DATA: bytes, + GENESIS_PRE_FARM_POOL_PUZZLE_HASH: bytes, + GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: bytes, + MAX_VDF_WITNESS_SIZE: uint8, + MEMPOOL_BLOCK_BUFFER: uint8, + MAX_COIN_AMOUNT: uint64, + MAX_BLOCK_COST_CLVM: uint64, + COST_PER_BYTE: uint64, + WEIGHT_PROOF_THRESHOLD: uint8, + WEIGHT_PROOF_RECENT_BLOCKS: uint32, + MAX_BLOCK_COUNT_PER_REQUESTS: uint32, + BLOCKS_CACHE_SIZE: uint32, + MAX_GENERATOR_SIZE: uint32, + MAX_GENERATOR_REF_LIST_SIZE: uint32, + POOL_SUB_SLOT_ITERS: uint64, + SOFT_FORK2_HEIGHT: uint32, + SOFT_FORK4_HEIGHT: uint32, + SOFT_FORK5_HEIGHT: uint32, + HARD_FORK_HEIGHT: uint32, + HARD_FORK_FIX_HEIGHT: uint32, + PLOT_FILTER_128_HEIGHT: uint32, + PLOT_FILTER_64_HEIGHT: uint32, + PLOT_FILTER_32_HEIGHT: uint32 + ) -> None: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + def __richcmp__(self) -> Any: ... + def __deepcopy__(self) -> ConsensusConstants: ... + def __copy__(self) -> ConsensusConstants: ... + @staticmethod + def from_bytes(bytes) -> ConsensusConstants: ... + @staticmethod + def from_bytes_unchecked(bytes) -> ConsensusConstants: ... + @staticmethod + def parse_rust(ReadableBuffer, bool = False) -> Tuple[ConsensusConstants, int]: ... + def to_bytes(self) -> bytes: ... + def __bytes__(self) -> bytes: ... + def stream_to_bytes(self) -> bytes: ... + def get_hash(self) -> bytes32: ... + def to_json_dict(self) -> Any: ... + @staticmethod + def from_json_dict(json_dict: Any) -> ConsensusConstants: ... + def replace(self, *, SLOT_BLOCKS_TARGET: Union[ uint32, _Unspec] = _Unspec(), + MIN_BLOCKS_PER_CHALLENGE_BLOCK: Union[ uint8, _Unspec] = _Unspec(), + MAX_SUB_SLOT_BLOCKS: Union[ uint32, _Unspec] = _Unspec(), + NUM_SPS_SUB_SLOT: Union[ uint32, _Unspec] = _Unspec(), + SUB_SLOT_ITERS_STARTING: Union[ uint64, _Unspec] = _Unspec(), + DIFFICULTY_CONSTANT_FACTOR: Union[ uint128, _Unspec] = _Unspec(), + DIFFICULTY_STARTING: Union[ uint64, _Unspec] = _Unspec(), + DIFFICULTY_CHANGE_MAX_FACTOR: Union[ uint32, _Unspec] = _Unspec(), + SUB_EPOCH_BLOCKS: Union[ uint32, _Unspec] = _Unspec(), + EPOCH_BLOCKS: Union[ uint32, _Unspec] = _Unspec(), + SIGNIFICANT_BITS: Union[ uint8, _Unspec] = _Unspec(), + DISCRIMINANT_SIZE_BITS: Union[ uint16, _Unspec] = _Unspec(), + NUMBER_ZERO_BITS_PLOT_FILTER: Union[ uint8, _Unspec] = _Unspec(), + MIN_PLOT_SIZE: Union[ uint8, _Unspec] = _Unspec(), + MAX_PLOT_SIZE: Union[ uint8, _Unspec] = _Unspec(), + SUB_SLOT_TIME_TARGET: Union[ uint16, _Unspec] = _Unspec(), + NUM_SP_INTERVALS_EXTRA: Union[ uint8, _Unspec] = _Unspec(), + MAX_FUTURE_TIME2: Union[ uint32, _Unspec] = _Unspec(), + NUMBER_OF_TIMESTAMPS: Union[ uint8, _Unspec] = _Unspec(), + GENESIS_CHALLENGE: Union[ bytes32, _Unspec] = _Unspec(), + AGG_SIG_ME_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), + AGG_SIG_PARENT_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), + AGG_SIG_PUZZLE_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), + AGG_SIG_AMOUNT_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), + AGG_SIG_PUZZLE_AMOUNT_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), + AGG_SIG_PARENT_AMOUNT_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), + AGG_SIG_PARENT_PUZZLE_ADDITIONAL_DATA: Union[ bytes32, _Unspec] = _Unspec(), + GENESIS_PRE_FARM_POOL_PUZZLE_HASH: Union[ bytes32, _Unspec] = _Unspec(), + GENESIS_PRE_FARM_FARMER_PUZZLE_HASH: Union[ bytes32, _Unspec] = _Unspec(), + MAX_VDF_WITNESS_SIZE: Union[ uint8, _Unspec] = _Unspec(), + MEMPOOL_BLOCK_BUFFER: Union[ uint8, _Unspec] = _Unspec(), + MAX_COIN_AMOUNT: Union[ uint64, _Unspec] = _Unspec(), + MAX_BLOCK_COST_CLVM: Union[ uint64, _Unspec] = _Unspec(), + COST_PER_BYTE: Union[ uint64, _Unspec] = _Unspec(), + WEIGHT_PROOF_THRESHOLD: Union[ uint8, _Unspec] = _Unspec(), + WEIGHT_PROOF_RECENT_BLOCKS: Union[ uint32, _Unspec] = _Unspec(), + MAX_BLOCK_COUNT_PER_REQUESTS: Union[ uint32, _Unspec] = _Unspec(), + BLOCKS_CACHE_SIZE: Union[ uint32, _Unspec] = _Unspec(), + MAX_GENERATOR_SIZE: Union[ uint32, _Unspec] = _Unspec(), + MAX_GENERATOR_REF_LIST_SIZE: Union[ uint32, _Unspec] = _Unspec(), + POOL_SUB_SLOT_ITERS: Union[ uint64, _Unspec] = _Unspec(), + SOFT_FORK2_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), + SOFT_FORK4_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), + SOFT_FORK5_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), + HARD_FORK_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), + HARD_FORK_FIX_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), + PLOT_FILTER_128_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), + PLOT_FILTER_64_HEIGHT: Union[ uint32, _Unspec] = _Unspec(), + PLOT_FILTER_32_HEIGHT: Union[ uint32, _Unspec] = _Unspec()) -> ConsensusConstants: ... From 19997dad3dc71d95d4378236dcd533af75de4e3c Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 27 Aug 2024 14:24:08 -0400 Subject: [PATCH 07/59] more --- .github/workflows/benchmark.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 6407d8073..eb5e2ea0a 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -60,18 +60,24 @@ jobs: run: | mypy --ignore-missing-imports tests + - name: python mypy stubtest filtered + # TODO: don't always this stuff + if: always() + run: | + stubtest --concise --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' + - name: python mypy stubtest concise + # TODO: don't always this stuff + if: always() run: | stubtest --concise chia_rs - name: python mypy stubtest + # TODO: don't always this stuff + if: always() run: | stubtest chia_rs - - name: python mypy stubtest filtered - run: | - stubtest --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' - - name: python black run: | black --check tests From 8f79776794cb69db7404c5b37e802b564e75355f Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 27 Aug 2024 16:12:39 -0400 Subject: [PATCH 08/59] tidy --- .github/workflows/benchmark.yml | 6 +- crates/chia-protocol/src/lib.rs | 2 +- stubtest.allowlist | 33 + wheel/generate_type_stubs.py | 48 +- .../chia_rs/{chia_rs.pyi => __init__.pyi} | 1104 ++++++++--------- wheel/src/api.rs | 56 +- 6 files changed, 583 insertions(+), 666 deletions(-) create mode 100644 stubtest.allowlist rename wheel/python/chia_rs/{chia_rs.pyi => __init__.pyi} (79%) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index eb5e2ea0a..4378d4d4c 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -64,19 +64,19 @@ jobs: # TODO: don't always this stuff if: always() run: | - stubtest --concise --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' + stubtest --allowlist stubtest.allowlist.to-review --concise --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' - name: python mypy stubtest concise # TODO: don't always this stuff if: always() run: | - stubtest --concise chia_rs + stubtest --allowlist stubtest.allowlist.to-review --concise chia_rs - name: python mypy stubtest # TODO: don't always this stuff if: always() run: | - stubtest chia_rs + stubtest --allowlist stubtest.allowlist.to-review chia_rs - name: python black run: | diff --git a/crates/chia-protocol/src/lib.rs b/crates/chia-protocol/src/lib.rs index 544979383..be89128d8 100644 --- a/crates/chia-protocol/src/lib.rs +++ b/crates/chia-protocol/src/lib.rs @@ -6,7 +6,7 @@ mod coin; mod coin_spend; mod coin_state; mod end_of_sub_slot_bundle; -mod fee_estimate; +pub mod fee_estimate; mod foliage; mod full_node_protocol; mod fullblock; diff --git a/stubtest.allowlist b/stubtest.allowlist new file mode 100644 index 000000000..335b2dcf9 --- /dev/null +++ b/stubtest.allowlist @@ -0,0 +1,33 @@ +# this is offered to help with hinting only and is not intended to be +# runtime accessible. is there a better option for handling this? +chia_rs.ReadableBuffer + +# TODO: G1Element->PublicKey expects *args +chia_rs.G1Element.__init__ + +# TODO: G2Element->Signature expects *args +chia_rs.G2Element.__init__ + +# TODO: expects *args +chia_rs.GTElement.__init__ + +# TODO: PrivateKey->SecretKey expects *args +chia_rs.PrivateKey.__init__ + +# TODO: expects *args +chia_rs.RequestPeers.__init__ + +# TODO: ask stubtest/mypy about these as they seem unlikely to be our doing +chia_rs.sized_byte_class.TypeVar.__bound__ +chia_rs.sized_byte_class.TypeVar.__constraints__ +chia_rs.sized_byte_class.TypeVar.__contravariant__ +chia_rs.sized_byte_class.TypeVar.__covariant__ + +chia_rs.struct_stream.TypeVar.__bound__ +chia_rs.struct_stream.TypeVar.__constraints__ +chia_rs.struct_stream.TypeVar.__contravariant__ +chia_rs.struct_stream.TypeVar.__covariant__ + +chia_rs.sized_byte_class.Iterable +chia_rs.sized_byte_class.BinaryIO.write +chia_rs.struct_stream.BinaryIO.write \ No newline at end of file diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index da473a3d2..048db8020 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -2,7 +2,7 @@ from typing import List, Optional, Tuple, TextIO from glob import glob -output_file = Path(__file__).parent.resolve() / "python" / "chia_rs" / "chia_rs.pyi" +output_file = Path(__file__).parent.resolve() / "python" / "chia_rs" / "__init__.pyi" crates_dir = Path(__file__).parent.parent.resolve() / "crates" input_dir = crates_dir / "chia-protocol" / "src" @@ -44,6 +44,8 @@ def add_indent(x: str): if extra is not None: members.extend(extra) + # TODO: make __richcmp__ dependent on streamable? + # def __richcmp__(self) -> Any: ... # TODO: don't let me merge this hardcoded SpendBundle @final exception file.write( f""" @@ -54,15 +56,14 @@ def __init__( ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> {name}: ... + def __deepcopy__(self, memo: object) -> {name}: ... def __copy__(self) -> {name}: ... @staticmethod - def from_bytes(bytes) -> {name}: ... + def from_bytes(blob: bytes) -> {name}: ... @staticmethod - def from_bytes_unchecked(bytes) -> {name}: ... + def from_bytes_unchecked(blob: bytes) -> {name}: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[{name}, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[{name}, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -73,7 +74,8 @@ def from_json_dict(json_dict: Any) -> {name}: ... """ ) - if len(all_replace_parameters) > 0: + # TODO: program doesn't have named fields so the replace function isn't added + if len(all_replace_parameters) > 0 and name != "Program": indent = ",\n " file.write( f""" def replace(self, *, {indent.join(all_replace_parameters)}) -> {name}: ... @@ -214,7 +216,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s "Program": [ "def get_tree_hash(self) -> bytes32: ...", "@staticmethod\n def default() -> Program: ...", - "@staticmethod\n def fromhex(hex) -> Program: ...", + "@staticmethod\n def fromhex(h: str) -> Program: ...", "def run_mempool_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ...", "def run_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ...", "def _run(self, max_cost: int, flags: int, args: object) -> Tuple[int, ChiaProgram]: ...", @@ -224,7 +226,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s "def uncurry(self) -> Tuple[ChiaProgram, ChiaProgram]: ...", ], "SpendBundle": [ - "@staticmethod\n def aggregate(sbs: List[SpendBundle]) -> SpendBundle: ...", + "@staticmethod\n def aggregate(spend_bundles: List[SpendBundle]) -> SpendBundle: ...", "def name(self) -> bytes32: ...", "def removals(self) -> List[Coin]: ...", "def additions(self) -> List[Coin]: ...", @@ -274,27 +276,23 @@ class _Unspec: def solution_generator(spends: Sequence[Tuple[Coin, bytes, bytes]]) -> bytes: ... def solution_generator_backrefs(spends: Sequence[Tuple[Coin, bytes, bytes]]) -> bytes: ... -def compute_merkle_set_root(items: Sequence[bytes]) -> bytes: ... +def compute_merkle_set_root(values: Sequence[bytes]) -> bytes: ... def supports_fast_forward(spend: CoinSpend) -> bool : ... def fast_forward_singleton(spend: CoinSpend, new_coin: Coin, new_parent: Coin) -> bytes: ... def run_block_generator( - program: ReadableBuffer, args: List[ReadableBuffer], max_cost: int, flags: int, constants: ConsensusConstants + program: ReadableBuffer, block_refs: List[ReadableBuffer], max_cost: int, flags: int, constants: ConsensusConstants ) -> Tuple[Optional[int], Optional[SpendBundleConditions]]: ... def run_block_generator2( - program: ReadableBuffer, args: List[ReadableBuffer], max_cost: int, flags: int, constants: ConsensusConstants + program: ReadableBuffer, block_refs: List[ReadableBuffer], max_cost: int, flags: int, constants: ConsensusConstants ) -> Tuple[Optional[int], Optional[SpendBundleConditions]]: ... def run_puzzle( puzzle: bytes, solution: bytes, parent_id: bytes32, amount: int, max_cost: int, flags: int, constants: ConsensusConstants ) -> SpendBundleConditions: ... -def deserialize_proof( - proof: bytes -) -> MerkleSet: ... - def confirm_included_already_hashed( root: bytes32, item: bytes32, @@ -351,9 +349,9 @@ class LazyNode: atom: Optional[bytes] def serialized_length(program: ReadableBuffer) -> int: ... -def tree_hash(program: ReadableBuffer) -> bytes32: ... +def tree_hash(blob: ReadableBuffer) -> bytes32: ... def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuffer, max_cost: int, find_parent: bytes32, find_amount: int, find_ph: bytes32, flags: int) -> Tuple[bytes, bytes]: ... -def get_puzzle_and_solution_for_coin2(program: Program, block_refs: List[ReadableBuffer], max_cost: int, find_coin: Coin, flags: int) -> Tuple[Program, Program]: ... +def get_puzzle_and_solution_for_coin2(generator: Program, block_refs: List[ReadableBuffer], max_cost: int, find_coin: Coin, flags: int) -> Tuple[Program, Program]: ... @final class BLSCache: @@ -378,16 +376,16 @@ def key_gen(seed: bytes) -> PrivateKey: ... @staticmethod def g2_from_message(msg: bytes) -> G2Element: ... @staticmethod - def derive_child_sk(pk: PrivateKey, index: int) -> PrivateKey: ... + def derive_child_sk(sk: PrivateKey, index: int) -> PrivateKey: ... @staticmethod - def derive_child_sk_unhardened(pk: PrivateKey, index: int) -> PrivateKey: ... + def derive_child_sk_unhardened(sk: PrivateKey, index: int) -> PrivateKey: ... @staticmethod def derive_child_pk_unhardened(pk: G1Element, index: int) -> G1Element: ... @final class MerkleSet: def get_root(self) -> bytes32: ... - def is_included_already_hashed(self, to_check: bytes) -> Tuple[bool, bytes]: ... + def is_included_already_hashed(self, included_leaf: bytes32) -> Tuple[bool, bytes]: ... def __init__( self, leafs: List[bytes32], @@ -410,7 +408,7 @@ def __init__( "def __str__(self) -> str: ...", "def __add__(self, other: G1Element) -> G1Element: ...", "def __iadd__(self, other: G1Element) -> G1Element: ...", - "def derive_unhardened(self, int) -> G1Element: ...", + "def derive_unhardened(self, idx: int) -> G1Element: ...", ], ) print_class( @@ -449,10 +447,10 @@ def __init__( "def get_g1(self) -> G1Element: ...", "def __str__(self) -> str: ...", "def public_key(self) -> G1Element: ...", - "def derive_hardened(self, int) -> PrivateKey: ...", - "def derive_unhardened(self, int) -> PrivateKey: ...", + "def derive_hardened(self, idx: int) -> PrivateKey: ...", + "def derive_unhardened(self, idx: int) -> PrivateKey: ...", "@staticmethod", - "def from_seed(bytes) -> PrivateKey: ...", + "def from_seed(seed: bytes) -> PrivateKey: ...", ], ) diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/__init__.pyi similarity index 79% rename from wheel/python/chia_rs/chia_rs.pyi rename to wheel/python/chia_rs/__init__.pyi index f6fb1963a..4cdac2959 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/__init__.pyi @@ -16,27 +16,23 @@ class _Unspec: def solution_generator(spends: Sequence[Tuple[Coin, bytes, bytes]]) -> bytes: ... def solution_generator_backrefs(spends: Sequence[Tuple[Coin, bytes, bytes]]) -> bytes: ... -def compute_merkle_set_root(items: Sequence[bytes]) -> bytes: ... +def compute_merkle_set_root(values: Sequence[bytes]) -> bytes: ... def supports_fast_forward(spend: CoinSpend) -> bool : ... def fast_forward_singleton(spend: CoinSpend, new_coin: Coin, new_parent: Coin) -> bytes: ... def run_block_generator( - program: ReadableBuffer, args: List[ReadableBuffer], max_cost: int, flags: int, constants: ConsensusConstants + program: ReadableBuffer, block_refs: List[ReadableBuffer], max_cost: int, flags: int, constants: ConsensusConstants ) -> Tuple[Optional[int], Optional[SpendBundleConditions]]: ... def run_block_generator2( - program: ReadableBuffer, args: List[ReadableBuffer], max_cost: int, flags: int, constants: ConsensusConstants + program: ReadableBuffer, block_refs: List[ReadableBuffer], max_cost: int, flags: int, constants: ConsensusConstants ) -> Tuple[Optional[int], Optional[SpendBundleConditions]]: ... def run_puzzle( puzzle: bytes, solution: bytes, parent_id: bytes32, amount: int, max_cost: int, flags: int, constants: ConsensusConstants ) -> SpendBundleConditions: ... -def deserialize_proof( - proof: bytes -) -> MerkleSet: ... - def confirm_included_already_hashed( root: bytes32, item: bytes32, @@ -93,9 +89,9 @@ class LazyNode: atom: Optional[bytes] def serialized_length(program: ReadableBuffer) -> int: ... -def tree_hash(program: ReadableBuffer) -> bytes32: ... +def tree_hash(blob: ReadableBuffer) -> bytes32: ... def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuffer, max_cost: int, find_parent: bytes32, find_amount: int, find_ph: bytes32, flags: int) -> Tuple[bytes, bytes]: ... -def get_puzzle_and_solution_for_coin2(program: Program, block_refs: List[ReadableBuffer], max_cost: int, find_coin: Coin, flags: int) -> Tuple[Program, Program]: ... +def get_puzzle_and_solution_for_coin2(generator: Program, block_refs: List[ReadableBuffer], max_cost: int, find_coin: Coin, flags: int) -> Tuple[Program, Program]: ... @final class BLSCache: @@ -120,16 +116,16 @@ class AugSchemeMPL: @staticmethod def g2_from_message(msg: bytes) -> G2Element: ... @staticmethod - def derive_child_sk(pk: PrivateKey, index: int) -> PrivateKey: ... + def derive_child_sk(sk: PrivateKey, index: int) -> PrivateKey: ... @staticmethod - def derive_child_sk_unhardened(pk: PrivateKey, index: int) -> PrivateKey: ... + def derive_child_sk_unhardened(sk: PrivateKey, index: int) -> PrivateKey: ... @staticmethod def derive_child_pk_unhardened(pk: G1Element, index: int) -> G1Element: ... @final class MerkleSet: def get_root(self) -> bytes32: ... - def is_included_already_hashed(self, to_check: bytes) -> Tuple[bool, bytes]: ... + def is_included_already_hashed(self, included_leaf: bytes32) -> Tuple[bool, bytes]: ... def __init__( self, leafs: List[bytes32], @@ -147,21 +143,20 @@ class G1Element: def __str__(self) -> str: ... def __add__(self, other: G1Element) -> G1Element: ... def __iadd__(self, other: G1Element) -> G1Element: ... - def derive_unhardened(self, int) -> G1Element: ... + def derive_unhardened(self, idx: int) -> G1Element: ... def __init__( self ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> G1Element: ... + def __deepcopy__(self, memo: object) -> G1Element: ... def __copy__(self) -> G1Element: ... @staticmethod - def from_bytes(bytes) -> G1Element: ... + def from_bytes(blob: bytes) -> G1Element: ... @staticmethod - def from_bytes_unchecked(bytes) -> G1Element: ... + def from_bytes_unchecked(blob: bytes) -> G1Element: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[G1Element, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[G1Element, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -185,15 +180,14 @@ class G2Element: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> G2Element: ... + def __deepcopy__(self, memo: object) -> G2Element: ... def __copy__(self) -> G2Element: ... @staticmethod - def from_bytes(bytes) -> G2Element: ... + def from_bytes(blob: bytes) -> G2Element: ... @staticmethod - def from_bytes_unchecked(bytes) -> G2Element: ... + def from_bytes_unchecked(blob: bytes) -> G2Element: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[G2Element, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[G2Element, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -213,15 +207,14 @@ class GTElement: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> GTElement: ... + def __deepcopy__(self, memo: object) -> GTElement: ... def __copy__(self) -> GTElement: ... @staticmethod - def from_bytes(bytes) -> GTElement: ... + def from_bytes(blob: bytes) -> GTElement: ... @staticmethod - def from_bytes_unchecked(bytes) -> GTElement: ... + def from_bytes_unchecked(blob: bytes) -> GTElement: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[GTElement, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[GTElement, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -237,24 +230,23 @@ class PrivateKey: def get_g1(self) -> G1Element: ... def __str__(self) -> str: ... def public_key(self) -> G1Element: ... - def derive_hardened(self, int) -> PrivateKey: ... - def derive_unhardened(self, int) -> PrivateKey: ... + def derive_hardened(self, idx: int) -> PrivateKey: ... + def derive_unhardened(self, idx: int) -> PrivateKey: ... @staticmethod - def from_seed(bytes) -> PrivateKey: ... + def from_seed(seed: bytes) -> PrivateKey: ... def __init__( self ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> PrivateKey: ... + def __deepcopy__(self, memo: object) -> PrivateKey: ... def __copy__(self) -> PrivateKey: ... @staticmethod - def from_bytes(bytes) -> PrivateKey: ... + def from_bytes(blob: bytes) -> PrivateKey: ... @staticmethod - def from_bytes_unchecked(bytes) -> PrivateKey: ... + def from_bytes_unchecked(blob: bytes) -> PrivateKey: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[PrivateKey, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[PrivateKey, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -308,15 +300,14 @@ class SpendConditions: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SpendConditions: ... + def __deepcopy__(self, memo: object) -> SpendConditions: ... def __copy__(self) -> SpendConditions: ... @staticmethod - def from_bytes(bytes) -> SpendConditions: ... + def from_bytes(blob: bytes) -> SpendConditions: ... @staticmethod - def from_bytes_unchecked(bytes) -> SpendConditions: ... + def from_bytes_unchecked(blob: bytes) -> SpendConditions: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SpendConditions, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[SpendConditions, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -371,15 +362,14 @@ class SpendBundleConditions: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SpendBundleConditions: ... + def __deepcopy__(self, memo: object) -> SpendBundleConditions: ... def __copy__(self) -> SpendBundleConditions: ... @staticmethod - def from_bytes(bytes) -> SpendBundleConditions: ... + def from_bytes(blob: bytes) -> SpendBundleConditions: ... @staticmethod - def from_bytes_unchecked(bytes) -> SpendBundleConditions: ... + def from_bytes_unchecked(blob: bytes) -> SpendBundleConditions: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SpendBundleConditions, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[SpendBundleConditions, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -463,15 +453,14 @@ class BlockRecord: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> BlockRecord: ... + def __deepcopy__(self, memo: object) -> BlockRecord: ... def __copy__(self) -> BlockRecord: ... @staticmethod - def from_bytes(bytes) -> BlockRecord: ... + def from_bytes(blob: bytes) -> BlockRecord: ... @staticmethod - def from_bytes_unchecked(bytes) -> BlockRecord: ... + def from_bytes_unchecked(blob: bytes) -> BlockRecord: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[BlockRecord, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[BlockRecord, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -518,15 +507,14 @@ class Message: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> Message: ... + def __deepcopy__(self, memo: object) -> Message: ... def __copy__(self) -> Message: ... @staticmethod - def from_bytes(bytes) -> Message: ... + def from_bytes(blob: bytes) -> Message: ... @staticmethod - def from_bytes_unchecked(bytes) -> Message: ... + def from_bytes_unchecked(blob: bytes) -> Message: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Message, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[Message, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -557,15 +545,14 @@ class Handshake: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> Handshake: ... + def __deepcopy__(self, memo: object) -> Handshake: ... def __copy__(self) -> Handshake: ... @staticmethod - def from_bytes(bytes) -> Handshake: ... + def from_bytes(blob: bytes) -> Handshake: ... @staticmethod - def from_bytes_unchecked(bytes) -> Handshake: ... + def from_bytes_unchecked(blob: bytes) -> Handshake: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Handshake, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[Handshake, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -595,15 +582,14 @@ class ClassgroupElement: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ClassgroupElement: ... + def __deepcopy__(self, memo: object) -> ClassgroupElement: ... def __copy__(self) -> ClassgroupElement: ... @staticmethod - def from_bytes(bytes) -> ClassgroupElement: ... + def from_bytes(blob: bytes) -> ClassgroupElement: ... @staticmethod - def from_bytes_unchecked(bytes) -> ClassgroupElement: ... + def from_bytes_unchecked(blob: bytes) -> ClassgroupElement: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ClassgroupElement, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[ClassgroupElement, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -627,15 +613,14 @@ class Coin: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> Coin: ... + def __deepcopy__(self, memo: object) -> Coin: ... def __copy__(self) -> Coin: ... @staticmethod - def from_bytes(bytes) -> Coin: ... + def from_bytes(blob: bytes) -> Coin: ... @staticmethod - def from_bytes_unchecked(bytes) -> Coin: ... + def from_bytes_unchecked(blob: bytes) -> Coin: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Coin, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[Coin, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -660,15 +645,14 @@ class CoinSpend: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> CoinSpend: ... + def __deepcopy__(self, memo: object) -> CoinSpend: ... def __copy__(self) -> CoinSpend: ... @staticmethod - def from_bytes(bytes) -> CoinSpend: ... + def from_bytes(blob: bytes) -> CoinSpend: ... @staticmethod - def from_bytes_unchecked(bytes) -> CoinSpend: ... + def from_bytes_unchecked(blob: bytes) -> CoinSpend: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinSpend, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[CoinSpend, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -693,15 +677,14 @@ class CoinState: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> CoinState: ... + def __deepcopy__(self, memo: object) -> CoinState: ... def __copy__(self) -> CoinState: ... @staticmethod - def from_bytes(bytes) -> CoinState: ... + def from_bytes(blob: bytes) -> CoinState: ... @staticmethod - def from_bytes_unchecked(bytes) -> CoinState: ... + def from_bytes_unchecked(blob: bytes) -> CoinState: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinState, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[CoinState, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -728,15 +711,14 @@ class EndOfSubSlotBundle: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> EndOfSubSlotBundle: ... + def __deepcopy__(self, memo: object) -> EndOfSubSlotBundle: ... def __copy__(self) -> EndOfSubSlotBundle: ... @staticmethod - def from_bytes(bytes) -> EndOfSubSlotBundle: ... + def from_bytes(blob: bytes) -> EndOfSubSlotBundle: ... @staticmethod - def from_bytes_unchecked(bytes) -> EndOfSubSlotBundle: ... + def from_bytes_unchecked(blob: bytes) -> EndOfSubSlotBundle: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[EndOfSubSlotBundle, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[EndOfSubSlotBundle, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -758,15 +740,14 @@ class FeeRate: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FeeRate: ... + def __deepcopy__(self, memo: object) -> FeeRate: ... def __copy__(self) -> FeeRate: ... @staticmethod - def from_bytes(bytes) -> FeeRate: ... + def from_bytes(blob: bytes) -> FeeRate: ... @staticmethod - def from_bytes_unchecked(bytes) -> FeeRate: ... + def from_bytes_unchecked(blob: bytes) -> FeeRate: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FeeRate, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[FeeRate, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -789,15 +770,14 @@ class FeeEstimate: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FeeEstimate: ... + def __deepcopy__(self, memo: object) -> FeeEstimate: ... def __copy__(self) -> FeeEstimate: ... @staticmethod - def from_bytes(bytes) -> FeeEstimate: ... + def from_bytes(blob: bytes) -> FeeEstimate: ... @staticmethod - def from_bytes_unchecked(bytes) -> FeeEstimate: ... + def from_bytes_unchecked(blob: bytes) -> FeeEstimate: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FeeEstimate, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[FeeEstimate, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -820,15 +800,14 @@ class FeeEstimateGroup: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FeeEstimateGroup: ... + def __deepcopy__(self, memo: object) -> FeeEstimateGroup: ... def __copy__(self) -> FeeEstimateGroup: ... @staticmethod - def from_bytes(bytes) -> FeeEstimateGroup: ... + def from_bytes(blob: bytes) -> FeeEstimateGroup: ... @staticmethod - def from_bytes_unchecked(bytes) -> FeeEstimateGroup: ... + def from_bytes_unchecked(blob: bytes) -> FeeEstimateGroup: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FeeEstimateGroup, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[FeeEstimateGroup, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -858,15 +837,14 @@ class TransactionsInfo: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> TransactionsInfo: ... + def __deepcopy__(self, memo: object) -> TransactionsInfo: ... def __copy__(self) -> TransactionsInfo: ... @staticmethod - def from_bytes(bytes) -> TransactionsInfo: ... + def from_bytes(blob: bytes) -> TransactionsInfo: ... @staticmethod - def from_bytes_unchecked(bytes) -> TransactionsInfo: ... + def from_bytes_unchecked(blob: bytes) -> TransactionsInfo: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[TransactionsInfo, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[TransactionsInfo, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -900,15 +878,14 @@ class FoliageTransactionBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FoliageTransactionBlock: ... + def __deepcopy__(self, memo: object) -> FoliageTransactionBlock: ... def __copy__(self) -> FoliageTransactionBlock: ... @staticmethod - def from_bytes(bytes) -> FoliageTransactionBlock: ... + def from_bytes(blob: bytes) -> FoliageTransactionBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> FoliageTransactionBlock: ... + def from_bytes_unchecked(blob: bytes) -> FoliageTransactionBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FoliageTransactionBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[FoliageTransactionBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -940,15 +917,14 @@ class FoliageBlockData: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FoliageBlockData: ... + def __deepcopy__(self, memo: object) -> FoliageBlockData: ... def __copy__(self) -> FoliageBlockData: ... @staticmethod - def from_bytes(bytes) -> FoliageBlockData: ... + def from_bytes(blob: bytes) -> FoliageBlockData: ... @staticmethod - def from_bytes_unchecked(bytes) -> FoliageBlockData: ... + def from_bytes_unchecked(blob: bytes) -> FoliageBlockData: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FoliageBlockData, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[FoliageBlockData, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -981,15 +957,14 @@ class Foliage: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> Foliage: ... + def __deepcopy__(self, memo: object) -> Foliage: ... def __copy__(self) -> Foliage: ... @staticmethod - def from_bytes(bytes) -> Foliage: ... + def from_bytes(blob: bytes) -> Foliage: ... @staticmethod - def from_bytes_unchecked(bytes) -> Foliage: ... + def from_bytes_unchecked(blob: bytes) -> Foliage: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Foliage, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[Foliage, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1021,15 +996,14 @@ class NewPeak: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewPeak: ... + def __deepcopy__(self, memo: object) -> NewPeak: ... def __copy__(self) -> NewPeak: ... @staticmethod - def from_bytes(bytes) -> NewPeak: ... + def from_bytes(blob: bytes) -> NewPeak: ... @staticmethod - def from_bytes_unchecked(bytes) -> NewPeak: ... + def from_bytes_unchecked(blob: bytes) -> NewPeak: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewPeak, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[NewPeak, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1056,15 +1030,14 @@ class NewTransaction: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewTransaction: ... + def __deepcopy__(self, memo: object) -> NewTransaction: ... def __copy__(self) -> NewTransaction: ... @staticmethod - def from_bytes(bytes) -> NewTransaction: ... + def from_bytes(blob: bytes) -> NewTransaction: ... @staticmethod - def from_bytes_unchecked(bytes) -> NewTransaction: ... + def from_bytes_unchecked(blob: bytes) -> NewTransaction: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewTransaction, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[NewTransaction, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1085,15 +1058,14 @@ class RequestTransaction: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestTransaction: ... + def __deepcopy__(self, memo: object) -> RequestTransaction: ... def __copy__(self) -> RequestTransaction: ... @staticmethod - def from_bytes(bytes) -> RequestTransaction: ... + def from_bytes(blob: bytes) -> RequestTransaction: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestTransaction: ... + def from_bytes_unchecked(blob: bytes) -> RequestTransaction: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestTransaction, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestTransaction, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1112,15 +1084,14 @@ class RespondTransaction: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondTransaction: ... + def __deepcopy__(self, memo: object) -> RespondTransaction: ... def __copy__(self) -> RespondTransaction: ... @staticmethod - def from_bytes(bytes) -> RespondTransaction: ... + def from_bytes(blob: bytes) -> RespondTransaction: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondTransaction: ... + def from_bytes_unchecked(blob: bytes) -> RespondTransaction: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondTransaction, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondTransaction, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1141,15 +1112,14 @@ class RequestProofOfWeight: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestProofOfWeight: ... + def __deepcopy__(self, memo: object) -> RequestProofOfWeight: ... def __copy__(self) -> RequestProofOfWeight: ... @staticmethod - def from_bytes(bytes) -> RequestProofOfWeight: ... + def from_bytes(blob: bytes) -> RequestProofOfWeight: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestProofOfWeight: ... + def from_bytes_unchecked(blob: bytes) -> RequestProofOfWeight: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestProofOfWeight, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestProofOfWeight, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1171,15 +1141,14 @@ class RespondProofOfWeight: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondProofOfWeight: ... + def __deepcopy__(self, memo: object) -> RespondProofOfWeight: ... def __copy__(self) -> RespondProofOfWeight: ... @staticmethod - def from_bytes(bytes) -> RespondProofOfWeight: ... + def from_bytes(blob: bytes) -> RespondProofOfWeight: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondProofOfWeight: ... + def from_bytes_unchecked(blob: bytes) -> RespondProofOfWeight: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondProofOfWeight, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondProofOfWeight, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1201,15 +1170,14 @@ class RequestBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestBlock: ... + def __deepcopy__(self, memo: object) -> RequestBlock: ... def __copy__(self) -> RequestBlock: ... @staticmethod - def from_bytes(bytes) -> RequestBlock: ... + def from_bytes(blob: bytes) -> RequestBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlock: ... + def from_bytes_unchecked(blob: bytes) -> RequestBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1229,15 +1197,14 @@ class RejectBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectBlock: ... + def __deepcopy__(self, memo: object) -> RejectBlock: ... def __copy__(self) -> RejectBlock: ... @staticmethod - def from_bytes(bytes) -> RejectBlock: ... + def from_bytes(blob: bytes) -> RejectBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> RejectBlock: ... + def from_bytes_unchecked(blob: bytes) -> RejectBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RejectBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1260,15 +1227,14 @@ class RequestBlocks: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestBlocks: ... + def __deepcopy__(self, memo: object) -> RequestBlocks: ... def __copy__(self) -> RequestBlocks: ... @staticmethod - def from_bytes(bytes) -> RequestBlocks: ... + def from_bytes(blob: bytes) -> RequestBlocks: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlocks: ... + def from_bytes_unchecked(blob: bytes) -> RequestBlocks: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlocks, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestBlocks, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1293,15 +1259,14 @@ class RespondBlocks: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondBlocks: ... + def __deepcopy__(self, memo: object) -> RespondBlocks: ... def __copy__(self) -> RespondBlocks: ... @staticmethod - def from_bytes(bytes) -> RespondBlocks: ... + def from_bytes(blob: bytes) -> RespondBlocks: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlocks: ... + def from_bytes_unchecked(blob: bytes) -> RespondBlocks: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlocks, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondBlocks, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1324,15 +1289,14 @@ class RejectBlocks: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectBlocks: ... + def __deepcopy__(self, memo: object) -> RejectBlocks: ... def __copy__(self) -> RejectBlocks: ... @staticmethod - def from_bytes(bytes) -> RejectBlocks: ... + def from_bytes(blob: bytes) -> RejectBlocks: ... @staticmethod - def from_bytes_unchecked(bytes) -> RejectBlocks: ... + def from_bytes_unchecked(blob: bytes) -> RejectBlocks: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlocks, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RejectBlocks, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1352,15 +1316,14 @@ class RespondBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondBlock: ... + def __deepcopy__(self, memo: object) -> RespondBlock: ... def __copy__(self) -> RespondBlock: ... @staticmethod - def from_bytes(bytes) -> RespondBlock: ... + def from_bytes(blob: bytes) -> RespondBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlock: ... + def from_bytes_unchecked(blob: bytes) -> RespondBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1379,15 +1342,14 @@ class NewUnfinishedBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewUnfinishedBlock: ... + def __deepcopy__(self, memo: object) -> NewUnfinishedBlock: ... def __copy__(self) -> NewUnfinishedBlock: ... @staticmethod - def from_bytes(bytes) -> NewUnfinishedBlock: ... + def from_bytes(blob: bytes) -> NewUnfinishedBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> NewUnfinishedBlock: ... + def from_bytes_unchecked(blob: bytes) -> NewUnfinishedBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewUnfinishedBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[NewUnfinishedBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1406,15 +1368,14 @@ class RequestUnfinishedBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestUnfinishedBlock: ... + def __deepcopy__(self, memo: object) -> RequestUnfinishedBlock: ... def __copy__(self) -> RequestUnfinishedBlock: ... @staticmethod - def from_bytes(bytes) -> RequestUnfinishedBlock: ... + def from_bytes(blob: bytes) -> RequestUnfinishedBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestUnfinishedBlock: ... + def from_bytes_unchecked(blob: bytes) -> RequestUnfinishedBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestUnfinishedBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestUnfinishedBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1433,15 +1394,14 @@ class RespondUnfinishedBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondUnfinishedBlock: ... + def __deepcopy__(self, memo: object) -> RespondUnfinishedBlock: ... def __copy__(self) -> RespondUnfinishedBlock: ... @staticmethod - def from_bytes(bytes) -> RespondUnfinishedBlock: ... + def from_bytes(blob: bytes) -> RespondUnfinishedBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondUnfinishedBlock: ... + def from_bytes_unchecked(blob: bytes) -> RespondUnfinishedBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondUnfinishedBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondUnfinishedBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1466,15 +1426,14 @@ class NewSignagePointOrEndOfSubSlot: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewSignagePointOrEndOfSubSlot: ... + def __deepcopy__(self, memo: object) -> NewSignagePointOrEndOfSubSlot: ... def __copy__(self) -> NewSignagePointOrEndOfSubSlot: ... @staticmethod - def from_bytes(bytes) -> NewSignagePointOrEndOfSubSlot: ... + def from_bytes(blob: bytes) -> NewSignagePointOrEndOfSubSlot: ... @staticmethod - def from_bytes_unchecked(bytes) -> NewSignagePointOrEndOfSubSlot: ... + def from_bytes_unchecked(blob: bytes) -> NewSignagePointOrEndOfSubSlot: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewSignagePointOrEndOfSubSlot, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[NewSignagePointOrEndOfSubSlot, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1500,15 +1459,14 @@ class RequestSignagePointOrEndOfSubSlot: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestSignagePointOrEndOfSubSlot: ... + def __deepcopy__(self, memo: object) -> RequestSignagePointOrEndOfSubSlot: ... def __copy__(self) -> RequestSignagePointOrEndOfSubSlot: ... @staticmethod - def from_bytes(bytes) -> RequestSignagePointOrEndOfSubSlot: ... + def from_bytes(blob: bytes) -> RequestSignagePointOrEndOfSubSlot: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestSignagePointOrEndOfSubSlot: ... + def from_bytes_unchecked(blob: bytes) -> RequestSignagePointOrEndOfSubSlot: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestSignagePointOrEndOfSubSlot, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestSignagePointOrEndOfSubSlot, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1537,15 +1495,14 @@ class RespondSignagePoint: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondSignagePoint: ... + def __deepcopy__(self, memo: object) -> RespondSignagePoint: ... def __copy__(self) -> RespondSignagePoint: ... @staticmethod - def from_bytes(bytes) -> RespondSignagePoint: ... + def from_bytes(blob: bytes) -> RespondSignagePoint: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondSignagePoint: ... + def from_bytes_unchecked(blob: bytes) -> RespondSignagePoint: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondSignagePoint, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondSignagePoint, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1568,15 +1525,14 @@ class RespondEndOfSubSlot: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondEndOfSubSlot: ... + def __deepcopy__(self, memo: object) -> RespondEndOfSubSlot: ... def __copy__(self) -> RespondEndOfSubSlot: ... @staticmethod - def from_bytes(bytes) -> RespondEndOfSubSlot: ... + def from_bytes(blob: bytes) -> RespondEndOfSubSlot: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondEndOfSubSlot: ... + def from_bytes_unchecked(blob: bytes) -> RespondEndOfSubSlot: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondEndOfSubSlot, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondEndOfSubSlot, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1595,15 +1551,14 @@ class RequestMempoolTransactions: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestMempoolTransactions: ... + def __deepcopy__(self, memo: object) -> RequestMempoolTransactions: ... def __copy__(self) -> RequestMempoolTransactions: ... @staticmethod - def from_bytes(bytes) -> RequestMempoolTransactions: ... + def from_bytes(blob: bytes) -> RequestMempoolTransactions: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestMempoolTransactions: ... + def from_bytes_unchecked(blob: bytes) -> RequestMempoolTransactions: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestMempoolTransactions, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestMempoolTransactions, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1628,15 +1583,14 @@ class NewCompactVDF: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewCompactVDF: ... + def __deepcopy__(self, memo: object) -> NewCompactVDF: ... def __copy__(self) -> NewCompactVDF: ... @staticmethod - def from_bytes(bytes) -> NewCompactVDF: ... + def from_bytes(blob: bytes) -> NewCompactVDF: ... @staticmethod - def from_bytes_unchecked(bytes) -> NewCompactVDF: ... + def from_bytes_unchecked(blob: bytes) -> NewCompactVDF: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewCompactVDF, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[NewCompactVDF, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1664,15 +1618,14 @@ class RequestCompactVDF: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestCompactVDF: ... + def __deepcopy__(self, memo: object) -> RequestCompactVDF: ... def __copy__(self) -> RequestCompactVDF: ... @staticmethod - def from_bytes(bytes) -> RequestCompactVDF: ... + def from_bytes(blob: bytes) -> RequestCompactVDF: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestCompactVDF: ... + def from_bytes_unchecked(blob: bytes) -> RequestCompactVDF: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestCompactVDF, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestCompactVDF, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1702,15 +1655,14 @@ class RespondCompactVDF: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondCompactVDF: ... + def __deepcopy__(self, memo: object) -> RespondCompactVDF: ... def __copy__(self) -> RespondCompactVDF: ... @staticmethod - def from_bytes(bytes) -> RespondCompactVDF: ... + def from_bytes(blob: bytes) -> RespondCompactVDF: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondCompactVDF: ... + def from_bytes_unchecked(blob: bytes) -> RespondCompactVDF: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondCompactVDF, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondCompactVDF, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1731,15 +1683,14 @@ class RequestPeers: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestPeers: ... + def __deepcopy__(self, memo: object) -> RequestPeers: ... def __copy__(self) -> RequestPeers: ... @staticmethod - def from_bytes(bytes) -> RequestPeers: ... + def from_bytes(blob: bytes) -> RequestPeers: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestPeers: ... + def from_bytes_unchecked(blob: bytes) -> RequestPeers: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPeers, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestPeers, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1757,15 +1708,14 @@ class RespondPeers: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondPeers: ... + def __deepcopy__(self, memo: object) -> RespondPeers: ... def __copy__(self) -> RespondPeers: ... @staticmethod - def from_bytes(bytes) -> RespondPeers: ... + def from_bytes(blob: bytes) -> RespondPeers: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondPeers: ... + def from_bytes_unchecked(blob: bytes) -> RespondPeers: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPeers, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondPeers, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1786,15 +1736,14 @@ class NewUnfinishedBlock2: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewUnfinishedBlock2: ... + def __deepcopy__(self, memo: object) -> NewUnfinishedBlock2: ... def __copy__(self) -> NewUnfinishedBlock2: ... @staticmethod - def from_bytes(bytes) -> NewUnfinishedBlock2: ... + def from_bytes(blob: bytes) -> NewUnfinishedBlock2: ... @staticmethod - def from_bytes_unchecked(bytes) -> NewUnfinishedBlock2: ... + def from_bytes_unchecked(blob: bytes) -> NewUnfinishedBlock2: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewUnfinishedBlock2, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[NewUnfinishedBlock2, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1816,15 +1765,14 @@ class RequestUnfinishedBlock2: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestUnfinishedBlock2: ... + def __deepcopy__(self, memo: object) -> RequestUnfinishedBlock2: ... def __copy__(self) -> RequestUnfinishedBlock2: ... @staticmethod - def from_bytes(bytes) -> RequestUnfinishedBlock2: ... + def from_bytes(blob: bytes) -> RequestUnfinishedBlock2: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestUnfinishedBlock2: ... + def from_bytes_unchecked(blob: bytes) -> RequestUnfinishedBlock2: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestUnfinishedBlock2, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestUnfinishedBlock2, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1874,15 +1822,14 @@ class FullBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> FullBlock: ... + def __deepcopy__(self, memo: object) -> FullBlock: ... def __copy__(self) -> FullBlock: ... @staticmethod - def from_bytes(bytes) -> FullBlock: ... + def from_bytes(blob: bytes) -> FullBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> FullBlock: ... + def from_bytes_unchecked(blob: bytes) -> FullBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FullBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[FullBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1941,15 +1888,14 @@ class HeaderBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> HeaderBlock: ... + def __deepcopy__(self, memo: object) -> HeaderBlock: ... def __copy__(self) -> HeaderBlock: ... @staticmethod - def from_bytes(bytes) -> HeaderBlock: ... + def from_bytes(blob: bytes) -> HeaderBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> HeaderBlock: ... + def from_bytes_unchecked(blob: bytes) -> HeaderBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[HeaderBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[HeaderBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -1982,15 +1928,14 @@ class TimestampedPeerInfo: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> TimestampedPeerInfo: ... + def __deepcopy__(self, memo: object) -> TimestampedPeerInfo: ... def __copy__(self) -> TimestampedPeerInfo: ... @staticmethod - def from_bytes(bytes) -> TimestampedPeerInfo: ... + def from_bytes(blob: bytes) -> TimestampedPeerInfo: ... @staticmethod - def from_bytes_unchecked(bytes) -> TimestampedPeerInfo: ... + def from_bytes_unchecked(blob: bytes) -> TimestampedPeerInfo: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[TimestampedPeerInfo, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[TimestampedPeerInfo, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2013,15 +1958,14 @@ class PoolTarget: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> PoolTarget: ... + def __deepcopy__(self, memo: object) -> PoolTarget: ... def __copy__(self) -> PoolTarget: ... @staticmethod - def from_bytes(bytes) -> PoolTarget: ... + def from_bytes(blob: bytes) -> PoolTarget: ... @staticmethod - def from_bytes_unchecked(bytes) -> PoolTarget: ... + def from_bytes_unchecked(blob: bytes) -> PoolTarget: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[PoolTarget, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[PoolTarget, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2039,7 +1983,7 @@ class Program: @staticmethod def default() -> Program: ... @staticmethod - def fromhex(hex) -> Program: ... + def fromhex(h: str) -> Program: ... def run_mempool_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ... def run_with_cost(self, max_cost: int, args: object) -> Tuple[int, ChiaProgram]: ... def _run(self, max_cost: int, flags: int, args: object) -> Tuple[int, ChiaProgram]: ... @@ -2055,15 +1999,14 @@ class Program: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> Program: ... + def __deepcopy__(self, memo: object) -> Program: ... def __copy__(self) -> Program: ... @staticmethod - def from_bytes(bytes) -> Program: ... + def from_bytes(blob: bytes) -> Program: ... @staticmethod - def from_bytes_unchecked(bytes) -> Program: ... + def from_bytes_unchecked(blob: bytes) -> Program: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Program, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[Program, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2071,7 +2014,6 @@ class Program: def to_json_dict(self) -> Any: ... @staticmethod def from_json_dict(json_dict: Any) -> Program: ... - def replace(self, *, a0: Union[ bytes, _Unspec] = _Unspec()) -> Program: ... @final class ProofOfSpace: @@ -2092,15 +2034,14 @@ class ProofOfSpace: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ProofOfSpace: ... + def __deepcopy__(self, memo: object) -> ProofOfSpace: ... def __copy__(self) -> ProofOfSpace: ... @staticmethod - def from_bytes(bytes) -> ProofOfSpace: ... + def from_bytes(blob: bytes) -> ProofOfSpace: ... @staticmethod - def from_bytes_unchecked(bytes) -> ProofOfSpace: ... + def from_bytes_unchecked(blob: bytes) -> ProofOfSpace: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ProofOfSpace, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[ProofOfSpace, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2138,15 +2079,14 @@ class RewardChainBlockUnfinished: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RewardChainBlockUnfinished: ... + def __deepcopy__(self, memo: object) -> RewardChainBlockUnfinished: ... def __copy__(self) -> RewardChainBlockUnfinished: ... @staticmethod - def from_bytes(bytes) -> RewardChainBlockUnfinished: ... + def from_bytes(blob: bytes) -> RewardChainBlockUnfinished: ... @staticmethod - def from_bytes_unchecked(bytes) -> RewardChainBlockUnfinished: ... + def from_bytes_unchecked(blob: bytes) -> RewardChainBlockUnfinished: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainBlockUnfinished, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RewardChainBlockUnfinished, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2199,15 +2139,14 @@ class RewardChainBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RewardChainBlock: ... + def __deepcopy__(self, memo: object) -> RewardChainBlock: ... def __copy__(self) -> RewardChainBlock: ... @staticmethod - def from_bytes(bytes) -> RewardChainBlock: ... + def from_bytes(blob: bytes) -> RewardChainBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> RewardChainBlock: ... + def from_bytes_unchecked(blob: bytes) -> RewardChainBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RewardChainBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2245,15 +2184,14 @@ class ChallengeBlockInfo: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ChallengeBlockInfo: ... + def __deepcopy__(self, memo: object) -> ChallengeBlockInfo: ... def __copy__(self) -> ChallengeBlockInfo: ... @staticmethod - def from_bytes(bytes) -> ChallengeBlockInfo: ... + def from_bytes(blob: bytes) -> ChallengeBlockInfo: ... @staticmethod - def from_bytes_unchecked(bytes) -> ChallengeBlockInfo: ... + def from_bytes_unchecked(blob: bytes) -> ChallengeBlockInfo: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ChallengeBlockInfo, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[ChallengeBlockInfo, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2283,15 +2221,14 @@ class ChallengeChainSubSlot: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ChallengeChainSubSlot: ... + def __deepcopy__(self, memo: object) -> ChallengeChainSubSlot: ... def __copy__(self) -> ChallengeChainSubSlot: ... @staticmethod - def from_bytes(bytes) -> ChallengeChainSubSlot: ... + def from_bytes(blob: bytes) -> ChallengeChainSubSlot: ... @staticmethod - def from_bytes_unchecked(bytes) -> ChallengeChainSubSlot: ... + def from_bytes_unchecked(blob: bytes) -> ChallengeChainSubSlot: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ChallengeChainSubSlot, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[ChallengeChainSubSlot, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2314,15 +2251,14 @@ class InfusedChallengeChainSubSlot: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> InfusedChallengeChainSubSlot: ... + def __deepcopy__(self, memo: object) -> InfusedChallengeChainSubSlot: ... def __copy__(self) -> InfusedChallengeChainSubSlot: ... @staticmethod - def from_bytes(bytes) -> InfusedChallengeChainSubSlot: ... + def from_bytes(blob: bytes) -> InfusedChallengeChainSubSlot: ... @staticmethod - def from_bytes_unchecked(bytes) -> InfusedChallengeChainSubSlot: ... + def from_bytes_unchecked(blob: bytes) -> InfusedChallengeChainSubSlot: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[InfusedChallengeChainSubSlot, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[InfusedChallengeChainSubSlot, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2347,15 +2283,14 @@ class RewardChainSubSlot: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RewardChainSubSlot: ... + def __deepcopy__(self, memo: object) -> RewardChainSubSlot: ... def __copy__(self) -> RewardChainSubSlot: ... @staticmethod - def from_bytes(bytes) -> RewardChainSubSlot: ... + def from_bytes(blob: bytes) -> RewardChainSubSlot: ... @staticmethod - def from_bytes_unchecked(bytes) -> RewardChainSubSlot: ... + def from_bytes_unchecked(blob: bytes) -> RewardChainSubSlot: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainSubSlot, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RewardChainSubSlot, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2381,15 +2316,14 @@ class SubSlotProofs: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubSlotProofs: ... + def __deepcopy__(self, memo: object) -> SubSlotProofs: ... def __copy__(self) -> SubSlotProofs: ... @staticmethod - def from_bytes(bytes) -> SubSlotProofs: ... + def from_bytes(blob: bytes) -> SubSlotProofs: ... @staticmethod - def from_bytes_unchecked(bytes) -> SubSlotProofs: ... + def from_bytes_unchecked(blob: bytes) -> SubSlotProofs: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubSlotProofs, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[SubSlotProofs, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2406,7 +2340,7 @@ class SpendBundle: coin_spends: List[CoinSpend] aggregated_signature: G2Element @staticmethod - def aggregate(sbs: List[SpendBundle]) -> SpendBundle: ... + def aggregate(spend_bundles: List[SpendBundle]) -> SpendBundle: ... def name(self) -> bytes32: ... def removals(self) -> List[Coin]: ... def additions(self) -> List[Coin]: ... @@ -2417,15 +2351,14 @@ class SpendBundle: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SpendBundle: ... + def __deepcopy__(self, memo: object) -> SpendBundle: ... def __copy__(self) -> SpendBundle: ... @staticmethod - def from_bytes(bytes) -> SpendBundle: ... + def from_bytes(blob: bytes) -> SpendBundle: ... @staticmethod - def from_bytes_unchecked(bytes) -> SpendBundle: ... + def from_bytes_unchecked(blob: bytes) -> SpendBundle: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SpendBundle, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[SpendBundle, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2453,15 +2386,14 @@ class SubEpochSummary: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubEpochSummary: ... + def __deepcopy__(self, memo: object) -> SubEpochSummary: ... def __copy__(self) -> SubEpochSummary: ... @staticmethod - def from_bytes(bytes) -> SubEpochSummary: ... + def from_bytes(blob: bytes) -> SubEpochSummary: ... @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochSummary: ... + def from_bytes_unchecked(blob: bytes) -> SubEpochSummary: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochSummary, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[SubEpochSummary, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2504,15 +2436,14 @@ class UnfinishedBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> UnfinishedBlock: ... + def __deepcopy__(self, memo: object) -> UnfinishedBlock: ... def __copy__(self) -> UnfinishedBlock: ... @staticmethod - def from_bytes(bytes) -> UnfinishedBlock: ... + def from_bytes(blob: bytes) -> UnfinishedBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> UnfinishedBlock: ... + def from_bytes_unchecked(blob: bytes) -> UnfinishedBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[UnfinishedBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[UnfinishedBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2554,15 +2485,14 @@ class UnfinishedHeaderBlock: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> UnfinishedHeaderBlock: ... + def __deepcopy__(self, memo: object) -> UnfinishedHeaderBlock: ... def __copy__(self) -> UnfinishedHeaderBlock: ... @staticmethod - def from_bytes(bytes) -> UnfinishedHeaderBlock: ... + def from_bytes(blob: bytes) -> UnfinishedHeaderBlock: ... @staticmethod - def from_bytes_unchecked(bytes) -> UnfinishedHeaderBlock: ... + def from_bytes_unchecked(blob: bytes) -> UnfinishedHeaderBlock: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[UnfinishedHeaderBlock, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[UnfinishedHeaderBlock, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2591,15 +2521,14 @@ class VDFInfo: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> VDFInfo: ... + def __deepcopy__(self, memo: object) -> VDFInfo: ... def __copy__(self) -> VDFInfo: ... @staticmethod - def from_bytes(bytes) -> VDFInfo: ... + def from_bytes(blob: bytes) -> VDFInfo: ... @staticmethod - def from_bytes_unchecked(bytes) -> VDFInfo: ... + def from_bytes_unchecked(blob: bytes) -> VDFInfo: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[VDFInfo, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[VDFInfo, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2624,15 +2553,14 @@ class VDFProof: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> VDFProof: ... + def __deepcopy__(self, memo: object) -> VDFProof: ... def __copy__(self) -> VDFProof: ... @staticmethod - def from_bytes(bytes) -> VDFProof: ... + def from_bytes(blob: bytes) -> VDFProof: ... @staticmethod - def from_bytes_unchecked(bytes) -> VDFProof: ... + def from_bytes_unchecked(blob: bytes) -> VDFProof: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[VDFProof, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[VDFProof, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2655,15 +2583,14 @@ class RequestPuzzleSolution: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestPuzzleSolution: ... + def __deepcopy__(self, memo: object) -> RequestPuzzleSolution: ... def __copy__(self) -> RequestPuzzleSolution: ... @staticmethod - def from_bytes(bytes) -> RequestPuzzleSolution: ... + def from_bytes(blob: bytes) -> RequestPuzzleSolution: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestPuzzleSolution: ... + def from_bytes_unchecked(blob: bytes) -> RequestPuzzleSolution: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPuzzleSolution, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestPuzzleSolution, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2689,15 +2616,14 @@ class PuzzleSolutionResponse: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> PuzzleSolutionResponse: ... + def __deepcopy__(self, memo: object) -> PuzzleSolutionResponse: ... def __copy__(self) -> PuzzleSolutionResponse: ... @staticmethod - def from_bytes(bytes) -> PuzzleSolutionResponse: ... + def from_bytes(blob: bytes) -> PuzzleSolutionResponse: ... @staticmethod - def from_bytes_unchecked(bytes) -> PuzzleSolutionResponse: ... + def from_bytes_unchecked(blob: bytes) -> PuzzleSolutionResponse: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[PuzzleSolutionResponse, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[PuzzleSolutionResponse, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2719,15 +2645,14 @@ class RespondPuzzleSolution: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondPuzzleSolution: ... + def __deepcopy__(self, memo: object) -> RespondPuzzleSolution: ... def __copy__(self) -> RespondPuzzleSolution: ... @staticmethod - def from_bytes(bytes) -> RespondPuzzleSolution: ... + def from_bytes(blob: bytes) -> RespondPuzzleSolution: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondPuzzleSolution: ... + def from_bytes_unchecked(blob: bytes) -> RespondPuzzleSolution: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPuzzleSolution, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondPuzzleSolution, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2748,15 +2673,14 @@ class RejectPuzzleSolution: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectPuzzleSolution: ... + def __deepcopy__(self, memo: object) -> RejectPuzzleSolution: ... def __copy__(self) -> RejectPuzzleSolution: ... @staticmethod - def from_bytes(bytes) -> RejectPuzzleSolution: ... + def from_bytes(blob: bytes) -> RejectPuzzleSolution: ... @staticmethod - def from_bytes_unchecked(bytes) -> RejectPuzzleSolution: ... + def from_bytes_unchecked(blob: bytes) -> RejectPuzzleSolution: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectPuzzleSolution, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RejectPuzzleSolution, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2776,15 +2700,14 @@ class SendTransaction: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SendTransaction: ... + def __deepcopy__(self, memo: object) -> SendTransaction: ... def __copy__(self) -> SendTransaction: ... @staticmethod - def from_bytes(bytes) -> SendTransaction: ... + def from_bytes(blob: bytes) -> SendTransaction: ... @staticmethod - def from_bytes_unchecked(bytes) -> SendTransaction: ... + def from_bytes_unchecked(blob: bytes) -> SendTransaction: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SendTransaction, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[SendTransaction, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2807,15 +2730,14 @@ class TransactionAck: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> TransactionAck: ... + def __deepcopy__(self, memo: object) -> TransactionAck: ... def __copy__(self) -> TransactionAck: ... @staticmethod - def from_bytes(bytes) -> TransactionAck: ... + def from_bytes(blob: bytes) -> TransactionAck: ... @staticmethod - def from_bytes_unchecked(bytes) -> TransactionAck: ... + def from_bytes_unchecked(blob: bytes) -> TransactionAck: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[TransactionAck, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[TransactionAck, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2842,15 +2764,14 @@ class NewPeakWallet: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> NewPeakWallet: ... + def __deepcopy__(self, memo: object) -> NewPeakWallet: ... def __copy__(self) -> NewPeakWallet: ... @staticmethod - def from_bytes(bytes) -> NewPeakWallet: ... + def from_bytes(blob: bytes) -> NewPeakWallet: ... @staticmethod - def from_bytes_unchecked(bytes) -> NewPeakWallet: ... + def from_bytes_unchecked(blob: bytes) -> NewPeakWallet: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewPeakWallet, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[NewPeakWallet, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2872,15 +2793,14 @@ class RequestBlockHeader: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestBlockHeader: ... + def __deepcopy__(self, memo: object) -> RequestBlockHeader: ... def __copy__(self) -> RequestBlockHeader: ... @staticmethod - def from_bytes(bytes) -> RequestBlockHeader: ... + def from_bytes(blob: bytes) -> RequestBlockHeader: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlockHeader: ... + def from_bytes_unchecked(blob: bytes) -> RequestBlockHeader: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlockHeader, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestBlockHeader, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2899,15 +2819,14 @@ class RespondBlockHeader: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondBlockHeader: ... + def __deepcopy__(self, memo: object) -> RespondBlockHeader: ... def __copy__(self) -> RespondBlockHeader: ... @staticmethod - def from_bytes(bytes) -> RespondBlockHeader: ... + def from_bytes(blob: bytes) -> RespondBlockHeader: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlockHeader: ... + def from_bytes_unchecked(blob: bytes) -> RespondBlockHeader: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlockHeader, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondBlockHeader, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2926,15 +2845,14 @@ class RejectHeaderRequest: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectHeaderRequest: ... + def __deepcopy__(self, memo: object) -> RejectHeaderRequest: ... def __copy__(self) -> RejectHeaderRequest: ... @staticmethod - def from_bytes(bytes) -> RejectHeaderRequest: ... + def from_bytes(blob: bytes) -> RejectHeaderRequest: ... @staticmethod - def from_bytes_unchecked(bytes) -> RejectHeaderRequest: ... + def from_bytes_unchecked(blob: bytes) -> RejectHeaderRequest: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectHeaderRequest, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RejectHeaderRequest, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2957,15 +2875,14 @@ class RequestRemovals: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestRemovals: ... + def __deepcopy__(self, memo: object) -> RequestRemovals: ... def __copy__(self) -> RequestRemovals: ... @staticmethod - def from_bytes(bytes) -> RequestRemovals: ... + def from_bytes(blob: bytes) -> RequestRemovals: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestRemovals: ... + def from_bytes_unchecked(blob: bytes) -> RequestRemovals: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemovals, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestRemovals, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -2992,15 +2909,14 @@ class RespondRemovals: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondRemovals: ... + def __deepcopy__(self, memo: object) -> RespondRemovals: ... def __copy__(self) -> RespondRemovals: ... @staticmethod - def from_bytes(bytes) -> RespondRemovals: ... + def from_bytes(blob: bytes) -> RespondRemovals: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondRemovals: ... + def from_bytes_unchecked(blob: bytes) -> RespondRemovals: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemovals, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondRemovals, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3024,15 +2940,14 @@ class RejectRemovalsRequest: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectRemovalsRequest: ... + def __deepcopy__(self, memo: object) -> RejectRemovalsRequest: ... def __copy__(self) -> RejectRemovalsRequest: ... @staticmethod - def from_bytes(bytes) -> RejectRemovalsRequest: ... + def from_bytes(blob: bytes) -> RejectRemovalsRequest: ... @staticmethod - def from_bytes_unchecked(bytes) -> RejectRemovalsRequest: ... + def from_bytes_unchecked(blob: bytes) -> RejectRemovalsRequest: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectRemovalsRequest, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RejectRemovalsRequest, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3056,15 +2971,14 @@ class RequestAdditions: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestAdditions: ... + def __deepcopy__(self, memo: object) -> RequestAdditions: ... def __copy__(self) -> RequestAdditions: ... @staticmethod - def from_bytes(bytes) -> RequestAdditions: ... + def from_bytes(blob: bytes) -> RequestAdditions: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestAdditions: ... + def from_bytes_unchecked(blob: bytes) -> RequestAdditions: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestAdditions, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestAdditions, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3091,15 +3005,14 @@ class RespondAdditions: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondAdditions: ... + def __deepcopy__(self, memo: object) -> RespondAdditions: ... def __copy__(self) -> RespondAdditions: ... @staticmethod - def from_bytes(bytes) -> RespondAdditions: ... + def from_bytes(blob: bytes) -> RespondAdditions: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondAdditions: ... + def from_bytes_unchecked(blob: bytes) -> RespondAdditions: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondAdditions, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondAdditions, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3123,15 +3036,14 @@ class RejectAdditionsRequest: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectAdditionsRequest: ... + def __deepcopy__(self, memo: object) -> RejectAdditionsRequest: ... def __copy__(self) -> RejectAdditionsRequest: ... @staticmethod - def from_bytes(bytes) -> RejectAdditionsRequest: ... + def from_bytes(blob: bytes) -> RejectAdditionsRequest: ... @staticmethod - def from_bytes_unchecked(bytes) -> RejectAdditionsRequest: ... + def from_bytes_unchecked(blob: bytes) -> RejectAdditionsRequest: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectAdditionsRequest, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RejectAdditionsRequest, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3155,15 +3067,14 @@ class RespondBlockHeaders: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondBlockHeaders: ... + def __deepcopy__(self, memo: object) -> RespondBlockHeaders: ... def __copy__(self) -> RespondBlockHeaders: ... @staticmethod - def from_bytes(bytes) -> RespondBlockHeaders: ... + def from_bytes(blob: bytes) -> RespondBlockHeaders: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlockHeaders: ... + def from_bytes_unchecked(blob: bytes) -> RespondBlockHeaders: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlockHeaders, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondBlockHeaders, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3186,15 +3097,14 @@ class RejectBlockHeaders: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectBlockHeaders: ... + def __deepcopy__(self, memo: object) -> RejectBlockHeaders: ... def __copy__(self) -> RejectBlockHeaders: ... @staticmethod - def from_bytes(bytes) -> RejectBlockHeaders: ... + def from_bytes(blob: bytes) -> RejectBlockHeaders: ... @staticmethod - def from_bytes_unchecked(bytes) -> RejectBlockHeaders: ... + def from_bytes_unchecked(blob: bytes) -> RejectBlockHeaders: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlockHeaders, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RejectBlockHeaders, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3218,15 +3128,14 @@ class RequestBlockHeaders: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestBlockHeaders: ... + def __deepcopy__(self, memo: object) -> RequestBlockHeaders: ... def __copy__(self) -> RequestBlockHeaders: ... @staticmethod - def from_bytes(bytes) -> RequestBlockHeaders: ... + def from_bytes(blob: bytes) -> RequestBlockHeaders: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlockHeaders: ... + def from_bytes_unchecked(blob: bytes) -> RequestBlockHeaders: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlockHeaders, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestBlockHeaders, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3249,15 +3158,14 @@ class RequestHeaderBlocks: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestHeaderBlocks: ... + def __deepcopy__(self, memo: object) -> RequestHeaderBlocks: ... def __copy__(self) -> RequestHeaderBlocks: ... @staticmethod - def from_bytes(bytes) -> RequestHeaderBlocks: ... + def from_bytes(blob: bytes) -> RequestHeaderBlocks: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestHeaderBlocks: ... + def from_bytes_unchecked(blob: bytes) -> RequestHeaderBlocks: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestHeaderBlocks, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestHeaderBlocks, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3279,15 +3187,14 @@ class RejectHeaderBlocks: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectHeaderBlocks: ... + def __deepcopy__(self, memo: object) -> RejectHeaderBlocks: ... def __copy__(self) -> RejectHeaderBlocks: ... @staticmethod - def from_bytes(bytes) -> RejectHeaderBlocks: ... + def from_bytes(blob: bytes) -> RejectHeaderBlocks: ... @staticmethod - def from_bytes_unchecked(bytes) -> RejectHeaderBlocks: ... + def from_bytes_unchecked(blob: bytes) -> RejectHeaderBlocks: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectHeaderBlocks, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RejectHeaderBlocks, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3311,15 +3218,14 @@ class RespondHeaderBlocks: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondHeaderBlocks: ... + def __deepcopy__(self, memo: object) -> RespondHeaderBlocks: ... def __copy__(self) -> RespondHeaderBlocks: ... @staticmethod - def from_bytes(bytes) -> RespondHeaderBlocks: ... + def from_bytes(blob: bytes) -> RespondHeaderBlocks: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondHeaderBlocks: ... + def from_bytes_unchecked(blob: bytes) -> RespondHeaderBlocks: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondHeaderBlocks, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondHeaderBlocks, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3342,15 +3248,14 @@ class RegisterForPhUpdates: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RegisterForPhUpdates: ... + def __deepcopy__(self, memo: object) -> RegisterForPhUpdates: ... def __copy__(self) -> RegisterForPhUpdates: ... @staticmethod - def from_bytes(bytes) -> RegisterForPhUpdates: ... + def from_bytes(blob: bytes) -> RegisterForPhUpdates: ... @staticmethod - def from_bytes_unchecked(bytes) -> RegisterForPhUpdates: ... + def from_bytes_unchecked(blob: bytes) -> RegisterForPhUpdates: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RegisterForPhUpdates, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RegisterForPhUpdates, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3374,15 +3279,14 @@ class RespondToPhUpdates: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondToPhUpdates: ... + def __deepcopy__(self, memo: object) -> RespondToPhUpdates: ... def __copy__(self) -> RespondToPhUpdates: ... @staticmethod - def from_bytes(bytes) -> RespondToPhUpdates: ... + def from_bytes(blob: bytes) -> RespondToPhUpdates: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondToPhUpdates: ... + def from_bytes_unchecked(blob: bytes) -> RespondToPhUpdates: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondToPhUpdates, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondToPhUpdates, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3405,15 +3309,14 @@ class RegisterForCoinUpdates: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RegisterForCoinUpdates: ... + def __deepcopy__(self, memo: object) -> RegisterForCoinUpdates: ... def __copy__(self) -> RegisterForCoinUpdates: ... @staticmethod - def from_bytes(bytes) -> RegisterForCoinUpdates: ... + def from_bytes(blob: bytes) -> RegisterForCoinUpdates: ... @staticmethod - def from_bytes_unchecked(bytes) -> RegisterForCoinUpdates: ... + def from_bytes_unchecked(blob: bytes) -> RegisterForCoinUpdates: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RegisterForCoinUpdates, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RegisterForCoinUpdates, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3437,15 +3340,14 @@ class RespondToCoinUpdates: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondToCoinUpdates: ... + def __deepcopy__(self, memo: object) -> RespondToCoinUpdates: ... def __copy__(self) -> RespondToCoinUpdates: ... @staticmethod - def from_bytes(bytes) -> RespondToCoinUpdates: ... + def from_bytes(blob: bytes) -> RespondToCoinUpdates: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondToCoinUpdates: ... + def from_bytes_unchecked(blob: bytes) -> RespondToCoinUpdates: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondToCoinUpdates, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondToCoinUpdates, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3472,15 +3374,14 @@ class CoinStateUpdate: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> CoinStateUpdate: ... + def __deepcopy__(self, memo: object) -> CoinStateUpdate: ... def __copy__(self) -> CoinStateUpdate: ... @staticmethod - def from_bytes(bytes) -> CoinStateUpdate: ... + def from_bytes(blob: bytes) -> CoinStateUpdate: ... @staticmethod - def from_bytes_unchecked(bytes) -> CoinStateUpdate: ... + def from_bytes_unchecked(blob: bytes) -> CoinStateUpdate: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinStateUpdate, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[CoinStateUpdate, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3502,15 +3403,14 @@ class RequestChildren: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestChildren: ... + def __deepcopy__(self, memo: object) -> RequestChildren: ... def __copy__(self) -> RequestChildren: ... @staticmethod - def from_bytes(bytes) -> RequestChildren: ... + def from_bytes(blob: bytes) -> RequestChildren: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestChildren: ... + def from_bytes_unchecked(blob: bytes) -> RequestChildren: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestChildren, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestChildren, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3529,15 +3429,14 @@ class RespondChildren: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondChildren: ... + def __deepcopy__(self, memo: object) -> RespondChildren: ... def __copy__(self) -> RespondChildren: ... @staticmethod - def from_bytes(bytes) -> RespondChildren: ... + def from_bytes(blob: bytes) -> RespondChildren: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondChildren: ... + def from_bytes_unchecked(blob: bytes) -> RespondChildren: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondChildren, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondChildren, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3558,15 +3457,14 @@ class RequestSesInfo: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestSesInfo: ... + def __deepcopy__(self, memo: object) -> RequestSesInfo: ... def __copy__(self) -> RequestSesInfo: ... @staticmethod - def from_bytes(bytes) -> RequestSesInfo: ... + def from_bytes(blob: bytes) -> RequestSesInfo: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestSesInfo: ... + def from_bytes_unchecked(blob: bytes) -> RequestSesInfo: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestSesInfo, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestSesInfo, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3588,15 +3486,14 @@ class RespondSesInfo: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondSesInfo: ... + def __deepcopy__(self, memo: object) -> RespondSesInfo: ... def __copy__(self) -> RespondSesInfo: ... @staticmethod - def from_bytes(bytes) -> RespondSesInfo: ... + def from_bytes(blob: bytes) -> RespondSesInfo: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondSesInfo: ... + def from_bytes_unchecked(blob: bytes) -> RespondSesInfo: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondSesInfo, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondSesInfo, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3616,15 +3513,14 @@ class RequestFeeEstimates: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestFeeEstimates: ... + def __deepcopy__(self, memo: object) -> RequestFeeEstimates: ... def __copy__(self) -> RequestFeeEstimates: ... @staticmethod - def from_bytes(bytes) -> RequestFeeEstimates: ... + def from_bytes(blob: bytes) -> RequestFeeEstimates: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestFeeEstimates: ... + def from_bytes_unchecked(blob: bytes) -> RequestFeeEstimates: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestFeeEstimates, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestFeeEstimates, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3643,15 +3539,14 @@ class RespondFeeEstimates: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondFeeEstimates: ... + def __deepcopy__(self, memo: object) -> RespondFeeEstimates: ... def __copy__(self) -> RespondFeeEstimates: ... @staticmethod - def from_bytes(bytes) -> RespondFeeEstimates: ... + def from_bytes(blob: bytes) -> RespondFeeEstimates: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondFeeEstimates: ... + def from_bytes_unchecked(blob: bytes) -> RespondFeeEstimates: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondFeeEstimates, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondFeeEstimates, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3670,15 +3565,14 @@ class RequestRemovePuzzleSubscriptions: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestRemovePuzzleSubscriptions: ... + def __deepcopy__(self, memo: object) -> RequestRemovePuzzleSubscriptions: ... def __copy__(self) -> RequestRemovePuzzleSubscriptions: ... @staticmethod - def from_bytes(bytes) -> RequestRemovePuzzleSubscriptions: ... + def from_bytes(blob: bytes) -> RequestRemovePuzzleSubscriptions: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestRemovePuzzleSubscriptions: ... + def from_bytes_unchecked(blob: bytes) -> RequestRemovePuzzleSubscriptions: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemovePuzzleSubscriptions, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestRemovePuzzleSubscriptions, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3697,15 +3591,14 @@ class RespondRemovePuzzleSubscriptions: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondRemovePuzzleSubscriptions: ... + def __deepcopy__(self, memo: object) -> RespondRemovePuzzleSubscriptions: ... def __copy__(self) -> RespondRemovePuzzleSubscriptions: ... @staticmethod - def from_bytes(bytes) -> RespondRemovePuzzleSubscriptions: ... + def from_bytes(blob: bytes) -> RespondRemovePuzzleSubscriptions: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondRemovePuzzleSubscriptions: ... + def from_bytes_unchecked(blob: bytes) -> RespondRemovePuzzleSubscriptions: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemovePuzzleSubscriptions, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondRemovePuzzleSubscriptions, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3724,15 +3617,14 @@ class RequestRemoveCoinSubscriptions: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestRemoveCoinSubscriptions: ... + def __deepcopy__(self, memo: object) -> RequestRemoveCoinSubscriptions: ... def __copy__(self) -> RequestRemoveCoinSubscriptions: ... @staticmethod - def from_bytes(bytes) -> RequestRemoveCoinSubscriptions: ... + def from_bytes(blob: bytes) -> RequestRemoveCoinSubscriptions: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestRemoveCoinSubscriptions: ... + def from_bytes_unchecked(blob: bytes) -> RequestRemoveCoinSubscriptions: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemoveCoinSubscriptions, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestRemoveCoinSubscriptions, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3751,15 +3643,14 @@ class RespondRemoveCoinSubscriptions: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondRemoveCoinSubscriptions: ... + def __deepcopy__(self, memo: object) -> RespondRemoveCoinSubscriptions: ... def __copy__(self) -> RespondRemoveCoinSubscriptions: ... @staticmethod - def from_bytes(bytes) -> RespondRemoveCoinSubscriptions: ... + def from_bytes(blob: bytes) -> RespondRemoveCoinSubscriptions: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondRemoveCoinSubscriptions: ... + def from_bytes_unchecked(blob: bytes) -> RespondRemoveCoinSubscriptions: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemoveCoinSubscriptions, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondRemoveCoinSubscriptions, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3784,15 +3675,14 @@ class CoinStateFilters: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> CoinStateFilters: ... + def __deepcopy__(self, memo: object) -> CoinStateFilters: ... def __copy__(self) -> CoinStateFilters: ... @staticmethod - def from_bytes(bytes) -> CoinStateFilters: ... + def from_bytes(blob: bytes) -> CoinStateFilters: ... @staticmethod - def from_bytes_unchecked(bytes) -> CoinStateFilters: ... + def from_bytes_unchecked(blob: bytes) -> CoinStateFilters: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinStateFilters, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[CoinStateFilters, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3822,15 +3712,14 @@ class RequestPuzzleState: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestPuzzleState: ... + def __deepcopy__(self, memo: object) -> RequestPuzzleState: ... def __copy__(self) -> RequestPuzzleState: ... @staticmethod - def from_bytes(bytes) -> RequestPuzzleState: ... + def from_bytes(blob: bytes) -> RequestPuzzleState: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestPuzzleState: ... + def from_bytes_unchecked(blob: bytes) -> RequestPuzzleState: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPuzzleState, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestPuzzleState, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3861,15 +3750,14 @@ class RespondPuzzleState: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondPuzzleState: ... + def __deepcopy__(self, memo: object) -> RespondPuzzleState: ... def __copy__(self) -> RespondPuzzleState: ... @staticmethod - def from_bytes(bytes) -> RespondPuzzleState: ... + def from_bytes(blob: bytes) -> RespondPuzzleState: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondPuzzleState: ... + def from_bytes_unchecked(blob: bytes) -> RespondPuzzleState: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPuzzleState, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondPuzzleState, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3892,15 +3780,14 @@ class RejectPuzzleState: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectPuzzleState: ... + def __deepcopy__(self, memo: object) -> RejectPuzzleState: ... def __copy__(self) -> RejectPuzzleState: ... @staticmethod - def from_bytes(bytes) -> RejectPuzzleState: ... + def from_bytes(blob: bytes) -> RejectPuzzleState: ... @staticmethod - def from_bytes_unchecked(bytes) -> RejectPuzzleState: ... + def from_bytes_unchecked(blob: bytes) -> RejectPuzzleState: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectPuzzleState, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RejectPuzzleState, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3925,15 +3812,14 @@ class RequestCoinState: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RequestCoinState: ... + def __deepcopy__(self, memo: object) -> RequestCoinState: ... def __copy__(self) -> RequestCoinState: ... @staticmethod - def from_bytes(bytes) -> RequestCoinState: ... + def from_bytes(blob: bytes) -> RequestCoinState: ... @staticmethod - def from_bytes_unchecked(bytes) -> RequestCoinState: ... + def from_bytes_unchecked(blob: bytes) -> RequestCoinState: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestCoinState, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RequestCoinState, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3957,15 +3843,14 @@ class RespondCoinState: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RespondCoinState: ... + def __deepcopy__(self, memo: object) -> RespondCoinState: ... def __copy__(self) -> RespondCoinState: ... @staticmethod - def from_bytes(bytes) -> RespondCoinState: ... + def from_bytes(blob: bytes) -> RespondCoinState: ... @staticmethod - def from_bytes_unchecked(bytes) -> RespondCoinState: ... + def from_bytes_unchecked(blob: bytes) -> RespondCoinState: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondCoinState, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RespondCoinState, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -3985,15 +3870,14 @@ class RejectCoinState: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RejectCoinState: ... + def __deepcopy__(self, memo: object) -> RejectCoinState: ... def __copy__(self) -> RejectCoinState: ... @staticmethod - def from_bytes(bytes) -> RejectCoinState: ... + def from_bytes(blob: bytes) -> RejectCoinState: ... @staticmethod - def from_bytes_unchecked(bytes) -> RejectCoinState: ... + def from_bytes_unchecked(blob: bytes) -> RejectCoinState: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectCoinState, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RejectCoinState, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -4018,15 +3902,14 @@ class SubEpochData: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubEpochData: ... + def __deepcopy__(self, memo: object) -> SubEpochData: ... def __copy__(self) -> SubEpochData: ... @staticmethod - def from_bytes(bytes) -> SubEpochData: ... + def from_bytes(blob: bytes) -> SubEpochData: ... @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochData: ... + def from_bytes_unchecked(blob: bytes) -> SubEpochData: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochData, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[SubEpochData, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -4074,15 +3957,14 @@ class SubSlotData: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubSlotData: ... + def __deepcopy__(self, memo: object) -> SubSlotData: ... def __copy__(self) -> SubSlotData: ... @staticmethod - def from_bytes(bytes) -> SubSlotData: ... + def from_bytes(blob: bytes) -> SubSlotData: ... @staticmethod - def from_bytes_unchecked(bytes) -> SubSlotData: ... + def from_bytes_unchecked(blob: bytes) -> SubSlotData: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubSlotData, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[SubSlotData, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -4117,15 +3999,14 @@ class SubEpochChallengeSegment: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubEpochChallengeSegment: ... + def __deepcopy__(self, memo: object) -> SubEpochChallengeSegment: ... def __copy__(self) -> SubEpochChallengeSegment: ... @staticmethod - def from_bytes(bytes) -> SubEpochChallengeSegment: ... + def from_bytes(blob: bytes) -> SubEpochChallengeSegment: ... @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochChallengeSegment: ... + def from_bytes_unchecked(blob: bytes) -> SubEpochChallengeSegment: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochChallengeSegment, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[SubEpochChallengeSegment, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -4146,15 +4027,14 @@ class SubEpochSegments: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> SubEpochSegments: ... + def __deepcopy__(self, memo: object) -> SubEpochSegments: ... def __copy__(self) -> SubEpochSegments: ... @staticmethod - def from_bytes(bytes) -> SubEpochSegments: ... + def from_bytes(blob: bytes) -> SubEpochSegments: ... @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochSegments: ... + def from_bytes_unchecked(blob: bytes) -> SubEpochSegments: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochSegments, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[SubEpochSegments, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -4173,15 +4053,14 @@ class RecentChainData: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> RecentChainData: ... + def __deepcopy__(self, memo: object) -> RecentChainData: ... def __copy__(self) -> RecentChainData: ... @staticmethod - def from_bytes(bytes) -> RecentChainData: ... + def from_bytes(blob: bytes) -> RecentChainData: ... @staticmethod - def from_bytes_unchecked(bytes) -> RecentChainData: ... + def from_bytes_unchecked(blob: bytes) -> RecentChainData: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RecentChainData, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[RecentChainData, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -4202,15 +4081,14 @@ class ProofBlockHeader: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ProofBlockHeader: ... + def __deepcopy__(self, memo: object) -> ProofBlockHeader: ... def __copy__(self) -> ProofBlockHeader: ... @staticmethod - def from_bytes(bytes) -> ProofBlockHeader: ... + def from_bytes(blob: bytes) -> ProofBlockHeader: ... @staticmethod - def from_bytes_unchecked(bytes) -> ProofBlockHeader: ... + def from_bytes_unchecked(blob: bytes) -> ProofBlockHeader: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ProofBlockHeader, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[ProofBlockHeader, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -4234,15 +4112,14 @@ class WeightProof: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> WeightProof: ... + def __deepcopy__(self, memo: object) -> WeightProof: ... def __copy__(self) -> WeightProof: ... @staticmethod - def from_bytes(bytes) -> WeightProof: ... + def from_bytes(blob: bytes) -> WeightProof: ... @staticmethod - def from_bytes_unchecked(bytes) -> WeightProof: ... + def from_bytes_unchecked(blob: bytes) -> WeightProof: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[WeightProof, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[WeightProof, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... @@ -4359,15 +4236,14 @@ class ConsensusConstants: ) -> None: ... def __hash__(self) -> int: ... def __repr__(self) -> str: ... - def __richcmp__(self) -> Any: ... - def __deepcopy__(self) -> ConsensusConstants: ... + def __deepcopy__(self, memo: object) -> ConsensusConstants: ... def __copy__(self) -> ConsensusConstants: ... @staticmethod - def from_bytes(bytes) -> ConsensusConstants: ... + def from_bytes(blob: bytes) -> ConsensusConstants: ... @staticmethod - def from_bytes_unchecked(bytes) -> ConsensusConstants: ... + def from_bytes_unchecked(blob: bytes) -> ConsensusConstants: ... @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ConsensusConstants, int]: ... + def parse_rust(blob: ReadableBuffer, trusted: bool = False) -> Tuple[ConsensusConstants, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... diff --git a/wheel/src/api.rs b/wheel/src/api.rs index ebf03094b..bbd7d429f 100644 --- a/wheel/src/api.rs +++ b/wheel/src/api.rs @@ -19,30 +19,32 @@ use chia_consensus::spendbundle_validation::{ }; use chia_protocol::{ BlockRecord, Bytes32, ChallengeBlockInfo, ChallengeChainSubSlot, ClassgroupElement, Coin, - CoinSpend, CoinState, CoinStateFilters, CoinStateUpdate, EndOfSubSlotBundle, Foliage, - FoliageBlockData, FoliageTransactionBlock, FullBlock, HeaderBlock, - InfusedChallengeChainSubSlot, NewCompactVDF, NewPeak, NewPeakWallet, - NewSignagePointOrEndOfSubSlot, NewTransaction, NewUnfinishedBlock, NewUnfinishedBlock2, - PoolTarget, Program, ProofBlockHeader, ProofOfSpace, PuzzleSolutionResponse, RecentChainData, - RegisterForCoinUpdates, RegisterForPhUpdates, RejectAdditionsRequest, RejectBlock, - RejectBlockHeaders, RejectBlocks, RejectCoinState, RejectHeaderBlocks, RejectHeaderRequest, - RejectPuzzleSolution, RejectPuzzleState, RejectRemovalsRequest, RequestAdditions, RequestBlock, - RequestBlockHeader, RequestBlockHeaders, RequestBlocks, RequestChildren, RequestCoinState, - RequestCompactVDF, RequestFeeEstimates, RequestHeaderBlocks, RequestMempoolTransactions, - RequestPeers, RequestProofOfWeight, RequestPuzzleSolution, RequestPuzzleState, RequestRemovals, - RequestRemoveCoinSubscriptions, RequestRemovePuzzleSubscriptions, RequestSesInfo, - RequestSignagePointOrEndOfSubSlot, RequestTransaction, RequestUnfinishedBlock, - RequestUnfinishedBlock2, RespondAdditions, RespondBlock, RespondBlockHeader, - RespondBlockHeaders, RespondBlocks, RespondChildren, RespondCoinState, RespondCompactVDF, - RespondEndOfSubSlot, RespondFeeEstimates, RespondHeaderBlocks, RespondPeers, - RespondProofOfWeight, RespondPuzzleSolution, RespondPuzzleState, RespondRemovals, - RespondRemoveCoinSubscriptions, RespondRemovePuzzleSubscriptions, RespondSesInfo, - RespondSignagePoint, RespondToCoinUpdates, RespondToPhUpdates, RespondTransaction, - RespondUnfinishedBlock, RewardChainBlock, RewardChainBlockUnfinished, RewardChainSubSlot, - SendTransaction, SpendBundle, SubEpochChallengeSegment, SubEpochData, SubEpochSegments, - SubEpochSummary, SubSlotData, SubSlotProofs, TimestampedPeerInfo, TransactionAck, - TransactionsInfo, UnfinishedBlock, UnfinishedHeaderBlock, VDFInfo, VDFProof, WeightProof, + CoinSpend, CoinState, CoinStateFilters, CoinStateUpdate, EndOfSubSlotBundle, FeeEstimate, + FeeEstimateGroup, FeeRate, Foliage, FoliageBlockData, FoliageTransactionBlock, FullBlock, + Handshake, HeaderBlock, InfusedChallengeChainSubSlot, LazyNode, Message, NewCompactVDF, + NewPeak, NewPeakWallet, NewSignagePointOrEndOfSubSlot, NewTransaction, NewUnfinishedBlock, + NewUnfinishedBlock2, PoolTarget, Program, ProofBlockHeader, ProofOfSpace, + PuzzleSolutionResponse, RecentChainData, RegisterForCoinUpdates, RegisterForPhUpdates, + RejectAdditionsRequest, RejectBlock, RejectBlockHeaders, RejectBlocks, RejectCoinState, + RejectHeaderBlocks, RejectHeaderRequest, RejectPuzzleSolution, RejectPuzzleState, + RejectRemovalsRequest, RequestAdditions, RequestBlock, RequestBlockHeader, RequestBlockHeaders, + RequestBlocks, RequestChildren, RequestCoinState, RequestCompactVDF, RequestFeeEstimates, + RequestHeaderBlocks, RequestMempoolTransactions, RequestPeers, RequestProofOfWeight, + RequestPuzzleSolution, RequestPuzzleState, RequestRemovals, RequestRemoveCoinSubscriptions, + RequestRemovePuzzleSubscriptions, RequestSesInfo, RequestSignagePointOrEndOfSubSlot, + RequestTransaction, RequestUnfinishedBlock, RequestUnfinishedBlock2, RespondAdditions, + RespondBlock, RespondBlockHeader, RespondBlockHeaders, RespondBlocks, RespondChildren, + RespondCoinState, RespondCompactVDF, RespondEndOfSubSlot, RespondFeeEstimates, + RespondHeaderBlocks, RespondPeers, RespondProofOfWeight, RespondPuzzleSolution, + RespondPuzzleState, RespondRemovals, RespondRemoveCoinSubscriptions, + RespondRemovePuzzleSubscriptions, RespondSesInfo, RespondSignagePoint, RespondToCoinUpdates, + RespondToPhUpdates, RespondTransaction, RespondUnfinishedBlock, RewardChainBlock, + RewardChainBlockUnfinished, RewardChainSubSlot, SendTransaction, SpendBundle, + SubEpochChallengeSegment, SubEpochData, SubEpochSegments, SubEpochSummary, SubSlotData, + SubSlotProofs, TimestampedPeerInfo, TransactionAck, TransactionsInfo, UnfinishedBlock, + UnfinishedHeaderBlock, VDFInfo, VDFProof, WeightProof, }; + use clvm_utils::tree_hash_from_bytes; use clvmr::{ENABLE_BLS_OPS_OUTSIDE_GUARD, ENABLE_FIXED_DIV, LIMIT_HEAP, NO_UNKNOWN_OPS}; use pyo3::buffer::PyBuffer; @@ -617,6 +619,14 @@ pub fn chia_rs(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_class::()?; + // TODO: i think this is part of the above group? + m.add_class::()?; + m.add_class::()?; + m.add_class::()?; + m.add_class::()?; + m.add_class::()?; + m.add_class::()?; + // facilities from clvm_rs m.add_function(wrap_pyfunction!(run_chia_program, m)?)?; From 5d9f1f5e901cd46689b9cbb526eebdcf66a4bf0b Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 27 Aug 2024 16:26:37 -0400 Subject: [PATCH 09/59] and --- crates/chia_py_streamable_macro/src/lib.rs | 38 ++++++++++++---------- stubtest.allowlist | 10 ++++++ wheel/generate_type_stubs.py | 1 + wheel/python/chia_rs/__init__.pyi | 1 + 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/crates/chia_py_streamable_macro/src/lib.rs b/crates/chia_py_streamable_macro/src/lib.rs index 9ab532b77..960ccfe48 100644 --- a/crates/chia_py_streamable_macro/src/lib.rs +++ b/crates/chia_py_streamable_macro/src/lib.rs @@ -127,28 +127,30 @@ pub fn py_streamable_macro(input: proc_macro::TokenStream) -> proc_macro::TokenS } }); - py_protocol.extend(quote! { - #[pyo3::pymethods] - impl #ident { - #[pyo3(signature = (**kwargs))] - fn replace(&self, kwargs: Option<&pyo3::types::PyDict>) -> pyo3::PyResult { - let mut ret = self.clone(); - if let Some(kwargs) = kwargs { - let iter: pyo3::types::iter::PyDictIterator = kwargs.iter(); - for (field, value) in iter { - let field = field.extract::()?; - match field.as_str() { - #(stringify!(#fnames_maybe_upper) => { - ret.#fnames = value.extract()?; - }),* - _ => { return Err(pyo3::exceptions::PyKeyError::new_err(format!("unknown field {field}"))); } + if named.len() > 0 { + py_protocol.extend(quote! { + #[pyo3::pymethods] + impl #ident { + #[pyo3(signature = (**kwargs))] + fn replace(&self, kwargs: Option<&pyo3::types::PyDict>) -> pyo3::PyResult { + let mut ret = self.clone(); + if let Some(kwargs) = kwargs { + let iter: pyo3::types::iter::PyDictIterator = kwargs.iter(); + for (field, value) in iter { + let field = field.extract::()?; + match field.as_str() { + #(stringify!(#fnames_maybe_upper) => { + ret.#fnames = value.extract()?; + }),* + _ => { return Err(pyo3::exceptions::PyKeyError::new_err(format!("unknown field {field}"))); } + } } } + Ok(ret) } - Ok(ret) } - } - }); + }); + } } syn::Fields::Unnamed(FieldsUnnamed { .. }) => {} syn::Fields::Unit => { diff --git a/stubtest.allowlist b/stubtest.allowlist index 335b2dcf9..23c7fa7b1 100644 --- a/stubtest.allowlist +++ b/stubtest.allowlist @@ -2,6 +2,16 @@ # runtime accessible. is there a better option for handling this? chia_rs.ReadableBuffer +# TODO: perhaps these should be private as _* +chia_rs.BlockRecord.ip_iters_impl +chia_rs.BlockRecord.ip_sub_slot_total_iters_impl +chia_rs.BlockRecord.sp_iters_impl +chia_rs.BlockRecord.sp_sub_slot_total_iters_impl +chia_rs.BlockRecord.sp_total_iters_impl + +# TODO: perhaps the inner should be private as _chia_rs +chia_rs.chia_rs + # TODO: G1Element->PublicKey expects *args chia_rs.G1Element.__init__ diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index 048db8020..0faabbb13 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -333,6 +333,7 @@ def get_flags_for_height_and_constants( ENABLE_BLS_OPS_OUTSIDE_GUARD: int = ... ENABLE_FIXED_DIV: int = ... ALLOW_BACKREFS: int = ... +ANALYZE_SPENDS: int = ... ELIGIBLE_FOR_DEDUP: int = ... ELIGIBLE_FOR_FF: int = ... diff --git a/wheel/python/chia_rs/__init__.pyi b/wheel/python/chia_rs/__init__.pyi index 4cdac2959..a3acde389 100644 --- a/wheel/python/chia_rs/__init__.pyi +++ b/wheel/python/chia_rs/__init__.pyi @@ -73,6 +73,7 @@ MEMPOOL_MODE: int = ... ENABLE_BLS_OPS_OUTSIDE_GUARD: int = ... ENABLE_FIXED_DIV: int = ... ALLOW_BACKREFS: int = ... +ANALYZE_SPENDS: int = ... ELIGIBLE_FOR_DEDUP: int = ... ELIGIBLE_FOR_FF: int = ... From a110482350d060fc7f583d3f5d35535129877bb8 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 27 Aug 2024 16:32:51 -0400 Subject: [PATCH 10/59] stuff --- .github/workflows/benchmark.yml | 6 +++--- crates/chia-protocol/src/lib.rs | 2 +- stubtest.allowlist | 2 +- wheel/generate_type_stubs.py | 5 ----- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 4378d4d4c..0ba81e8fa 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -64,19 +64,19 @@ jobs: # TODO: don't always this stuff if: always() run: | - stubtest --allowlist stubtest.allowlist.to-review --concise --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' + stubtest --allowlist stubtest.allowlist --concise --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' - name: python mypy stubtest concise # TODO: don't always this stuff if: always() run: | - stubtest --allowlist stubtest.allowlist.to-review --concise chia_rs + stubtest --allowlist stubtest.allowlist --concise chia_rs - name: python mypy stubtest # TODO: don't always this stuff if: always() run: | - stubtest --allowlist stubtest.allowlist.to-review chia_rs + stubtest --allowlist stubtest.allowlist chia_rs - name: python black run: | diff --git a/crates/chia-protocol/src/lib.rs b/crates/chia-protocol/src/lib.rs index be89128d8..544979383 100644 --- a/crates/chia-protocol/src/lib.rs +++ b/crates/chia-protocol/src/lib.rs @@ -6,7 +6,7 @@ mod coin; mod coin_spend; mod coin_state; mod end_of_sub_slot_bundle; -pub mod fee_estimate; +mod fee_estimate; mod foliage; mod full_node_protocol; mod fullblock; diff --git a/stubtest.allowlist b/stubtest.allowlist index 23c7fa7b1..95520ca07 100644 --- a/stubtest.allowlist +++ b/stubtest.allowlist @@ -40,4 +40,4 @@ chia_rs.struct_stream.TypeVar.__covariant__ chia_rs.sized_byte_class.Iterable chia_rs.sized_byte_class.BinaryIO.write -chia_rs.struct_stream.BinaryIO.write \ No newline at end of file +chia_rs.struct_stream.BinaryIO.write diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index 0faabbb13..74f4406d0 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -24,11 +24,6 @@ def transform_type(m: str) -> str: def print_class( file: TextIO, name: str, members: List[str], extra: Optional[List[str]] = None ): - - # f-strings don't allow backslashes, which makes it a bit tricky to - # manipulate strings with newlines - nl = "\n" - def add_indent(x: str): return "\n " + x From 1438d6588a4962f7d622a1d142500ad484cf92c9 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 27 Aug 2024 16:43:25 -0400 Subject: [PATCH 11/59] clippy --- crates/chia_py_streamable_macro/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/chia_py_streamable_macro/src/lib.rs b/crates/chia_py_streamable_macro/src/lib.rs index 960ccfe48..fc0f22352 100644 --- a/crates/chia_py_streamable_macro/src/lib.rs +++ b/crates/chia_py_streamable_macro/src/lib.rs @@ -127,7 +127,7 @@ pub fn py_streamable_macro(input: proc_macro::TokenStream) -> proc_macro::TokenS } }); - if named.len() > 0 { + if !named.is_empty() { py_protocol.extend(quote! { #[pyo3::pymethods] impl #ident { From e4c8b024274f02628a2b275e68da6f141f64df5b Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 27 Aug 2024 16:51:19 -0400 Subject: [PATCH 12/59] per python version --- .github/workflows/benchmark.yml | 9 ++++++--- stubtest.allowlist | 10 ---------- stubtest.allowlist.3-11-plus | 10 ++++++++++ 3 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 stubtest.allowlist.3-11-plus diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 0ba81e8fa..2b4836b8e 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -20,6 +20,9 @@ jobs: os: [macos-latest, ubuntu-latest, windows-latest] python-version: ["3.8", "3.9", "3.10", "3.11"] + env: + stubtest_args: ${{ matrix.python-version == '3.11' && '--allow-list stubtest.allowlist.3-11-plus' || ""}} + steps: - uses: actions/checkout@v4 with: @@ -64,19 +67,19 @@ jobs: # TODO: don't always this stuff if: always() run: | - stubtest --allowlist stubtest.allowlist --concise --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' + stubtest ${{ env.stubtest_args }} --allowlist stubtest.allowlist --concise --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' - name: python mypy stubtest concise # TODO: don't always this stuff if: always() run: | - stubtest --allowlist stubtest.allowlist --concise chia_rs + stubtest ${{ env.stubtest_args }} --allowlist stubtest.allowlist --concise chia_rs - name: python mypy stubtest # TODO: don't always this stuff if: always() run: | - stubtest --allowlist stubtest.allowlist chia_rs + stubtest ${{ env.stubtest_args }} --allowlist stubtest.allowlist chia_rs - name: python black run: | diff --git a/stubtest.allowlist b/stubtest.allowlist index 95520ca07..35e11e103 100644 --- a/stubtest.allowlist +++ b/stubtest.allowlist @@ -28,16 +28,6 @@ chia_rs.PrivateKey.__init__ chia_rs.RequestPeers.__init__ # TODO: ask stubtest/mypy about these as they seem unlikely to be our doing -chia_rs.sized_byte_class.TypeVar.__bound__ -chia_rs.sized_byte_class.TypeVar.__constraints__ -chia_rs.sized_byte_class.TypeVar.__contravariant__ -chia_rs.sized_byte_class.TypeVar.__covariant__ - -chia_rs.struct_stream.TypeVar.__bound__ -chia_rs.struct_stream.TypeVar.__constraints__ -chia_rs.struct_stream.TypeVar.__contravariant__ -chia_rs.struct_stream.TypeVar.__covariant__ - chia_rs.sized_byte_class.Iterable chia_rs.sized_byte_class.BinaryIO.write chia_rs.struct_stream.BinaryIO.write diff --git a/stubtest.allowlist.3-11-plus b/stubtest.allowlist.3-11-plus new file mode 100644 index 000000000..746a42d90 --- /dev/null +++ b/stubtest.allowlist.3-11-plus @@ -0,0 +1,10 @@ +# TODO: ask stubtest/mypy about these as they seem unlikely to be our doing +chia_rs.sized_byte_class.TypeVar.__bound__ +chia_rs.sized_byte_class.TypeVar.__constraints__ +chia_rs.sized_byte_class.TypeVar.__contravariant__ +chia_rs.sized_byte_class.TypeVar.__covariant__ + +chia_rs.struct_stream.TypeVar.__bound__ +chia_rs.struct_stream.TypeVar.__constraints__ +chia_rs.struct_stream.TypeVar.__contravariant__ +chia_rs.struct_stream.TypeVar.__covariant__ From ebb7dd3fd8151e914e2ad6f6a45e50312c2bcb21 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 28 Aug 2024 09:04:35 -0400 Subject: [PATCH 13/59] Delete wheel/py.typed (leaving wheel/python/chia_rs/py.typed) I think this outer one is unneeded? --- wheel/py.typed | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 wheel/py.typed diff --git a/wheel/py.typed b/wheel/py.typed deleted file mode 100644 index e69de29bb..000000000 From 9296f0d6a9c430672bfbc70055ef4383ed2dd114 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Thu, 29 Aug 2024 12:22:51 -0400 Subject: [PATCH 14/59] Add cargo machete to CI --- .github/workflows/build-crate.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-crate.yml b/.github/workflows/build-crate.yml index e14a647ca..7e7ee4a8c 100644 --- a/.github/workflows/build-crate.yml +++ b/.github/workflows/build-crate.yml @@ -28,6 +28,12 @@ jobs: - name: Clippy run: cargo clippy --workspace --all-features --all-targets + - name: Install cargo-machete + run: cargo install cargo-machete + + - name: Unused dependencies + run: cargo machete + - name: Tests (debug) run: cargo test --workspace --all-features From 33242d18765de4ba46e67ae0f4f462308c8d75ec Mon Sep 17 00:00:00 2001 From: Rigidity Date: Thu, 29 Aug 2024 12:23:37 -0400 Subject: [PATCH 15/59] Add machete to pre-commit --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f59794fe3..19756e870 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,6 +28,13 @@ repos: entry: cargo clippy --workspace --all-features --all-targets language: system pass_filenames: false + - id: machete + name: machete + description: run cargo machete on the workspace + stages: [pre-push] + entry: cargo machete + language: system + pass_filenames: false - id: tests name: run tests description: run cargo test on the workspace From e46374ae474443a4207e62872328fc2adf4a97e0 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Thu, 29 Aug 2024 12:25:12 -0400 Subject: [PATCH 16/59] Add machete to all stages --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19756e870..dcaf8c314 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,6 @@ repos: - id: machete name: machete description: run cargo machete on the workspace - stages: [pre-push] entry: cargo machete language: system pass_filenames: false From 384945458ad7dd06d55ccf43cd3742c6c1e1a71f Mon Sep 17 00:00:00 2001 From: Rigidity Date: Thu, 29 Aug 2024 12:27:01 -0400 Subject: [PATCH 17/59] chia-fuzz --- crates/chia-consensus/fuzz/Cargo.toml | 4 ---- crates/chia-consensus/fuzz/fuzz_targets/parse-cond-args.rs | 2 +- crates/chia-consensus/fuzz/fuzz_targets/parse-conditions.rs | 2 +- crates/chia-consensus/fuzz/fuzz_targets/parse-spend-id.rs | 2 +- crates/chia-consensus/fuzz/fuzz_targets/parse-spend.rs | 2 +- crates/chia-consensus/fuzz/fuzz_targets/parse-spends.rs | 2 +- crates/chia-consensus/fuzz/fuzz_targets/process-spend.rs | 2 +- .../chia-consensus/fuzz/fuzz_targets/puzzle-coin-solution.rs | 2 +- crates/clvm-utils/fuzz/fuzz_targets/curry.rs | 2 +- crates/clvm-utils/fuzz/fuzz_targets/tree-hash.rs | 2 +- 10 files changed, 9 insertions(+), 13 deletions(-) diff --git a/crates/chia-consensus/fuzz/Cargo.toml b/crates/chia-consensus/fuzz/Cargo.toml index 6022d3a49..bff787e22 100644 --- a/crates/chia-consensus/fuzz/Cargo.toml +++ b/crates/chia-consensus/fuzz/Cargo.toml @@ -21,10 +21,6 @@ chia-traits = { workspace = true } chia-consensus = { workspace = true } hex-literal = { workspace = true } -[lib] -name = "fuzzing_utils" -crate-type = ["rlib"] - [[bin]] name = "puzzle-coin-solution" path = "fuzz_targets/puzzle-coin-solution.rs" diff --git a/crates/chia-consensus/fuzz/fuzz_targets/parse-cond-args.rs b/crates/chia-consensus/fuzz/fuzz_targets/parse-cond-args.rs index 5a30b8e8d..e08f41860 100644 --- a/crates/chia-consensus/fuzz/fuzz_targets/parse-cond-args.rs +++ b/crates/chia-consensus/fuzz/fuzz_targets/parse-cond-args.rs @@ -2,8 +2,8 @@ use libfuzzer_sys::fuzz_target; use chia_consensus::gen::conditions::parse_args; +use chia_fuzz::{make_list, BitCursor}; use clvmr::allocator::Allocator; -use fuzzing_utils::{make_list, BitCursor}; use chia_consensus::gen::flags::STRICT_ARGS_COUNT; diff --git a/crates/chia-consensus/fuzz/fuzz_targets/parse-conditions.rs b/crates/chia-consensus/fuzz/fuzz_targets/parse-conditions.rs index 16999caa0..03b80f95a 100644 --- a/crates/chia-consensus/fuzz/fuzz_targets/parse-conditions.rs +++ b/crates/chia-consensus/fuzz/fuzz_targets/parse-conditions.rs @@ -6,11 +6,11 @@ use chia_consensus::gen::conditions::{ parse_conditions, MempoolVisitor, ParseState, SpendBundleConditions, SpendConditions, }; use chia_consensus::gen::spend_visitor::SpendVisitor; +use chia_fuzz::{make_list, BitCursor}; use chia_protocol::Bytes32; use chia_protocol::Coin; use clvm_utils::tree_hash; use clvmr::{Allocator, NodePtr}; -use fuzzing_utils::{make_list, BitCursor}; use std::collections::HashSet; use std::sync::Arc; diff --git a/crates/chia-consensus/fuzz/fuzz_targets/parse-spend-id.rs b/crates/chia-consensus/fuzz/fuzz_targets/parse-spend-id.rs index 3567d4134..fbfb8e324 100644 --- a/crates/chia-consensus/fuzz/fuzz_targets/parse-spend-id.rs +++ b/crates/chia-consensus/fuzz/fuzz_targets/parse-spend-id.rs @@ -2,8 +2,8 @@ use libfuzzer_sys::fuzz_target; use chia_consensus::gen::messages::SpendId; +use chia_fuzz::{make_list, BitCursor}; use clvmr::allocator::Allocator; -use fuzzing_utils::{make_list, BitCursor}; fuzz_target!(|data: &[u8]| { let mut a = Allocator::new(); diff --git a/crates/chia-consensus/fuzz/fuzz_targets/parse-spend.rs b/crates/chia-consensus/fuzz/fuzz_targets/parse-spend.rs index 62e255fb9..f055c5740 100644 --- a/crates/chia-consensus/fuzz/fuzz_targets/parse-spend.rs +++ b/crates/chia-consensus/fuzz/fuzz_targets/parse-spend.rs @@ -2,8 +2,8 @@ use libfuzzer_sys::fuzz_target; use chia_consensus::gen::get_puzzle_and_solution::parse_coin_spend; +use chia_fuzz::{make_list, BitCursor}; use clvmr::allocator::Allocator; -use fuzzing_utils::{make_list, BitCursor}; fuzz_target!(|data: &[u8]| { let mut a = Allocator::new(); diff --git a/crates/chia-consensus/fuzz/fuzz_targets/parse-spends.rs b/crates/chia-consensus/fuzz/fuzz_targets/parse-spends.rs index 8b510918a..84257c734 100644 --- a/crates/chia-consensus/fuzz/fuzz_targets/parse-spends.rs +++ b/crates/chia-consensus/fuzz/fuzz_targets/parse-spends.rs @@ -2,8 +2,8 @@ use libfuzzer_sys::fuzz_target; use chia_consensus::gen::conditions::{parse_spends, MempoolVisitor}; +use chia_fuzz::{make_list, BitCursor}; use clvmr::{Allocator, NodePtr}; -use fuzzing_utils::{make_list, BitCursor}; use chia_consensus::consensus_constants::TEST_CONSTANTS; use chia_consensus::gen::flags::{NO_UNKNOWN_CONDS, STRICT_ARGS_COUNT}; diff --git a/crates/chia-consensus/fuzz/fuzz_targets/process-spend.rs b/crates/chia-consensus/fuzz/fuzz_targets/process-spend.rs index 134ac76e7..8be826dde 100644 --- a/crates/chia-consensus/fuzz/fuzz_targets/process-spend.rs +++ b/crates/chia-consensus/fuzz/fuzz_targets/process-spend.rs @@ -4,8 +4,8 @@ use chia_consensus::gen::conditions::{ process_single_spend, MempoolVisitor, ParseState, SpendBundleConditions, }; use chia_consensus::gen::flags::{NO_UNKNOWN_CONDS, STRICT_ARGS_COUNT}; +use chia_fuzz::{make_tree, BitCursor}; use clvmr::allocator::Allocator; -use fuzzing_utils::{make_tree, BitCursor}; use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &[u8]| { diff --git a/crates/chia-consensus/fuzz/fuzz_targets/puzzle-coin-solution.rs b/crates/chia-consensus/fuzz/fuzz_targets/puzzle-coin-solution.rs index 8f871497a..9dcb5e79f 100644 --- a/crates/chia-consensus/fuzz/fuzz_targets/puzzle-coin-solution.rs +++ b/crates/chia-consensus/fuzz/fuzz_targets/puzzle-coin-solution.rs @@ -2,9 +2,9 @@ use libfuzzer_sys::fuzz_target; use chia_consensus::gen::get_puzzle_and_solution::get_puzzle_and_solution_for_coin; +use chia_fuzz::{make_tree, BitCursor}; use chia_protocol::Coin; use clvmr::allocator::Allocator; -use fuzzing_utils::{make_tree, BitCursor}; use std::collections::HashSet; const HASH: [u8; 32] = [ diff --git a/crates/clvm-utils/fuzz/fuzz_targets/curry.rs b/crates/clvm-utils/fuzz/fuzz_targets/curry.rs index d8b198830..877a660dd 100644 --- a/crates/clvm-utils/fuzz/fuzz_targets/curry.rs +++ b/crates/clvm-utils/fuzz/fuzz_targets/curry.rs @@ -2,9 +2,9 @@ use clvm_traits::{FromClvm, ToClvm}; use libfuzzer_sys::fuzz_target; +use chia_fuzz::{make_tree, BitCursor}; use clvm_utils::CurriedProgram; use clvmr::allocator::{Allocator, NodePtr}; -use fuzzing_utils::{make_tree, BitCursor}; fuzz_target!(|data: &[u8]| { let mut a = Allocator::new(); diff --git a/crates/clvm-utils/fuzz/fuzz_targets/tree-hash.rs b/crates/clvm-utils/fuzz/fuzz_targets/tree-hash.rs index 74f8e20cd..724957e06 100644 --- a/crates/clvm-utils/fuzz/fuzz_targets/tree-hash.rs +++ b/crates/clvm-utils/fuzz/fuzz_targets/tree-hash.rs @@ -1,9 +1,9 @@ #![no_main] use libfuzzer_sys::fuzz_target; +use chia_fuzz::{make_tree, BitCursor}; use clvm_utils::{tree_hash, tree_hash_cached, TreeHash}; use clvmr::{Allocator, NodePtr}; -use fuzzing_utils::{make_tree, BitCursor}; use std::collections::{HashMap, HashSet}; use clvmr::serde::{node_from_bytes_backrefs_record, node_to_bytes_backrefs}; From b4966a696e4fa76324ff762fdef2087625d61b17 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Thu, 29 Aug 2024 12:28:24 -0400 Subject: [PATCH 18/59] Add workaround for clvmr --- Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 631c3a8ef..cba3307d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -62,6 +62,11 @@ clvm-traits = { workspace = true, optional = true } clvm-utils = { workspace = true, optional = true } clvmr = { workspace = true } +# This is required since clvmr is only added here to provide the openssl feature conditionally. +# In the future we could pass the openssl feature to each of the relevant workspace crates instead. +[package.metadata.cargo-machete] +ignored = ["clvmr"] + [features] default = [ "bls", From fcc43196441316ba910e39dc626805a0dbcc2253 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Thu, 29 Aug 2024 12:29:30 -0400 Subject: [PATCH 19/59] Remove unused deps --- Cargo.lock | 8 -------- crates/chia-bls/Cargo.toml | 1 - crates/chia-consensus/Cargo.toml | 1 - crates/chia-puzzles/fuzz/Cargo.toml | 1 - crates/chia-tools/Cargo.toml | 1 - wheel/Cargo.toml | 5 ----- 6 files changed, 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ddef533e0..76e45bce6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -305,7 +305,6 @@ dependencies = [ name = "chia-bls" version = "0.11.0" dependencies = [ - "anyhow", "arbitrary", "blst", "chia-traits 0.11.0", @@ -354,7 +353,6 @@ dependencies = [ "chia-traits 0.11.0", "chia_py_streamable_macro", "chia_streamable_macro 0.11.0", - "clvm-derive", "clvm-traits", "clvm-utils", "clvmr", @@ -436,7 +434,6 @@ dependencies = [ "clvm-traits", "clvmr", "libfuzzer-sys", - "pyo3", ] [[package]] @@ -466,7 +463,6 @@ dependencies = [ "clvm-utils", "clvmr", "hex", - "hex-literal", "rusqlite", "zstd", ] @@ -509,10 +505,6 @@ dependencies = [ "chia-bls 0.11.0", "chia-consensus", "chia-protocol", - "chia-traits 0.11.0", - "chia_py_streamable_macro", - "chia_streamable_macro 0.11.0", - "clvm-traits", "clvm-utils", "clvmr", "hex", diff --git a/crates/chia-bls/Cargo.toml b/crates/chia-bls/Cargo.toml index 851830e2e..a421d7047 100644 --- a/crates/chia-bls/Cargo.toml +++ b/crates/chia-bls/Cargo.toml @@ -18,7 +18,6 @@ arbitrary = ["dep:arbitrary"] [dependencies] chia-traits = { workspace = true } chia_py_streamable_macro = { workspace = true, optional = true } -anyhow = { workspace = true } sha2 = { workspace = true } clvmr = { workspace = true } hkdf = { workspace = true } diff --git a/crates/chia-consensus/Cargo.toml b/crates/chia-consensus/Cargo.toml index c58c66e25..7d5553e6f 100644 --- a/crates/chia-consensus/Cargo.toml +++ b/crates/chia-consensus/Cargo.toml @@ -23,7 +23,6 @@ chia_py_streamable_macro = { workspace = true, optional = true } clvm-utils = { workspace = true } chia-traits = { workspace = true } clvm-traits = { workspace = true } -clvm-derive = { workspace = true } chia-protocol = { workspace = true } chia-puzzles = { workspace = true } chia-bls = { workspace = true } diff --git a/crates/chia-puzzles/fuzz/Cargo.toml b/crates/chia-puzzles/fuzz/Cargo.toml index a9d81b326..df2700289 100644 --- a/crates/chia-puzzles/fuzz/Cargo.toml +++ b/crates/chia-puzzles/fuzz/Cargo.toml @@ -14,7 +14,6 @@ workspace = true [dependencies] libfuzzer-sys = { workspace = true } clvmr = { workspace = true } -pyo3 = { workspace = true, features = ["auto-initialize"]} chia-puzzles = { workspace = true, features = ["arbitrary"] } clvm-traits = { workspace = true } diff --git a/crates/chia-tools/Cargo.toml b/crates/chia-tools/Cargo.toml index 950e80ee4..3d48a3b21 100644 --- a/crates/chia-tools/Cargo.toml +++ b/crates/chia-tools/Cargo.toml @@ -25,7 +25,6 @@ clap = { workspace = true, features = ["derive"] } zstd = { workspace = true } blocking-threadpool = { workspace = true } hex = { workspace = true } -hex-literal = { workspace = true } [lib] name = "chia_tools" diff --git a/wheel/Cargo.toml b/wheel/Cargo.toml index f3d602ddd..ba2bbc64f 100644 --- a/wheel/Cargo.toml +++ b/wheel/Cargo.toml @@ -23,13 +23,8 @@ python-source = "python" [dependencies] clvmr = { workspace = true } hex = { workspace = true } - pyo3 = { workspace = true, features = ["multiple-pymethods"] } chia-consensus = { workspace = true, features = ["py-bindings"] } chia-bls = { workspace = true, features = ["py-bindings"] } chia-protocol = { workspace = true, features = ["py-bindings"] } -chia-traits = { workspace = true, features = ["py-bindings"] } -clvm-traits = { workspace = true, features = ["derive", "py-bindings"] } clvm-utils = { workspace = true } -chia_py_streamable_macro = { workspace = true } -chia_streamable_macro = { workspace = true } From 034d3fa059118fcbe58cf7460daf34320070eb6d Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 09:24:40 -0400 Subject: [PATCH 20/59] oops --- stubtest.allowlist | 13 ++++++++++++- wheel/generate_type_stubs.py | 2 +- wheel/python/chia_rs/{__init__.pyi => chia_rs.pyi} | 0 3 files changed, 13 insertions(+), 2 deletions(-) rename wheel/python/chia_rs/{__init__.pyi => chia_rs.pyi} (100%) diff --git a/stubtest.allowlist b/stubtest.allowlist index 35e11e103..159c43428 100644 --- a/stubtest.allowlist +++ b/stubtest.allowlist @@ -1,6 +1,7 @@ # this is offered to help with hinting only and is not intended to be # runtime accessible. is there a better option for handling this? chia_rs.ReadableBuffer +chia_rs.chia_rs.ReadableBuffer # TODO: perhaps these should be private as _* chia_rs.BlockRecord.ip_iters_impl @@ -8,24 +9,34 @@ chia_rs.BlockRecord.ip_sub_slot_total_iters_impl chia_rs.BlockRecord.sp_iters_impl chia_rs.BlockRecord.sp_sub_slot_total_iters_impl chia_rs.BlockRecord.sp_total_iters_impl +chia_rs.chia_rs.BlockRecord.ip_iters_impl +chia_rs.chia_rs.BlockRecord.ip_sub_slot_total_iters_impl +chia_rs.chia_rs.BlockRecord.sp_iters_impl +chia_rs.chia_rs.BlockRecord.sp_sub_slot_total_iters_impl +chia_rs.chia_rs.BlockRecord.sp_total_iters_impl # TODO: perhaps the inner should be private as _chia_rs -chia_rs.chia_rs +# chia_rs.chia_rs # TODO: G1Element->PublicKey expects *args chia_rs.G1Element.__init__ +chia_rs.chia_rs.G1Element.__init__ # TODO: G2Element->Signature expects *args chia_rs.G2Element.__init__ +chia_rs.chia_rs.G2Element.__init__ # TODO: expects *args chia_rs.GTElement.__init__ +chia_rs.chia_rs.GTElement.__init__ # TODO: PrivateKey->SecretKey expects *args chia_rs.PrivateKey.__init__ +chia_rs.chia_rs.PrivateKey.__init__ # TODO: expects *args chia_rs.RequestPeers.__init__ +chia_rs.chia_rs.RequestPeers.__init__ # TODO: ask stubtest/mypy about these as they seem unlikely to be our doing chia_rs.sized_byte_class.Iterable diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index 74f4406d0..00a236f4d 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -2,7 +2,7 @@ from typing import List, Optional, Tuple, TextIO from glob import glob -output_file = Path(__file__).parent.resolve() / "python" / "chia_rs" / "__init__.pyi" +output_file = Path(__file__).parent.resolve() / "python" / "chia_rs" / "chia_rs.pyi" crates_dir = Path(__file__).parent.parent.resolve() / "crates" input_dir = crates_dir / "chia-protocol" / "src" diff --git a/wheel/python/chia_rs/__init__.pyi b/wheel/python/chia_rs/chia_rs.pyi similarity index 100% rename from wheel/python/chia_rs/__init__.pyi rename to wheel/python/chia_rs/chia_rs.pyi From de9293fbab366f5074d25837798daf7f21b35005 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 10:08:54 -0400 Subject: [PATCH 21/59] handle unnamed parameters --- wheel/generate_type_stubs.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index 00a236f4d..18c2f1e41 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -32,6 +32,8 @@ def add_indent(x: str): all_replace_parameters = [] for m in members: replace_param_name, replace_type = m.split(":") + if replace_param_name.startswith("a") and replace_param_name[1:].isnumeric(): + continue all_replace_parameters.append( f"{replace_param_name}: Union[{replace_type}, _Unspec] = _Unspec()" ) @@ -39,12 +41,14 @@ def add_indent(x: str): if extra is not None: members.extend(extra) - # TODO: make __richcmp__ dependent on streamable? + # TODO: could theoretically be detected from the use of #[streamable(subclass)] + inheritable = name in ["SpendBundle"] + + # TODO: when is __richcmp__ actually present? # def __richcmp__(self) -> Any: ... - # TODO: don't let me merge this hardcoded SpendBundle @final exception file.write( f""" -{"@final" if name != "SpendBundle" else ""} +{"" if inheritable else "@final"} class {name}:{"".join(map(add_indent, members))} def __init__( self{init_args} @@ -69,8 +73,7 @@ def from_json_dict(json_dict: Any) -> {name}: ... """ ) - # TODO: program doesn't have named fields so the replace function isn't added - if len(all_replace_parameters) > 0 and name != "Program": + if len(all_replace_parameters) > 0: indent = ",\n " file.write( f""" def replace(self, *, {indent.join(all_replace_parameters)}) -> {name}: ... From c550729f90f71d06f7525479cd17aebf10f9ac4a Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 10:11:02 -0400 Subject: [PATCH 22/59] tidy --- wheel/src/api.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/wheel/src/api.rs b/wheel/src/api.rs index bbd7d429f..b5342342d 100644 --- a/wheel/src/api.rs +++ b/wheel/src/api.rs @@ -618,8 +618,6 @@ pub fn chia_rs(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; - - // TODO: i think this is part of the above group? m.add_class::()?; m.add_class::()?; m.add_class::()?; From fd763be4e25cff9fc225cd51c0260ad159030e65 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 10:12:21 -0400 Subject: [PATCH 23/59] move allowlists to `wheel/` --- .github/workflows/benchmark.yml | 8 ++++---- stubtest.allowlist => wheel/stubtest.allowlist | 0 .../stubtest.allowlist.3-11-plus | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename stubtest.allowlist => wheel/stubtest.allowlist (100%) rename stubtest.allowlist.3-11-plus => wheel/stubtest.allowlist.3-11-plus (100%) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 2b4836b8e..0495a2ac1 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -21,7 +21,7 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] env: - stubtest_args: ${{ matrix.python-version == '3.11' && '--allow-list stubtest.allowlist.3-11-plus' || ""}} + stubtest_args: ${{ matrix.python-version == '3.11' && '--allow-list wheel/stubtest.allowlist.3-11-plus' || ""}} steps: - uses: actions/checkout@v4 @@ -67,19 +67,19 @@ jobs: # TODO: don't always this stuff if: always() run: | - stubtest ${{ env.stubtest_args }} --allowlist stubtest.allowlist --concise --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' + stubtest ${{ env.stubtest_args }} --allowlist wheel/stubtest.allowlist --concise --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' - name: python mypy stubtest concise # TODO: don't always this stuff if: always() run: | - stubtest ${{ env.stubtest_args }} --allowlist stubtest.allowlist --concise chia_rs + stubtest ${{ env.stubtest_args }} --allowlist wheel/stubtest.allowlist --concise chia_rs - name: python mypy stubtest # TODO: don't always this stuff if: always() run: | - stubtest ${{ env.stubtest_args }} --allowlist stubtest.allowlist chia_rs + stubtest ${{ env.stubtest_args }} --allowlist wheel/stubtest.allowlist chia_rs - name: python black run: | diff --git a/stubtest.allowlist b/wheel/stubtest.allowlist similarity index 100% rename from stubtest.allowlist rename to wheel/stubtest.allowlist diff --git a/stubtest.allowlist.3-11-plus b/wheel/stubtest.allowlist.3-11-plus similarity index 100% rename from stubtest.allowlist.3-11-plus rename to wheel/stubtest.allowlist.3-11-plus From 50b1a4738139607adb63a416e1341d23c51c3938 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 10:16:37 -0400 Subject: [PATCH 24/59] tidy --- wheel/generate_type_stubs.py | 2 +- wheel/src/api.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index 18c2f1e41..67812aa9e 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -44,7 +44,7 @@ def add_indent(x: str): # TODO: could theoretically be detected from the use of #[streamable(subclass)] inheritable = name in ["SpendBundle"] - # TODO: when is __richcmp__ actually present? + # TODO: is __richcmp__ ever actually present? # def __richcmp__(self) -> Any: ... file.write( f""" diff --git a/wheel/src/api.rs b/wheel/src/api.rs index b5342342d..8899efcd3 100644 --- a/wheel/src/api.rs +++ b/wheel/src/api.rs @@ -44,7 +44,6 @@ use chia_protocol::{ SubSlotProofs, TimestampedPeerInfo, TransactionAck, TransactionsInfo, UnfinishedBlock, UnfinishedHeaderBlock, VDFInfo, VDFProof, WeightProof, }; - use clvm_utils::tree_hash_from_bytes; use clvmr::{ENABLE_BLS_OPS_OUTSIDE_GUARD, ENABLE_FIXED_DIV, LIMIT_HEAP, NO_UNKNOWN_OPS}; use pyo3::buffer::PyBuffer; From 24c69566976c0f133bc7e0ba60862ae76963943f Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 11:11:32 -0400 Subject: [PATCH 25/59] tidy --- .github/workflows/benchmark.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 0495a2ac1..3f31398ed 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -63,23 +63,24 @@ jobs: run: | mypy --ignore-missing-imports tests - - name: python mypy stubtest filtered - # TODO: don't always this stuff - if: always() - run: | - stubtest ${{ env.stubtest_args }} --allowlist wheel/stubtest.allowlist --concise --ignore-missing-stub chia_rs | grep -vE '\.(__deepcopy__|__richcmp__|from_bytes|from_bytes_unchecked|parse_rust) ' - - - name: python mypy stubtest concise - # TODO: don't always this stuff - if: always() - run: | - stubtest ${{ env.stubtest_args }} --allowlist wheel/stubtest.allowlist --concise chia_rs - - name: python mypy stubtest - # TODO: don't always this stuff - if: always() run: | - stubtest ${{ env.stubtest_args }} --allowlist wheel/stubtest.allowlist chia_rs + FAILURE=0 + echo "::group::concise" + if ! stubtest ${{ env.stubtest_args }} --allowlist wheel/stubtest.allowlist --concise chia_rs + then + FAILURE=1 + fi + echo "::endgroup::" + + echo "::group::complete" + if ! stubtest ${{ env.stubtest_args }} --allowlist wheel/stubtest.allowlist chia_rs + then + FAILURE=1 + fi + echo "::endgroup::" + + exit ${FAILURE} - name: python black run: | From 4919e52ffe861fa8f861274db5e8fe839b9fcfb5 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 11:11:57 -0400 Subject: [PATCH 26/59] temporarily trigger a failure --- wheel/stubtest.allowlist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wheel/stubtest.allowlist b/wheel/stubtest.allowlist index 159c43428..8e29ea247 100644 --- a/wheel/stubtest.allowlist +++ b/wheel/stubtest.allowlist @@ -1,6 +1,6 @@ # this is offered to help with hinting only and is not intended to be # runtime accessible. is there a better option for handling this? -chia_rs.ReadableBuffer +# chia_rs.ReadableBuffer chia_rs.chia_rs.ReadableBuffer # TODO: perhaps these should be private as _* From 7ae172e462ad83a4faaa01bd3c2677f7c76af889 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 11:19:49 -0400 Subject: [PATCH 27/59] fixup --- .github/workflows/benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 3f31398ed..de3bef188 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -21,7 +21,7 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] env: - stubtest_args: ${{ matrix.python-version == '3.11' && '--allow-list wheel/stubtest.allowlist.3-11-plus' || ""}} + stubtest_args: ${{ matrix.python-version == '3.11' && '--allow-list wheel/stubtest.allowlist.3-11-plus' || ''}} steps: - uses: actions/checkout@v4 From d5be7751ec20289e724b089bd113b70b64b676ad Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 11:30:35 -0400 Subject: [PATCH 28/59] Revert "temporarily trigger a failure" This reverts commit 4919e52ffe861fa8f861274db5e8fe839b9fcfb5. --- wheel/stubtest.allowlist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wheel/stubtest.allowlist b/wheel/stubtest.allowlist index 8e29ea247..159c43428 100644 --- a/wheel/stubtest.allowlist +++ b/wheel/stubtest.allowlist @@ -1,6 +1,6 @@ # this is offered to help with hinting only and is not intended to be # runtime accessible. is there a better option for handling this? -# chia_rs.ReadableBuffer +chia_rs.ReadableBuffer chia_rs.chia_rs.ReadableBuffer # TODO: perhaps these should be private as _* From 3dae5d6029c32c25b82b5cab3346470d072f97b5 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 11:33:54 -0400 Subject: [PATCH 29/59] fixup --- .github/workflows/benchmark.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index de3bef188..537a87a80 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -21,7 +21,7 @@ jobs: python-version: ["3.8", "3.9", "3.10", "3.11"] env: - stubtest_args: ${{ matrix.python-version == '3.11' && '--allow-list wheel/stubtest.allowlist.3-11-plus' || ''}} + stubtest_args: ${{ matrix.python-version == '3.11' && '--allowlist wheel/stubtest.allowlist.3-11-plus' || ''}} steps: - uses: actions/checkout@v4 From d0928906854cbe4554767a9d3c702386a209d8d3 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 5 Sep 2024 11:40:58 -0400 Subject: [PATCH 30/59] fixup --- .github/workflows/benchmark.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 537a87a80..58637d45b 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -64,6 +64,7 @@ jobs: mypy --ignore-missing-imports tests - name: python mypy stubtest + shell: bash run: | FAILURE=0 echo "::group::concise" From 2ea058d50f3fe7599f839f3f1e28c2ce373480fb Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Mon, 9 Sep 2024 17:57:33 +0100 Subject: [PATCH 31/59] Revert accidental change while fixing clippy warnings. --- .../chia-consensus/src/spendbundle_conditions.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/crates/chia-consensus/src/spendbundle_conditions.rs b/crates/chia-consensus/src/spendbundle_conditions.rs index 32c307368..244aa4126 100644 --- a/crates/chia-consensus/src/spendbundle_conditions.rs +++ b/crates/chia-consensus/src/spendbundle_conditions.rs @@ -15,6 +15,8 @@ use clvmr::reduction::Reduction; use clvmr::run_program::run_program; use clvmr::serde::node_from_bytes; +const QUOTE_BYTES: usize = 2; + pub fn get_conditions_from_spendbundle( a: &mut Allocator, spend_bundle: &SpendBundle, @@ -22,8 +24,6 @@ pub fn get_conditions_from_spendbundle( height: u32, constants: &ConsensusConstants, ) -> Result { - const QUOTE_BYTES_COST: usize = 2; - let flags = get_flags_for_height_and_constants(height, constants) | MEMPOOL_MODE; // below is an adapted version of the code from run_block_generators::run_block_generator2() @@ -42,7 +42,7 @@ pub fn get_conditions_from_spendbundle( }); // We don't pay the size cost (nor execution cost) of being wrapped by a // quote (in solution_generator). - let generator_length_without_quote = solution_generator(spends_info)?.len() - QUOTE_BYTES_COST; + let generator_length_without_quote = solution_generator(spends_info)?.len() - QUOTE_BYTES; let byte_cost = generator_length_without_quote as u64 * constants.cost_per_byte; subtract_cost(a, &mut cost_left, byte_cost)?; @@ -93,6 +93,9 @@ mod tests { use rstest::rstest; use std::fs::read; + const QUOTE_EXECUTION_COST: u64 = 20; + const QUOTE_BYTES_COST: u64 = QUOTE_BYTES as u64 * TEST_CONSTANTS.cost_per_byte; + #[rstest] #[case("3000253", 8, 2, 51_216_870)] #[case("1000101", 34, 15, 250_083_677)] @@ -103,9 +106,6 @@ mod tests { #[values(0, 1, 1_000_000, 5_000_000)] height: u32, #[case] cost: u64, ) { - const QUOTE_EXECUTION_COST: u64 = 20; - const QUOTE_BYTE_COST: u64 = 2 * TEST_CONSTANTS.cost_per_byte; - let bundle = SpendBundle::from_bytes( &read(format!("../../test-bundles/{filename}.bundle")).expect("read file"), ) @@ -146,7 +146,7 @@ mod tests { // does not include the overhead to make a block. assert_eq!( conditions.cost, - block_conds.cost - QUOTE_EXECUTION_COST - QUOTE_BYTE_COST + block_conds.cost - QUOTE_EXECUTION_COST - QUOTE_BYTES_COST ); } @@ -353,7 +353,6 @@ mod tests { &coin_spend.solution, ) }); - const QUOTE_BYTES: usize = 2; let generator_length_without_quote = solution_generator(program_spends) .expect("solution_generator failed") .len() From 1b67eb12b8f0b5465ba01f38f8fe51bd745f1e68 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Fri, 13 Sep 2024 11:50:46 +0100 Subject: [PATCH 32/59] Release the GIL when calling validate_clvm_and_signature in the python binding. --- wheel/src/api.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wheel/src/api.rs b/wheel/src/api.rs index ebf03094b..2b603d123 100644 --- a/wheel/src/api.rs +++ b/wheel/src/api.rs @@ -422,16 +422,19 @@ fn fast_forward_singleton<'p>( #[pyo3(name = "validate_clvm_and_signature")] #[allow(clippy::type_complexity)] pub fn py_validate_clvm_and_signature( + py: Python<'_>, new_spend: &SpendBundle, max_cost: u64, constants: &ConsensusConstants, peak_height: u32, ) -> PyResult<(OwnedSpendBundleConditions, Vec<([u8; 32], GTElement)>, f32)> { - let (owned_conditions, additions, duration) = - validate_clvm_and_signature(new_spend, max_cost, constants, peak_height).map_err(|e| { + let (owned_conditions, additions, duration) = py + .allow_threads(|| validate_clvm_and_signature(new_spend, max_cost, constants, peak_height)) + .map_err(|e| { + // cast validation error to int let error_code: u32 = e.into(); PyErr::new::(error_code) - })?; // cast validation error to int + })?; Ok((owned_conditions, additions, duration.as_secs_f32())) } From 2aa206cd852656273c893cb8bf3508c8ea4bfcf7 Mon Sep 17 00:00:00 2001 From: matt-o-how <48453825+matt-o-how@users.noreply.github.com> Date: Tue, 17 Sep 2024 11:58:27 +0100 Subject: [PATCH 33/59] Remove references to `NPCResult` (#699) * rename npc_result * rename osbc to `conditions` --- crates/chia-consensus/src/spendbundle_validation.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/chia-consensus/src/spendbundle_validation.rs b/crates/chia-consensus/src/spendbundle_validation.rs index 9539f2b1e..80d9b1d81 100644 --- a/crates/chia-consensus/src/spendbundle_validation.rs +++ b/crates/chia-consensus/src/spendbundle_validation.rs @@ -32,7 +32,7 @@ pub fn validate_clvm_and_signature( let mut a = make_allocator(LIMIT_HEAP); let sbc = get_conditions_from_spendbundle(&mut a, spend_bundle, max_cost, height, constants) .map_err(|e| e.1)?; - let npcresult = OwnedSpendBundleConditions::from(&a, sbc); + let conditions = OwnedSpendBundleConditions::from(&a, sbc); // Collect all pairs in a single vector to avoid multiple iterations let mut pairs = Vec::new(); @@ -40,7 +40,7 @@ pub fn validate_clvm_and_signature( let mut aug_msg = Vec::::new(); let mut final_msg = Vec::::new(); - for spend in &npcresult.spends { + for spend in &conditions.spends { let condition_items_pairs = [ (AGG_SIG_PARENT, &spend.agg_sig_parent), (AGG_SIG_PUZZLE, &spend.agg_sig_puzzle), @@ -67,7 +67,7 @@ pub fn validate_clvm_and_signature( } // Adding unsafe items - for (pk, msg) in &npcresult.agg_sig_unsafe { + for (pk, msg) in &conditions.agg_sig_unsafe { let mut aug_msg = pk.to_bytes().to_vec(); aug_msg.extend_from_slice(msg.as_ref()); let aug_hash = hash_to_g2(&aug_msg); @@ -85,7 +85,7 @@ pub fn validate_clvm_and_signature( } // Collect results - Ok((npcresult, pairs, start_time.elapsed())) + Ok((conditions, pairs, start_time.elapsed())) } fn hash_pk_and_msg(pk: &[u8], msg: &[u8]) -> [u8; 32] { From adfc66718c53873faa52b58fc7307a2963ba8b7e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 18 Sep 2024 00:24:05 +0200 Subject: [PATCH 34/59] release the GIL in run_block_generator() and run_block_generator2(), allowing these to be run in a ThreadPoolExecutor (#712) --- wheel/src/run_generator.rs | 86 +++++++++++++++++++++----------------- 1 file changed, 48 insertions(+), 38 deletions(-) diff --git a/wheel/src/run_generator.rs b/wheel/src/run_generator.rs index bc364728b..00be27e35 100644 --- a/wheel/src/run_generator.rs +++ b/wheel/src/run_generator.rs @@ -20,7 +20,7 @@ pub fn py_to_slice<'a>(buf: PyBuffer) -> &'a [u8] { #[pyfunction] pub fn run_block_generator<'a>( - _py: Python<'a>, + py: Python<'a>, program: PyBuffer, block_refs: &Bound<'_, PyList>, max_cost: Cost, @@ -29,12 +29,15 @@ pub fn run_block_generator<'a>( ) -> (Option, Option) { let mut allocator = make_allocator(flags); - let refs = block_refs.into_iter().map(|b| { - let buf = b - .extract::>() - .expect("block_refs should be a list of buffers"); - py_to_slice::<'a>(buf) - }); + let refs = block_refs + .into_iter() + .map(|b| { + let buf = b + .extract::>() + .expect("block_refs should be a list of buffers"); + py_to_slice::<'a>(buf) + }) + .collect::>(); let program = py_to_slice::<'a>(program); let run_block = if (flags & ANALYZE_SPENDS) == 0 { native_run_block_generator::<_, EmptyVisitor, _> @@ -42,24 +45,26 @@ pub fn run_block_generator<'a>( native_run_block_generator::<_, MempoolVisitor, _> }; - match run_block(&mut allocator, program, refs, max_cost, flags, constants) { - Ok(spend_bundle_conds) => ( - None, - Some(OwnedSpendBundleConditions::from( - &allocator, - spend_bundle_conds, - )), - ), - Err(ValidationErr(_, error_code)) => { - // a validation error occurred - (Some(error_code.into()), None) + py.allow_threads(|| { + match run_block(&mut allocator, program, refs, max_cost, flags, constants) { + Ok(spend_bundle_conds) => ( + None, + Some(OwnedSpendBundleConditions::from( + &allocator, + spend_bundle_conds, + )), + ), + Err(ValidationErr(_, error_code)) => { + // a validation error occurred + (Some(error_code.into()), None) + } } - } + }) } #[pyfunction] pub fn run_block_generator2<'a>( - _py: Python<'a>, + py: Python<'a>, program: PyBuffer, block_refs: &Bound<'_, PyList>, max_cost: Cost, @@ -68,12 +73,15 @@ pub fn run_block_generator2<'a>( ) -> (Option, Option) { let mut allocator = make_allocator(flags); - let refs = block_refs.into_iter().map(|b| { - let buf = b - .extract::>() - .expect("block_refs must be list of buffers"); - py_to_slice::<'a>(buf) - }); + let refs = block_refs + .into_iter() + .map(|b| { + let buf = b + .extract::>() + .expect("block_refs must be list of buffers"); + py_to_slice::<'a>(buf) + }) + .collect::>(); let program = py_to_slice::<'a>(program); let run_block = if (flags & ANALYZE_SPENDS) == 0 { @@ -82,17 +90,19 @@ pub fn run_block_generator2<'a>( native_run_block_generator2::<_, MempoolVisitor, _> }; - match run_block(&mut allocator, program, refs, max_cost, flags, constants) { - Ok(spend_bundle_conds) => ( - None, - Some(OwnedSpendBundleConditions::from( - &allocator, - spend_bundle_conds, - )), - ), - Err(ValidationErr(_, error_code)) => { - // a validation error occurred - (Some(error_code.into()), None) + py.allow_threads(|| { + match run_block(&mut allocator, program, refs, max_cost, flags, constants) { + Ok(spend_bundle_conds) => ( + None, + Some(OwnedSpendBundleConditions::from( + &allocator, + spend_bundle_conds, + )), + ), + Err(ValidationErr(_, error_code)) => { + // a validation error occurred + (Some(error_code.into()), None) + } } - } + }) } From 624fe68f63e5198720587960a1c17def3db19824 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 19 Sep 2024 22:56:55 +0200 Subject: [PATCH 35/59] remove the DISALLOW_INFINITY_G1 flag, make its behavior enabled unconditionally. This was enabled in soft-fork 5 which has now activated and this rule can be applied to all previous blocks (#715) --- crates/chia-consensus/src/gen/conditions.rs | 62 +++++-------------- crates/chia-consensus/src/gen/flags.rs | 13 +--- .../src/spendbundle_validation.rs | 8 +-- generator-tests/infinity-g1.txt | 6 -- wheel/generate_type_stubs.py | 1 - wheel/python/chia_rs/chia_rs.pyi | 1 - wheel/src/api.rs | 4 +- 7 files changed, 19 insertions(+), 76 deletions(-) diff --git a/crates/chia-consensus/src/gen/conditions.rs b/crates/chia-consensus/src/gen/conditions.rs index e5bf91ca7..77ff4cc04 100644 --- a/crates/chia-consensus/src/gen/conditions.rs +++ b/crates/chia-consensus/src/gen/conditions.rs @@ -17,7 +17,7 @@ use super::opcodes::{ use super::sanitize_int::{sanitize_uint, SanitizedUint}; use super::validation_error::{first, next, rest, ErrorCode, ValidationErr}; use crate::consensus_constants::ConsensusConstants; -use crate::gen::flags::{DISALLOW_INFINITY_G1, NO_UNKNOWN_CONDS, STRICT_ARGS_COUNT}; +use crate::gen::flags::{NO_UNKNOWN_CONDS, STRICT_ARGS_COUNT}; use crate::gen::messages::{Message, SpendId}; use crate::gen::spend_visitor::SpendVisitor; use crate::gen::validation_error::check_nil; @@ -867,17 +867,13 @@ fn decrement(cnt: &mut u32, n: NodePtr) -> Result<(), ValidationErr> { } } -fn to_key(a: &Allocator, pk: NodePtr, flags: u32) -> Result, ValidationErr> { +fn to_key(a: &Allocator, pk: NodePtr) -> Result { let key = PublicKey::from_bytes(a.atom(pk).as_ref().try_into().expect("internal error")) .map_err(|_| ValidationErr(pk, ErrorCode::InvalidPublicKey))?; if key.is_inf() { - if (flags & DISALLOW_INFINITY_G1) != 0 { - Err(ValidationErr(pk, ErrorCode::InvalidPublicKey)) - } else { - Ok(None) - } + Err(ValidationErr(pk, ErrorCode::InvalidPublicKey)) } else { - Ok(Some(key)) + Ok(key) } } @@ -1124,47 +1120,31 @@ pub fn parse_conditions( state.assert_concurrent_puzzle.insert(id); } Condition::AggSigMe(pk, msg) => { - if let Some(pk) = to_key(a, pk, flags)? { - spend.agg_sig_me.push((pk, msg)); - } + spend.agg_sig_me.push((to_key(a, pk)?, msg)); } Condition::AggSigParent(pk, msg) => { - if let Some(pk) = to_key(a, pk, flags)? { - spend.agg_sig_parent.push((pk, msg)); - } + spend.agg_sig_parent.push((to_key(a, pk)?, msg)); } Condition::AggSigPuzzle(pk, msg) => { - if let Some(pk) = to_key(a, pk, flags)? { - spend.agg_sig_puzzle.push((pk, msg)); - } + spend.agg_sig_puzzle.push((to_key(a, pk)?, msg)); } Condition::AggSigAmount(pk, msg) => { - if let Some(pk) = to_key(a, pk, flags)? { - spend.agg_sig_amount.push((pk, msg)); - } + spend.agg_sig_amount.push((to_key(a, pk)?, msg)); } Condition::AggSigPuzzleAmount(pk, msg) => { - if let Some(pk) = to_key(a, pk, flags)? { - spend.agg_sig_puzzle_amount.push((pk, msg)); - } + spend.agg_sig_puzzle_amount.push((to_key(a, pk)?, msg)); } Condition::AggSigParentAmount(pk, msg) => { - if let Some(pk) = to_key(a, pk, flags)? { - spend.agg_sig_parent_amount.push((pk, msg)); - } + spend.agg_sig_parent_amount.push((to_key(a, pk)?, msg)); } Condition::AggSigParentPuzzle(pk, msg) => { - if let Some(pk) = to_key(a, pk, flags)? { - spend.agg_sig_parent_puzzle.push((pk, msg)); - } + spend.agg_sig_parent_puzzle.push((to_key(a, pk)?, msg)); } Condition::AggSigUnsafe(pk, msg) => { // AGG_SIG_UNSAFE messages are not allowed to end with the // suffix added to other AGG_SIG_* conditions check_agg_sig_unsafe_message(a, msg, constants)?; - if let Some(pk) = to_key(a, pk, flags)? { - ret.agg_sig_unsafe.push((pk, msg)); - } + ret.agg_sig_unsafe.push((to_key(a, pk)?, msg)); } Condition::Softfork(cost) => { if *max_cost < cost { @@ -3123,7 +3103,7 @@ fn test_agg_sig_invalid_pubkey( #[case(AGG_SIG_UNSAFE)] fn test_agg_sig_infinity_pubkey( #[case] condition: ConditionOpcode, - #[values(DISALLOW_INFINITY_G1, 0)] mempool: u32, + #[values(MEMPOOL_MODE, 0)] mempool: u32, ) { let ret = cond_test_flag( &format!( @@ -3133,21 +3113,7 @@ fn test_agg_sig_infinity_pubkey( mempool ); - if mempool != 0 { - assert_eq!(ret.unwrap_err().1, ErrorCode::InvalidPublicKey); - } else { - let ret = ret.expect("expected conditions to be valid").1; - assert!(ret.agg_sig_unsafe.is_empty()); - for c in ret.spends { - assert!(c.agg_sig_me.is_empty()); - assert!(c.agg_sig_parent.is_empty()); - assert!(c.agg_sig_puzzle.is_empty()); - assert!(c.agg_sig_amount.is_empty()); - assert!(c.agg_sig_puzzle_amount.is_empty()); - assert!(c.agg_sig_parent_amount.is_empty()); - assert!(c.agg_sig_parent_puzzle.is_empty()); - } - } + assert_eq!(ret.unwrap_err().1, ErrorCode::InvalidPublicKey); } #[cfg(test)] diff --git a/crates/chia-consensus/src/gen/flags.rs b/crates/chia-consensus/src/gen/flags.rs index a6a97d8a1..27c30e10a 100644 --- a/crates/chia-consensus/src/gen/flags.rs +++ b/crates/chia-consensus/src/gen/flags.rs @@ -17,14 +17,5 @@ pub const ALLOW_BACKREFS: u32 = 0x0200_0000; // what features are detected of the spends pub const ANALYZE_SPENDS: u32 = 0x0400_0000; -// When this flag is set, we reject AGG_SIG_* conditions whose public key is the -// infinity G1 point. Such public keys are mathematically valid, but do not -// provide any security guarantees. Chia has historically allowed them. Enabling -// this flag is a soft-fork. -pub const DISALLOW_INFINITY_G1: u32 = 0x1000_0000; - -pub const MEMPOOL_MODE: u32 = CLVM_MEMPOOL_MODE - | NO_UNKNOWN_CONDS - | STRICT_ARGS_COUNT - | ANALYZE_SPENDS - | DISALLOW_INFINITY_G1; +pub const MEMPOOL_MODE: u32 = + CLVM_MEMPOOL_MODE | NO_UNKNOWN_CONDS | STRICT_ARGS_COUNT | ANALYZE_SPENDS; diff --git a/crates/chia-consensus/src/spendbundle_validation.rs b/crates/chia-consensus/src/spendbundle_validation.rs index 80d9b1d81..98fa53d14 100644 --- a/crates/chia-consensus/src/spendbundle_validation.rs +++ b/crates/chia-consensus/src/spendbundle_validation.rs @@ -1,6 +1,6 @@ use crate::allocator::make_allocator; use crate::consensus_constants::ConsensusConstants; -use crate::gen::flags::{ALLOW_BACKREFS, DISALLOW_INFINITY_G1}; +use crate::gen::flags::ALLOW_BACKREFS; use crate::gen::make_aggsig_final_message::make_aggsig_final_message; use crate::gen::opcodes::{ AGG_SIG_AMOUNT, AGG_SIG_ME, AGG_SIG_PARENT, AGG_SIG_PARENT_AMOUNT, AGG_SIG_PARENT_PUZZLE, @@ -98,10 +98,6 @@ fn hash_pk_and_msg(pk: &[u8], msg: &[u8]) -> [u8; 32] { pub fn get_flags_for_height_and_constants(height: u32, constants: &ConsensusConstants) -> u32 { let mut flags: u32 = ENABLE_FIXED_DIV; - if height >= constants.soft_fork5_height { - flags |= DISALLOW_INFINITY_G1; - } - if height >= constants.hard_fork_height { // the hard-fork initiated with 2.0. To activate June 2024 // * costs are ascribed to some unknown condition codes, to allow for @@ -139,7 +135,7 @@ mod tests { #[case(0, ENABLE_FIXED_DIV)] #[case(TEST_CONSTANTS.hard_fork_height, ENABLE_BLS_OPS_OUTSIDE_GUARD | ENABLE_FIXED_DIV | ALLOW_BACKREFS)] #[case(5_716_000, ENABLE_BLS_OPS_OUTSIDE_GUARD | ENABLE_FIXED_DIV | ALLOW_BACKREFS)] - #[case(TEST_CONSTANTS.soft_fork5_height, ENABLE_BLS_OPS_OUTSIDE_GUARD | ENABLE_FIXED_DIV | ALLOW_BACKREFS | DISALLOW_INFINITY_G1)] + #[case(TEST_CONSTANTS.soft_fork5_height, ENABLE_BLS_OPS_OUTSIDE_GUARD | ENABLE_FIXED_DIV | ALLOW_BACKREFS)] fn test_get_flags(#[case] height: u32, #[case] expected_value: u32) { assert_eq!( get_flags_for_height_and_constants(height, &TEST_CONSTANTS), diff --git a/generator-tests/infinity-g1.txt b/generator-tests/infinity-g1.txt index f047b85ed..15c494f40 100644 --- a/generator-tests/infinity-g1.txt +++ b/generator-tests/infinity-g1.txt @@ -1,8 +1,2 @@ ff01ffffffa00101010101010101010101010101010101010101010101010101010101010101ffff01ffff2bffb0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff86666f6f6261728080ff7bff80808080 -SPENDS: -- coin id: 10d6c244183579e7704ea71e862098f15d28d63fb63c6a54779d1fe901ca48b1 ph: 99d9c5fd60cc6d5bca3390783d3489cd744139f7f143191ea911de3a22b50907 -cost: 2552512 -removal_amount: 123 -addition_amount: 0 -STRICT: FAILED: 10 diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index ed35a496f..fc3c0b39d 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -323,7 +323,6 @@ def get_flags_for_height_and_constants( NO_UNKNOWN_CONDS: int = ... STRICT_ARGS_COUNT: int = ... LIMIT_HEAP: int = ... -DISALLOW_INFINITY_G1: int = ... MEMPOOL_MODE: int = ... ENABLE_BLS_OPS: int = ... ENABLE_SECP_OPS: int = ... diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 7b8b65cbf..94780a9c7 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -72,7 +72,6 @@ def get_flags_for_height_and_constants( NO_UNKNOWN_CONDS: int = ... STRICT_ARGS_COUNT: int = ... LIMIT_HEAP: int = ... -DISALLOW_INFINITY_G1: int = ... MEMPOOL_MODE: int = ... ENABLE_BLS_OPS: int = ... ENABLE_SECP_OPS: int = ... diff --git a/wheel/src/api.rs b/wheel/src/api.rs index 2b603d123..af97ed7a0 100644 --- a/wheel/src/api.rs +++ b/wheel/src/api.rs @@ -3,8 +3,7 @@ use chia_consensus::allocator::make_allocator; use chia_consensus::consensus_constants::ConsensusConstants; use chia_consensus::gen::conditions::MempoolVisitor; use chia_consensus::gen::flags::{ - ALLOW_BACKREFS, ANALYZE_SPENDS, DISALLOW_INFINITY_G1, MEMPOOL_MODE, NO_UNKNOWN_CONDS, - STRICT_ARGS_COUNT, + ALLOW_BACKREFS, ANALYZE_SPENDS, MEMPOOL_MODE, NO_UNKNOWN_CONDS, STRICT_ARGS_COUNT, }; use chia_consensus::gen::owned_conditions::{OwnedSpendBundleConditions, OwnedSpendConditions}; use chia_consensus::gen::run_block_generator::setup_generator_args; @@ -505,7 +504,6 @@ pub fn chia_rs(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add("MEMPOOL_MODE", MEMPOOL_MODE)?; m.add("ALLOW_BACKREFS", ALLOW_BACKREFS)?; m.add("ANALYZE_SPENDS", ANALYZE_SPENDS)?; - m.add("DISALLOW_INFINITY_G1", DISALLOW_INFINITY_G1)?; // Chia classes m.add_class::()?; From e29c82f72fa9cca8990fe15c9e29ff4fa62d725a Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 20 Sep 2024 11:18:10 +0200 Subject: [PATCH 36/59] update gen-corpus to generate coin spends for solution-generator fuzzer --- crates/chia-tools/src/bin/gen-corpus.rs | 55 ++++++++++++++++++++----- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/crates/chia-tools/src/bin/gen-corpus.rs b/crates/chia-tools/src/bin/gen-corpus.rs index 4ffb58e9d..34a00c70e 100644 --- a/crates/chia-tools/src/bin/gen-corpus.rs +++ b/crates/chia-tools/src/bin/gen-corpus.rs @@ -15,9 +15,11 @@ use clvm_traits::FromClvm; use clvm_utils::{tree_hash, CurriedProgram}; use clvmr::allocator::NodePtr; use clvmr::Allocator; +use core::sync::atomic::Ordering; use std::collections::HashSet; -use std::fs::write; +use std::fs::{write, File}; use std::io::Write; +use std::sync::atomic::AtomicUsize; use std::sync::{Arc, Mutex}; use std::thread::available_parallelism; use std::time::{Duration, Instant}; @@ -37,6 +39,14 @@ struct Args { #[arg(long, default_value_t = false)] spend_bundles: bool, + /// generate corpus for solution-generator + #[arg(long, default_value_t = false)] + coin_spends: bool, + + /// generate corpus for run-puzzle + #[arg(long, default_value_t = false)] + puzzles: bool, + /// stop running block generators when reaching this height #[arg(short, long)] max_height: Option, @@ -62,6 +72,7 @@ fn main() { let mut last_height = 0; let mut last_time = Instant::now(); + let corpus_counter = Arc::new(AtomicUsize::new(0)); iterate_tx_blocks( &args.file, args.start_height, @@ -73,6 +84,7 @@ fn main() { let seen_puzzles = seen_puzzles.clone(); let seen_singletons = seen_singletons.clone(); + let cnt = corpus_counter.clone(); pool.execute(move || { let mut a = Allocator::new_limited(500_000_000); @@ -93,11 +105,13 @@ fn main() { _ => puzzle_hash, }; - let run_puzzle = seen_puzzles.lock().unwrap().insert(mod_hash); + let seen_puzzle = seen_puzzles.lock().unwrap().insert(mod_hash); + let run_puzzle = args.puzzles && seen_puzzle; let fast_forward = (mod_hash == SINGLETON_TOP_LAYER_PUZZLE_HASH.into()) && seen_singletons.lock().unwrap().insert(puzzle_hash); - if !run_puzzle && !fast_forward && !args.spend_bundles { + if !run_puzzle && !fast_forward && !args.spend_bundles && !args.coin_spends + { return; } let puzzle_reveal = Program::from_clvm(a, puzzle).expect("puzzle reveal"); @@ -113,49 +127,68 @@ fn main() { solution, }; - if args.spend_bundles { + if (args.spend_bundles || args.coin_spends) && !seen_puzzle { bundle.coin_spends.push(spend.clone()); } if !run_puzzle && !fast_forward { return; } - let mut bytes = Vec::::new(); - spend.stream(&mut bytes).expect("stream CoinSpend"); + let bytes = spend.to_bytes().expect("stream CoinSpend"); if run_puzzle { let directory = "../chia-consensus/fuzz/corpus/run-puzzle"; let _ = std::fs::create_dir_all(directory); write(format!("{directory}/{mod_hash}.spend"), &bytes).expect("write"); - println!("{height}: {mod_hash}"); + cnt.fetch_add(1, Ordering::Relaxed); } if fast_forward { let directory = "../chia-consensus/fuzz/corpus/fast-forward"; let _ = std::fs::create_dir_all(directory); - write(format!("{directory}/{puzzle_hash}.spend"), bytes) + write(format!("{directory}/{puzzle_hash}.spend"), &bytes) .expect("write"); - println!("{height}: {puzzle_hash}"); + cnt.fetch_add(1, Ordering::Relaxed); } }, ) .expect("failed to run block generator"); - if args.spend_bundles { + if args.spend_bundles && !bundle.coin_spends.is_empty() { let directory = "../chia-protocol/fuzz/corpus/spend-bundle"; let _ = std::fs::create_dir_all(directory); let bytes = bundle.to_bytes().expect("to_bytes"); write(format!("{directory}/{height}.bundle"), bytes).expect("write"); + cnt.fetch_add(1, Ordering::Relaxed); + } + + if args.coin_spends && !bundle.coin_spends.is_empty() { + let directory = "../chia-consensus/fuzz/corpus/solution-generator"; + let _ = std::fs::create_dir_all(directory); + let mut f = + File::create(format!("{directory}/{height}.spends")).expect("open file"); + for cs in &bundle.coin_spends { + f.write_all(&cs.to_bytes().expect("CoinSpend serialize")) + .expect("file write"); + } + cnt.fetch_add(1, Ordering::Relaxed); } }); if last_time.elapsed() > Duration::new(4, 0) { let rate = f64::from(height - last_height) / last_time.elapsed().as_secs_f64(); - print!("\rheight: {height} ({rate:0.1} blocks/s) "); + print!( + "\rheight: {height} ({rate:0.1} blocks/s) corpus: {} ", + corpus_counter.load(Ordering::Relaxed) + ); let _ = std::io::stdout().flush(); last_height = height; last_time = Instant::now(); } }, ); + print!( + "\nwrote {} examples to the fuzzing corpus", + corpus_counter.load(Ordering::Relaxed) + ); assert_eq!(pool.panic_count(), 0); From bc16616155b001b0bf88f37fa4f40b35f3b9bfae Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 20 Sep 2024 21:25:37 +0200 Subject: [PATCH 37/59] bump clvm_rs dependency to 0.9.0. update the removed flags accordingly. fix an old mistake in the python stub file where some removed flags were still exposed. --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- crates/chia-consensus/src/spendbundle_validation.rs | 13 ++++++------- .../chia-protocol/fuzz/fuzz_targets/spend-bundle.rs | 3 +-- crates/chia-protocol/src/spend_bundle.rs | 5 +---- wheel/generate_type_stubs.py | 4 ---- wheel/python/chia_rs/chia_rs.pyi | 4 ---- wheel/src/api.rs | 4 +--- 8 files changed, 12 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a42ad5005..bb4ad01d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -663,9 +663,9 @@ dependencies = [ [[package]] name = "clvmr" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903233f3bc9392b44a589f0cea46a53a67fedc3afb4b1303f636977074a505c5" +checksum = "ffccd9116f36edbf02dad718a2fece269d05492fb31278423883ef464444bbb6" dependencies = [ "chia-bls 0.10.0", "hex-literal", diff --git a/Cargo.toml b/Cargo.toml index f1c579996..24dbfdf01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -110,7 +110,7 @@ clvm-utils = { path = "./crates/clvm-utils", version = "0.13.0" } clvm-derive = { path = "./crates/clvm-derive", version = "0.13.0" } chia-fuzz = { path = "./crates/chia-consensus/fuzz", version = "0.13.0" } blst = { version = "0.3.12", features = ["portable"] } -clvmr = "0.8.0" +clvmr = "0.9.0" syn = "2.0.75" quote = "1.0.32" proc-macro2 = "1.0.84" diff --git a/crates/chia-consensus/src/spendbundle_validation.rs b/crates/chia-consensus/src/spendbundle_validation.rs index 98fa53d14..dacde6639 100644 --- a/crates/chia-consensus/src/spendbundle_validation.rs +++ b/crates/chia-consensus/src/spendbundle_validation.rs @@ -13,7 +13,7 @@ use chia_bls::GTElement; use chia_bls::{aggregate_verify_gt, hash_to_g2}; use chia_protocol::SpendBundle; use clvmr::sha2::Sha256; -use clvmr::{ENABLE_BLS_OPS_OUTSIDE_GUARD, ENABLE_FIXED_DIV, LIMIT_HEAP}; +use clvmr::LIMIT_HEAP; use std::time::{Duration, Instant}; // type definition makes clippy happy @@ -96,7 +96,7 @@ fn hash_pk_and_msg(pk: &[u8], msg: &[u8]) -> [u8; 32] { } pub fn get_flags_for_height_and_constants(height: u32, constants: &ConsensusConstants) -> u32 { - let mut flags: u32 = ENABLE_FIXED_DIV; + let mut flags: u32 = 0; if height >= constants.hard_fork_height { // the hard-fork initiated with 2.0. To activate June 2024 @@ -113,7 +113,7 @@ pub fn get_flags_for_height_and_constants(height: u32, constants: &ConsensusCons // arguments // * Allow the block generator to be serialized with the improved clvm // serialization format (with back-references) - flags = flags | ENABLE_BLS_OPS_OUTSIDE_GUARD | ALLOW_BACKREFS; + flags |= ALLOW_BACKREFS; } flags } @@ -132,10 +132,9 @@ mod tests { use rstest::rstest; #[rstest] - #[case(0, ENABLE_FIXED_DIV)] - #[case(TEST_CONSTANTS.hard_fork_height, ENABLE_BLS_OPS_OUTSIDE_GUARD | ENABLE_FIXED_DIV | ALLOW_BACKREFS)] - #[case(5_716_000, ENABLE_BLS_OPS_OUTSIDE_GUARD | ENABLE_FIXED_DIV | ALLOW_BACKREFS)] - #[case(TEST_CONSTANTS.soft_fork5_height, ENABLE_BLS_OPS_OUTSIDE_GUARD | ENABLE_FIXED_DIV | ALLOW_BACKREFS)] + #[case(0, 0)] + #[case(TEST_CONSTANTS.hard_fork_height, ALLOW_BACKREFS)] + #[case(5_716_000, ALLOW_BACKREFS)] fn test_get_flags(#[case] height: u32, #[case] expected_value: u32) { assert_eq!( get_flags_for_height_and_constants(height, &TEST_CONSTANTS), diff --git a/crates/chia-protocol/fuzz/fuzz_targets/spend-bundle.rs b/crates/chia-protocol/fuzz/fuzz_targets/spend-bundle.rs index 97106d6c1..89735192a 100644 --- a/crates/chia-protocol/fuzz/fuzz_targets/spend-bundle.rs +++ b/crates/chia-protocol/fuzz/fuzz_targets/spend-bundle.rs @@ -5,7 +5,6 @@ use chia_protocol::{Bytes32, SpendBundle}; use chia_traits::Streamable; use clvm_traits::FromClvm; use clvmr::op_utils::{first, rest}; -use clvmr::ENABLE_FIXED_DIV; use clvmr::{Allocator, NodePtr}; use libfuzzer_sys::fuzz_target; use std::collections::HashSet; @@ -27,7 +26,7 @@ fuzz_target!(|data: &[u8]| { for cs in &bundle.coin_spends { let (cost, mut conds) = cs .puzzle_reveal - .run(&mut a, ENABLE_FIXED_DIV, 11_000_000_000, &cs.solution) + .run(&mut a, 0, 11_000_000_000, &cs.solution) .expect("run"); total_cost += cost; diff --git a/crates/chia-protocol/src/spend_bundle.rs b/crates/chia-protocol/src/spend_bundle.rs index 62778fa65..1e17a7740 100644 --- a/crates/chia-protocol/src/spend_bundle.rs +++ b/crates/chia-protocol/src/spend_bundle.rs @@ -10,7 +10,6 @@ use clvmr::cost::Cost; use clvmr::op_utils::{first, rest}; use clvmr::reduction::EvalErr; use clvmr::Allocator; -use clvmr::ENABLE_FIXED_DIV; #[cfg(feature = "py-bindings")] use pyo3::prelude::*; @@ -50,9 +49,7 @@ impl SpendBundle { for cs in &self.coin_spends { a.restore_checkpoint(&checkpoint); - let (cost, mut conds) = - cs.puzzle_reveal - .run(&mut a, ENABLE_FIXED_DIV, cost_left, &cs.solution)?; + let (cost, mut conds) = cs.puzzle_reveal.run(&mut a, 0, cost_left, &cs.solution)?; if cost > cost_left { return Err(EvalErr(a.nil(), "cost exceeded".to_string())); } diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index fc3c0b39d..ec39274db 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -324,10 +324,6 @@ def get_flags_for_height_and_constants( STRICT_ARGS_COUNT: int = ... LIMIT_HEAP: int = ... MEMPOOL_MODE: int = ... -ENABLE_BLS_OPS: int = ... -ENABLE_SECP_OPS: int = ... -ENABLE_BLS_OPS_OUTSIDE_GUARD: int = ... -ENABLE_FIXED_DIV: int = ... ALLOW_BACKREFS: int = ... ELIGIBLE_FOR_DEDUP: int = ... diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 94780a9c7..30512a276 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -73,10 +73,6 @@ NO_UNKNOWN_CONDS: int = ... STRICT_ARGS_COUNT: int = ... LIMIT_HEAP: int = ... MEMPOOL_MODE: int = ... -ENABLE_BLS_OPS: int = ... -ENABLE_SECP_OPS: int = ... -ENABLE_BLS_OPS_OUTSIDE_GUARD: int = ... -ENABLE_FIXED_DIV: int = ... ALLOW_BACKREFS: int = ... ELIGIBLE_FOR_DEDUP: int = ... diff --git a/wheel/src/api.rs b/wheel/src/api.rs index af97ed7a0..758f8eca0 100644 --- a/wheel/src/api.rs +++ b/wheel/src/api.rs @@ -43,7 +43,7 @@ use chia_protocol::{ TransactionsInfo, UnfinishedBlock, UnfinishedHeaderBlock, VDFInfo, VDFProof, WeightProof, }; use clvm_utils::tree_hash_from_bytes; -use clvmr::{ENABLE_BLS_OPS_OUTSIDE_GUARD, ENABLE_FIXED_DIV, LIMIT_HEAP, NO_UNKNOWN_OPS}; +use clvmr::{LIMIT_HEAP, NO_UNKNOWN_OPS}; use pyo3::buffer::PyBuffer; use pyo3::exceptions::{PyRuntimeError, PyTypeError, PyValueError}; use pyo3::prelude::*; @@ -500,7 +500,6 @@ pub fn chia_rs(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { // clvm functions m.add("NO_UNKNOWN_CONDS", NO_UNKNOWN_CONDS)?; m.add("STRICT_ARGS_COUNT", STRICT_ARGS_COUNT)?; - m.add("ENABLE_FIXED_DIV", ENABLE_FIXED_DIV)?; m.add("MEMPOOL_MODE", MEMPOOL_MODE)?; m.add("ALLOW_BACKREFS", ALLOW_BACKREFS)?; m.add("ANALYZE_SPENDS", ANALYZE_SPENDS)?; @@ -623,7 +622,6 @@ pub fn chia_rs(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_function(wrap_pyfunction!(run_chia_program, m)?)?; m.add("NO_UNKNOWN_OPS", NO_UNKNOWN_OPS)?; m.add("LIMIT_HEAP", LIMIT_HEAP)?; - m.add("ENABLE_BLS_OPS_OUTSIDE_GUARD", ENABLE_BLS_OPS_OUTSIDE_GUARD)?; m.add_function(wrap_pyfunction!(serialized_length, m)?)?; m.add_function(wrap_pyfunction!(compute_merkle_set_root, m)?)?; From b6ebeabf82ba26a8d06cebc1f8e2aa7d56d6099d Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 20 Sep 2024 23:09:30 +0200 Subject: [PATCH 38/59] remove dependency on chia-blockchain in some tests that no longer work with the new changes to chia_rs (since it's a circular dependency) --- tests/test_block_record_fidelity.py | 34 +---------------------------- tests/test_blscache.py | 15 ------------- tests/test_spend_bundle.py | 3 +-- 3 files changed, 2 insertions(+), 50 deletions(-) diff --git a/tests/test_block_record_fidelity.py b/tests/test_block_record_fidelity.py index c357008ce..ec1b3afad 100644 --- a/tests/test_block_record_fidelity.py +++ b/tests/test_block_record_fidelity.py @@ -5,9 +5,8 @@ from chia_rs import BlockRecord, ClassgroupElement from chia_rs.sized_bytes import bytes32, bytes100 from chia_rs.sized_ints import uint32, uint64, uint8, uint128 -from chia.consensus.block_record import BlockRecord as PyBlockRecord from random import Random -from chia.consensus.default_constants import DEFAULT_CONSTANTS +from run_gen import DEFAULT_CONSTANTS def get_classgroup_element(rng: Random) -> ClassgroupElement: @@ -130,34 +129,3 @@ def wrap_call(expr: str, br: Any) -> str: return f"V:{ret}" except Exception as e: return f"E:{e}" - - -def test_block_record() -> None: - rng = Random() - seed = int(time.time()) - print(f"seed: {seed}") - rng.seed(seed) - - for i in range(500000): - br = get_block_record(rng) - serialized = bytes(br) - py_identity = PyBlockRecord.from_bytes(serialized) - - assert bytes(py_identity) == serialized - assert f"{type(br)}" != f"{type(py_identity)}" - - for test_call in [ - "ip_iters", - "sp_total_iters", - "sp_iters", - "ip_sub_slot_total_iters", - "sp_sub_slot_total_iters", - ]: - rust_ret = wrap_call(f"br.{test_call}(DEFAULT_CONSTANTS)", br) - py_ret = wrap_call(f"br.{test_call}(DEFAULT_CONSTANTS)", py_identity) - - assert rust_ret == py_ret - - if (i & 0x3FF) == 0: - sys.stdout.write(f" {i} \r") - sys.stdout.flush() diff --git a/tests/test_blscache.py b/tests/test_blscache.py index 018d539de..c228b321d 100644 --- a/tests/test_blscache.py +++ b/tests/test_blscache.py @@ -18,7 +18,6 @@ from chia.util.hash import std_hash from chia.util.lru_cache import LRUCache from chia.types.blockchain_format.program import Program as ChiaProgram -from chia.util import cached_bls as cached_bls_old import pytest @@ -167,17 +166,12 @@ def test_cached_bls(): # Verify with empty cache and populate it assert cached_bls.aggregate_verify(pks_half, msgs_half, agg_sig_half) - assert cached_bls_old.aggregate_verify( - pks_half_bytes, msgs_half, agg_sig_half, True - ) # Verify with partial cache hit assert cached_bls.aggregate_verify(pks, msgs, agg_sig) - assert cached_bls_old.aggregate_verify(pks_bytes, msgs, agg_sig, True) # Verify with full cache hit assert cached_bls.aggregate_verify(pks, msgs, agg_sig) - assert cached_bls_old.aggregate_verify(pks_bytes, msgs, agg_sig) # Use a small cache which can not accommodate all pairings bls_cache = BLSCache(n_keys // 2) @@ -185,19 +179,12 @@ def test_cached_bls(): # Verify signatures and cache pairings one at a time for pk, msg, sig in zip(pks_half, msgs_half, sigs_half): assert bls_cache.aggregate_verify([pk], [msg], sig) - assert cached_bls_old.aggregate_verify( - [bytes(pk)], [msg], sig, True, local_cache - ) # Verify the same messages with aggregated signature (full cache hit) assert bls_cache.aggregate_verify(pks_half, msgs_half, agg_sig_half) - assert cached_bls_old.aggregate_verify( - pks_half_bytes, msgs_half, agg_sig_half, False, local_cache - ) # Verify more messages (partial cache hit) assert bls_cache.aggregate_verify(pks, msgs, agg_sig) - assert cached_bls_old.aggregate_verify(pks_bytes, msgs, agg_sig, False, local_cache) def test_cached_bls_flattening(): @@ -250,14 +237,12 @@ def test_cached_bls_repeat_pk(): assert AugSchemeMPL.aggregate_verify([pk for pk in pks], msgs, agg_sig) assert cached_bls.aggregate_verify(pks, msgs, agg_sig) - assert cached_bls_old.aggregate_verify(pks_bytes, msgs, agg_sig, True) def test_empty_sig(): sig = AugSchemeMPL.aggregate([]) cached_bls = BLSCache() assert cached_bls.aggregate_verify([], [], sig) - assert cached_bls_old.aggregate_verify([], [], sig) def test_bad_cache_size(): diff --git a/tests/test_spend_bundle.py b/tests/test_spend_bundle.py index 220180af7..063e35a36 100644 --- a/tests/test_spend_bundle.py +++ b/tests/test_spend_bundle.py @@ -1,5 +1,4 @@ from chia_rs import SpendBundle -from chia.types.spend_bundle import SpendBundle as PySpendBundle import pytest from typing import Type @@ -189,7 +188,7 @@ amount: 1232500000000 }]" -@pytest.mark.parametrize("ty", [SpendBundle, PySpendBundle]) +@pytest.mark.parametrize("ty", [SpendBundle]) @pytest.mark.parametrize( "input_file, expected_add, expected_rem", [ From bf1d911e0d73356643262e33f762a22240c9a240 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 21 Sep 2024 12:19:26 +0200 Subject: [PATCH 39/59] update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 96f9efe1f..19884df0c 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ To list and run fuzzers: ```bash cargo fuzz list -cargo fuzz run +cargo +nightly fuzz run --jobs=10 ``` ## Bumping Version Number From 47ffe806d2f49a69804717c941dee415b4178c7d Mon Sep 17 00:00:00 2001 From: matt-o-how <48453825+matt-o-how@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:07:10 +0100 Subject: [PATCH 40/59] Change BLSCache to take and return deserialized GTElements (#710) * Change update() and items() in BLSCache to take and return unserialized GTElements * line endings * fmt --- crates/chia-bls/src/bls_cache.rs | 13 +++---------- tests/test_blscache.py | 14 ++++++-------- wheel/generate_type_stubs.py | 4 ++-- wheel/python/chia_rs/chia_rs.pyi | 4 ++-- 4 files changed, 13 insertions(+), 22 deletions(-) diff --git a/crates/chia-bls/src/bls_cache.rs b/crates/chia-bls/src/bls_cache.rs index f375465cc..3ce4a8b6a 100644 --- a/crates/chia-bls/src/bls_cache.rs +++ b/crates/chia-bls/src/bls_cache.rs @@ -137,10 +137,7 @@ impl BlsCache { use pyo3::types::PyBytes; let ret = PyList::empty_bound(py); for (key, value) in &self.cache { - ret.append(( - PyBytes::new_bound(py, key), - PyBytes::new_bound(py, &value.to_bytes()), - ))?; + ret.append((PyBytes::new_bound(py, key), value.clone().into_py(py)))?; } Ok(ret.into()) } @@ -148,15 +145,11 @@ impl BlsCache { #[pyo3(name = "update")] pub fn py_update(&mut self, other: &Bound<'_, PyList>) -> PyResult<()> { for item in other.borrow().iter()? { - let (key, value): (Vec, Vec) = item?.extract()?; + let (key, value): (Vec, GTElement) = item?.extract()?; self.cache.put( key.try_into() .map_err(|_| PyValueError::new_err("invalid key"))?, - GTElement::from_bytes( - (&value[..]) - .try_into() - .map_err(|_| PyValueError::new_err("invalid GTElement"))?, - ), + value, ); } Ok(()) diff --git a/tests/test_blscache.py b/tests/test_blscache.py index c228b321d..35fda7619 100644 --- a/tests/test_blscache.py +++ b/tests/test_blscache.py @@ -202,10 +202,9 @@ def test_cached_bls_flattening(): gts = [pk.pair(AugSchemeMPL.g2_from_message(bytes(pk) + b"foobar")) for pk in pks] for key, value in cached_bls.items(): assert isinstance(key, bytes) - assert isinstance(value, bytes) - reconstructed = GTElement.from_bytes(value) - assert reconstructed in gts - gts.remove(reconstructed) + assert isinstance(value, GTElement) + assert value in gts + gts.remove(value) cache_copy = BLSCache() cache_copy.update(cached_bls.items()) @@ -214,10 +213,9 @@ def test_cached_bls_flattening(): gts = [pk.pair(AugSchemeMPL.g2_from_message(bytes(pk) + b"foobar")) for pk in pks] for key, value in cache_copy.items(): assert isinstance(key, bytes) - assert isinstance(value, bytes) - reconstructed = GTElement.from_bytes(value) - assert reconstructed in gts - gts.remove(reconstructed) + assert isinstance(value, GTElement) + assert value in gts + gts.remove(value) def test_cached_bls_repeat_pk(): diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index ec39274db..f27db2c05 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -348,8 +348,8 @@ class BLSCache: def __init__(self, cache_size: Optional[int] = 50000) -> None: ... def len(self) -> int: ... def aggregate_verify(self, pks: List[G1Element], msgs: List[bytes], sig: G2Element) -> bool: ... - def items(self) -> List[Tuple[bytes, bytes]]: ... - def update(self, other: List[Tuple[bytes, bytes]]) -> None: ... + def items(self) -> List[Tuple[bytes, GTElement]]: ... + def update(self, other: List[Tuple[bytes, GTElement]]) -> None: ... class AugSchemeMPL: @staticmethod diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 30512a276..62c20915c 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -97,8 +97,8 @@ class BLSCache: def __init__(self, cache_size: Optional[int] = 50000) -> None: ... def len(self) -> int: ... def aggregate_verify(self, pks: List[G1Element], msgs: List[bytes], sig: G2Element) -> bool: ... - def items(self) -> List[Tuple[bytes, bytes]]: ... - def update(self, other: List[Tuple[bytes, bytes]]) -> None: ... + def items(self) -> List[Tuple[bytes, GTElement]]: ... + def update(self, other: List[Tuple[bytes, GTElement]]) -> None: ... class AugSchemeMPL: @staticmethod From aba589519c9de0d2b85a2f9f1bd64e43a9a23cda Mon Sep 17 00:00:00 2001 From: matt-o-how <48453825+matt-o-how@users.noreply.github.com> Date: Mon, 23 Sep 2024 11:07:24 +0100 Subject: [PATCH 41/59] Switch to #[classmethod] for SpendBundle::py_aggregate (#678) * switch to classmethod for py_aggregate * import under cfg feature * update stubs * add test for derived class returning correctly * change pystreamable macro to use classmethods instead of staticmethods * fmt and clippy * fix line ending format * black test * add tests for the streamable macro functions * fix tests to actually test what we're expecting * fix aggregate * nonworking commit for arvid * fixup * add downcasting step to streamable classmethods that support it * fix tests and remove duplicate imports * add from_parent for OwnedSpendConditions and OwnedSpendBundleConditions * fmt * fix stubs and use ? * pushing broken optional skip to work from laptop * fix * update all remaining streamable macros to use check and skip * update stubs to reflect new Streamable * use py as paramter instead of calling with_gil() * Add NotImplemented error for unsupported from_parent() calls * re-enable from_parent in SpendBundle * make error messages struct specific * fmt * fix if statement for from_parent skip * clippy fixes * add from_parent skip to aggregate() * clippy fix * Remove final with_gil() Co-authored-by: Arvid Norberg * fmt --------- Co-authored-by: arvidn Co-authored-by: Arvid Norberg --- crates/chia-bls/src/gtelement.rs | 15 +- crates/chia-bls/src/public_key.rs | 25 +- crates/chia-bls/src/secret_key.rs | 25 +- crates/chia-bls/src/signature.rs | 25 +- .../src/gen/owned_conditions.rs | 31 + crates/chia-protocol/src/coin.rs | 16 + crates/chia-protocol/src/coin_spend.rs | 17 + crates/chia-protocol/src/program.rs | 19 +- crates/chia-protocol/src/spend_bundle.rs | 34 +- crates/chia_py_streamable_macro/src/lib.rs | 87 +- tests/test_spend_bundle.py | 32 + wheel/generate_type_stubs.py | 20 +- wheel/python/chia_rs/chia_rs.pyi | 1910 ++++++++--------- 13 files changed, 1263 insertions(+), 993 deletions(-) diff --git a/crates/chia-bls/src/gtelement.rs b/crates/chia-bls/src/gtelement.rs index 5c42fbd1c..f3245692d 100644 --- a/crates/chia-bls/src/gtelement.rs +++ b/crates/chia-bls/src/gtelement.rs @@ -2,6 +2,12 @@ use blst::*; use chia_traits::chia_error::Result; use chia_traits::{read_bytes, Streamable}; use clvmr::sha2::Sha256; +#[cfg(feature = "py-bindings")] +use pyo3::exceptions::PyNotImplementedError; +#[cfg(feature = "py-bindings")] +use pyo3::prelude::*; +#[cfg(feature = "py-bindings")] +use pyo3::types::PyType; use std::fmt; use std::hash::{Hash, Hasher}; use std::io::Cursor; @@ -112,6 +118,14 @@ impl GTElement { hex::encode(self.to_bytes()) } + #[classmethod] + #[pyo3(name = "from_parent")] + pub fn from_parent(_cls: &Bound<'_, PyType>, _instance: &Self) -> PyResult { + Err(PyNotImplementedError::new_err( + "GTElement does not support from_parent().", + )) + } + #[must_use] pub fn __mul__(&self, rhs: &Self) -> Self { let mut ret = self.clone(); @@ -130,7 +144,6 @@ mod pybindings { use crate::parse_hex::parse_hex_string; use chia_traits::{FromJsonDict, ToJsonDict}; - use pyo3::prelude::*; impl ToJsonDict for GTElement { fn to_json_dict(&self, py: Python<'_>) -> PyResult { diff --git a/crates/chia-bls/src/public_key.rs b/crates/chia-bls/src/public_key.rs index c0e164c61..cd95b5a85 100644 --- a/crates/chia-bls/src/public_key.rs +++ b/crates/chia-bls/src/public_key.rs @@ -4,6 +4,12 @@ use crate::{DerivableKey, Error, Result}; use blst::*; use chia_traits::{read_bytes, Streamable}; use clvmr::sha2::Sha256; +#[cfg(feature = "py-bindings")] +use pyo3::exceptions::PyNotImplementedError; +#[cfg(feature = "py-bindings")] +use pyo3::prelude::*; +#[cfg(feature = "py-bindings")] +use pyo3::types::PyType; use std::fmt; use std::hash::{Hash, Hasher}; use std::io::Cursor; @@ -321,6 +327,14 @@ impl PublicKey { other.pair(self) } + #[classmethod] + #[pyo3(name = "from_parent")] + pub fn from_parent(_cls: &Bound<'_, PyType>, _instance: &Self) -> PyResult { + Err(PyNotImplementedError::new_err( + "PublicKey does not support from_parent().", + )) + } + #[pyo3(name = "get_fingerprint")] pub fn py_get_fingerprint(&self) -> u32 { self.get_fingerprint() @@ -353,7 +367,6 @@ mod pybindings { use crate::parse_hex::parse_hex_string; use chia_traits::{FromJsonDict, ToJsonDict}; - use pyo3::prelude::*; impl ToJsonDict for PublicKey { fn to_json_dict(&self, py: Python<'_>) -> PyResult { @@ -737,7 +750,11 @@ mod pytests { let pk = sk.public_key(); Python::with_gil(|py| { let string = pk.to_json_dict(py).expect("to_json_dict"); - let pk2 = PublicKey::from_json_dict(string.bind(py)).unwrap(); + let py_class = py.get_type_bound::(); + let pk2: PublicKey = PublicKey::from_json_dict(&py_class, py, string.bind(py)) + .unwrap() + .extract(py) + .unwrap(); assert_eq!(pk, pk2); }); } @@ -752,8 +769,10 @@ mod pytests { fn test_json_dict(#[case] input: &str, #[case] msg: &str) { pyo3::prepare_freethreaded_python(); Python::with_gil(|py| { + let py_class = py.get_type_bound::(); let err = - PublicKey::from_json_dict(input.to_string().into_py(py).bind(py)).unwrap_err(); + PublicKey::from_json_dict(&py_class, py, input.to_string().into_py(py).bind(py)) + .unwrap_err(); assert_eq!(err.value_bound(py).to_string(), msg.to_string()); }); } diff --git a/crates/chia-bls/src/secret_key.rs b/crates/chia-bls/src/secret_key.rs index 31368b206..a93c8d3aa 100644 --- a/crates/chia-bls/src/secret_key.rs +++ b/crates/chia-bls/src/secret_key.rs @@ -3,6 +3,12 @@ use blst::*; use chia_traits::{read_bytes, Streamable}; use clvmr::sha2::Sha256; use hkdf::HkdfExtract; +#[cfg(feature = "py-bindings")] +use pyo3::exceptions::PyNotImplementedError; +#[cfg(feature = "py-bindings")] +use pyo3::prelude::*; +#[cfg(feature = "py-bindings")] +use pyo3::types::PyType; use std::fmt; use std::hash::{Hash, Hasher}; use std::io::Cursor; @@ -266,6 +272,14 @@ impl SecretKey { hex::encode(self.to_bytes()) } + #[classmethod] + #[pyo3(name = "from_parent")] + pub fn from_parent(_cls: &Bound<'_, PyType>, _instance: &Self) -> PyResult { + Err(PyNotImplementedError::new_err( + "SecretKey does not support from_parent().", + )) + } + #[pyo3(name = "derive_hardened")] #[must_use] pub fn py_derive_hardened(&self, idx: u32) -> Self { @@ -292,7 +306,6 @@ mod pybindings { use crate::parse_hex::parse_hex_string; use chia_traits::{FromJsonDict, ToJsonDict}; - use pyo3::prelude::*; impl ToJsonDict for SecretKey { fn to_json_dict(&self, py: Python<'_>) -> PyResult { @@ -557,7 +570,11 @@ mod pytests { let sk = SecretKey::from_seed(&data); Python::with_gil(|py| { let string = sk.to_json_dict(py).expect("to_json_dict"); - let sk2 = SecretKey::from_json_dict(string.bind(py)).unwrap(); + let py_class = py.get_type_bound::(); + let sk2 = SecretKey::from_json_dict(&py_class, py, string.bind(py)) + .unwrap() + .extract(py) + .unwrap(); assert_eq!(sk, sk2); assert_eq!(sk.public_key(), sk2.public_key()); }); @@ -588,8 +605,10 @@ mod pytests { fn test_json_dict(#[case] input: &str, #[case] msg: &str) { pyo3::prepare_freethreaded_python(); Python::with_gil(|py| { + let py_class = py.get_type_bound::(); let err = - SecretKey::from_json_dict(input.to_string().into_py(py).bind(py)).unwrap_err(); + SecretKey::from_json_dict(&py_class, py, input.to_string().into_py(py).bind(py)) + .unwrap_err(); assert_eq!(err.value_bound(py).to_string(), msg.to_string()); }); } diff --git a/crates/chia-bls/src/signature.rs b/crates/chia-bls/src/signature.rs index 879200e98..f87b22a68 100644 --- a/crates/chia-bls/src/signature.rs +++ b/crates/chia-bls/src/signature.rs @@ -2,6 +2,12 @@ use crate::{Error, GTElement, PublicKey, Result, SecretKey}; use blst::*; use chia_traits::{read_bytes, Streamable}; use clvmr::sha2::Sha256; +#[cfg(feature = "py-bindings")] +use pyo3::exceptions::PyNotImplementedError; +#[cfg(feature = "py-bindings")] +use pyo3::prelude::*; +#[cfg(feature = "py-bindings")] +use pyo3::types::PyType; use std::borrow::Borrow; use std::fmt; use std::hash::{Hash, Hasher}; @@ -486,6 +492,14 @@ impl Signature { Self::default() } + #[classmethod] + #[pyo3(name = "from_parent")] + pub fn from_parent(_cls: &Bound<'_, PyType>, _instance: &Self) -> PyResult { + Err(PyNotImplementedError::new_err( + "Signature does not support from_parent().", + )) + } + #[pyo3(name = "pair")] pub fn py_pair(&self, other: &PublicKey) -> GTElement { self.pair(other) @@ -518,7 +532,6 @@ mod pybindings { use crate::parse_hex::parse_hex_string; use chia_traits::{FromJsonDict, ToJsonDict}; - use pyo3::prelude::*; impl ToJsonDict for Signature { fn to_json_dict(&self, py: Python<'_>) -> PyResult { @@ -1259,7 +1272,11 @@ mod pytests { let sig = sign(&sk, msg); Python::with_gil(|py| { let string = sig.to_json_dict(py).expect("to_json_dict"); - let sig2 = Signature::from_json_dict(string.bind(py)).unwrap(); + let py_class = py.get_type_bound::(); + let sig2 = Signature::from_json_dict(&py_class, py, string.bind(py)) + .unwrap() + .extract(py) + .unwrap(); assert_eq!(sig, sig2); }); } @@ -1274,8 +1291,10 @@ mod pytests { fn test_json_dict(#[case] input: &str, #[case] msg: &str) { pyo3::prepare_freethreaded_python(); Python::with_gil(|py| { + let py_class = py.get_type_bound::(); let err = - Signature::from_json_dict(input.to_string().into_py(py).bind(py)).unwrap_err(); + Signature::from_json_dict(&py_class, py, input.to_string().into_py(py).bind(py)) + .unwrap_err(); assert_eq!(err.value_bound(py).to_string(), msg.to_string()); }); } diff --git a/crates/chia-consensus/src/gen/owned_conditions.rs b/crates/chia-consensus/src/gen/owned_conditions.rs index 32ba447ae..491d71d54 100644 --- a/crates/chia-consensus/src/gen/owned_conditions.rs +++ b/crates/chia-consensus/src/gen/owned_conditions.rs @@ -8,6 +8,13 @@ use super::conditions::{SpendBundleConditions, SpendConditions}; #[cfg(feature = "py-bindings")] use chia_py_streamable_macro::{PyJsonDict, PyStreamable}; +#[cfg(feature = "py-bindings")] +use pyo3::exceptions::PyNotImplementedError; +#[cfg(feature = "py-bindings")] +use pyo3::prelude::*; +#[cfg(feature = "py-bindings")] +use pyo3::types::PyType; + #[derive(Streamable, Hash, Debug, Clone, Eq, PartialEq)] #[cfg_attr( feature = "py-bindings", @@ -144,3 +151,27 @@ fn convert_agg_sigs(a: &Allocator, agg_sigs: &[(PublicKey, NodePtr)]) -> Vec<(Pu } ret } + +#[cfg(feature = "py-bindings")] +#[pymethods] +impl OwnedSpendConditions { + #[classmethod] + #[pyo3(name = "from_parent")] + pub fn from_parent(_cls: &Bound<'_, PyType>, _instance: &Self) -> PyResult { + Err(PyNotImplementedError::new_err( + "OwnedSpendConditions does not support from_parent().", + )) + } +} + +#[cfg(feature = "py-bindings")] +#[pymethods] +impl OwnedSpendBundleConditions { + #[classmethod] + #[pyo3(name = "from_parent")] + pub fn from_parent(_cls: &Bound<'_, PyType>, _instance: &Self) -> PyResult { + Err(PyNotImplementedError::new_err( + "OwnedSpendBundleConditions does not support from_parent().", + )) + } +} diff --git a/crates/chia-protocol/src/coin.rs b/crates/chia-protocol/src/coin.rs index b473b9aa4..2ae83b2fa 100644 --- a/crates/chia-protocol/src/coin.rs +++ b/crates/chia-protocol/src/coin.rs @@ -6,8 +6,12 @@ use clvm_traits::{ }; use clvmr::sha2::Sha256; +#[cfg(feature = "py-bindings")] +use pyo3::exceptions::PyNotImplementedError; #[cfg(feature = "py-bindings")] use pyo3::prelude::*; +#[cfg(feature = "py-bindings")] +use pyo3::types::PyType; #[streamable] #[derive(Copy)] @@ -55,6 +59,18 @@ impl Coin { } } +#[cfg(feature = "py-bindings")] +#[pymethods] +impl Coin { + #[classmethod] + #[pyo3(name = "from_parent")] + pub fn from_parent(_cls: &Bound<'_, PyType>, _coin: Self) -> PyResult { + Err(PyNotImplementedError::new_err( + "Coin does not support from_parent().", + )) + } +} + impl> ToClvm for Coin { fn to_clvm(&self, encoder: &mut E) -> Result { clvm_list!(self.parent_coin_info, self.puzzle_hash, self.amount).to_clvm(encoder) diff --git a/crates/chia-protocol/src/coin_spend.rs b/crates/chia-protocol/src/coin_spend.rs index 7e52cba2a..ffbd3c9c1 100644 --- a/crates/chia-protocol/src/coin_spend.rs +++ b/crates/chia-protocol/src/coin_spend.rs @@ -2,6 +2,10 @@ use chia_streamable_macro::streamable; use crate::coin::Coin; use crate::program::Program; +#[cfg(feature = "py-bindings")] +use pyo3::prelude::*; +#[cfg(feature = "py-bindings")] +use pyo3::types::PyType; #[streamable] pub struct CoinSpend { @@ -9,3 +13,16 @@ pub struct CoinSpend { puzzle_reveal: Program, solution: Program, } + +#[cfg(feature = "py-bindings")] +#[pymethods] +impl CoinSpend { + #[classmethod] + #[pyo3(name = "from_parent")] + pub fn from_parent(cls: &Bound<'_, PyType>, py: Python<'_>, cs: Self) -> PyResult { + // Convert result into potential child class + let instance = cls.call1((cs.coin, cs.puzzle_reveal, cs.solution))?; + + Ok(instance.into_py(py)) + } +} diff --git a/crates/chia-protocol/src/program.rs b/crates/chia-protocol/src/program.rs index 978429ed5..5c05686ec 100644 --- a/crates/chia-protocol/src/program.rs +++ b/crates/chia-protocol/src/program.rs @@ -12,6 +12,10 @@ use clvmr::serde::{ }; use clvmr::sha2::Sha256; use clvmr::{Allocator, ChiaDialect}; +#[cfg(feature = "py-bindings")] +use pyo3::prelude::*; +#[cfg(feature = "py-bindings")] +use pyo3::types::PyType; use std::io::Cursor; use std::ops::Deref; @@ -152,9 +156,6 @@ use chia_traits::{FromJsonDict, ToJsonDict}; #[cfg(feature = "py-bindings")] use chia_py_streamable_macro::PyStreamable; -#[cfg(feature = "py-bindings")] -use pyo3::prelude::*; - #[cfg(feature = "py-bindings")] use pyo3::types::{PyList, PyTuple}; @@ -486,6 +487,18 @@ impl ToJsonDict for Program { } } +#[cfg(feature = "py-bindings")] +#[pymethods] +impl Program { + #[classmethod] + #[pyo3(name = "from_parent")] + pub fn from_parent(_cls: &Bound<'_, PyType>, _instance: &Self) -> PyResult { + Err(PyNotImplementedError::new_err( + "This class does not support from_parent().", + )) + } +} + #[cfg(feature = "py-bindings")] impl FromJsonDict for Program { fn from_json_dict(o: &Bound<'_, PyAny>) -> PyResult { diff --git a/crates/chia-protocol/src/spend_bundle.rs b/crates/chia-protocol/src/spend_bundle.rs index 1e17a7740..b5ab9dc9b 100644 --- a/crates/chia-protocol/src/spend_bundle.rs +++ b/crates/chia-protocol/src/spend_bundle.rs @@ -13,6 +13,8 @@ use clvmr::Allocator; #[cfg(feature = "py-bindings")] use pyo3::prelude::*; +#[cfg(feature = "py-bindings")] +use pyo3::types::PyType; #[streamable(subclass)] pub struct SpendBundle { @@ -91,10 +93,36 @@ impl SpendBundle { #[pymethods] #[allow(clippy::needless_pass_by_value)] impl SpendBundle { - #[staticmethod] + #[classmethod] #[pyo3(name = "aggregate")] - fn py_aggregate(spend_bundles: Vec) -> SpendBundle { - SpendBundle::aggregate(&spend_bundles) + fn py_aggregate( + cls: &Bound<'_, PyType>, + py: Python<'_>, + spend_bundles: Vec, + ) -> PyResult { + let aggregated = Bound::new(py, Self::aggregate(&spend_bundles))?; + if aggregated.is_exact_instance(cls) { + Ok(aggregated.into_py(py)) + } else { + let instance = cls.call_method1("from_parent", (aggregated.into_py(py),))?; + Ok(instance.into_py(py)) + } + } + + #[classmethod] + #[pyo3(name = "from_parent")] + pub fn from_parent( + cls: &Bound<'_, PyType>, + py: Python<'_>, + spend_bundle: Self, + ) -> PyResult { + // Convert result into potential child class + let instance = cls.call( + (spend_bundle.coin_spends, spend_bundle.aggregated_signature), + None, + )?; + + Ok(instance.into_py(py)) } #[pyo3(name = "name")] diff --git a/crates/chia_py_streamable_macro/src/lib.rs b/crates/chia_py_streamable_macro/src/lib.rs index 9ab532b77..49e306feb 100644 --- a/crates/chia_py_streamable_macro/src/lib.rs +++ b/crates/chia_py_streamable_macro/src/lib.rs @@ -159,10 +159,25 @@ pub fn py_streamable_macro(input: proc_macro::TokenStream) -> proc_macro::TokenS py_protocol.extend(quote! { #[pyo3::pymethods] impl #ident { - #[staticmethod] + #[classmethod] #[pyo3(signature=(json_dict))] - pub fn from_json_dict(json_dict: &pyo3::Bound) -> pyo3::PyResult { - ::from_json_dict(json_dict) + pub fn from_json_dict(cls: &pyo3::Bound<'_, pyo3::types::PyType>, py: pyo3::Python<'_>, json_dict: &pyo3::Bound) -> pyo3::PyResult { + use pyo3::prelude::PyAnyMethods; + use pyo3::IntoPy; + use pyo3::Bound; + use pyo3::type_object::PyTypeInfo; + use std::borrow::Borrow; + let rust_obj = Bound::new(py, ::from_json_dict(json_dict)?)?; + + // Check if python class is different from rust class (in case of child classes) + // if so call the python class's conversion code + + if rust_obj.is_exact_instance(&cls) { + Ok(rust_obj.into_py(py)) + } else { + let instance = cls.call_method1("from_parent", (rust_obj.into_py(py),))?; + Ok(instance.into_py(py)) + } } pub fn to_json_dict(&self, py: pyo3::Python) -> pyo3::PyResult { @@ -174,34 +189,70 @@ pub fn py_streamable_macro(input: proc_macro::TokenStream) -> proc_macro::TokenS let streamable = quote! { #[pyo3::pymethods] impl #ident { - #[staticmethod] + #[classmethod] #[pyo3(name = "from_bytes")] - pub fn py_from_bytes(blob: pyo3::buffer::PyBuffer) -> pyo3::PyResult { + pub fn py_from_bytes(cls: &pyo3::Bound<'_, pyo3::types::PyType>, py: pyo3::Python<'_>, blob: pyo3::buffer::PyBuffer) -> pyo3::PyResult { + use pyo3::prelude::PyAnyMethods; + use pyo3::IntoPy; + use pyo3::Bound; + use pyo3::type_object::PyTypeInfo; + use std::borrow::Borrow; + if !blob.is_c_contiguous() { panic!("from_bytes() must be called with a contiguous buffer"); } let slice = unsafe { std::slice::from_raw_parts(blob.buf_ptr() as *const u8, blob.len_bytes()) }; - ::from_bytes(slice).map_err(|e| <#crate_name::chia_error::Error as Into>::into(e)) + let rust_obj = Bound::new(py, ::from_bytes(slice)?)?; + + // Check if python class is different from rust class (in case of child classes) + // if so call the python class's conversion code + + if rust_obj.is_exact_instance(&cls) { + Ok(rust_obj.into_py(py)) + } else { + let instance = cls.call_method1("from_parent", (rust_obj.into_py(py),))?; + Ok(instance.into_py(py)) + } } - #[staticmethod] + #[classmethod] #[pyo3(name = "from_bytes_unchecked")] - pub fn py_from_bytes_unchecked(blob: pyo3::buffer::PyBuffer) -> pyo3::PyResult { + pub fn py_from_bytes_unchecked(cls: &pyo3::Bound<'_, pyo3::types::PyType>, py: pyo3::Python<'_>, blob: pyo3::buffer::PyBuffer) -> pyo3::PyResult { + use pyo3::prelude::PyAnyMethods; + use pyo3::IntoPy; + use pyo3::Bound; + use pyo3::type_object::PyTypeInfo; + use std::borrow::Borrow; if !blob.is_c_contiguous() { panic!("from_bytes_unchecked() must be called with a contiguous buffer"); } let slice = unsafe { std::slice::from_raw_parts(blob.buf_ptr() as *const u8, blob.len_bytes()) }; - ::from_bytes_unchecked(slice).map_err(|e| <#crate_name::chia_error::Error as Into>::into(e)) + let rust_obj = Bound::new(py, ::from_bytes_unchecked(slice).map_err(|e| <#crate_name::chia_error::Error as Into>::into(e))?)?; + + // Check if python class is different from rust class (in case of child classes) + // if so call the python class's conversion code + + if rust_obj.is_exact_instance(&cls) { + Ok(rust_obj.into_py(py)) + } else { + let instance = cls.call_method1("from_parent", (rust_obj.into_py(py),))?; + Ok(instance.into_py(py)) + } } // returns the type as well as the number of bytes read from the buffer - #[staticmethod] + #[classmethod] #[pyo3(signature= (blob, trusted=false))] - pub fn parse_rust<'p>(blob: pyo3::buffer::PyBuffer, trusted: bool) -> pyo3::PyResult<(Self, u32)> { + pub fn parse_rust<'p>(cls: &pyo3::Bound<'_, pyo3::types::PyType>, py: pyo3::Python<'_>, blob: pyo3::buffer::PyBuffer, trusted: bool) -> pyo3::PyResult<(pyo3::PyObject, u32)> { + use pyo3::prelude::PyAnyMethods; + use pyo3::IntoPy; + use pyo3::Bound; + use pyo3::type_object::PyTypeInfo; + use std::borrow::Borrow; if !blob.is_c_contiguous() { panic!("parse_rust() must be called with a contiguous buffer"); } @@ -209,10 +260,22 @@ pub fn py_streamable_macro(input: proc_macro::TokenStream) -> proc_macro::TokenS std::slice::from_raw_parts(blob.buf_ptr() as *const u8, blob.len_bytes()) }; let mut input = std::io::Cursor::<&[u8]>::new(slice); - if trusted { + let rust_obj = if trusted { ::parse::(&mut input).map_err(|e| <#crate_name::chia_error::Error as Into>::into(e)).map(|v| (v, input.position() as u32)) } else { ::parse::(&mut input).map_err(|e| <#crate_name::chia_error::Error as Into>::into(e)).map(|v| (v, input.position() as u32)) + }?; + + // Check if python class is different from rust class (in case of child classes) + // if so call the python class's conversion code + + let rust_obj = (Bound::new(py, rust_obj.0)?, rust_obj.1); + + if rust_obj.0.is_exact_instance(&cls) { + Ok((rust_obj.0.into_py(py), rust_obj.1)) + } else { + let instance = cls.call_method1("from_parent", (rust_obj.0.into_py(py),))?; + Ok((instance.into_py(py), rust_obj.1)) } } diff --git a/tests/test_spend_bundle.py b/tests/test_spend_bundle.py index 063e35a36..5975b12b2 100644 --- a/tests/test_spend_bundle.py +++ b/tests/test_spend_bundle.py @@ -210,3 +210,35 @@ def test_spend_bundle( rem = f"{removals}" assert rem == expected_rem + + +class NewAndImprovedSpendBundle(SpendBundle): + test_bool = True + + def new_function(self) -> bool: + return self.test_bool + + +def test_derive_class(): + # Test if aggregate() supports class inheritance + test = SpendBundle.aggregate([]) + assert isinstance(test, SpendBundle) + test = NewAndImprovedSpendBundle.aggregate([]) + assert isinstance(test, NewAndImprovedSpendBundle) + assert test.test_bool + assert test.new_function() + + # Test if the Streamable macro functions support class inheritance + obj_bytes = bytes(test) + test = NewAndImprovedSpendBundle.from_bytes(obj_bytes) + assert isinstance(test, NewAndImprovedSpendBundle) + assert test.test_bool + assert test.new_function() + + obj_json = test.to_json_dict() + test = NewAndImprovedSpendBundle.from_json_dict(obj_json) + assert isinstance(test, NewAndImprovedSpendBundle) + assert test.test_bool + assert test.new_function() + + test = NewAndImprovedSpendBundle.parse_rust(obj_bytes) diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index f27db2c05..09b863841 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -50,19 +50,19 @@ def __repr__(self) -> str: ... def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> {name}: ... def __copy__(self) -> {name}: ... - @staticmethod - def from_bytes(bytes) -> {name}: ... - @staticmethod - def from_bytes_unchecked(bytes) -> {name}: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[{name}, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> {name}: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... """ ) @@ -217,7 +217,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s "def uncurry(self) -> Tuple[ChiaProgram, ChiaProgram]: ...", ], "SpendBundle": [ - "@staticmethod\n def aggregate(sbs: List[SpendBundle]) -> SpendBundle: ...", + "@classmethod\n def aggregate(cls, sbs: List[SpendBundle]) -> Self: ...", "def name(self) -> bytes32: ...", "def removals(self) -> List[Coin]: ...", "def additions(self) -> List[Coin]: ...", @@ -254,7 +254,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s # this file is generated by generate_type_stubs.py # -from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar +from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar, Self from .sized_bytes import bytes32, bytes100 from .sized_ints import uint8, uint16, uint32, uint64, uint128, int8, int16, int32, int64 from chia.types.blockchain_format.program import Program as ChiaProgram diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 62c20915c..05ea9f1f9 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -3,7 +3,7 @@ # this file is generated by generate_type_stubs.py # -from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar +from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar, Self from .sized_bytes import bytes32, bytes100 from .sized_ints import uint8, uint16, uint32, uint64, uint128, int8, int16, int32, int64 from chia.types.blockchain_format.program import Program as ChiaProgram @@ -148,19 +148,19 @@ class G1Element: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> G1Element: ... def __copy__(self) -> G1Element: ... - @staticmethod - def from_bytes(bytes) -> G1Element: ... - @staticmethod - def from_bytes_unchecked(bytes) -> G1Element: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[G1Element, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> G1Element: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... class G2Element: SIZE: ClassVar[int] = ... @@ -179,19 +179,19 @@ class G2Element: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> G2Element: ... def __copy__(self) -> G2Element: ... - @staticmethod - def from_bytes(bytes) -> G2Element: ... - @staticmethod - def from_bytes_unchecked(bytes) -> G2Element: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[G2Element, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> G2Element: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... class GTElement: SIZE: ClassVar[int] = ... @@ -206,19 +206,19 @@ class GTElement: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> GTElement: ... def __copy__(self) -> GTElement: ... - @staticmethod - def from_bytes(bytes) -> GTElement: ... - @staticmethod - def from_bytes_unchecked(bytes) -> GTElement: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[GTElement, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> GTElement: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... class PrivateKey: PRIVATE_KEY_SIZE: ClassVar[int] = ... @@ -238,19 +238,19 @@ class PrivateKey: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> PrivateKey: ... def __copy__(self) -> PrivateKey: ... - @staticmethod - def from_bytes(bytes) -> PrivateKey: ... - @staticmethod - def from_bytes_unchecked(bytes) -> PrivateKey: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[PrivateKey, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> PrivateKey: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... class SpendConditions: coin_id: bytes @@ -299,19 +299,19 @@ class SpendConditions: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> SpendConditions: ... def __copy__(self) -> SpendConditions: ... - @staticmethod - def from_bytes(bytes) -> SpendConditions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SpendConditions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SpendConditions, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SpendConditions: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_id: Union[ bytes, _Unspec] = _Unspec(), parent_id: Union[ bytes, _Unspec] = _Unspec(), puzzle_hash: Union[ bytes, _Unspec] = _Unspec(), @@ -361,19 +361,19 @@ class SpendBundleConditions: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> SpendBundleConditions: ... def __copy__(self) -> SpendBundleConditions: ... - @staticmethod - def from_bytes(bytes) -> SpendBundleConditions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SpendBundleConditions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SpendBundleConditions, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SpendBundleConditions: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, spends: Union[ List[SpendConditions], _Unspec] = _Unspec(), reserve_fee: Union[ int, _Unspec] = _Unspec(), height_absolute: Union[ int, _Unspec] = _Unspec(), @@ -452,19 +452,19 @@ class BlockRecord: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> BlockRecord: ... def __copy__(self) -> BlockRecord: ... - @staticmethod - def from_bytes(bytes) -> BlockRecord: ... - @staticmethod - def from_bytes_unchecked(bytes) -> BlockRecord: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[BlockRecord, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> BlockRecord: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, header_hash: Union[ bytes32, _Unspec] = _Unspec(), prev_hash: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), @@ -506,19 +506,19 @@ class Message: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> Message: ... def __copy__(self) -> Message: ... - @staticmethod - def from_bytes(bytes) -> Message: ... - @staticmethod - def from_bytes_unchecked(bytes) -> Message: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Message, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> Message: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, msg_type: Union[ int, _Unspec] = _Unspec(), id: Union[ Optional[uint16], _Unspec] = _Unspec(), data: Union[ bytes, _Unspec] = _Unspec()) -> Message: ... @@ -544,19 +544,19 @@ class Handshake: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> Handshake: ... def __copy__(self) -> Handshake: ... - @staticmethod - def from_bytes(bytes) -> Handshake: ... - @staticmethod - def from_bytes_unchecked(bytes) -> Handshake: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Handshake, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> Handshake: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, network_id: Union[ str, _Unspec] = _Unspec(), protocol_version: Union[ str, _Unspec] = _Unspec(), software_version: Union[ str, _Unspec] = _Unspec(), @@ -581,19 +581,19 @@ class ClassgroupElement: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> ClassgroupElement: ... def __copy__(self) -> ClassgroupElement: ... - @staticmethod - def from_bytes(bytes) -> ClassgroupElement: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ClassgroupElement: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ClassgroupElement, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ClassgroupElement: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, data: Union[ bytes100, _Unspec] = _Unspec()) -> ClassgroupElement: ... class Coin: @@ -612,19 +612,19 @@ class Coin: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> Coin: ... def __copy__(self) -> Coin: ... - @staticmethod - def from_bytes(bytes) -> Coin: ... - @staticmethod - def from_bytes_unchecked(bytes) -> Coin: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Coin, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> Coin: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, parent_coin_info: Union[ bytes32, _Unspec] = _Unspec(), puzzle_hash: Union[ bytes32, _Unspec] = _Unspec(), amount: Union[ uint64, _Unspec] = _Unspec()) -> Coin: ... @@ -644,19 +644,19 @@ class CoinSpend: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> CoinSpend: ... def __copy__(self) -> CoinSpend: ... - @staticmethod - def from_bytes(bytes) -> CoinSpend: ... - @staticmethod - def from_bytes_unchecked(bytes) -> CoinSpend: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinSpend, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> CoinSpend: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin: Union[ Coin, _Unspec] = _Unspec(), puzzle_reveal: Union[ Program, _Unspec] = _Unspec(), solution: Union[ Program, _Unspec] = _Unspec()) -> CoinSpend: ... @@ -676,19 +676,19 @@ class CoinState: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> CoinState: ... def __copy__(self) -> CoinState: ... - @staticmethod - def from_bytes(bytes) -> CoinState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> CoinState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinState, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> CoinState: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin: Union[ Coin, _Unspec] = _Unspec(), spent_height: Union[ Optional[uint32], _Unspec] = _Unspec(), created_height: Union[ Optional[uint32], _Unspec] = _Unspec()) -> CoinState: ... @@ -710,19 +710,19 @@ class EndOfSubSlotBundle: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> EndOfSubSlotBundle: ... def __copy__(self) -> EndOfSubSlotBundle: ... - @staticmethod - def from_bytes(bytes) -> EndOfSubSlotBundle: ... - @staticmethod - def from_bytes_unchecked(bytes) -> EndOfSubSlotBundle: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[EndOfSubSlotBundle, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> EndOfSubSlotBundle: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, challenge_chain: Union[ ChallengeChainSubSlot, _Unspec] = _Unspec(), infused_challenge_chain: Union[ Optional[InfusedChallengeChainSubSlot], _Unspec] = _Unspec(), reward_chain: Union[ RewardChainSubSlot, _Unspec] = _Unspec(), @@ -739,19 +739,19 @@ class FeeRate: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> FeeRate: ... def __copy__(self) -> FeeRate: ... - @staticmethod - def from_bytes(bytes) -> FeeRate: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FeeRate: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FeeRate, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FeeRate: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, mojos_per_clvm_cost: Union[ uint64, _Unspec] = _Unspec()) -> FeeRate: ... class FeeEstimate: @@ -769,19 +769,19 @@ class FeeEstimate: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> FeeEstimate: ... def __copy__(self) -> FeeEstimate: ... - @staticmethod - def from_bytes(bytes) -> FeeEstimate: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FeeEstimate: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FeeEstimate, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FeeEstimate: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, error: Union[ Optional[str], _Unspec] = _Unspec(), time_target: Union[ uint64, _Unspec] = _Unspec(), estimated_fee_rate: Union[ FeeRate, _Unspec] = _Unspec()) -> FeeEstimate: ... @@ -799,19 +799,19 @@ class FeeEstimateGroup: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> FeeEstimateGroup: ... def __copy__(self) -> FeeEstimateGroup: ... - @staticmethod - def from_bytes(bytes) -> FeeEstimateGroup: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FeeEstimateGroup: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FeeEstimateGroup, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FeeEstimateGroup: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, error: Union[ Optional[str], _Unspec] = _Unspec(), estimates: Union[ List[FeeEstimate], _Unspec] = _Unspec()) -> FeeEstimateGroup: ... @@ -836,19 +836,19 @@ class TransactionsInfo: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> TransactionsInfo: ... def __copy__(self) -> TransactionsInfo: ... - @staticmethod - def from_bytes(bytes) -> TransactionsInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> TransactionsInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[TransactionsInfo, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> TransactionsInfo: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, generator_root: Union[ bytes32, _Unspec] = _Unspec(), generator_refs_root: Union[ bytes32, _Unspec] = _Unspec(), aggregated_signature: Union[ G2Element, _Unspec] = _Unspec(), @@ -877,19 +877,19 @@ class FoliageTransactionBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> FoliageTransactionBlock: ... def __copy__(self) -> FoliageTransactionBlock: ... - @staticmethod - def from_bytes(bytes) -> FoliageTransactionBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FoliageTransactionBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FoliageTransactionBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FoliageTransactionBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, prev_transaction_block_hash: Union[ bytes32, _Unspec] = _Unspec(), timestamp: Union[ uint64, _Unspec] = _Unspec(), filter_hash: Union[ bytes32, _Unspec] = _Unspec(), @@ -916,19 +916,19 @@ class FoliageBlockData: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> FoliageBlockData: ... def __copy__(self) -> FoliageBlockData: ... - @staticmethod - def from_bytes(bytes) -> FoliageBlockData: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FoliageBlockData: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FoliageBlockData, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FoliageBlockData: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, unfinished_reward_block_hash: Union[ bytes32, _Unspec] = _Unspec(), pool_target: Union[ PoolTarget, _Unspec] = _Unspec(), pool_signature: Union[ Optional[G2Element], _Unspec] = _Unspec(), @@ -956,19 +956,19 @@ class Foliage: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> Foliage: ... def __copy__(self) -> Foliage: ... - @staticmethod - def from_bytes(bytes) -> Foliage: ... - @staticmethod - def from_bytes_unchecked(bytes) -> Foliage: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Foliage, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> Foliage: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, prev_block_hash: Union[ bytes32, _Unspec] = _Unspec(), reward_block_hash: Union[ bytes32, _Unspec] = _Unspec(), foliage_block_data: Union[ FoliageBlockData, _Unspec] = _Unspec(), @@ -995,19 +995,19 @@ class NewPeak: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> NewPeak: ... def __copy__(self) -> NewPeak: ... - @staticmethod - def from_bytes(bytes) -> NewPeak: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewPeak: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewPeak, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewPeak: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, header_hash: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), weight: Union[ uint128, _Unspec] = _Unspec(), @@ -1029,19 +1029,19 @@ class NewTransaction: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> NewTransaction: ... def __copy__(self) -> NewTransaction: ... - @staticmethod - def from_bytes(bytes) -> NewTransaction: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewTransaction: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewTransaction, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewTransaction: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, transaction_id: Union[ bytes32, _Unspec] = _Unspec(), cost: Union[ uint64, _Unspec] = _Unspec(), fees: Union[ uint64, _Unspec] = _Unspec()) -> NewTransaction: ... @@ -1057,19 +1057,19 @@ class RequestTransaction: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestTransaction: ... def __copy__(self) -> RequestTransaction: ... - @staticmethod - def from_bytes(bytes) -> RequestTransaction: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestTransaction: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestTransaction, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestTransaction: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, transaction_id: Union[ bytes32, _Unspec] = _Unspec()) -> RequestTransaction: ... class RespondTransaction: @@ -1083,19 +1083,19 @@ class RespondTransaction: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondTransaction: ... def __copy__(self) -> RespondTransaction: ... - @staticmethod - def from_bytes(bytes) -> RespondTransaction: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondTransaction: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondTransaction, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondTransaction: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, transaction: Union[ SpendBundle, _Unspec] = _Unspec()) -> RespondTransaction: ... class RequestProofOfWeight: @@ -1111,19 +1111,19 @@ class RequestProofOfWeight: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestProofOfWeight: ... def __copy__(self) -> RequestProofOfWeight: ... - @staticmethod - def from_bytes(bytes) -> RequestProofOfWeight: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestProofOfWeight: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestProofOfWeight, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestProofOfWeight: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, total_number_of_blocks: Union[ uint32, _Unspec] = _Unspec(), tip: Union[ bytes32, _Unspec] = _Unspec()) -> RequestProofOfWeight: ... @@ -1140,19 +1140,19 @@ class RespondProofOfWeight: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondProofOfWeight: ... def __copy__(self) -> RespondProofOfWeight: ... - @staticmethod - def from_bytes(bytes) -> RespondProofOfWeight: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondProofOfWeight: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondProofOfWeight, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondProofOfWeight: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, wp: Union[ WeightProof, _Unspec] = _Unspec(), tip: Union[ bytes32, _Unspec] = _Unspec()) -> RespondProofOfWeight: ... @@ -1169,19 +1169,19 @@ class RequestBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestBlock: ... def __copy__(self) -> RequestBlock: ... - @staticmethod - def from_bytes(bytes) -> RequestBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), include_transaction_block: Union[ bool, _Unspec] = _Unspec()) -> RequestBlock: ... @@ -1196,19 +1196,19 @@ class RejectBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RejectBlock: ... def __copy__(self) -> RejectBlock: ... - @staticmethod - def from_bytes(bytes) -> RejectBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlock: ... class RequestBlocks: @@ -1226,19 +1226,19 @@ class RequestBlocks: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestBlocks: ... def __copy__(self) -> RequestBlocks: ... - @staticmethod - def from_bytes(bytes) -> RequestBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlocks, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestBlocks: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec(), include_transaction_block: Union[ bool, _Unspec] = _Unspec()) -> RequestBlocks: ... @@ -1258,19 +1258,19 @@ class RespondBlocks: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondBlocks: ... def __copy__(self) -> RespondBlocks: ... - @staticmethod - def from_bytes(bytes) -> RespondBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlocks, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondBlocks: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec(), blocks: Union[ List[FullBlock], _Unspec] = _Unspec()) -> RespondBlocks: ... @@ -1288,19 +1288,19 @@ class RejectBlocks: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RejectBlocks: ... def __copy__(self) -> RejectBlocks: ... - @staticmethod - def from_bytes(bytes) -> RejectBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlocks, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectBlocks: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlocks: ... @@ -1315,19 +1315,19 @@ class RespondBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondBlock: ... def __copy__(self) -> RespondBlock: ... - @staticmethod - def from_bytes(bytes) -> RespondBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, block: Union[ FullBlock, _Unspec] = _Unspec()) -> RespondBlock: ... class NewUnfinishedBlock: @@ -1341,19 +1341,19 @@ class NewUnfinishedBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> NewUnfinishedBlock: ... def __copy__(self) -> NewUnfinishedBlock: ... - @staticmethod - def from_bytes(bytes) -> NewUnfinishedBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewUnfinishedBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewUnfinishedBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewUnfinishedBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec()) -> NewUnfinishedBlock: ... class RequestUnfinishedBlock: @@ -1367,19 +1367,19 @@ class RequestUnfinishedBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestUnfinishedBlock: ... def __copy__(self) -> RequestUnfinishedBlock: ... - @staticmethod - def from_bytes(bytes) -> RequestUnfinishedBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestUnfinishedBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestUnfinishedBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestUnfinishedBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RequestUnfinishedBlock: ... class RespondUnfinishedBlock: @@ -1393,19 +1393,19 @@ class RespondUnfinishedBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondUnfinishedBlock: ... def __copy__(self) -> RespondUnfinishedBlock: ... - @staticmethod - def from_bytes(bytes) -> RespondUnfinishedBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondUnfinishedBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondUnfinishedBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondUnfinishedBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, unfinished_block: Union[ UnfinishedBlock, _Unspec] = _Unspec()) -> RespondUnfinishedBlock: ... class NewSignagePointOrEndOfSubSlot: @@ -1425,19 +1425,19 @@ class NewSignagePointOrEndOfSubSlot: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> NewSignagePointOrEndOfSubSlot: ... def __copy__(self) -> NewSignagePointOrEndOfSubSlot: ... - @staticmethod - def from_bytes(bytes) -> NewSignagePointOrEndOfSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewSignagePointOrEndOfSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewSignagePointOrEndOfSubSlot, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewSignagePointOrEndOfSubSlot: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, prev_challenge_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), @@ -1458,19 +1458,19 @@ class RequestSignagePointOrEndOfSubSlot: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestSignagePointOrEndOfSubSlot: ... def __copy__(self) -> RequestSignagePointOrEndOfSubSlot: ... - @staticmethod - def from_bytes(bytes) -> RequestSignagePointOrEndOfSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestSignagePointOrEndOfSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestSignagePointOrEndOfSubSlot, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestSignagePointOrEndOfSubSlot: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), last_rc_infusion: Union[ bytes32, _Unspec] = _Unspec()) -> RequestSignagePointOrEndOfSubSlot: ... @@ -1494,19 +1494,19 @@ class RespondSignagePoint: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondSignagePoint: ... def __copy__(self) -> RespondSignagePoint: ... - @staticmethod - def from_bytes(bytes) -> RespondSignagePoint: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondSignagePoint: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondSignagePoint, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondSignagePoint: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, index_from_challenge: Union[ uint8, _Unspec] = _Unspec(), challenge_chain_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), challenge_chain_proof: Union[ VDFProof, _Unspec] = _Unspec(), @@ -1524,19 +1524,19 @@ class RespondEndOfSubSlot: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondEndOfSubSlot: ... def __copy__(self) -> RespondEndOfSubSlot: ... - @staticmethod - def from_bytes(bytes) -> RespondEndOfSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondEndOfSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondEndOfSubSlot, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondEndOfSubSlot: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, end_of_slot_bundle: Union[ EndOfSubSlotBundle, _Unspec] = _Unspec()) -> RespondEndOfSubSlot: ... class RequestMempoolTransactions: @@ -1550,19 +1550,19 @@ class RequestMempoolTransactions: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestMempoolTransactions: ... def __copy__(self) -> RequestMempoolTransactions: ... - @staticmethod - def from_bytes(bytes) -> RequestMempoolTransactions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestMempoolTransactions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestMempoolTransactions, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestMempoolTransactions: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, filter: Union[ bytes, _Unspec] = _Unspec()) -> RequestMempoolTransactions: ... class NewCompactVDF: @@ -1582,19 +1582,19 @@ class NewCompactVDF: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> NewCompactVDF: ... def __copy__(self) -> NewCompactVDF: ... - @staticmethod - def from_bytes(bytes) -> NewCompactVDF: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewCompactVDF: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewCompactVDF, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewCompactVDF: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), field_vdf: Union[ uint8, _Unspec] = _Unspec(), @@ -1617,19 +1617,19 @@ class RequestCompactVDF: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestCompactVDF: ... def __copy__(self) -> RequestCompactVDF: ... - @staticmethod - def from_bytes(bytes) -> RequestCompactVDF: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestCompactVDF: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestCompactVDF, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestCompactVDF: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), field_vdf: Union[ uint8, _Unspec] = _Unspec(), @@ -1654,19 +1654,19 @@ class RespondCompactVDF: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondCompactVDF: ... def __copy__(self) -> RespondCompactVDF: ... - @staticmethod - def from_bytes(bytes) -> RespondCompactVDF: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondCompactVDF: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondCompactVDF, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondCompactVDF: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), field_vdf: Union[ uint8, _Unspec] = _Unspec(), @@ -1682,19 +1682,19 @@ class RequestPeers: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestPeers: ... def __copy__(self) -> RequestPeers: ... - @staticmethod - def from_bytes(bytes) -> RequestPeers: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestPeers: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPeers, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestPeers: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... class RespondPeers: peer_list: List[TimestampedPeerInfo] @@ -1707,19 +1707,19 @@ class RespondPeers: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondPeers: ... def __copy__(self) -> RespondPeers: ... - @staticmethod - def from_bytes(bytes) -> RespondPeers: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondPeers: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPeers, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondPeers: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, peer_list: Union[ List[TimestampedPeerInfo], _Unspec] = _Unspec()) -> RespondPeers: ... class NewUnfinishedBlock2: @@ -1735,19 +1735,19 @@ class NewUnfinishedBlock2: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> NewUnfinishedBlock2: ... def __copy__(self) -> NewUnfinishedBlock2: ... - @staticmethod - def from_bytes(bytes) -> NewUnfinishedBlock2: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewUnfinishedBlock2: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewUnfinishedBlock2, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewUnfinishedBlock2: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec(), foliage_hash: Union[ Optional[bytes32], _Unspec] = _Unspec()) -> NewUnfinishedBlock2: ... @@ -1764,19 +1764,19 @@ class RequestUnfinishedBlock2: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestUnfinishedBlock2: ... def __copy__(self) -> RequestUnfinishedBlock2: ... - @staticmethod - def from_bytes(bytes) -> RequestUnfinishedBlock2: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestUnfinishedBlock2: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestUnfinishedBlock2, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestUnfinishedBlock2: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, unfinished_reward_hash: Union[ bytes32, _Unspec] = _Unspec(), foliage_hash: Union[ Optional[bytes32], _Unspec] = _Unspec()) -> RequestUnfinishedBlock2: ... @@ -1821,19 +1821,19 @@ class FullBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> FullBlock: ... def __copy__(self) -> FullBlock: ... - @staticmethod - def from_bytes(bytes) -> FullBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> FullBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[FullBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> FullBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec(), challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), @@ -1887,19 +1887,19 @@ class HeaderBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> HeaderBlock: ... def __copy__(self) -> HeaderBlock: ... - @staticmethod - def from_bytes(bytes) -> HeaderBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> HeaderBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[HeaderBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> HeaderBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec(), challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), @@ -1927,19 +1927,19 @@ class TimestampedPeerInfo: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> TimestampedPeerInfo: ... def __copy__(self) -> TimestampedPeerInfo: ... - @staticmethod - def from_bytes(bytes) -> TimestampedPeerInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> TimestampedPeerInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[TimestampedPeerInfo, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> TimestampedPeerInfo: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, host: Union[ str, _Unspec] = _Unspec(), port: Union[ uint16, _Unspec] = _Unspec(), timestamp: Union[ uint64, _Unspec] = _Unspec()) -> TimestampedPeerInfo: ... @@ -1957,19 +1957,19 @@ class PoolTarget: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> PoolTarget: ... def __copy__(self) -> PoolTarget: ... - @staticmethod - def from_bytes(bytes) -> PoolTarget: ... - @staticmethod - def from_bytes_unchecked(bytes) -> PoolTarget: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[PoolTarget, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> PoolTarget: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, puzzle_hash: Union[ bytes32, _Unspec] = _Unspec(), max_height: Union[ uint32, _Unspec] = _Unspec()) -> PoolTarget: ... @@ -1998,19 +1998,19 @@ class Program: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> Program: ... def __copy__(self) -> Program: ... - @staticmethod - def from_bytes(bytes) -> Program: ... - @staticmethod - def from_bytes_unchecked(bytes) -> Program: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[Program, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> Program: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, a0: Union[ bytes, _Unspec] = _Unspec()) -> Program: ... class ProofOfSpace: @@ -2034,19 +2034,19 @@ class ProofOfSpace: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> ProofOfSpace: ... def __copy__(self) -> ProofOfSpace: ... - @staticmethod - def from_bytes(bytes) -> ProofOfSpace: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ProofOfSpace: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ProofOfSpace, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ProofOfSpace: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, challenge: Union[ bytes32, _Unspec] = _Unspec(), pool_public_key: Union[ Optional[G1Element], _Unspec] = _Unspec(), pool_contract_puzzle_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), @@ -2079,19 +2079,19 @@ class RewardChainBlockUnfinished: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RewardChainBlockUnfinished: ... def __copy__(self) -> RewardChainBlockUnfinished: ... - @staticmethod - def from_bytes(bytes) -> RewardChainBlockUnfinished: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RewardChainBlockUnfinished: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainBlockUnfinished, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RewardChainBlockUnfinished: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, total_iters: Union[ uint128, _Unspec] = _Unspec(), signage_point_index: Union[ uint8, _Unspec] = _Unspec(), pos_ss_cc_challenge_hash: Union[ bytes32, _Unspec] = _Unspec(), @@ -2139,19 +2139,19 @@ class RewardChainBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RewardChainBlock: ... def __copy__(self) -> RewardChainBlock: ... - @staticmethod - def from_bytes(bytes) -> RewardChainBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RewardChainBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RewardChainBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, weight: Union[ uint128, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), total_iters: Union[ uint128, _Unspec] = _Unspec(), @@ -2184,19 +2184,19 @@ class ChallengeBlockInfo: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> ChallengeBlockInfo: ... def __copy__(self) -> ChallengeBlockInfo: ... - @staticmethod - def from_bytes(bytes) -> ChallengeBlockInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ChallengeBlockInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ChallengeBlockInfo, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ChallengeBlockInfo: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, proof_of_space: Union[ ProofOfSpace, _Unspec] = _Unspec(), challenge_chain_sp_vdf: Union[ Optional[VDFInfo], _Unspec] = _Unspec(), challenge_chain_sp_signature: Union[ G2Element, _Unspec] = _Unspec(), @@ -2221,19 +2221,19 @@ class ChallengeChainSubSlot: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> ChallengeChainSubSlot: ... def __copy__(self) -> ChallengeChainSubSlot: ... - @staticmethod - def from_bytes(bytes) -> ChallengeChainSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ChallengeChainSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ChallengeChainSubSlot, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ChallengeChainSubSlot: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, challenge_chain_end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), infused_challenge_chain_sub_slot_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), subepoch_summary_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), @@ -2251,19 +2251,19 @@ class InfusedChallengeChainSubSlot: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> InfusedChallengeChainSubSlot: ... def __copy__(self) -> InfusedChallengeChainSubSlot: ... - @staticmethod - def from_bytes(bytes) -> InfusedChallengeChainSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> InfusedChallengeChainSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[InfusedChallengeChainSubSlot, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> InfusedChallengeChainSubSlot: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, infused_challenge_chain_end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec()) -> InfusedChallengeChainSubSlot: ... class RewardChainSubSlot: @@ -2283,19 +2283,19 @@ class RewardChainSubSlot: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RewardChainSubSlot: ... def __copy__(self) -> RewardChainSubSlot: ... - @staticmethod - def from_bytes(bytes) -> RewardChainSubSlot: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RewardChainSubSlot: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RewardChainSubSlot, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RewardChainSubSlot: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, end_of_slot_vdf: Union[ VDFInfo, _Unspec] = _Unspec(), challenge_chain_sub_slot_hash: Union[ bytes32, _Unspec] = _Unspec(), infused_challenge_chain_sub_slot_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), @@ -2316,19 +2316,19 @@ class SubSlotProofs: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> SubSlotProofs: ... def __copy__(self) -> SubSlotProofs: ... - @staticmethod - def from_bytes(bytes) -> SubSlotProofs: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubSlotProofs: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubSlotProofs, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubSlotProofs: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, challenge_chain_slot_proof: Union[ VDFProof, _Unspec] = _Unspec(), infused_challenge_chain_slot_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), reward_chain_slot_proof: Union[ VDFProof, _Unspec] = _Unspec()) -> SubSlotProofs: ... @@ -2336,8 +2336,8 @@ class SubSlotProofs: class SpendBundle: coin_spends: List[CoinSpend] aggregated_signature: G2Element - @staticmethod - def aggregate(sbs: List[SpendBundle]) -> SpendBundle: ... + @classmethod + def aggregate(cls, sbs: List[SpendBundle]) -> Self: ... def name(self) -> bytes32: ... def removals(self) -> List[Coin]: ... def additions(self) -> List[Coin]: ... @@ -2351,19 +2351,19 @@ class SpendBundle: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> SpendBundle: ... def __copy__(self) -> SpendBundle: ... - @staticmethod - def from_bytes(bytes) -> SpendBundle: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SpendBundle: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SpendBundle, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SpendBundle: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_spends: Union[ List[CoinSpend], _Unspec] = _Unspec(), aggregated_signature: Union[ G2Element, _Unspec] = _Unspec()) -> SpendBundle: ... @@ -2386,19 +2386,19 @@ class SubEpochSummary: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> SubEpochSummary: ... def __copy__(self) -> SubEpochSummary: ... - @staticmethod - def from_bytes(bytes) -> SubEpochSummary: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochSummary: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochSummary, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubEpochSummary: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, prev_subepoch_summary_hash: Union[ bytes32, _Unspec] = _Unspec(), reward_chain_hash: Union[ bytes32, _Unspec] = _Unspec(), num_blocks_overflow: Union[ uint8, _Unspec] = _Unspec(), @@ -2436,19 +2436,19 @@ class UnfinishedBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> UnfinishedBlock: ... def __copy__(self) -> UnfinishedBlock: ... - @staticmethod - def from_bytes(bytes) -> UnfinishedBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> UnfinishedBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[UnfinishedBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> UnfinishedBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), reward_chain_block: Union[ RewardChainBlockUnfinished, _Unspec] = _Unspec(), challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), @@ -2485,19 +2485,19 @@ class UnfinishedHeaderBlock: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> UnfinishedHeaderBlock: ... def __copy__(self) -> UnfinishedHeaderBlock: ... - @staticmethod - def from_bytes(bytes) -> UnfinishedHeaderBlock: ... - @staticmethod - def from_bytes_unchecked(bytes) -> UnfinishedHeaderBlock: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[UnfinishedHeaderBlock, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> UnfinishedHeaderBlock: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), reward_chain_block: Union[ RewardChainBlockUnfinished, _Unspec] = _Unspec(), challenge_chain_sp_proof: Union[ Optional[VDFProof], _Unspec] = _Unspec(), @@ -2521,19 +2521,19 @@ class VDFInfo: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> VDFInfo: ... def __copy__(self) -> VDFInfo: ... - @staticmethod - def from_bytes(bytes) -> VDFInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> VDFInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[VDFInfo, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> VDFInfo: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, challenge: Union[ bytes32, _Unspec] = _Unspec(), number_of_iterations: Union[ uint64, _Unspec] = _Unspec(), output: Union[ ClassgroupElement, _Unspec] = _Unspec()) -> VDFInfo: ... @@ -2553,19 +2553,19 @@ class VDFProof: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> VDFProof: ... def __copy__(self) -> VDFProof: ... - @staticmethod - def from_bytes(bytes) -> VDFProof: ... - @staticmethod - def from_bytes_unchecked(bytes) -> VDFProof: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[VDFProof, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> VDFProof: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, witness_type: Union[ uint8, _Unspec] = _Unspec(), witness: Union[ bytes, _Unspec] = _Unspec(), normalized_to_identity: Union[ bool, _Unspec] = _Unspec()) -> VDFProof: ... @@ -2583,19 +2583,19 @@ class RequestPuzzleSolution: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestPuzzleSolution: ... def __copy__(self) -> RequestPuzzleSolution: ... - @staticmethod - def from_bytes(bytes) -> RequestPuzzleSolution: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestPuzzleSolution: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPuzzleSolution, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestPuzzleSolution: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec()) -> RequestPuzzleSolution: ... @@ -2616,19 +2616,19 @@ class PuzzleSolutionResponse: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> PuzzleSolutionResponse: ... def __copy__(self) -> PuzzleSolutionResponse: ... - @staticmethod - def from_bytes(bytes) -> PuzzleSolutionResponse: ... - @staticmethod - def from_bytes_unchecked(bytes) -> PuzzleSolutionResponse: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[PuzzleSolutionResponse, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> PuzzleSolutionResponse: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), puzzle: Union[ Program, _Unspec] = _Unspec(), @@ -2645,19 +2645,19 @@ class RespondPuzzleSolution: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondPuzzleSolution: ... def __copy__(self) -> RespondPuzzleSolution: ... - @staticmethod - def from_bytes(bytes) -> RespondPuzzleSolution: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondPuzzleSolution: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPuzzleSolution, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondPuzzleSolution: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, response: Union[ PuzzleSolutionResponse, _Unspec] = _Unspec()) -> RespondPuzzleSolution: ... class RejectPuzzleSolution: @@ -2673,19 +2673,19 @@ class RejectPuzzleSolution: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RejectPuzzleSolution: ... def __copy__(self) -> RejectPuzzleSolution: ... - @staticmethod - def from_bytes(bytes) -> RejectPuzzleSolution: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectPuzzleSolution: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectPuzzleSolution, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectPuzzleSolution: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec()) -> RejectPuzzleSolution: ... @@ -2700,19 +2700,19 @@ class SendTransaction: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> SendTransaction: ... def __copy__(self) -> SendTransaction: ... - @staticmethod - def from_bytes(bytes) -> SendTransaction: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SendTransaction: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SendTransaction, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SendTransaction: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, transaction: Union[ SpendBundle, _Unspec] = _Unspec()) -> SendTransaction: ... class TransactionAck: @@ -2730,19 +2730,19 @@ class TransactionAck: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> TransactionAck: ... def __copy__(self) -> TransactionAck: ... - @staticmethod - def from_bytes(bytes) -> TransactionAck: ... - @staticmethod - def from_bytes_unchecked(bytes) -> TransactionAck: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[TransactionAck, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> TransactionAck: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, txid: Union[ bytes32, _Unspec] = _Unspec(), status: Union[ uint8, _Unspec] = _Unspec(), error: Union[ Optional[str], _Unspec] = _Unspec()) -> TransactionAck: ... @@ -2764,19 +2764,19 @@ class NewPeakWallet: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> NewPeakWallet: ... def __copy__(self) -> NewPeakWallet: ... - @staticmethod - def from_bytes(bytes) -> NewPeakWallet: ... - @staticmethod - def from_bytes_unchecked(bytes) -> NewPeakWallet: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[NewPeakWallet, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> NewPeakWallet: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, header_hash: Union[ bytes32, _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), weight: Union[ uint128, _Unspec] = _Unspec(), @@ -2793,19 +2793,19 @@ class RequestBlockHeader: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestBlockHeader: ... def __copy__(self) -> RequestBlockHeader: ... - @staticmethod - def from_bytes(bytes) -> RequestBlockHeader: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlockHeader: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlockHeader, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestBlockHeader: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RequestBlockHeader: ... class RespondBlockHeader: @@ -2819,19 +2819,19 @@ class RespondBlockHeader: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondBlockHeader: ... def __copy__(self) -> RespondBlockHeader: ... - @staticmethod - def from_bytes(bytes) -> RespondBlockHeader: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlockHeader: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlockHeader, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondBlockHeader: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, header_block: Union[ HeaderBlock, _Unspec] = _Unspec()) -> RespondBlockHeader: ... class RejectHeaderRequest: @@ -2845,19 +2845,19 @@ class RejectHeaderRequest: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RejectHeaderRequest: ... def __copy__(self) -> RejectHeaderRequest: ... - @staticmethod - def from_bytes(bytes) -> RejectHeaderRequest: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectHeaderRequest: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectHeaderRequest, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectHeaderRequest: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec()) -> RejectHeaderRequest: ... class RequestRemovals: @@ -2875,19 +2875,19 @@ class RequestRemovals: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestRemovals: ... def __copy__(self) -> RequestRemovals: ... - @staticmethod - def from_bytes(bytes) -> RequestRemovals: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestRemovals: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemovals, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestRemovals: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), coin_names: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemovals: ... @@ -2909,19 +2909,19 @@ class RespondRemovals: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondRemovals: ... def __copy__(self) -> RespondRemovals: ... - @staticmethod - def from_bytes(bytes) -> RespondRemovals: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondRemovals: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemovals, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondRemovals: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), coins: Union[ List[Tuple[bytes32, Optional[Coin]]], _Unspec] = _Unspec(), @@ -2940,19 +2940,19 @@ class RejectRemovalsRequest: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RejectRemovalsRequest: ... def __copy__(self) -> RejectRemovalsRequest: ... - @staticmethod - def from_bytes(bytes) -> RejectRemovalsRequest: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectRemovalsRequest: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectRemovalsRequest, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectRemovalsRequest: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RejectRemovalsRequest: ... @@ -2971,19 +2971,19 @@ class RequestAdditions: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestAdditions: ... def __copy__(self) -> RequestAdditions: ... - @staticmethod - def from_bytes(bytes) -> RequestAdditions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestAdditions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestAdditions, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestAdditions: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ Optional[bytes32], _Unspec] = _Unspec(), puzzle_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestAdditions: ... @@ -3005,19 +3005,19 @@ class RespondAdditions: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondAdditions: ... def __copy__(self) -> RespondAdditions: ... - @staticmethod - def from_bytes(bytes) -> RespondAdditions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondAdditions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondAdditions, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondAdditions: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), coins: Union[ List[Tuple[bytes32, List[Coin]]], _Unspec] = _Unspec(), @@ -3036,19 +3036,19 @@ class RejectAdditionsRequest: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RejectAdditionsRequest: ... def __copy__(self) -> RejectAdditionsRequest: ... - @staticmethod - def from_bytes(bytes) -> RejectAdditionsRequest: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectAdditionsRequest: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectAdditionsRequest, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectAdditionsRequest: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec()) -> RejectAdditionsRequest: ... @@ -3067,19 +3067,19 @@ class RespondBlockHeaders: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondBlockHeaders: ... def __copy__(self) -> RespondBlockHeaders: ... - @staticmethod - def from_bytes(bytes) -> RespondBlockHeaders: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondBlockHeaders: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondBlockHeaders, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondBlockHeaders: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec(), header_blocks: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RespondBlockHeaders: ... @@ -3097,19 +3097,19 @@ class RejectBlockHeaders: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RejectBlockHeaders: ... def __copy__(self) -> RejectBlockHeaders: ... - @staticmethod - def from_bytes(bytes) -> RejectBlockHeaders: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectBlockHeaders: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectBlockHeaders, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectBlockHeaders: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectBlockHeaders: ... @@ -3128,19 +3128,19 @@ class RequestBlockHeaders: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestBlockHeaders: ... def __copy__(self) -> RequestBlockHeaders: ... - @staticmethod - def from_bytes(bytes) -> RequestBlockHeaders: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestBlockHeaders: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestBlockHeaders, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestBlockHeaders: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec(), return_filter: Union[ bool, _Unspec] = _Unspec()) -> RequestBlockHeaders: ... @@ -3158,19 +3158,19 @@ class RequestHeaderBlocks: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestHeaderBlocks: ... def __copy__(self) -> RequestHeaderBlocks: ... - @staticmethod - def from_bytes(bytes) -> RequestHeaderBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestHeaderBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestHeaderBlocks, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestHeaderBlocks: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec()) -> RequestHeaderBlocks: ... @@ -3187,19 +3187,19 @@ class RejectHeaderBlocks: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RejectHeaderBlocks: ... def __copy__(self) -> RejectHeaderBlocks: ... - @staticmethod - def from_bytes(bytes) -> RejectHeaderBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectHeaderBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectHeaderBlocks, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectHeaderBlocks: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec()) -> RejectHeaderBlocks: ... @@ -3218,19 +3218,19 @@ class RespondHeaderBlocks: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondHeaderBlocks: ... def __copy__(self) -> RespondHeaderBlocks: ... - @staticmethod - def from_bytes(bytes) -> RespondHeaderBlocks: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondHeaderBlocks: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondHeaderBlocks, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondHeaderBlocks: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec(), header_blocks: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RespondHeaderBlocks: ... @@ -3248,19 +3248,19 @@ class RegisterForPhUpdates: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RegisterForPhUpdates: ... def __copy__(self) -> RegisterForPhUpdates: ... - @staticmethod - def from_bytes(bytes) -> RegisterForPhUpdates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RegisterForPhUpdates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RegisterForPhUpdates, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RegisterForPhUpdates: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), min_height: Union[ uint32, _Unspec] = _Unspec()) -> RegisterForPhUpdates: ... @@ -3279,19 +3279,19 @@ class RespondToPhUpdates: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondToPhUpdates: ... def __copy__(self) -> RespondToPhUpdates: ... - @staticmethod - def from_bytes(bytes) -> RespondToPhUpdates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondToPhUpdates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondToPhUpdates, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondToPhUpdates: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), min_height: Union[ uint32, _Unspec] = _Unspec(), coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondToPhUpdates: ... @@ -3309,19 +3309,19 @@ class RegisterForCoinUpdates: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RegisterForCoinUpdates: ... def __copy__(self) -> RegisterForCoinUpdates: ... - @staticmethod - def from_bytes(bytes) -> RegisterForCoinUpdates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RegisterForCoinUpdates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RegisterForCoinUpdates, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RegisterForCoinUpdates: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), min_height: Union[ uint32, _Unspec] = _Unspec()) -> RegisterForCoinUpdates: ... @@ -3340,19 +3340,19 @@ class RespondToCoinUpdates: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondToCoinUpdates: ... def __copy__(self) -> RespondToCoinUpdates: ... - @staticmethod - def from_bytes(bytes) -> RespondToCoinUpdates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondToCoinUpdates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondToCoinUpdates, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondToCoinUpdates: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), min_height: Union[ uint32, _Unspec] = _Unspec(), coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondToCoinUpdates: ... @@ -3374,19 +3374,19 @@ class CoinStateUpdate: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> CoinStateUpdate: ... def __copy__(self) -> CoinStateUpdate: ... - @staticmethod - def from_bytes(bytes) -> CoinStateUpdate: ... - @staticmethod - def from_bytes_unchecked(bytes) -> CoinStateUpdate: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinStateUpdate, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> CoinStateUpdate: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, height: Union[ uint32, _Unspec] = _Unspec(), fork_height: Union[ uint32, _Unspec] = _Unspec(), peak_hash: Union[ bytes32, _Unspec] = _Unspec(), @@ -3403,19 +3403,19 @@ class RequestChildren: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestChildren: ... def __copy__(self) -> RequestChildren: ... - @staticmethod - def from_bytes(bytes) -> RequestChildren: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestChildren: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestChildren, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestChildren: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_name: Union[ bytes32, _Unspec] = _Unspec()) -> RequestChildren: ... class RespondChildren: @@ -3429,19 +3429,19 @@ class RespondChildren: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondChildren: ... def __copy__(self) -> RespondChildren: ... - @staticmethod - def from_bytes(bytes) -> RespondChildren: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondChildren: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondChildren, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondChildren: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondChildren: ... class RequestSesInfo: @@ -3457,19 +3457,19 @@ class RequestSesInfo: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestSesInfo: ... def __copy__(self) -> RequestSesInfo: ... - @staticmethod - def from_bytes(bytes) -> RequestSesInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestSesInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestSesInfo, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestSesInfo: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, start_height: Union[ uint32, _Unspec] = _Unspec(), end_height: Union[ uint32, _Unspec] = _Unspec()) -> RequestSesInfo: ... @@ -3486,19 +3486,19 @@ class RespondSesInfo: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondSesInfo: ... def __copy__(self) -> RespondSesInfo: ... - @staticmethod - def from_bytes(bytes) -> RespondSesInfo: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondSesInfo: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondSesInfo, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondSesInfo: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, reward_chain_hash: Union[ List[bytes32], _Unspec] = _Unspec(), heights: Union[ List[List[uint32]], _Unspec] = _Unspec()) -> RespondSesInfo: ... @@ -3513,19 +3513,19 @@ class RequestFeeEstimates: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestFeeEstimates: ... def __copy__(self) -> RequestFeeEstimates: ... - @staticmethod - def from_bytes(bytes) -> RequestFeeEstimates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestFeeEstimates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestFeeEstimates, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestFeeEstimates: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, time_targets: Union[ List[uint64], _Unspec] = _Unspec()) -> RequestFeeEstimates: ... class RespondFeeEstimates: @@ -3539,19 +3539,19 @@ class RespondFeeEstimates: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondFeeEstimates: ... def __copy__(self) -> RespondFeeEstimates: ... - @staticmethod - def from_bytes(bytes) -> RespondFeeEstimates: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondFeeEstimates: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondFeeEstimates, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondFeeEstimates: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, estimates: Union[ FeeEstimateGroup, _Unspec] = _Unspec()) -> RespondFeeEstimates: ... class RequestRemovePuzzleSubscriptions: @@ -3565,19 +3565,19 @@ class RequestRemovePuzzleSubscriptions: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestRemovePuzzleSubscriptions: ... def __copy__(self) -> RequestRemovePuzzleSubscriptions: ... - @staticmethod - def from_bytes(bytes) -> RequestRemovePuzzleSubscriptions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestRemovePuzzleSubscriptions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemovePuzzleSubscriptions, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestRemovePuzzleSubscriptions: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, puzzle_hashes: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemovePuzzleSubscriptions: ... class RespondRemovePuzzleSubscriptions: @@ -3591,19 +3591,19 @@ class RespondRemovePuzzleSubscriptions: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondRemovePuzzleSubscriptions: ... def __copy__(self) -> RespondRemovePuzzleSubscriptions: ... - @staticmethod - def from_bytes(bytes) -> RespondRemovePuzzleSubscriptions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondRemovePuzzleSubscriptions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemovePuzzleSubscriptions, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondRemovePuzzleSubscriptions: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec()) -> RespondRemovePuzzleSubscriptions: ... class RequestRemoveCoinSubscriptions: @@ -3617,19 +3617,19 @@ class RequestRemoveCoinSubscriptions: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestRemoveCoinSubscriptions: ... def __copy__(self) -> RequestRemoveCoinSubscriptions: ... - @staticmethod - def from_bytes(bytes) -> RequestRemoveCoinSubscriptions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestRemoveCoinSubscriptions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestRemoveCoinSubscriptions, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestRemoveCoinSubscriptions: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_ids: Union[ Optional[List[bytes32]], _Unspec] = _Unspec()) -> RequestRemoveCoinSubscriptions: ... class RespondRemoveCoinSubscriptions: @@ -3643,19 +3643,19 @@ class RespondRemoveCoinSubscriptions: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondRemoveCoinSubscriptions: ... def __copy__(self) -> RespondRemoveCoinSubscriptions: ... - @staticmethod - def from_bytes(bytes) -> RespondRemoveCoinSubscriptions: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondRemoveCoinSubscriptions: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondRemoveCoinSubscriptions, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondRemoveCoinSubscriptions: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec()) -> RespondRemoveCoinSubscriptions: ... class CoinStateFilters: @@ -3675,19 +3675,19 @@ class CoinStateFilters: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> CoinStateFilters: ... def __copy__(self) -> CoinStateFilters: ... - @staticmethod - def from_bytes(bytes) -> CoinStateFilters: ... - @staticmethod - def from_bytes_unchecked(bytes) -> CoinStateFilters: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[CoinStateFilters, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> CoinStateFilters: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, include_spent: Union[ bool, _Unspec] = _Unspec(), include_unspent: Union[ bool, _Unspec] = _Unspec(), include_hinted: Union[ bool, _Unspec] = _Unspec(), @@ -3712,19 +3712,19 @@ class RequestPuzzleState: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestPuzzleState: ... def __copy__(self) -> RequestPuzzleState: ... - @staticmethod - def from_bytes(bytes) -> RequestPuzzleState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestPuzzleState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestPuzzleState, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestPuzzleState: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), previous_height: Union[ Optional[uint32], _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), @@ -3750,19 +3750,19 @@ class RespondPuzzleState: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondPuzzleState: ... def __copy__(self) -> RespondPuzzleState: ... - @staticmethod - def from_bytes(bytes) -> RespondPuzzleState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondPuzzleState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondPuzzleState, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondPuzzleState: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, puzzle_hashes: Union[ List[bytes32], _Unspec] = _Unspec(), height: Union[ uint32, _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), @@ -3780,19 +3780,19 @@ class RejectPuzzleState: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RejectPuzzleState: ... def __copy__(self) -> RejectPuzzleState: ... - @staticmethod - def from_bytes(bytes) -> RejectPuzzleState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectPuzzleState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectPuzzleState, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectPuzzleState: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, reason: Union[ int, _Unspec] = _Unspec()) -> RejectPuzzleState: ... class RequestCoinState: @@ -3812,19 +3812,19 @@ class RequestCoinState: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RequestCoinState: ... def __copy__(self) -> RequestCoinState: ... - @staticmethod - def from_bytes(bytes) -> RequestCoinState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RequestCoinState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RequestCoinState, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RequestCoinState: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), previous_height: Union[ Optional[uint32], _Unspec] = _Unspec(), header_hash: Union[ bytes32, _Unspec] = _Unspec(), @@ -3843,19 +3843,19 @@ class RespondCoinState: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RespondCoinState: ... def __copy__(self) -> RespondCoinState: ... - @staticmethod - def from_bytes(bytes) -> RespondCoinState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RespondCoinState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RespondCoinState, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RespondCoinState: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, coin_ids: Union[ List[bytes32], _Unspec] = _Unspec(), coin_states: Union[ List[CoinState], _Unspec] = _Unspec()) -> RespondCoinState: ... @@ -3870,19 +3870,19 @@ class RejectCoinState: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RejectCoinState: ... def __copy__(self) -> RejectCoinState: ... - @staticmethod - def from_bytes(bytes) -> RejectCoinState: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RejectCoinState: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RejectCoinState, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RejectCoinState: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, reason: Union[ int, _Unspec] = _Unspec()) -> RejectCoinState: ... class SubEpochData: @@ -3902,19 +3902,19 @@ class SubEpochData: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> SubEpochData: ... def __copy__(self) -> SubEpochData: ... - @staticmethod - def from_bytes(bytes) -> SubEpochData: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochData: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochData, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubEpochData: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, reward_chain_hash: Union[ bytes32, _Unspec] = _Unspec(), num_blocks_overflow: Union[ uint8, _Unspec] = _Unspec(), new_sub_slot_iters: Union[ Optional[uint64], _Unspec] = _Unspec(), @@ -3957,19 +3957,19 @@ class SubSlotData: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> SubSlotData: ... def __copy__(self) -> SubSlotData: ... - @staticmethod - def from_bytes(bytes) -> SubSlotData: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubSlotData: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubSlotData, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubSlotData: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, proof_of_space: Union[ Optional[ProofOfSpace], _Unspec] = _Unspec(), cc_signage_point: Union[ Optional[VDFProof], _Unspec] = _Unspec(), cc_infusion_point: Union[ Optional[VDFProof], _Unspec] = _Unspec(), @@ -3999,19 +3999,19 @@ class SubEpochChallengeSegment: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> SubEpochChallengeSegment: ... def __copy__(self) -> SubEpochChallengeSegment: ... - @staticmethod - def from_bytes(bytes) -> SubEpochChallengeSegment: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochChallengeSegment: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochChallengeSegment, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubEpochChallengeSegment: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, sub_epoch_n: Union[ uint32, _Unspec] = _Unspec(), sub_slots: Union[ List[SubSlotData], _Unspec] = _Unspec(), rc_slot_end_info: Union[ Optional[VDFInfo], _Unspec] = _Unspec()) -> SubEpochChallengeSegment: ... @@ -4027,19 +4027,19 @@ class SubEpochSegments: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> SubEpochSegments: ... def __copy__(self) -> SubEpochSegments: ... - @staticmethod - def from_bytes(bytes) -> SubEpochSegments: ... - @staticmethod - def from_bytes_unchecked(bytes) -> SubEpochSegments: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[SubEpochSegments, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> SubEpochSegments: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, challenge_segments: Union[ List[SubEpochChallengeSegment], _Unspec] = _Unspec()) -> SubEpochSegments: ... class RecentChainData: @@ -4053,19 +4053,19 @@ class RecentChainData: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> RecentChainData: ... def __copy__(self) -> RecentChainData: ... - @staticmethod - def from_bytes(bytes) -> RecentChainData: ... - @staticmethod - def from_bytes_unchecked(bytes) -> RecentChainData: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[RecentChainData, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> RecentChainData: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, recent_chain_data: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> RecentChainData: ... class ProofBlockHeader: @@ -4081,19 +4081,19 @@ class ProofBlockHeader: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> ProofBlockHeader: ... def __copy__(self) -> ProofBlockHeader: ... - @staticmethod - def from_bytes(bytes) -> ProofBlockHeader: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ProofBlockHeader: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ProofBlockHeader, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ProofBlockHeader: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, finished_sub_slots: Union[ List[EndOfSubSlotBundle], _Unspec] = _Unspec(), reward_chain_block: Union[ RewardChainBlock, _Unspec] = _Unspec()) -> ProofBlockHeader: ... @@ -4112,19 +4112,19 @@ class WeightProof: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> WeightProof: ... def __copy__(self) -> WeightProof: ... - @staticmethod - def from_bytes(bytes) -> WeightProof: ... - @staticmethod - def from_bytes_unchecked(bytes) -> WeightProof: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[WeightProof, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> WeightProof: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, sub_epochs: Union[ List[SubEpochData], _Unspec] = _Unspec(), sub_epoch_segments: Union[ List[SubEpochChallengeSegment], _Unspec] = _Unspec(), recent_chain_data: Union[ List[HeaderBlock], _Unspec] = _Unspec()) -> WeightProof: ... @@ -4230,19 +4230,19 @@ class ConsensusConstants: def __richcmp__(self) -> Any: ... def __deepcopy__(self) -> ConsensusConstants: ... def __copy__(self) -> ConsensusConstants: ... - @staticmethod - def from_bytes(bytes) -> ConsensusConstants: ... - @staticmethod - def from_bytes_unchecked(bytes) -> ConsensusConstants: ... - @staticmethod - def parse_rust(ReadableBuffer, bool = False) -> Tuple[ConsensusConstants, int]: ... + @classmethod + def from_bytes(cls, bytes) -> Self: ... + @classmethod + def from_bytes_unchecked(cls, bytes) -> Self: ... + @classmethod + def parse_rust(cls, ReadableBuffer, bool = False) -> Tuple[Self, int]: ... def to_bytes(self) -> bytes: ... def __bytes__(self) -> bytes: ... def stream_to_bytes(self) -> bytes: ... def get_hash(self) -> bytes32: ... def to_json_dict(self) -> Any: ... - @staticmethod - def from_json_dict(json_dict: Any) -> ConsensusConstants: ... + @classmethod + def from_json_dict(cls, json_dict: Any) -> Self: ... def replace(self, *, SLOT_BLOCKS_TARGET: Union[ uint32, _Unspec] = _Unspec(), MIN_BLOCKS_PER_CHALLENGE_BLOCK: Union[ uint8, _Unspec] = _Unspec(), MAX_SUB_SLOT_BLOCKS: Union[ uint32, _Unspec] = _Unspec(), From 570d3e48176fe099169505925ac2f5069b83d0d2 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 23 Sep 2024 14:25:27 +0200 Subject: [PATCH 42/59] now that the mempool TX validation path has been separated from the block validation, we can remove the ANALYZE_SPENDS flag. It's implied for validate_clvm_and_signature() --- crates/chia-consensus/benches/run-generator.rs | 4 ++-- .../fuzz/fuzz_targets/run-generator.rs | 5 ++--- crates/chia-consensus/src/gen/flags.rs | 7 +------ .../src/gen/get_puzzle_and_solution.rs | 4 ++-- .../src/gen/run_block_generator.rs | 13 +++++++------ .../chia-consensus/src/gen/test_generators.rs | 6 +++--- .../src/spendbundle_conditions.rs | 4 ++-- crates/chia-tools/src/bin/analyze-chain.rs | 5 ++--- .../src/bin/test-block-generators.rs | 10 ++++------ wheel/src/api.rs | 3 +-- wheel/src/run_generator.rs | 18 ++++-------------- 11 files changed, 30 insertions(+), 49 deletions(-) diff --git a/crates/chia-consensus/benches/run-generator.rs b/crates/chia-consensus/benches/run-generator.rs index a37b9cb9e..588f0e1c5 100644 --- a/crates/chia-consensus/benches/run-generator.rs +++ b/crates/chia-consensus/benches/run-generator.rs @@ -51,7 +51,7 @@ fn run(c: &mut Criterion) { let mut a = Allocator::new(); let start = Instant::now(); - let conds = run_block_generator::<_, MempoolVisitor, _>( + let conds = run_block_generator( &mut a, gen, &block_refs, @@ -69,7 +69,7 @@ fn run(c: &mut Criterion) { let mut a = Allocator::new(); let start = Instant::now(); - let conds = run_block_generator2::<_, MempoolVisitor, _>( + let conds = run_block_generator2( &mut a, gen, &block_refs, diff --git a/crates/chia-consensus/fuzz/fuzz_targets/run-generator.rs b/crates/chia-consensus/fuzz/fuzz_targets/run-generator.rs index 0f539a177..b34c03811 100644 --- a/crates/chia-consensus/fuzz/fuzz_targets/run-generator.rs +++ b/crates/chia-consensus/fuzz/fuzz_targets/run-generator.rs @@ -1,7 +1,6 @@ #![no_main] use chia_consensus::allocator::make_allocator; use chia_consensus::consensus_constants::TEST_CONSTANTS; -use chia_consensus::gen::conditions::MempoolVisitor; use chia_consensus::gen::flags::ALLOW_BACKREFS; use chia_consensus::gen::run_block_generator::{run_block_generator, run_block_generator2}; use chia_consensus::gen::validation_error::{ErrorCode, ValidationErr}; @@ -10,7 +9,7 @@ use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &[u8]| { let mut a1 = make_allocator(LIMIT_HEAP); - let r1 = run_block_generator::<&[u8], MempoolVisitor, _>( + let r1 = run_block_generator::<&[u8], _>( &mut a1, data, [], @@ -21,7 +20,7 @@ fuzz_target!(|data: &[u8]| { drop(a1); let mut a2 = make_allocator(LIMIT_HEAP); - let r2 = run_block_generator2::<&[u8], MempoolVisitor, _>( + let r2 = run_block_generator2::<&[u8], _>( &mut a2, data, [], diff --git a/crates/chia-consensus/src/gen/flags.rs b/crates/chia-consensus/src/gen/flags.rs index 27c30e10a..13ca7d6ce 100644 --- a/crates/chia-consensus/src/gen/flags.rs +++ b/crates/chia-consensus/src/gen/flags.rs @@ -13,9 +13,4 @@ pub const STRICT_ARGS_COUNT: u32 = 0x80000; // contain back-references pub const ALLOW_BACKREFS: u32 = 0x0200_0000; -// When set, the "flags" field of the Spend objects will be set depending on -// what features are detected of the spends -pub const ANALYZE_SPENDS: u32 = 0x0400_0000; - -pub const MEMPOOL_MODE: u32 = - CLVM_MEMPOOL_MODE | NO_UNKNOWN_CONDS | STRICT_ARGS_COUNT | ANALYZE_SPENDS; +pub const MEMPOOL_MODE: u32 = CLVM_MEMPOOL_MODE | NO_UNKNOWN_CONDS | STRICT_ARGS_COUNT; diff --git a/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs b/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs index f1f742587..6f242d2d1 100644 --- a/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs +++ b/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs @@ -61,7 +61,7 @@ pub fn get_puzzle_and_solution_for_coin( mod test { use super::*; use crate::consensus_constants::TEST_CONSTANTS; - use crate::gen::conditions::{u64_to_bytes, MempoolVisitor}; + use crate::gen::conditions::u64_to_bytes; use crate::gen::flags::{ALLOW_BACKREFS, MEMPOOL_MODE}; use crate::gen::run_block_generator::{run_block_generator2, setup_generator_args}; use chia_protocol::Bytes32; @@ -234,7 +234,7 @@ mod test { let mut a = Allocator::new(); let blocks: &[&[u8]] = &[]; - let conds = run_block_generator2::<_, MempoolVisitor, _>( + let conds = run_block_generator2( &mut a, &generator, blocks, diff --git a/crates/chia-consensus/src/gen/run_block_generator.rs b/crates/chia-consensus/src/gen/run_block_generator.rs index e73ebf01d..b7f99b993 100644 --- a/crates/chia-consensus/src/gen/run_block_generator.rs +++ b/crates/chia-consensus/src/gen/run_block_generator.rs @@ -1,9 +1,9 @@ use crate::consensus_constants::ConsensusConstants; use crate::gen::conditions::{ - parse_spends, process_single_spend, validate_conditions, ParseState, SpendBundleConditions, + parse_spends, process_single_spend, validate_conditions, EmptyVisitor, ParseState, + SpendBundleConditions, }; use crate::gen::flags::ALLOW_BACKREFS; -use crate::gen::spend_visitor::SpendVisitor; use crate::gen::validation_error::{first, ErrorCode, ValidationErr}; use crate::generator_rom::{CLVM_DESERIALIZER, GENERATOR_ROM}; use clvm_utils::{tree_hash_cached, TreeHash}; @@ -67,7 +67,7 @@ where // the only reason we need to pass in the allocator is because the returned // SpendBundleConditions contains NodePtr fields. If that's changed, we could // create the allocator inside this functions as well. -pub fn run_block_generator, V: SpendVisitor, I: IntoIterator>( +pub fn run_block_generator, I: IntoIterator>( a: &mut Allocator, program: &[u8], block_refs: I, @@ -112,7 +112,8 @@ where // we pass in what's left of max_cost here, to fail early in case the // cost of a condition brings us over the cost limit - let mut result = parse_spends::(a, generator_output, cost_left, flags, constants)?; + let mut result = + parse_spends::(a, generator_output, cost_left, flags, constants)?; result.cost += max_cost - cost_left; Ok(result) } @@ -146,7 +147,7 @@ pub fn extract_n( // you only pay cost for the generator, the puzzles and the conditions). // it also does not apply the stack depth or object allocation limits the same, // as each puzzle run in its own environment. -pub fn run_block_generator2, V: SpendVisitor, I: IntoIterator>( +pub fn run_block_generator2, I: IntoIterator>( a: &mut Allocator, program: &[u8], block_refs: I, @@ -198,7 +199,7 @@ where let buf = tree_hash_cached(a, puzzle, &backrefs, &mut cache); let puzzle_hash = a.new_atom(&buf)?; - process_single_spend::( + process_single_spend::( a, &mut ret, &mut state, diff --git a/crates/chia-consensus/src/gen/test_generators.rs b/crates/chia-consensus/src/gen/test_generators.rs index ccef1fed6..ad3ee3388 100644 --- a/crates/chia-consensus/src/gen/test_generators.rs +++ b/crates/chia-consensus/src/gen/test_generators.rs @@ -1,4 +1,4 @@ -use super::conditions::{MempoolVisitor, NewCoin, SpendBundleConditions, SpendConditions}; +use super::conditions::{NewCoin, SpendBundleConditions, SpendConditions}; use super::run_block_generator::{run_block_generator, run_block_generator2}; use crate::allocator::make_allocator; use crate::consensus_constants::TEST_CONSTANTS; @@ -231,7 +231,7 @@ fn run_generator(#[case] name: &str) { for (flags, expected) in zip(&[DEFAULT_FLAGS, DEFAULT_FLAGS | MEMPOOL_MODE], expected) { println!("flags: {flags:x}"); let mut a = make_allocator(*flags); - let conds = run_block_generator::<_, MempoolVisitor, _>( + let conds = run_block_generator( &mut a, &generator, &block_refs, @@ -246,7 +246,7 @@ fn run_generator(#[case] name: &str) { }; let mut a = make_allocator(*flags); - let conds = run_block_generator2::<_, MempoolVisitor, _>( + let conds = run_block_generator2( &mut a, &generator, &block_refs, diff --git a/crates/chia-consensus/src/spendbundle_conditions.rs b/crates/chia-consensus/src/spendbundle_conditions.rs index 244aa4126..2e0547ef0 100644 --- a/crates/chia-consensus/src/spendbundle_conditions.rs +++ b/crates/chia-consensus/src/spendbundle_conditions.rs @@ -133,7 +133,7 @@ mod tests { }); let program = solution_generator(program_spends).expect("solution_generator failed"); let blocks: &[&[u8]] = &[]; - let block_conds = run_block_generator2::<_, MempoolVisitor, _>( + let block_conds = run_block_generator2( &mut a, program.as_slice(), blocks, @@ -312,7 +312,7 @@ mod tests { // of just the spend bundle will be lower let (block_cost, block_output) = { let mut a = make_allocator(DEFAULT_FLAGS); - let block_conds = run_block_generator::<_, MempoolVisitor, _>( + let block_conds = run_block_generator( &mut a, &generator_buffer, &block_refs, diff --git a/crates/chia-tools/src/bin/analyze-chain.rs b/crates/chia-tools/src/bin/analyze-chain.rs index 485f0f2de..0ab55631d 100644 --- a/crates/chia-tools/src/bin/analyze-chain.rs +++ b/crates/chia-tools/src/bin/analyze-chain.rs @@ -4,7 +4,6 @@ use std::io::Write; use std::time::SystemTime; use chia_consensus::consensus_constants::TEST_CONSTANTS; -use chia_consensus::gen::conditions::EmptyVisitor; use chia_consensus::gen::flags::{ALLOW_BACKREFS, MEMPOOL_MODE}; use chia_consensus::gen::run_block_generator::{run_block_generator, run_block_generator2}; use chia_tools::iterate_tx_blocks; @@ -51,9 +50,9 @@ fn main() { // after the hard fork, we run blocks without paying for the // CLVM generator ROM let block_runner = if height >= 5_496_000 { - run_block_generator2::<_, EmptyVisitor, _> + run_block_generator2 } else { - run_block_generator::<_, EmptyVisitor, _> + run_block_generator }; let generator = block diff --git a/crates/chia-tools/src/bin/test-block-generators.rs b/crates/chia-tools/src/bin/test-block-generators.rs index a02387aa0..e03084f5d 100644 --- a/crates/chia-tools/src/bin/test-block-generators.rs +++ b/crates/chia-tools/src/bin/test-block-generators.rs @@ -2,9 +2,7 @@ use clap::Parser; use chia_bls::PublicKey; use chia_consensus::consensus_constants::TEST_CONSTANTS; -use chia_consensus::gen::conditions::{ - EmptyVisitor, NewCoin, SpendBundleConditions, SpendConditions, -}; +use chia_consensus::gen::conditions::{NewCoin, SpendBundleConditions, SpendConditions}; use chia_consensus::gen::flags::{ALLOW_BACKREFS, MEMPOOL_MODE}; use chia_consensus::gen::run_block_generator::{run_block_generator, run_block_generator2}; use chia_tools::iterate_tx_blocks; @@ -161,9 +159,9 @@ fn main() { // after the hard fork, we run blocks without paying for the // CLVM generator ROM let block_runner = if height >= 5_496_000 { - run_block_generator2::<_, EmptyVisitor, _> + run_block_generator2 } else { - run_block_generator::<_, EmptyVisitor, _> + run_block_generator }; let mut conditions = @@ -183,7 +181,7 @@ fn main() { } if args.validate { - let mut baseline = run_block_generator::<_, EmptyVisitor, _>( + let mut baseline = run_block_generator( &mut a, generator.as_ref(), &block_refs, diff --git a/wheel/src/api.rs b/wheel/src/api.rs index 758f8eca0..6c026ff59 100644 --- a/wheel/src/api.rs +++ b/wheel/src/api.rs @@ -3,7 +3,7 @@ use chia_consensus::allocator::make_allocator; use chia_consensus::consensus_constants::ConsensusConstants; use chia_consensus::gen::conditions::MempoolVisitor; use chia_consensus::gen::flags::{ - ALLOW_BACKREFS, ANALYZE_SPENDS, MEMPOOL_MODE, NO_UNKNOWN_CONDS, STRICT_ARGS_COUNT, + ALLOW_BACKREFS, MEMPOOL_MODE, NO_UNKNOWN_CONDS, STRICT_ARGS_COUNT, }; use chia_consensus::gen::owned_conditions::{OwnedSpendBundleConditions, OwnedSpendConditions}; use chia_consensus::gen::run_block_generator::setup_generator_args; @@ -502,7 +502,6 @@ pub fn chia_rs(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add("STRICT_ARGS_COUNT", STRICT_ARGS_COUNT)?; m.add("MEMPOOL_MODE", MEMPOOL_MODE)?; m.add("ALLOW_BACKREFS", ALLOW_BACKREFS)?; - m.add("ANALYZE_SPENDS", ANALYZE_SPENDS)?; // Chia classes m.add_class::()?; diff --git a/wheel/src/run_generator.rs b/wheel/src/run_generator.rs index 00be27e35..8c628db75 100644 --- a/wheel/src/run_generator.rs +++ b/wheel/src/run_generator.rs @@ -1,7 +1,5 @@ use chia_consensus::allocator::make_allocator; use chia_consensus::consensus_constants::ConsensusConstants; -use chia_consensus::gen::conditions::{EmptyVisitor, MempoolVisitor}; -use chia_consensus::gen::flags::ANALYZE_SPENDS; use chia_consensus::gen::owned_conditions::OwnedSpendBundleConditions; use chia_consensus::gen::run_block_generator::run_block_generator as native_run_block_generator; use chia_consensus::gen::run_block_generator::run_block_generator2 as native_run_block_generator2; @@ -39,14 +37,10 @@ pub fn run_block_generator<'a>( }) .collect::>(); let program = py_to_slice::<'a>(program); - let run_block = if (flags & ANALYZE_SPENDS) == 0 { - native_run_block_generator::<_, EmptyVisitor, _> - } else { - native_run_block_generator::<_, MempoolVisitor, _> - }; py.allow_threads(|| { - match run_block(&mut allocator, program, refs, max_cost, flags, constants) { + match native_run_block_generator(&mut allocator, program, refs, max_cost, flags, constants) + { Ok(spend_bundle_conds) => ( None, Some(OwnedSpendBundleConditions::from( @@ -84,14 +78,10 @@ pub fn run_block_generator2<'a>( .collect::>(); let program = py_to_slice::<'a>(program); - let run_block = if (flags & ANALYZE_SPENDS) == 0 { - native_run_block_generator2::<_, EmptyVisitor, _> - } else { - native_run_block_generator2::<_, MempoolVisitor, _> - }; py.allow_threads(|| { - match run_block(&mut allocator, program, refs, max_cost, flags, constants) { + match native_run_block_generator2(&mut allocator, program, refs, max_cost, flags, constants) + { Ok(spend_bundle_conds) => ( None, Some(OwnedSpendBundleConditions::from( From b7509bac96387bb923023f91af65d81da8520363 Mon Sep 17 00:00:00 2001 From: arvidn Date: Mon, 23 Sep 2024 17:06:49 +0200 Subject: [PATCH 43/59] use PySequence instead of PyList in BlsCache::update() to allow passing bytes32 instead of bytes (for example) --- crates/chia-bls/src/bls_cache.rs | 4 ++-- wheel/generate_type_stubs.py | 2 +- wheel/python/chia_rs/chia_rs.pyi | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/chia-bls/src/bls_cache.rs b/crates/chia-bls/src/bls_cache.rs index 3ce4a8b6a..23b8aae15 100644 --- a/crates/chia-bls/src/bls_cache.rs +++ b/crates/chia-bls/src/bls_cache.rs @@ -83,7 +83,7 @@ impl BlsCache { use pyo3::{ exceptions::PyValueError, pybacked::PyBackedBytes, - types::{PyAnyMethods, PyList}, + types::{PyAnyMethods, PyList, PySequence}, Bound, PyObject, PyResult, }; @@ -143,7 +143,7 @@ impl BlsCache { } #[pyo3(name = "update")] - pub fn py_update(&mut self, other: &Bound<'_, PyList>) -> PyResult<()> { + pub fn py_update(&mut self, other: &Bound<'_, PySequence>) -> PyResult<()> { for item in other.borrow().iter()? { let (key, value): (Vec, GTElement) = item?.extract()?; self.cache.put( diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index 09b863841..aa5b40574 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -349,7 +349,7 @@ def __init__(self, cache_size: Optional[int] = 50000) -> None: ... def len(self) -> int: ... def aggregate_verify(self, pks: List[G1Element], msgs: List[bytes], sig: G2Element) -> bool: ... def items(self) -> List[Tuple[bytes, GTElement]]: ... - def update(self, other: List[Tuple[bytes, GTElement]]) -> None: ... + def update(self, other: Sequence[Tuple[bytes, GTElement]]) -> None: ... class AugSchemeMPL: @staticmethod diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 05ea9f1f9..11bbe57c6 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -98,7 +98,7 @@ class BLSCache: def len(self) -> int: ... def aggregate_verify(self, pks: List[G1Element], msgs: List[bytes], sig: G2Element) -> bool: ... def items(self) -> List[Tuple[bytes, GTElement]]: ... - def update(self, other: List[Tuple[bytes, GTElement]]) -> None: ... + def update(self, other: Sequence[Tuple[bytes, GTElement]]) -> None: ... class AugSchemeMPL: @staticmethod From 1b23017b08bf7ee61ca35219b8b0533b7ec3d34f Mon Sep 17 00:00:00 2001 From: matt-o-how <48453825+matt-o-how@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:33:56 +0100 Subject: [PATCH 44/59] Optimize `get_conditions_from_spendbundle()` by calculating the generator's size without creating the generator (#714) * add function for calculating generator size without allocations * fix off by one error for low amounts * move unused import to test mod * fix amount = 0 case * take coinspend by reference * clippy fix * use amount comparison optimisation * add fuzzer * fmt * add variance to fuzzer by breaking instead of quitting on invalid coinspend * use while loop and consume `data` * further clarify cost calculation and generalise the amount_to_bytes_len function * fix comment * hand failure to create solution_generator() * fmt * debugging in CI * parse as untrusted * further debugging in CI required * add in accounting for puzzle and solution as atoms * debug in ci * ignore backrefs and add edgecase test * fmt * remove debug panic * clippy fix * remote debug CI again * expect node * fixup fuzzer (#720) * remove debug code * update comment * Update crates/chia-consensus/fuzz/fuzz_targets/solution-generator.rs Co-authored-by: Amine Khaldi --------- Co-authored-by: Arvid Norberg Co-authored-by: Amine Khaldi --- crates/chia-consensus/fuzz/Cargo.toml | 7 + .../fuzz/fuzz_targets/solution-generator.rs | 42 +++++ .../src/gen/solution_generator.rs | 151 +++++++++++++++++- .../src/spendbundle_conditions.rs | 15 +- 4 files changed, 200 insertions(+), 15 deletions(-) create mode 100644 crates/chia-consensus/fuzz/fuzz_targets/solution-generator.rs diff --git a/crates/chia-consensus/fuzz/Cargo.toml b/crates/chia-consensus/fuzz/Cargo.toml index 5c65b81bf..1df444629 100644 --- a/crates/chia-consensus/fuzz/Cargo.toml +++ b/crates/chia-consensus/fuzz/Cargo.toml @@ -111,3 +111,10 @@ path = "fuzz_targets/merkle-set.rs" test = false doc = false bench = false + +[[bin]] +name = "solution-generator" +path = "fuzz_targets/solution-generator.rs" +test = false +doc = false +bench = false \ No newline at end of file diff --git a/crates/chia-consensus/fuzz/fuzz_targets/solution-generator.rs b/crates/chia-consensus/fuzz/fuzz_targets/solution-generator.rs new file mode 100644 index 000000000..bebcf44a7 --- /dev/null +++ b/crates/chia-consensus/fuzz/fuzz_targets/solution-generator.rs @@ -0,0 +1,42 @@ +#![no_main] +use chia_consensus::gen::solution_generator::{calculate_generator_length, solution_generator}; +use chia_protocol::{Coin, CoinSpend}; +use chia_traits::Streamable; +use clvmr::{ + serde::{node_from_bytes_backrefs, node_to_bytes}, + Allocator, +}; +use libfuzzer_sys::fuzz_target; +use std::io::Cursor; + +fuzz_target!(|data: &[u8]| { + let mut spends = Vec::::new(); + let mut generator_input = Vec::<(Coin, Vec, Vec)>::new(); + let mut data = Cursor::new(data); + let mut discrepancy: i64 = 0; + let mut a = Allocator::new(); + while let Ok(spend) = CoinSpend::parse::(&mut data) { + spends.push(spend.clone()); + generator_input.push(( + spend.coin, + spend.puzzle_reveal.to_vec(), + spend.solution.to_vec(), + )); + // Check for atoms which can be represented in a smaller form + let node = node_from_bytes_backrefs(&mut a, spend.puzzle_reveal.as_ref()).expect("node"); + let puz = node_to_bytes(&a, node).expect("bytes"); + discrepancy += spend.puzzle_reveal.as_ref().len() as i64 - puz.len() as i64; + let node = node_from_bytes_backrefs(&mut a, spend.solution.as_ref()).expect("node"); + let sol = node_to_bytes(&a, node).expect("bytes"); + discrepancy += spend.solution.as_ref().len() as i64 - sol.len() as i64; + } + if spends.is_empty() { + return; + } + let result = solution_generator(generator_input).expect("solution_generator"); + + assert_eq!( + result.len() as i64, + calculate_generator_length(spends) as i64 - discrepancy + ); +}); diff --git a/crates/chia-consensus/src/gen/solution_generator.rs b/crates/chia-consensus/src/gen/solution_generator.rs index 4ed325a68..9ba270a5a 100644 --- a/crates/chia-consensus/src/gen/solution_generator.rs +++ b/crates/chia-consensus/src/gen/solution_generator.rs @@ -1,4 +1,5 @@ use chia_protocol::Coin; +use chia_protocol::CoinSpend; use clvmr::allocator::{Allocator, NodePtr}; use clvmr::serde::{node_from_bytes_backrefs, node_to_bytes, node_to_bytes_backrefs}; use std::io; @@ -39,6 +40,48 @@ where Ok(quote) } +fn clvm_bytes_len(val: u64) -> usize { + if val < 0x80 { + 1 + } else if val < 0x8000 { + 3 + } else if val < 0x0080_0000 { + 4 + } else if val < 0x8000_0000 { + 5 + } else if val < 0x0080_0000_0000 { + 6 + } else if val < 0x8000_0000_0000 { + 7 + } else if val < 0x0080_0000_0000_0000 { + 8 + } else if val < 0x8000_0000_0000_0000 { + 9 + } else { + 10 + } +} + +// calculate the size in bytes of a generator with no backref optimisations +pub fn calculate_generator_length(spends: I) -> usize +where + I: AsRef<[CoinSpend]>, +{ + let mut size: usize = 5; // (q . (())) => ff01ff8080 => 5 bytes + + for s in spends.as_ref() { + let puzzle = s.puzzle_reveal.as_ref(); + let solution = s.solution.as_ref(); + // parent-id puzzle-reveal amount solution + // parent-id is always 32 bytes + prepend 1 byte = 33 + // + 6 bytes for list extension + // coin amount is already prepended correctly in clvm_bytes_len() + size += 39 + puzzle.len() + clvm_bytes_len(s.coin.amount) + solution.len(); + } + + size +} + // the tuple has the Coin, puzzle-reveal and solution pub fn solution_generator(spends: I) -> io::Result> where @@ -63,8 +106,11 @@ where #[cfg(test)] mod tests { use super::*; + use chia_protocol::Program; + use chia_traits::Streamable; use clvmr::{run_program, ChiaDialect}; use hex_literal::hex; + use rstest::rstest; const PUZZLE1: [u8; 291] = hex!( " @@ -141,11 +187,28 @@ mod tests { 18_375_000_000_000_000_000, ); - let result = solution_generator([ + let spends = [ (coin1, PUZZLE1.as_ref(), SOLUTION1.as_ref()), (coin2, PUZZLE2.as_ref(), SOLUTION2.as_ref()), - ]) - .expect("solution_generator"); + ]; + + let result = solution_generator(spends).expect("solution_generator"); + + assert_eq!( + result.len(), + calculate_generator_length([ + CoinSpend { + coin: coin1, + puzzle_reveal: Program::from(PUZZLE1.as_ref()), + solution: Program::from(SOLUTION1.as_ref()) + }, + CoinSpend { + coin: coin2, + puzzle_reveal: Program::from(PUZZLE2.as_ref()), + solution: Program::from(SOLUTION2.as_ref()) + }, + ]) + ); assert_eq!( result, @@ -194,8 +257,17 @@ mod tests { let generator_output = run_generator(&result); assert_eq!(generator_output, EXPECTED_GENERATOR_OUTPUT); - let result = solution_generator([(coin2, PUZZLE2.as_ref(), SOLUTION2.as_ref())]) - .expect("solution_generator"); + let spends = [(coin2, PUZZLE2.as_ref(), SOLUTION2.as_ref())]; + let result = solution_generator(spends).expect("solution_generator"); + + assert_eq!( + result.len(), + calculate_generator_length([CoinSpend { + coin: coin2, + puzzle_reveal: Program::from(PUZZLE2.as_ref()), + solution: Program::from(SOLUTION2.as_ref()) + },]) + ); assert_eq!( result, @@ -220,6 +292,75 @@ mod tests { ); } + #[test] + fn test_length_calculator() { + let mut spends: Vec<(Coin, &[u8], &[u8])> = Vec::new(); + let mut coin_spends = Vec::::new(); + for i in [ + 0, + 1, + 128, + 129, + 256, + 257, + 4_294_967_296, + 4_294_967_297, + 0x8000_0001, + 0x8000_0000_0001, + 0x8000_0000_0000_0001, + ] { + let coin: Coin = Coin::new( + hex!("ccd5bb71183532bff220ba46c268991a00000000000000000000000000036840").into(), + hex!("fcc78a9e396df6ceebc217d2446bc016e0b3d5922fb32e5783ec5a85d490cfb6").into(), + i, + ); + spends.push((coin, PUZZLE1.as_ref(), SOLUTION1.as_ref())); + coin_spends.push(CoinSpend { + coin, + puzzle_reveal: Program::from(PUZZLE1.as_ref()), + solution: Program::from(SOLUTION1.as_ref()), + }); + let result = solution_generator(spends.clone()).expect("solution_generator"); + + assert_eq!(result.len(), calculate_generator_length(&coin_spends)); + } + } + + #[rstest] + #[case(hex!("f800000000").as_ref(), SOLUTION1.as_ref())] + #[case(hex!("fffffe0000ff41ff013a").as_ref(), SOLUTION1.as_ref())] + #[case(PUZZLE1.as_ref(), hex!("00").as_ref())] + fn test_length_calculator_edge_case(#[case] puzzle: &[u8], #[case] solution: &[u8]) { + let mut spends: Vec<(Coin, &[u8], &[u8])> = Vec::new(); + let mut coin_spends = Vec::::new(); + let mut a = Allocator::new(); + let mut discrepancy: i64 = 0; + + let coin: Coin = Coin::new( + hex!("ccd5bb71183532bff220ba46c268991a00000000000000000000000000036840").into(), + hex!("fcc78a9e396df6ceebc217d2446bc016e0b3d5922fb32e5783ec5a85d490cfb6").into(), + 100, + ); + spends.push((coin, puzzle, solution)); + coin_spends.push(CoinSpend { + coin, + puzzle_reveal: Program::from_bytes(puzzle).expect("puzzle_reveal"), + solution: Program::from_bytes(solution).expect("solution"), + }); + let node = node_from_bytes_backrefs(&mut a, puzzle).expect("puzzle"); + let puz = node_to_bytes(&a, node).expect("bytes"); + discrepancy += puzzle.len() as i64 - puz.len() as i64; + let node = node_from_bytes_backrefs(&mut a, solution).expect("solution"); + let sol = node_to_bytes(&a, node).expect("bytes"); + discrepancy += solution.len() as i64 - sol.len() as i64; + let result = solution_generator(spends.clone()).expect("solution_generator"); + + assert_eq!( + result.len() as i64, + calculate_generator_length(&coin_spends) as i64 - discrepancy + ); + } + #[test] fn test_solution_generator_backre() { let coin1: Coin = Coin::new( diff --git a/crates/chia-consensus/src/spendbundle_conditions.rs b/crates/chia-consensus/src/spendbundle_conditions.rs index 2e0547ef0..629fa909d 100644 --- a/crates/chia-consensus/src/spendbundle_conditions.rs +++ b/crates/chia-consensus/src/spendbundle_conditions.rs @@ -4,7 +4,7 @@ use crate::gen::conditions::{ }; use crate::gen::flags::MEMPOOL_MODE; use crate::gen::run_block_generator::subtract_cost; -use crate::gen::solution_generator::solution_generator; +use crate::gen::solution_generator::calculate_generator_length; use crate::gen::validation_error::ValidationErr; use crate::spendbundle_validation::get_flags_for_height_and_constants; use chia_protocol::SpendBundle; @@ -32,17 +32,11 @@ pub fn get_conditions_from_spendbundle( let dialect = ChiaDialect::new(flags); let mut ret = SpendBundleConditions::default(); let mut state = ParseState::default(); - - let spends_info = spend_bundle.coin_spends.iter().map(|coin_spend| { - ( - coin_spend.coin, - &coin_spend.puzzle_reveal, - &coin_spend.solution, - ) - }); // We don't pay the size cost (nor execution cost) of being wrapped by a // quote (in solution_generator). - let generator_length_without_quote = solution_generator(spends_info)?.len() - QUOTE_BYTES; + let generator_length_without_quote = + calculate_generator_length(&spend_bundle.coin_spends) - QUOTE_BYTES; + let byte_cost = generator_length_without_quote as u64 * constants.cost_per_byte; subtract_cost(a, &mut cost_left, byte_cost)?; @@ -86,6 +80,7 @@ mod tests { use crate::allocator::make_allocator; use crate::gen::conditions::{ELIGIBLE_FOR_DEDUP, ELIGIBLE_FOR_FF}; use crate::gen::run_block_generator::run_block_generator2; + use crate::gen::solution_generator::solution_generator; use chia_bls::Signature; use chia_protocol::CoinSpend; use chia_traits::Streamable; From e0b9cd455bd639c684e5076ed286da7e13c0f39a Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 24 Sep 2024 15:48:20 +0200 Subject: [PATCH 45/59] add test for clvm_bytes_len --- .../src/gen/solution_generator.rs | 66 ++++++++++++++++++- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/crates/chia-consensus/src/gen/solution_generator.rs b/crates/chia-consensus/src/gen/solution_generator.rs index 9ba270a5a..c153a903a 100644 --- a/crates/chia-consensus/src/gen/solution_generator.rs +++ b/crates/chia-consensus/src/gen/solution_generator.rs @@ -40,6 +40,8 @@ where Ok(quote) } +// this function returns the number of bytes the specified +// number is serialized to, in CLVM serialized form fn clvm_bytes_len(val: u64) -> usize { if val < 0x80 { 1 @@ -72,8 +74,9 @@ where for s in spends.as_ref() { let puzzle = s.puzzle_reveal.as_ref(); let solution = s.solution.as_ref(); - // parent-id puzzle-reveal amount solution - // parent-id is always 32 bytes + prepend 1 byte = 33 + // Each spend has the following form: + // ( parent-id puzzle-reveal amount solution ) + // parent-id is always 32 bytes + 1 byte length prefix = 33 // + 6 bytes for list extension // coin amount is already prepended correctly in clvm_bytes_len() size += 39 + puzzle.len() + clvm_bytes_len(s.coin.amount) + solution.len(); @@ -440,4 +443,63 @@ mod tests { let generator_output = run_generator(&result); assert_eq!(generator_output, EXPECTED_GENERATOR_OUTPUT); } + + #[rstest] + #[case(0)] + #[case(1)] + #[case(0x7f)] + #[case(0x80)] + #[case(0xff)] + #[case(0x7fff)] + #[case(0x8000)] + #[case(0xffff)] + #[case(0x7fffff)] + #[case(0x800000)] + #[case(0xffffff)] + #[case(0x7fffffff)] + #[case(0x80000000)] + #[case(0xffffffff)] + #[case(0x7fffffffff)] + #[case(0x8000000000)] + #[case(0xffffffffff)] + #[case(0x7fffffffffff)] + #[case(0x800000000000)] + #[case(0xffffffffffff)] + #[case(0x7fffffffffffff)] + #[case(0x80000000000000)] + #[case(0xffffffffffffff)] + #[case(0x7fffffffffffffff)] + #[case(0x8000000000000000)] + #[case(0xffffffffffffffff)] + #[case(0x7)] + #[case(0x8)] + #[case(0xf)] + #[case(0x7ff)] + #[case(0x800)] + #[case(0xfff)] + #[case(0x7ffff)] + #[case(0x80000)] + #[case(0xfffff)] + #[case(0x7ffffff)] + #[case(0x8000000)] + #[case(0xfffffff)] + #[case(0x7ffffffff)] + #[case(0x800000000)] + #[case(0xfffffffff)] + #[case(0x7ffffffffff)] + #[case(0x80000000000)] + #[case(0xfffffffffff)] + #[case(0x7ffffffffffff)] + #[case(0x8000000000000)] + #[case(0xfffffffffffff)] + #[case(0x7ffffffffffffff)] + #[case(0x800000000000000)] + #[case(0xfffffffffffffff)] + fn test_clvm_bytes_len(#[case] n: u64) { + let len = clvm_bytes_len(n); + let mut a = Allocator::new(); + let atom = a.new_number(n.into()).expect("new_number"); + let bytes = node_to_bytes(&a, atom).expect("node_to_bytes"); + assert_eq!(bytes.len(), len); + } } From 66f5a575655a056f14e69a9cacb5fc6006da34bd Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Tue, 24 Sep 2024 11:23:00 -0400 Subject: [PATCH 46/59] update concurrency pattern to match blockchain --- .github/workflows/audit-check.yml | 4 ++++ .github/workflows/benchmark.yml | 4 ++++ .github/workflows/build-crate.yml | 4 ++++ .github/workflows/build-npm.yml | 4 ++++ .github/workflows/build-riscv64.yml | 4 ++++ .github/workflows/build-wheels.yml | 3 +-- .github/workflows/prettier.yml | 4 ++++ 7 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/audit-check.yml b/.github/workflows/audit-check.yml index 332799198..643387cfc 100644 --- a/.github/workflows/audit-check.yml +++ b/.github/workflows/audit-check.yml @@ -4,6 +4,10 @@ on: branches: - "**" +concurrency: + group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} + cancel-in-progress: true + jobs: security_audit: runs-on: ubuntu-latest diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index cf1ad22fd..fd8964a4a 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -10,6 +10,10 @@ on: branches: - "**" +concurrency: + group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} + cancel-in-progress: true + jobs: tests: name: Unit Tests diff --git a/.github/workflows/build-crate.yml b/.github/workflows/build-crate.yml index 746095a69..0097e566e 100644 --- a/.github/workflows/build-crate.yml +++ b/.github/workflows/build-crate.yml @@ -10,6 +10,10 @@ on: branches: - "**" +concurrency: + group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} + cancel-in-progress: true + jobs: build_crate: name: Build crate diff --git a/.github/workflows/build-npm.yml b/.github/workflows/build-npm.yml index 4679bd3c8..d19b091e6 100644 --- a/.github/workflows/build-npm.yml +++ b/.github/workflows/build-npm.yml @@ -10,6 +10,10 @@ on: branches: - "**" +concurrency: + group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} + cancel-in-progress: true + jobs: build_npm: name: Build npm diff --git a/.github/workflows/build-riscv64.yml b/.github/workflows/build-riscv64.yml index 4099724be..57708ccf3 100644 --- a/.github/workflows/build-riscv64.yml +++ b/.github/workflows/build-riscv64.yml @@ -10,6 +10,10 @@ on: branches: - "**" +concurrency: + group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} + cancel-in-progress: true + permissions: id-token: write contents: read diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index f2d95d961..2279d96e8 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -11,8 +11,7 @@ on: - "**" concurrency: - # SHA is added to the end if on `main` to let all main workflows run - group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }} + group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} cancel-in-progress: true permissions: diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 29387b657..0310583f0 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -10,6 +10,10 @@ on: branches: - "**" +concurrency: + group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }} + cancel-in-progress: true + jobs: prettier: name: Prettier From 9b523c7a655914a2e510219e1693488562b4f041 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 25 Sep 2024 08:45:44 -0400 Subject: [PATCH 47/59] get `Self` from `typing_extensions` (#721) * get `Self` from `typing_extensions` * add dependency on typing-extensions * find the path, then install with an index * update actual stub * include directory * use a temporary directory * shell: bash --- .github/workflows/build-wheels.yml | 9 ++++++++- wheel/generate_type_stubs.py | 3 ++- wheel/pyproject.toml | 4 ++++ wheel/python/chia_rs/chia_rs.pyi | 3 ++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 2279d96e8..37908cf77 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -189,8 +189,15 @@ jobs: directories: ${{ steps.create-venv.outputs.activate-venv-directories }} - name: Install chia_rs wheel + shell: bash run: | - pip install --no-index --find-links target/wheels/ chia_rs + TMP_DEST=$(mktemp -d) + pip download --no-index --no-deps --only-binary :all: --find-links target/wheels/ --dest "${TMP_DEST}" chia_rs + echo ==== + ls -l "${TMP_DEST}" + echo ==== + pip install "${TMP_DEST}"/* + rm -rf "${TMP_DEST}" - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index aa5b40574..56a0cea38 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -254,9 +254,10 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s # this file is generated by generate_type_stubs.py # -from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar, Self +from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar from .sized_bytes import bytes32, bytes100 from .sized_ints import uint8, uint16, uint32, uint64, uint128, int8, int16, int32, int64 +from typing_extensions import Self from chia.types.blockchain_format.program import Program as ChiaProgram ReadableBuffer = Union[bytes, bytearray, memoryview] diff --git a/wheel/pyproject.toml b/wheel/pyproject.toml index cea949f5f..b051c326d 100644 --- a/wheel/pyproject.toml +++ b/wheel/pyproject.toml @@ -6,3 +6,7 @@ build-backend = "maturin" bindings = "pyo3" features = ["pyo3/extension-module"] python-source = "python" + +[project] +name = "chia_rs" +dependencies = ["typing_extensions"] diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 11bbe57c6..0c764ef31 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -3,9 +3,10 @@ # this file is generated by generate_type_stubs.py # -from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar, Self +from typing import List, Optional, Sequence, Tuple, Union, Dict, Any, ClassVar from .sized_bytes import bytes32, bytes100 from .sized_ints import uint8, uint16, uint32, uint64, uint128, int8, int16, int32, int64 +from typing_extensions import Self from chia.types.blockchain_format.program import Program as ChiaProgram ReadableBuffer = Union[bytes, bytearray, memoryview] From c4087fc98036fff597d4c3b143922a4482c3a207 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 25 Sep 2024 09:27:34 -0400 Subject: [PATCH 48/59] fixups and ignores around `.from_parent()` --- wheel/generate_type_stubs.py | 6 +++++- wheel/python/chia_rs/chia_rs.pyi | 7 ++++++- wheel/stubtest.allowlist | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index e0917b890..f4903ef60 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -166,6 +166,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s extra_members = { "Coin": [ "def name(self) -> bytes32: ...", + "@classmethod\n def from_parent(cls, _coin: Self): ...", ], "ClassgroupElement": [ "@staticmethod\n def create(bytes) -> ClassgroupElement: ...", @@ -224,6 +225,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s "def uncurry(self) -> Tuple[ChiaProgram, ChiaProgram]: ...", ], "SpendBundle": [ + "@classmethod\n def from_parent(cls, spend_bundle: Self): ...", "@classmethod\n def aggregate(cls, spend_bundles: List[SpendBundle]) -> Self: ...", "def name(self) -> bytes32: ...", "def removals(self) -> List[Coin]: ...", @@ -239,6 +241,9 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s "def ip_iters(self, constants: ConsensusConstants) -> uint64: ...", "def sp_total_iters(self, constants: ConsensusConstants) -> uint128: ...", ], + "CoinSpend": [ + "@classmethod\n def from_parent(cls, cs: Self): ...", + ], } classes = [] @@ -329,7 +334,6 @@ def get_flags_for_height_and_constants( LIMIT_HEAP: int = ... MEMPOOL_MODE: int = ... ALLOW_BACKREFS: int = ... -ANALYZE_SPENDS: int = ... ELIGIBLE_FOR_DEDUP: int = ... ELIGIBLE_FOR_FF: int = ... diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 7bd8222bb..7b5943a11 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -71,7 +71,6 @@ STRICT_ARGS_COUNT: int = ... LIMIT_HEAP: int = ... MEMPOOL_MODE: int = ... ALLOW_BACKREFS: int = ... -ANALYZE_SPENDS: int = ... ELIGIBLE_FOR_DEDUP: int = ... ELIGIBLE_FOR_FF: int = ... @@ -604,6 +603,8 @@ class Coin: puzzle_hash: bytes32 amount: uint64 def name(self) -> bytes32: ... + @classmethod + def from_parent(cls, _coin: Self): ... def __init__( self, parent_coin_info: bytes, @@ -636,6 +637,8 @@ class CoinSpend: coin: Coin puzzle_reveal: Program solution: Program + @classmethod + def from_parent(cls, cs: Self): ... def __init__( self, coin: Coin, @@ -2339,6 +2342,8 @@ class SpendBundle: coin_spends: List[CoinSpend] aggregated_signature: G2Element @classmethod + def from_parent(cls, spend_bundle: Self): ... + @classmethod def aggregate(cls, spend_bundles: List[SpendBundle]) -> Self: ... def name(self) -> bytes32: ... def removals(self) -> List[Coin]: ... diff --git a/wheel/stubtest.allowlist b/wheel/stubtest.allowlist index 159c43428..248a7acb3 100644 --- a/wheel/stubtest.allowlist +++ b/wheel/stubtest.allowlist @@ -42,3 +42,22 @@ chia_rs.chia_rs.RequestPeers.__init__ chia_rs.sized_byte_class.Iterable chia_rs.sized_byte_class.BinaryIO.write chia_rs.struct_stream.BinaryIO.write + +# TODO: why are we implementing these just so they can report not implemented? +chia_rs.G1Element.from_parent +chia_rs.G2Element.from_parent +chia_rs.GTElement.from_parent +chia_rs.PrivateKey.from_parent +chia_rs.Program.from_parent +chia_rs.Spend.from_parent +chia_rs.SpendBundleConditions.from_parent +chia_rs.SpendConditions.from_parent +chia_rs.chia_rs.G1Element.from_parent +chia_rs.chia_rs.G2Element.from_parent +chia_rs.chia_rs.GTElement.from_parent +chia_rs.chia_rs.PrivateKey.from_parent +chia_rs.chia_rs.Program.from_parent +chia_rs.chia_rs.SpendBundleConditions.from_parent +chia_rs.chia_rs.SpendConditions.from_parent +chia_rs.spend.Spend.from_parent +chia_rs.spend.SpendConditions.from_parent From 2e6adcba857ec73faca544bee64a408c0bda0dde Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 25 Sep 2024 15:06:10 -0400 Subject: [PATCH 49/59] remove `.from_parent()` hinting at least for now --- wheel/generate_type_stubs.py | 5 ----- wheel/python/chia_rs/chia_rs.pyi | 6 ------ wheel/stubtest.allowlist | 10 +++++++++- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index f4903ef60..1db73d5a0 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -166,7 +166,6 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s extra_members = { "Coin": [ "def name(self) -> bytes32: ...", - "@classmethod\n def from_parent(cls, _coin: Self): ...", ], "ClassgroupElement": [ "@staticmethod\n def create(bytes) -> ClassgroupElement: ...", @@ -225,7 +224,6 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s "def uncurry(self) -> Tuple[ChiaProgram, ChiaProgram]: ...", ], "SpendBundle": [ - "@classmethod\n def from_parent(cls, spend_bundle: Self): ...", "@classmethod\n def aggregate(cls, spend_bundles: List[SpendBundle]) -> Self: ...", "def name(self) -> bytes32: ...", "def removals(self) -> List[Coin]: ...", @@ -241,9 +239,6 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s "def ip_iters(self, constants: ConsensusConstants) -> uint64: ...", "def sp_total_iters(self, constants: ConsensusConstants) -> uint128: ...", ], - "CoinSpend": [ - "@classmethod\n def from_parent(cls, cs: Self): ...", - ], } classes = [] diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 7b5943a11..d11412604 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -603,8 +603,6 @@ class Coin: puzzle_hash: bytes32 amount: uint64 def name(self) -> bytes32: ... - @classmethod - def from_parent(cls, _coin: Self): ... def __init__( self, parent_coin_info: bytes, @@ -637,8 +635,6 @@ class CoinSpend: coin: Coin puzzle_reveal: Program solution: Program - @classmethod - def from_parent(cls, cs: Self): ... def __init__( self, coin: Coin, @@ -2342,8 +2338,6 @@ class SpendBundle: coin_spends: List[CoinSpend] aggregated_signature: G2Element @classmethod - def from_parent(cls, spend_bundle: Self): ... - @classmethod def aggregate(cls, spend_bundles: List[SpendBundle]) -> Self: ... def name(self) -> bytes32: ... def removals(self) -> List[Coin]: ... diff --git a/wheel/stubtest.allowlist b/wheel/stubtest.allowlist index 248a7acb3..f8c303124 100644 --- a/wheel/stubtest.allowlist +++ b/wheel/stubtest.allowlist @@ -43,7 +43,7 @@ chia_rs.sized_byte_class.Iterable chia_rs.sized_byte_class.BinaryIO.write chia_rs.struct_stream.BinaryIO.write -# TODO: why are we implementing these just so they can report not implemented? +# these raise unimplemented chia_rs.G1Element.from_parent chia_rs.G2Element.from_parent chia_rs.GTElement.from_parent @@ -61,3 +61,11 @@ chia_rs.chia_rs.SpendBundleConditions.from_parent chia_rs.chia_rs.SpendConditions.from_parent chia_rs.spend.Spend.from_parent chia_rs.spend.SpendConditions.from_parent + +# these are impemented but not intended to be called from python +chia_rs.Coin.from_parent +chia_rs.CoinSpend.from_parent +chia_rs.SpendBundle.from_parent +chia_rs.chia_rs.Coin.from_parent +chia_rs.chia_rs.CoinSpend.from_parent +chia_rs.chia_rs.SpendBundle.from_parent From e31b12613b5ea09e909364474f16e50430a77415 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Wed, 25 Sep 2024 15:06:57 -0400 Subject: [PATCH 50/59] typo --- wheel/stubtest.allowlist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wheel/stubtest.allowlist b/wheel/stubtest.allowlist index f8c303124..36d5afaf3 100644 --- a/wheel/stubtest.allowlist +++ b/wheel/stubtest.allowlist @@ -62,7 +62,7 @@ chia_rs.chia_rs.SpendConditions.from_parent chia_rs.spend.Spend.from_parent chia_rs.spend.SpendConditions.from_parent -# these are impemented but not intended to be called from python +# these are implemented but not intended to be called from python chia_rs.Coin.from_parent chia_rs.CoinSpend.from_parent chia_rs.SpendBundle.from_parent From c6cd98f637f07e60f68203c4c27b8cf3a559ae9b Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 25 Sep 2024 22:10:56 +0200 Subject: [PATCH 51/59] Release 0.14.0 (#727) chia@0.14.0 chia-bls@0.14.0 chia-client@0.14.0 chia-consensus@0.14.0 chia-protocol@0.14.0 chia-puzzles@0.14.0 chia-tools@0.14.0 chia_rs@0.14.0 clvm-traits@0.14.0 clvm-utils@0.14.0 Generated by cargo-workspaces --- Cargo.lock | 36 +++++++++++++-------------- Cargo.toml | 16 ++++++------ crates/chia-bls/Cargo.toml | 2 +- crates/chia-client/Cargo.toml | 2 +- crates/chia-consensus/Cargo.toml | 2 +- crates/chia-consensus/fuzz/Cargo.toml | 2 +- crates/chia-protocol/Cargo.toml | 2 +- crates/chia-puzzles/Cargo.toml | 2 +- crates/chia-tools/Cargo.toml | 2 +- crates/clvm-traits/Cargo.toml | 2 +- crates/clvm-utils/Cargo.toml | 2 +- wheel/Cargo.toml | 2 +- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bb4ad01d7..9c4217bfc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -271,9 +271,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chia" -version = "0.13.0" +version = "0.14.0" dependencies = [ - "chia-bls 0.13.0", + "chia-bls 0.14.0", "chia-client", "chia-consensus", "chia-protocol", @@ -303,7 +303,7 @@ dependencies = [ [[package]] name = "chia-bls" -version = "0.13.0" +version = "0.14.0" dependencies = [ "arbitrary", "blst", @@ -325,14 +325,14 @@ dependencies = [ name = "chia-bls-fuzz" version = "0.13.0" dependencies = [ - "chia-bls 0.13.0", + "chia-bls 0.14.0", "libfuzzer-sys", "pyo3", ] [[package]] name = "chia-client" -version = "0.13.0" +version = "0.14.0" dependencies = [ "chia-protocol", "chia-traits 0.11.0", @@ -345,9 +345,9 @@ dependencies = [ [[package]] name = "chia-consensus" -version = "0.13.0" +version = "0.14.0" dependencies = [ - "chia-bls 0.13.0", + "chia-bls 0.14.0", "chia-protocol", "chia-puzzles", "chia-traits 0.11.0", @@ -383,10 +383,10 @@ dependencies = [ [[package]] name = "chia-protocol" -version = "0.13.0" +version = "0.14.0" dependencies = [ "arbitrary", - "chia-bls 0.13.0", + "chia-bls 0.14.0", "chia-traits 0.11.0", "chia_py_streamable_macro", "chia_streamable_macro 0.11.0", @@ -413,10 +413,10 @@ dependencies = [ [[package]] name = "chia-puzzles" -version = "0.13.0" +version = "0.14.0" dependencies = [ "arbitrary", - "chia-bls 0.13.0", + "chia-bls 0.14.0", "chia-protocol", "clvm-traits", "clvm-utils", @@ -450,10 +450,10 @@ dependencies = [ [[package]] name = "chia-tools" -version = "0.13.0" +version = "0.14.0" dependencies = [ "blocking-threadpool", - "chia-bls 0.13.0", + "chia-bls 0.14.0", "chia-consensus", "chia-protocol", "chia-puzzles", @@ -500,9 +500,9 @@ dependencies = [ [[package]] name = "chia_rs" -version = "0.13.0" +version = "0.14.0" dependencies = [ - "chia-bls 0.13.0", + "chia-bls 0.14.0", "chia-consensus", "chia-protocol", "clvm-utils", @@ -619,9 +619,9 @@ dependencies = [ [[package]] name = "clvm-traits" -version = "0.13.0" +version = "0.14.0" dependencies = [ - "chia-bls 0.13.0", + "chia-bls 0.14.0", "clvm-derive", "clvmr", "hex", @@ -642,7 +642,7 @@ dependencies = [ [[package]] name = "clvm-utils" -version = "0.13.0" +version = "0.14.0" dependencies = [ "clvm-traits", "clvmr", diff --git a/Cargo.toml b/Cargo.toml index 24dbfdf01..15af42f95 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia" -version = "0.13.0" +version = "0.14.0" edition = "2021" license = "Apache-2.0" description = "A meta-crate that exports all of the Chia crates in the workspace." @@ -98,15 +98,15 @@ lto = "thin" [workspace.dependencies] chia_py_streamable_macro = { path = "./crates/chia_py_streamable_macro", version = "0.13.0" } chia_streamable_macro = { path = "./crates/chia_streamable_macro", version = "0.11.0" } -chia-bls = { path = "./crates/chia-bls", version = "0.13.0" } -chia-client = { path = "./crates/chia-client", version = "0.13.0" } -chia-consensus = { path = "./crates/chia-consensus", version = "0.13.0" } -chia-protocol = { path = "./crates/chia-protocol", version = "0.13.0" } +chia-bls = { path = "./crates/chia-bls", version = "0.14.0" } +chia-client = { path = "./crates/chia-client", version = "0.14.0" } +chia-consensus = { path = "./crates/chia-consensus", version = "0.14.0" } +chia-protocol = { path = "./crates/chia-protocol", version = "0.14.0" } chia-ssl = { path = "./crates/chia-ssl", version = "0.11.0" } chia-traits = { path = "./crates/chia-traits", version = "0.11.0" } -chia-puzzles = { path = "./crates/chia-puzzles", version = "0.13.0" } -clvm-traits = { path = "./crates/clvm-traits", version = "0.13.0" } -clvm-utils = { path = "./crates/clvm-utils", version = "0.13.0" } +chia-puzzles = { path = "./crates/chia-puzzles", version = "0.14.0" } +clvm-traits = { path = "./crates/clvm-traits", version = "0.14.0" } +clvm-utils = { path = "./crates/clvm-utils", version = "0.14.0" } clvm-derive = { path = "./crates/clvm-derive", version = "0.13.0" } chia-fuzz = { path = "./crates/chia-consensus/fuzz", version = "0.13.0" } blst = { version = "0.3.12", features = ["portable"] } diff --git a/crates/chia-bls/Cargo.toml b/crates/chia-bls/Cargo.toml index 8e17c79b1..f35f6a713 100644 --- a/crates/chia-bls/Cargo.toml +++ b/crates/chia-bls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-bls" -version = "0.13.0" +version = "0.14.0" edition = "2021" license = "Apache-2.0" description = "BLS signature, verification and aggregation functions for the Chia blockchain" diff --git a/crates/chia-client/Cargo.toml b/crates/chia-client/Cargo.toml index 96be4ee7b..4e7619a5e 100644 --- a/crates/chia-client/Cargo.toml +++ b/crates/chia-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-client" -version = "0.13.0" +version = "0.14.0" edition = "2021" license = "Apache-2.0" description = "Chia light client and async peer connections." diff --git a/crates/chia-consensus/Cargo.toml b/crates/chia-consensus/Cargo.toml index 3e35cfd3a..6fb9869d7 100644 --- a/crates/chia-consensus/Cargo.toml +++ b/crates/chia-consensus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-consensus" -version = "0.13.0" +version = "0.14.0" edition = "2021" license = "Apache-2.0" description = "Utility functions and types used by the Chia blockchain full node" diff --git a/crates/chia-consensus/fuzz/Cargo.toml b/crates/chia-consensus/fuzz/Cargo.toml index 1df444629..b4fb0499b 100644 --- a/crates/chia-consensus/fuzz/Cargo.toml +++ b/crates/chia-consensus/fuzz/Cargo.toml @@ -117,4 +117,4 @@ name = "solution-generator" path = "fuzz_targets/solution-generator.rs" test = false doc = false -bench = false \ No newline at end of file +bench = false diff --git a/crates/chia-protocol/Cargo.toml b/crates/chia-protocol/Cargo.toml index a883c3cb3..19c0825a5 100644 --- a/crates/chia-protocol/Cargo.toml +++ b/crates/chia-protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-protocol" -version = "0.13.0" +version = "0.14.0" edition = "2021" license = "Apache-2.0" description = "Chia network protocol message types" diff --git a/crates/chia-puzzles/Cargo.toml b/crates/chia-puzzles/Cargo.toml index ab9fe61ad..e554d16a4 100644 --- a/crates/chia-puzzles/Cargo.toml +++ b/crates/chia-puzzles/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-puzzles" -version = "0.13.0" +version = "0.14.0" edition = "2021" license = "Apache-2.0" description = "Chia primitives needed for building wallets." diff --git a/crates/chia-tools/Cargo.toml b/crates/chia-tools/Cargo.toml index 1d42bdcb9..0894f7b6f 100644 --- a/crates/chia-tools/Cargo.toml +++ b/crates/chia-tools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-tools" -version = "0.13.0" +version = "0.14.0" edition = "2021" license = "Apache-2.0" description = "Utility functions and types used by the Chia blockchain full node" diff --git a/crates/clvm-traits/Cargo.toml b/crates/clvm-traits/Cargo.toml index e37ee88a9..72cb8308e 100644 --- a/crates/clvm-traits/Cargo.toml +++ b/crates/clvm-traits/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clvm-traits" -version = "0.13.0" +version = "0.14.0" edition = "2021" license = "Apache-2.0" description = "Traits for encoding and decoding CLVM objects." diff --git a/crates/clvm-utils/Cargo.toml b/crates/clvm-utils/Cargo.toml index 71f11dc6c..293ac4e37 100644 --- a/crates/clvm-utils/Cargo.toml +++ b/crates/clvm-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clvm-utils" -version = "0.13.0" +version = "0.14.0" edition = "2021" license = "Apache-2.0" description = "Utility functions for processing clvm programs and structures" diff --git a/wheel/Cargo.toml b/wheel/Cargo.toml index 23814402e..1ecf21c73 100644 --- a/wheel/Cargo.toml +++ b/wheel/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia_rs" -version = "0.13.0" +version = "0.14.0" authors = ["Richard Kiss "] edition = "2021" license = "Apache-2.0" From 2f36f08e1c44be155f15826609d1a73ce554be8d Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 26 Sep 2024 15:08:31 -0400 Subject: [PATCH 52/59] Revert "stop ignoring missing imports for the now-hinted clvm library" This reverts commit b447eaa001262618dc896e4d806bb43c88a6e4fd. --- mypy.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mypy.ini b/mypy.ini index 5b5cedc9a..0529a8267 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,4 +1,7 @@ [mypy] +[mypy-clvm.*] +ignore_missing_imports = True + [mypy-colorama.*] ignore_missing_imports = True From 582f59b9d96b07852835c2e4ac7d3dea4d8e52e0 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 26 Sep 2024 15:10:02 -0400 Subject: [PATCH 53/59] move mypy config into config, and be specific with ignores --- .github/workflows/benchmark.yml | 2 +- mypy.ini | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 8d9b2029c..7110562d8 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -65,7 +65,7 @@ jobs: - name: python mypy run: | - mypy --ignore-missing-imports tests + mypy tests - name: python mypy stubtest shell: bash diff --git a/mypy.ini b/mypy.ini index 0529a8267..9a3de1aa3 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,5 +1,8 @@ [mypy] +[mypy-blspy.*] +ignore_missing_imports = True + [mypy-clvm.*] ignore_missing_imports = True From aa4420459c7eb64d19655931bce93fc16f0a705f Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 27 Sep 2024 15:34:52 +0200 Subject: [PATCH 54/59] pass ParseState by reference (instead of move) into validate_conditions(). Remove redundant u64_to_bytes() function. Improve documentation of condition flags --- crates/chia-consensus/src/gen/conditions.rs | 72 ++++++++----------- crates/chia-consensus/src/gen/flags.rs | 9 ++- .../src/gen/get_puzzle_and_solution.rs | 2 +- .../src/gen/make_aggsig_final_message.rs | 7 +- .../src/gen/run_block_generator.rs | 2 +- .../src/spendbundle_conditions.rs | 2 +- .../src/spendbundle_validation.rs | 2 +- 7 files changed, 44 insertions(+), 52 deletions(-) diff --git a/crates/chia-consensus/src/gen/conditions.rs b/crates/chia-consensus/src/gen/conditions.rs index 77ff4cc04..d2c093571 100644 --- a/crates/chia-consensus/src/gen/conditions.rs +++ b/crates/chia-consensus/src/gen/conditions.rs @@ -1260,7 +1260,7 @@ pub fn parse_spends( )?; } - validate_conditions(a, &ret, state, spends, flags)?; + validate_conditions(a, &ret, &state, spends, flags)?; ret.cost = max_cost - cost_left; Ok(ret) @@ -1269,7 +1269,7 @@ pub fn parse_spends( pub fn validate_conditions( a: &Allocator, ret: &SpendBundleConditions, - state: ParseState, + state: &ParseState, spends: NodePtr, _flags: u32, ) -> Result<(), ValidationErr> { @@ -1309,13 +1309,13 @@ pub fn validate_conditions( } // check concurrent spent assertions - for coin_id in state.assert_concurrent_spend { + for coin_id in &state.assert_concurrent_spend { if !state .spent_coins - .contains_key(&Bytes32::try_from(a.atom(coin_id).as_ref()).unwrap()) + .contains_key(&Bytes32::try_from(a.atom(*coin_id).as_ref()).unwrap()) { return Err(ValidationErr( - coin_id, + *coin_id, ErrorCode::AssertConcurrentSpendFailed, )); } @@ -1326,14 +1326,14 @@ pub fn validate_conditions( // expand all the spent puzzle hashes into a set, to allow // fast lookups of all assertions - for ph in state.spent_puzzles { - spent_phs.insert(a.atom(ph).as_ref().try_into().unwrap()); + for ph in &state.spent_puzzles { + spent_phs.insert(a.atom(*ph).as_ref().try_into().unwrap()); } - for puzzle_assert in state.assert_concurrent_puzzle { - if !spent_phs.contains(&a.atom(puzzle_assert).as_ref().try_into().unwrap()) { + for puzzle_assert in &state.assert_concurrent_puzzle { + if !spent_phs.contains(&a.atom(*puzzle_assert).as_ref().try_into().unwrap()) { return Err(ValidationErr( - puzzle_assert, + *puzzle_assert, ErrorCode::AssertConcurrentPuzzleFailed, )); } @@ -1345,41 +1345,41 @@ pub fn validate_conditions( if !state.assert_coin.is_empty() { let mut announcements = HashSet::::new(); - for (coin_id, announce) in state.announce_coin { + for (coin_id, announce) in &state.announce_coin { let mut hasher = Sha256::new(); - hasher.update(*coin_id); - hasher.update(a.atom(announce)); + hasher.update(**coin_id); + hasher.update(a.atom(*announce)); let announcement_id: [u8; 32] = hasher.finalize(); announcements.insert(announcement_id.into()); } - for coin_assert in state.assert_coin { - if !announcements.contains(&a.atom(coin_assert).as_ref().try_into().unwrap()) { + for coin_assert in &state.assert_coin { + if !announcements.contains(&a.atom(*coin_assert).as_ref().try_into().unwrap()) { return Err(ValidationErr( - coin_assert, + *coin_assert, ErrorCode::AssertCoinAnnouncementFailed, )); } } } - for spend_idx in state.assert_ephemeral { + for spend_idx in &state.assert_ephemeral { // make sure this coin was created in this block - if !is_ephemeral(a, spend_idx, &state.spent_coins, &ret.spends) { + if !is_ephemeral(a, *spend_idx, &state.spent_coins, &ret.spends) { return Err(ValidationErr( - ret.spends[spend_idx].parent_id, + ret.spends[*spend_idx].parent_id, ErrorCode::AssertEphemeralFailed, )); } } - for spend_idx in state.assert_not_ephemeral { + for spend_idx in &state.assert_not_ephemeral { // make sure this coin was NOT created in this block // because consensus rules do not allow relative conditions on // ephemeral spends - if is_ephemeral(a, spend_idx, &state.spent_coins, &ret.spends) { + if is_ephemeral(a, *spend_idx, &state.spent_coins, &ret.spends) { return Err(ValidationErr( - ret.spends[spend_idx].parent_id, + ret.spends[*spend_idx].parent_id, ErrorCode::EphemeralRelativeCondition, )); } @@ -1388,18 +1388,18 @@ pub fn validate_conditions( if !state.assert_puzzle.is_empty() { let mut announcements = HashSet::::new(); - for (puzzle_hash, announce) in state.announce_puzzle { + for (puzzle_hash, announce) in &state.announce_puzzle { let mut hasher = Sha256::new(); - hasher.update(a.atom(puzzle_hash)); - hasher.update(a.atom(announce)); + hasher.update(a.atom(*puzzle_hash)); + hasher.update(a.atom(*announce)); let announcement_id: [u8; 32] = hasher.finalize(); announcements.insert(announcement_id.into()); } - for puzzle_assert in state.assert_puzzle { - if !announcements.contains(&a.atom(puzzle_assert).as_ref().try_into().unwrap()) { + for puzzle_assert in &state.assert_puzzle { + if !announcements.contains(&a.atom(*puzzle_assert).as_ref().try_into().unwrap()) { return Err(ValidationErr( - puzzle_assert, + *puzzle_assert, ErrorCode::AssertPuzzleAnnouncementFailed, )); } @@ -1434,19 +1434,6 @@ pub fn validate_conditions( Ok(()) } -#[cfg(test)] -pub(crate) fn u64_to_bytes(n: u64) -> Vec { - let mut buf = Vec::::new(); - buf.extend_from_slice(&n.to_be_bytes()); - if (buf[0] & 0x80) != 0 { - buf.insert(0, 0); - } else { - while buf.len() > 1 && buf[0] == 0 && (buf[1] & 0x80) == 0 { - buf.remove(0); - } - } - buf -} #[cfg(test)] use crate::consensus_constants::TEST_CONSTANTS; #[cfg(test)] @@ -1521,6 +1508,9 @@ const LONGMSG: &[u8; 1025] = &[ 4, ]; +#[cfg(test)] +use crate::gen::make_aggsig_final_message::u64_to_bytes; + #[cfg(test)] fn hash_buf(b1: &[u8], b2: &[u8]) -> Vec { let mut ctx = Sha256::new(); diff --git a/crates/chia-consensus/src/gen/flags.rs b/crates/chia-consensus/src/gen/flags.rs index 13ca7d6ce..830e4d50d 100644 --- a/crates/chia-consensus/src/gen/flags.rs +++ b/crates/chia-consensus/src/gen/flags.rs @@ -1,13 +1,16 @@ use clvmr::MEMPOOL_MODE as CLVM_MEMPOOL_MODE; -// flags controlling to condition parsing +// flags controlling the condition parsing +// These flags are combined in the same fields as clvm_rs flags, controlling the +// CLVM execution. To avoid clashes, CLVM flags are in the lower two bytes and +// condition parsing and validation flags are in the top two bytes. // unknown condition codes are disallowed -pub const NO_UNKNOWN_CONDS: u32 = 0x20000; +pub const NO_UNKNOWN_CONDS: u32 = 0x2_0000; // With this flag, conditions will require the exact number of arguments // currently supported for those conditions. This is meant for mempool-mode -pub const STRICT_ARGS_COUNT: u32 = 0x80000; +pub const STRICT_ARGS_COUNT: u32 = 0x8_0000; // when this flag is set, the block generator serialization is allowed to // contain back-references diff --git a/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs b/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs index 6f242d2d1..bb3b6548c 100644 --- a/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs +++ b/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs @@ -61,8 +61,8 @@ pub fn get_puzzle_and_solution_for_coin( mod test { use super::*; use crate::consensus_constants::TEST_CONSTANTS; - use crate::gen::conditions::u64_to_bytes; use crate::gen::flags::{ALLOW_BACKREFS, MEMPOOL_MODE}; + use crate::gen::make_aggsig_final_message::u64_to_bytes; use crate::gen::run_block_generator::{run_block_generator2, setup_generator_args}; use chia_protocol::Bytes32; use clvm_traits::FromClvm; diff --git a/crates/chia-consensus/src/gen/make_aggsig_final_message.rs b/crates/chia-consensus/src/gen/make_aggsig_final_message.rs index 577e9530a..a0ad6dabd 100644 --- a/crates/chia-consensus/src/gen/make_aggsig_final_message.rs +++ b/crates/chia-consensus/src/gen/make_aggsig_final_message.rs @@ -4,7 +4,6 @@ use crate::gen::opcodes::{ AGG_SIG_PARENT_PUZZLE, AGG_SIG_PUZZLE, AGG_SIG_PUZZLE_AMOUNT, }; use crate::gen::owned_conditions::OwnedSpendConditions; -use chia_protocol::Bytes; use chia_protocol::Coin; pub fn make_aggsig_final_message( @@ -51,13 +50,13 @@ pub fn make_aggsig_final_message( } } -fn u64_to_bytes(val: u64) -> Bytes { +pub fn u64_to_bytes(val: u64) -> Vec { let amount_bytes: [u8; 8] = val.to_be_bytes(); if val >= 0x8000_0000_0000_0000_u64 { let mut ret = Vec::::new(); ret.push(0_u8); ret.extend(amount_bytes); - Bytes::new(ret) + ret } else { let start = match val { n if n >= 0x0080_0000_0000_0000_u64 => 0, @@ -70,7 +69,7 @@ fn u64_to_bytes(val: u64) -> Bytes { n if n > 0 => 7, _ => 8, }; - Bytes::new(amount_bytes[start..].to_vec()) + amount_bytes[start..].to_vec() } } diff --git a/crates/chia-consensus/src/gen/run_block_generator.rs b/crates/chia-consensus/src/gen/run_block_generator.rs index b7f99b993..af767294f 100644 --- a/crates/chia-consensus/src/gen/run_block_generator.rs +++ b/crates/chia-consensus/src/gen/run_block_generator.rs @@ -216,7 +216,7 @@ where return Err(ValidationErr(all_spends, ErrorCode::GeneratorRuntimeError)); } - validate_conditions(a, &ret, state, a.nil(), flags)?; + validate_conditions(a, &ret, &state, a.nil(), flags)?; ret.cost = max_cost - cost_left; Ok(ret) diff --git a/crates/chia-consensus/src/spendbundle_conditions.rs b/crates/chia-consensus/src/spendbundle_conditions.rs index 629fa909d..c033ce5ba 100644 --- a/crates/chia-consensus/src/spendbundle_conditions.rs +++ b/crates/chia-consensus/src/spendbundle_conditions.rs @@ -66,7 +66,7 @@ pub fn get_conditions_from_spendbundle( )?; } - validate_conditions(a, &ret, state, a.nil(), flags)?; + validate_conditions(a, &ret, &state, a.nil(), flags)?; assert!(max_cost >= cost_left); ret.cost = max_cost - cost_left; Ok(ret) diff --git a/crates/chia-consensus/src/spendbundle_validation.rs b/crates/chia-consensus/src/spendbundle_validation.rs index dacde6639..b155118ab 100644 --- a/crates/chia-consensus/src/spendbundle_validation.rs +++ b/crates/chia-consensus/src/spendbundle_validation.rs @@ -122,7 +122,7 @@ pub fn get_flags_for_height_and_constants(height: u32, constants: &ConsensusCons mod tests { use super::*; use crate::consensus_constants::TEST_CONSTANTS; - use crate::gen::conditions::u64_to_bytes; + use crate::gen::make_aggsig_final_message::u64_to_bytes; use chia_bls::{sign, G2Element, SecretKey, Signature}; use chia_protocol::{Bytes, Bytes32}; use chia_protocol::{Coin, CoinSpend, Program}; From 5485860860316ec39007f59c6e6d03ea2cb9d72e Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 27 Sep 2024 11:01:46 -0400 Subject: [PATCH 55/59] Add chia-sha2 crate to prevent cyclic dependency with clvmr --- Cargo.lock | 21 ++++++- Cargo.toml | 7 ++- crates/chia-bls/Cargo.toml | 1 + crates/chia-bls/src/bls_cache.rs | 2 +- crates/chia-bls/src/gtelement.rs | 2 +- crates/chia-bls/src/public_key.rs | 2 +- crates/chia-bls/src/secret_key.rs | 2 +- crates/chia-bls/src/signature.rs | 2 +- crates/chia-consensus/Cargo.toml | 1 + crates/chia-consensus/fuzz/Cargo.toml | 1 + .../fuzz/fuzz_targets/merkle-set.rs | 2 +- crates/chia-consensus/src/gen/coin_id.rs | 2 +- crates/chia-consensus/src/gen/conditions.rs | 2 +- .../src/gen/get_puzzle_and_solution.rs | 2 +- crates/chia-consensus/src/merkle_set.rs | 2 +- crates/chia-consensus/src/merkle_tree.rs | 2 +- .../src/spendbundle_validation.rs | 2 +- crates/chia-protocol/Cargo.toml | 1 + crates/chia-protocol/fuzz/Cargo.toml | 1 + .../fuzz/fuzz_targets/streamable.rs | 2 +- crates/chia-protocol/src/bytes.rs | 2 +- crates/chia-protocol/src/coin.rs | 2 +- crates/chia-protocol/src/program.rs | 2 +- crates/chia-puzzles/Cargo.toml | 1 + crates/chia-puzzles/src/derive_synthetic.rs | 2 +- crates/chia-sha2/Cargo.toml | 19 ++++++ crates/chia-sha2/src/lib.rs | 61 +++++++++++++++++++ crates/chia-traits/Cargo.toml | 1 + crates/chia-traits/src/streamable.rs | 2 +- crates/chia_py_streamable_macro/src/lib.rs | 2 +- crates/chia_streamable_macro/src/lib.rs | 8 +-- crates/clvm-utils/Cargo.toml | 1 + crates/clvm-utils/src/tree_hash.rs | 2 +- src/lib.rs | 1 + 34 files changed, 138 insertions(+), 27 deletions(-) create mode 100644 crates/chia-sha2/Cargo.toml create mode 100644 crates/chia-sha2/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 9c4217bfc..6d4775ec7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -278,6 +278,7 @@ dependencies = [ "chia-consensus", "chia-protocol", "chia-puzzles", + "chia-sha2", "chia-ssl", "chia-traits 0.11.0", "clvm-traits", @@ -307,6 +308,7 @@ version = "0.14.0" dependencies = [ "arbitrary", "blst", + "chia-sha2", "chia-traits 0.11.0", "chia_py_streamable_macro", "clvmr", @@ -350,6 +352,7 @@ dependencies = [ "chia-bls 0.14.0", "chia-protocol", "chia-puzzles", + "chia-sha2", "chia-traits 0.11.0", "chia_py_streamable_macro", "chia_streamable_macro 0.11.0", @@ -373,6 +376,7 @@ version = "0.13.0" dependencies = [ "chia-consensus", "chia-protocol", + "chia-sha2", "chia-traits 0.11.0", "clvm-traits", "clvm-utils", @@ -387,6 +391,7 @@ version = "0.14.0" dependencies = [ "arbitrary", "chia-bls 0.14.0", + "chia-sha2", "chia-traits 0.11.0", "chia_py_streamable_macro", "chia_streamable_macro 0.11.0", @@ -404,6 +409,7 @@ version = "0.13.0" dependencies = [ "arbitrary", "chia-protocol", + "chia-sha2", "chia-traits 0.11.0", "clvm-traits", "clvmr", @@ -418,6 +424,7 @@ dependencies = [ "arbitrary", "chia-bls 0.14.0", "chia-protocol", + "chia-sha2", "clvm-traits", "clvm-utils", "clvmr", @@ -436,6 +443,14 @@ dependencies = [ "libfuzzer-sys", ] +[[package]] +name = "chia-sha2" +version = "0.14.0" +dependencies = [ + "openssl", + "sha2", +] + [[package]] name = "chia-ssl" version = "0.11.0" @@ -482,6 +497,7 @@ dependencies = [ name = "chia-traits" version = "0.11.0" dependencies = [ + "chia-sha2", "chia_streamable_macro 0.11.0", "clvmr", "pyo3", @@ -644,6 +660,7 @@ dependencies = [ name = "clvm-utils" version = "0.14.0" dependencies = [ + "chia-sha2", "clvm-traits", "clvmr", "hex", @@ -1570,9 +1587,9 @@ dependencies = [ [[package]] name = "openssl-src" -version = "300.3.1+3.3.1" +version = "300.3.2+3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" +checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" dependencies = [ "cc", ] diff --git a/Cargo.toml b/Cargo.toml index 15af42f95..0fe04a9d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,6 +58,7 @@ chia-protocol = { workspace = true, optional = true } chia-ssl = { workspace = true, optional = true } chia-traits = { workspace = true, optional = true } chia-puzzles = { workspace = true, optional = true } +chia-sha2 = { workspace = true, optional = true } clvm-traits = { workspace = true, optional = true } clvm-utils = { workspace = true, optional = true } clvmr = { workspace = true } @@ -76,6 +77,7 @@ default = [ "ssl", "traits", "puzzles", + "sha2", "clvm-traits", "clvm-utils" ] @@ -87,10 +89,11 @@ protocol = ["dep:chia-protocol"] ssl = ["dep:chia-ssl"] traits = ["dep:chia-traits"] puzzles = ["dep:chia-puzzles"] +sha2 = ["dep:chia-sha2"] clvm-traits = ["dep:clvm-traits"] clvm-utils = ["dep:clvm-utils"] -openssl = ["clvmr/openssl"] +openssl = ["chia-sha2/openssl", "clvmr/openssl"] [profile.release] lto = "thin" @@ -105,6 +108,7 @@ chia-protocol = { path = "./crates/chia-protocol", version = "0.14.0" } chia-ssl = { path = "./crates/chia-ssl", version = "0.11.0" } chia-traits = { path = "./crates/chia-traits", version = "0.11.0" } chia-puzzles = { path = "./crates/chia-puzzles", version = "0.14.0" } +chia-sha2 = { path = "./crates/chia-sha2", version = "0.14.0" } clvm-traits = { path = "./crates/clvm-traits", version = "0.14.0" } clvm-utils = { path = "./crates/clvm-utils", version = "0.14.0" } clvm-derive = { path = "./crates/clvm-derive", version = "0.13.0" } @@ -144,3 +148,4 @@ zstd = "0.13.2" blocking-threadpool = "1.0.1" libfuzzer-sys = "0.4" wasm-bindgen = "0.2.93" +openssl = "0.10.66" diff --git a/crates/chia-bls/Cargo.toml b/crates/chia-bls/Cargo.toml index f35f6a713..352e2e4b0 100644 --- a/crates/chia-bls/Cargo.toml +++ b/crates/chia-bls/Cargo.toml @@ -17,6 +17,7 @@ arbitrary = ["dep:arbitrary"] [dependencies] chia-traits = { workspace = true } +chia-sha2 = { workspace = true } chia_py_streamable_macro = { workspace = true, optional = true } sha2 = { workspace = true } clvmr = { workspace = true } diff --git a/crates/chia-bls/src/bls_cache.rs b/crates/chia-bls/src/bls_cache.rs index 23b8aae15..a059ec825 100644 --- a/crates/chia-bls/src/bls_cache.rs +++ b/crates/chia-bls/src/bls_cache.rs @@ -1,7 +1,7 @@ use std::borrow::Borrow; use std::num::NonZeroUsize; -use clvmr::sha2::Sha256; +use chia_sha2::Sha256; use lru::LruCache; use crate::{aggregate_verify_gt, hash_to_g2}; diff --git a/crates/chia-bls/src/gtelement.rs b/crates/chia-bls/src/gtelement.rs index f3245692d..373890c2f 100644 --- a/crates/chia-bls/src/gtelement.rs +++ b/crates/chia-bls/src/gtelement.rs @@ -1,7 +1,7 @@ use blst::*; +use chia_sha2::Sha256; use chia_traits::chia_error::Result; use chia_traits::{read_bytes, Streamable}; -use clvmr::sha2::Sha256; #[cfg(feature = "py-bindings")] use pyo3::exceptions::PyNotImplementedError; #[cfg(feature = "py-bindings")] diff --git a/crates/chia-bls/src/public_key.rs b/crates/chia-bls/src/public_key.rs index cd95b5a85..8c6140083 100644 --- a/crates/chia-bls/src/public_key.rs +++ b/crates/chia-bls/src/public_key.rs @@ -2,8 +2,8 @@ use crate::secret_key::is_all_zero; use crate::{DerivableKey, Error, Result}; use blst::*; +use chia_sha2::Sha256; use chia_traits::{read_bytes, Streamable}; -use clvmr::sha2::Sha256; #[cfg(feature = "py-bindings")] use pyo3::exceptions::PyNotImplementedError; #[cfg(feature = "py-bindings")] diff --git a/crates/chia-bls/src/secret_key.rs b/crates/chia-bls/src/secret_key.rs index a93c8d3aa..591787aa4 100644 --- a/crates/chia-bls/src/secret_key.rs +++ b/crates/chia-bls/src/secret_key.rs @@ -1,7 +1,7 @@ use crate::{DerivableKey, Error, PublicKey, Result}; use blst::*; +use chia_sha2::Sha256; use chia_traits::{read_bytes, Streamable}; -use clvmr::sha2::Sha256; use hkdf::HkdfExtract; #[cfg(feature = "py-bindings")] use pyo3::exceptions::PyNotImplementedError; diff --git a/crates/chia-bls/src/signature.rs b/crates/chia-bls/src/signature.rs index f87b22a68..01eed3b9b 100644 --- a/crates/chia-bls/src/signature.rs +++ b/crates/chia-bls/src/signature.rs @@ -1,7 +1,7 @@ use crate::{Error, GTElement, PublicKey, Result, SecretKey}; use blst::*; +use chia_sha2::Sha256; use chia_traits::{read_bytes, Streamable}; -use clvmr::sha2::Sha256; #[cfg(feature = "py-bindings")] use pyo3::exceptions::PyNotImplementedError; #[cfg(feature = "py-bindings")] diff --git a/crates/chia-consensus/Cargo.toml b/crates/chia-consensus/Cargo.toml index 6fb9869d7..6df32abb4 100644 --- a/crates/chia-consensus/Cargo.toml +++ b/crates/chia-consensus/Cargo.toml @@ -21,6 +21,7 @@ pyo3 = { workspace = true, optional = true } chia_streamable_macro = { workspace = true } chia_py_streamable_macro = { workspace = true, optional = true } clvm-utils = { workspace = true } +chia-sha2 = { workspace = true } chia-traits = { workspace = true } clvm-traits = { workspace = true } chia-protocol = { workspace = true } diff --git a/crates/chia-consensus/fuzz/Cargo.toml b/crates/chia-consensus/fuzz/Cargo.toml index b4fb0499b..126f1f604 100644 --- a/crates/chia-consensus/fuzz/Cargo.toml +++ b/crates/chia-consensus/fuzz/Cargo.toml @@ -17,6 +17,7 @@ clvmr = { workspace = true } clvm-utils = { workspace = true } clvm-traits = { workspace = true } chia-protocol = { workspace = true } +chia-sha2 = { workspace = true } chia-traits = { workspace = true } chia-consensus = { workspace = true } hex-literal = { workspace = true } diff --git a/crates/chia-consensus/fuzz/fuzz_targets/merkle-set.rs b/crates/chia-consensus/fuzz/fuzz_targets/merkle-set.rs index d68d276f8..bc3886405 100644 --- a/crates/chia-consensus/fuzz/fuzz_targets/merkle-set.rs +++ b/crates/chia-consensus/fuzz/fuzz_targets/merkle-set.rs @@ -1,6 +1,6 @@ #![no_main] use chia_consensus::merkle_tree::{validate_merkle_proof, MerkleSet}; -use clvmr::sha2::Sha256; +use chia_sha2::Sha256; use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &[u8]| { diff --git a/crates/chia-consensus/src/gen/coin_id.rs b/crates/chia-consensus/src/gen/coin_id.rs index 7b09e84f1..9b06c18f2 100644 --- a/crates/chia-consensus/src/gen/coin_id.rs +++ b/crates/chia-consensus/src/gen/coin_id.rs @@ -1,6 +1,6 @@ use chia_protocol::Bytes32; +use chia_sha2::Sha256; use clvmr::allocator::{Allocator, NodePtr}; -use clvmr::sha2::Sha256; pub fn compute_coin_id( a: &Allocator, diff --git a/crates/chia-consensus/src/gen/conditions.rs b/crates/chia-consensus/src/gen/conditions.rs index 77ff4cc04..3fd16e15b 100644 --- a/crates/chia-consensus/src/gen/conditions.rs +++ b/crates/chia-consensus/src/gen/conditions.rs @@ -23,9 +23,9 @@ use crate::gen::spend_visitor::SpendVisitor; use crate::gen::validation_error::check_nil; use chia_bls::PublicKey; use chia_protocol::Bytes32; +use chia_sha2::Sha256; use clvmr::allocator::{Allocator, NodePtr, SExp}; use clvmr::cost::Cost; -use clvmr::sha2::Sha256; use std::cmp::{max, min}; use std::collections::{HashMap, HashSet}; use std::hash::{Hash, Hasher}; diff --git a/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs b/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs index 6f242d2d1..37dc735e8 100644 --- a/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs +++ b/crates/chia-consensus/src/gen/get_puzzle_and_solution.rs @@ -65,11 +65,11 @@ mod test { use crate::gen::flags::{ALLOW_BACKREFS, MEMPOOL_MODE}; use crate::gen::run_block_generator::{run_block_generator2, setup_generator_args}; use chia_protocol::Bytes32; + use chia_sha2::Sha256; use clvm_traits::FromClvm; use clvm_utils::tree_hash; use clvmr::reduction::Reduction; use clvmr::serde::node_from_bytes_backrefs; - use clvmr::sha2::Sha256; use clvmr::{run_program, ChiaDialect}; use rstest::rstest; use std::collections::HashSet; diff --git a/crates/chia-consensus/src/merkle_set.rs b/crates/chia-consensus/src/merkle_set.rs index fd8135440..5ff480eb0 100644 --- a/crates/chia-consensus/src/merkle_set.rs +++ b/crates/chia-consensus/src/merkle_set.rs @@ -1,4 +1,4 @@ -use clvmr::sha2::Sha256; +use chia_sha2::Sha256; use hex_literal::hex; fn get_bit(val: &[u8; 32], bit: u8) -> u8 { diff --git a/crates/chia-consensus/src/merkle_tree.rs b/crates/chia-consensus/src/merkle_tree.rs index 1533c8141..52a3d53b3 100644 --- a/crates/chia-consensus/src/merkle_tree.rs +++ b/crates/chia-consensus/src/merkle_tree.rs @@ -5,9 +5,9 @@ use hex_literal::hex; #[cfg(feature = "py-bindings")] use chia_protocol::Bytes32; +use chia_sha2::Sha256; #[cfg(feature = "py-bindings")] use chia_traits::ChiaToPython; -use clvmr::sha2::Sha256; #[cfg(feature = "py-bindings")] use pyo3::exceptions::PyValueError; #[cfg(feature = "py-bindings")] diff --git a/crates/chia-consensus/src/spendbundle_validation.rs b/crates/chia-consensus/src/spendbundle_validation.rs index dacde6639..ef670fe0f 100644 --- a/crates/chia-consensus/src/spendbundle_validation.rs +++ b/crates/chia-consensus/src/spendbundle_validation.rs @@ -12,7 +12,7 @@ use crate::spendbundle_conditions::get_conditions_from_spendbundle; use chia_bls::GTElement; use chia_bls::{aggregate_verify_gt, hash_to_g2}; use chia_protocol::SpendBundle; -use clvmr::sha2::Sha256; +use chia_sha2::Sha256; use clvmr::LIMIT_HEAP; use std::time::{Duration, Instant}; diff --git a/crates/chia-protocol/Cargo.toml b/crates/chia-protocol/Cargo.toml index 19c0825a5..c38be2472 100644 --- a/crates/chia-protocol/Cargo.toml +++ b/crates/chia-protocol/Cargo.toml @@ -22,6 +22,7 @@ chia_streamable_macro = { workspace = true } chia_py_streamable_macro = { workspace = true, optional = true } clvmr = { workspace = true } chia-traits = { workspace = true } +chia-sha2 = { workspace = true } clvm-traits = { workspace = true, features = ["derive"] } clvm-utils = { workspace = true } chia-bls = { workspace = true } diff --git a/crates/chia-protocol/fuzz/Cargo.toml b/crates/chia-protocol/fuzz/Cargo.toml index 09ee88cba..4ca5c79d5 100644 --- a/crates/chia-protocol/fuzz/Cargo.toml +++ b/crates/chia-protocol/fuzz/Cargo.toml @@ -14,6 +14,7 @@ workspace = true [dependencies] libfuzzer-sys = { workspace = true } clvmr = { workspace = true } +chia-sha2 = { workspace = true } chia-traits = { workspace = true } clvm-traits = { workspace = true } chia-protocol = { workspace = true, features = ["arbitrary"] } diff --git a/crates/chia-protocol/fuzz/fuzz_targets/streamable.rs b/crates/chia-protocol/fuzz/fuzz_targets/streamable.rs index 300d242b7..684576e5d 100644 --- a/crates/chia-protocol/fuzz/fuzz_targets/streamable.rs +++ b/crates/chia-protocol/fuzz/fuzz_targets/streamable.rs @@ -1,8 +1,8 @@ #![no_main] use arbitrary::{Arbitrary, Unstructured}; use chia_protocol::*; +use chia_sha2::Sha256; use chia_traits::Streamable; -use clvmr::sha2::Sha256; use libfuzzer_sys::fuzz_target; pub fn test_streamable(obj: &T) { diff --git a/crates/chia-protocol/src/bytes.rs b/crates/chia-protocol/src/bytes.rs index 87426e71b..aaf87b2ca 100644 --- a/crates/chia-protocol/src/bytes.rs +++ b/crates/chia-protocol/src/bytes.rs @@ -1,7 +1,7 @@ +use chia_sha2::Sha256; use chia_traits::{chia_error, read_bytes, Streamable}; use clvm_traits::{ClvmDecoder, ClvmEncoder, FromClvm, FromClvmError, ToClvm, ToClvmError}; use clvm_utils::TreeHash; -use clvmr::sha2::Sha256; use clvmr::Atom; use std::array::TryFromSliceError; use std::fmt; diff --git a/crates/chia-protocol/src/coin.rs b/crates/chia-protocol/src/coin.rs index 2ae83b2fa..4fbb74775 100644 --- a/crates/chia-protocol/src/coin.rs +++ b/crates/chia-protocol/src/coin.rs @@ -1,10 +1,10 @@ use crate::{Bytes32, BytesImpl}; +use chia_sha2::Sha256; use chia_streamable_macro::streamable; use clvm_traits::{ clvm_list, destructure_list, match_list, ClvmDecoder, ClvmEncoder, FromClvm, FromClvmError, ToClvm, ToClvmError, }; -use clvmr::sha2::Sha256; #[cfg(feature = "py-bindings")] use pyo3::exceptions::PyNotImplementedError; diff --git a/crates/chia-protocol/src/program.rs b/crates/chia-protocol/src/program.rs index 5c05686ec..45067a97a 100644 --- a/crates/chia-protocol/src/program.rs +++ b/crates/chia-protocol/src/program.rs @@ -1,4 +1,5 @@ use crate::bytes::Bytes; +use chia_sha2::Sha256; use chia_traits::chia_error::{Error, Result}; use chia_traits::Streamable; use clvm_traits::{FromClvm, FromClvmError, ToClvm, ToClvmError}; @@ -10,7 +11,6 @@ use clvmr::serde::{ node_from_bytes, node_from_bytes_backrefs, node_to_bytes, serialized_length_from_bytes, serialized_length_from_bytes_trusted, }; -use clvmr::sha2::Sha256; use clvmr::{Allocator, ChiaDialect}; #[cfg(feature = "py-bindings")] use pyo3::prelude::*; diff --git a/crates/chia-puzzles/Cargo.toml b/crates/chia-puzzles/Cargo.toml index e554d16a4..166f3144b 100644 --- a/crates/chia-puzzles/Cargo.toml +++ b/crates/chia-puzzles/Cargo.toml @@ -20,6 +20,7 @@ num-bigint = { workspace = true } hex-literal = { workspace = true } clvm-utils = { workspace = true } clvm-traits = { workspace = true, features = ["chia-bls"] } +chia-sha2 = { workspace = true } chia-bls = { workspace = true } chia-protocol = { workspace = true } arbitrary = { workspace = true, features = ["derive"], optional = true } diff --git a/crates/chia-puzzles/src/derive_synthetic.rs b/crates/chia-puzzles/src/derive_synthetic.rs index d845586f0..9e03d7b90 100644 --- a/crates/chia-puzzles/src/derive_synthetic.rs +++ b/crates/chia-puzzles/src/derive_synthetic.rs @@ -1,5 +1,5 @@ use chia_bls::{PublicKey, SecretKey}; -use clvmr::sha2::Sha256; +use chia_sha2::Sha256; use hex_literal::hex; use num_bigint::BigInt; diff --git a/crates/chia-sha2/Cargo.toml b/crates/chia-sha2/Cargo.toml new file mode 100644 index 000000000..ad8a6a6be --- /dev/null +++ b/crates/chia-sha2/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "chia-sha2" +version = "0.14.0" +edition = "2021" +license = "Apache-2.0" +description = "A common wrapper around OpenSSL and sha2 implementations of sha256." +authors = ["Brandon Haggstrom "] +homepage = "https://github.com/Chia-Network/chia_rs" +repository = "https://github.com/Chia-Network/chia_rs" + +[lints] +workspace = true + +[features] +openssl = ["dep:openssl"] + +[dependencies] +sha2 = { workspace = true } +openssl = { workspace = true, optional = true } diff --git a/crates/chia-sha2/src/lib.rs b/crates/chia-sha2/src/lib.rs new file mode 100644 index 000000000..267392057 --- /dev/null +++ b/crates/chia-sha2/src/lib.rs @@ -0,0 +1,61 @@ +#[cfg(not(feature = "openssl"))] +use sha2::Digest; + +#[derive(Default, Clone)] +pub struct Sha256 { + #[cfg(feature = "openssl")] + ctx: openssl::sha::Sha256, + + #[cfg(not(feature = "openssl"))] + ctx: sha2::Sha256, +} + +impl Sha256 { + pub fn new() -> Self { + Self::default() + } + pub fn update(&mut self, buf: impl AsRef<[u8]>) { + self.ctx.update(buf.as_ref()); + } + pub fn finalize(self) -> [u8; 32] { + #[cfg(feature = "openssl")] + { + self.ctx.finish() + } + #[cfg(not(feature = "openssl"))] + { + self.ctx.finalize().into() + } + } +} + +#[test] +fn test_sha256() { + // https://www.di-mgt.com.au/sha_testvectors.html + + let output = &[ + 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea, 0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, + 0x23, 0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c, 0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, + 0x15, 0xad, + ]; + + let mut ctx = Sha256::new(); + ctx.update([0x61, 0x62, 0x63]); + assert_eq!(&ctx.finalize().as_slice(), output); + + let mut ctx = Sha256::new(); + ctx.update([0x61]); + ctx.update([0x62]); + ctx.update([0x63]); + assert_eq!(&ctx.finalize().as_slice(), output); + + let mut ctx = Sha256::new(); + ctx.update([0x61, 0x62]); + ctx.update([0x63]); + assert_eq!(&ctx.finalize().as_slice(), output); + + let mut ctx = Sha256::new(); + ctx.update([0x61]); + ctx.update([0x62, 0x63]); + assert_eq!(&ctx.finalize().as_slice(), output); +} diff --git a/crates/chia-traits/Cargo.toml b/crates/chia-traits/Cargo.toml index 9dadf80f9..9e3d21c13 100644 --- a/crates/chia-traits/Cargo.toml +++ b/crates/chia-traits/Cargo.toml @@ -13,6 +13,7 @@ workspace = true py-bindings = ["dep:pyo3"] [dependencies] +chia-sha2 = { workspace = true } pyo3 = { workspace = true, features = ["multiple-pymethods"], optional = true } chia_streamable_macro = { workspace = true } clvmr = { workspace = true } diff --git a/crates/chia-traits/src/streamable.rs b/crates/chia-traits/src/streamable.rs index 5e07576ff..6be2dab34 100644 --- a/crates/chia-traits/src/streamable.rs +++ b/crates/chia-traits/src/streamable.rs @@ -1,5 +1,5 @@ use crate::chia_error::{Error, Result}; -use clvmr::sha2::Sha256; +use chia_sha2::Sha256; use std::io::Cursor; use std::mem; diff --git a/crates/chia_py_streamable_macro/src/lib.rs b/crates/chia_py_streamable_macro/src/lib.rs index 3ecd92423..1d77d83d6 100644 --- a/crates/chia_py_streamable_macro/src/lib.rs +++ b/crates/chia_py_streamable_macro/src/lib.rs @@ -285,7 +285,7 @@ pub fn py_streamable_macro(input: proc_macro::TokenStream) -> proc_macro::TokenS use pyo3::IntoPy; use pyo3::types::PyModule; use pyo3::prelude::PyAnyMethods; - let mut ctx = clvmr::sha2::Sha256::new(); + let mut ctx = chia_sha2::Sha256::new(); #crate_name::Streamable::update_digest(self, &mut ctx); let bytes_module = PyModule::import_bound(py, "chia_rs.sized_bytes")?; let ty = bytes_module.getattr("bytes32")?; diff --git a/crates/chia_streamable_macro/src/lib.rs b/crates/chia_streamable_macro/src/lib.rs index 357dbd16e..e04f51df8 100644 --- a/crates/chia_streamable_macro/src/lib.rs +++ b/crates/chia_streamable_macro/src/lib.rs @@ -165,7 +165,7 @@ pub fn chia_streamable_macro(input: TokenStream) -> TokenStream { } let ret = quote! { impl #crate_name::Streamable for #ident { - fn update_digest(&self, digest: &mut clvmr::sha2::Sha256) { + fn update_digest(&self, digest: &mut chia_sha2::Sha256) { ::update_digest(&(*self as u8), digest); } fn stream(&self, out: &mut Vec) -> #crate_name::chia_error::Result<()> { @@ -205,7 +205,7 @@ pub fn chia_streamable_macro(input: TokenStream) -> TokenStream { if !fnames.is_empty() { let ret = quote! { impl #crate_name::Streamable for #ident { - fn update_digest(&self, digest: &mut clvmr::sha2::Sha256) { + fn update_digest(&self, digest: &mut chia_sha2::Sha256) { #(self.#fnames.update_digest(digest);)* } fn stream(&self, out: &mut Vec) -> #crate_name::chia_error::Result<()> { @@ -221,7 +221,7 @@ pub fn chia_streamable_macro(input: TokenStream) -> TokenStream { } else if !findices.is_empty() { let ret = quote! { impl #crate_name::Streamable for #ident { - fn update_digest(&self, digest: &mut clvmr::sha2::Sha256) { + fn update_digest(&self, digest: &mut chia_sha2::Sha256) { #(self.#findices.update_digest(digest);)* } fn stream(&self, out: &mut Vec) -> #crate_name::chia_error::Result<()> { @@ -238,7 +238,7 @@ pub fn chia_streamable_macro(input: TokenStream) -> TokenStream { // this is an empty type (Unit) let ret = quote! { impl #crate_name::Streamable for #ident { - fn update_digest(&self, _digest: &mut clvmr::sha2::Sha256) {} + fn update_digest(&self, _digest: &mut chia_sha2::Sha256) {} fn stream(&self, _out: &mut Vec) -> #crate_name::chia_error::Result<()> { Ok(()) } diff --git a/crates/clvm-utils/Cargo.toml b/crates/clvm-utils/Cargo.toml index 293ac4e37..09d636fd2 100644 --- a/crates/clvm-utils/Cargo.toml +++ b/crates/clvm-utils/Cargo.toml @@ -12,6 +12,7 @@ repository = "https://github.com/Chia-Network/chia_rs" workspace = true [dependencies] +chia-sha2 = { workspace = true } clvmr = { workspace = true } clvm-traits = { workspace = true } hex = { workspace = true } diff --git a/crates/clvm-utils/src/tree_hash.rs b/crates/clvm-utils/src/tree_hash.rs index df9e12038..2f57312be 100644 --- a/crates/clvm-utils/src/tree_hash.rs +++ b/crates/clvm-utils/src/tree_hash.rs @@ -1,6 +1,6 @@ +use chia_sha2::Sha256; use clvmr::allocator::{Allocator, NodePtr, SExp}; use clvmr::serde::node_from_bytes_backrefs_record; -use clvmr::sha2::Sha256; use std::collections::{HashMap, HashSet}; use std::ops::Deref; use std::{fmt, io}; diff --git a/src/lib.rs b/src/lib.rs index 808dde2ee..1df6d0b21 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,7 @@ pub use chia_client as client; pub use chia_consensus as consensus; pub use chia_protocol as protocol; pub use chia_puzzles as puzzles; +pub use chia_sha2 as sha2; pub use chia_ssl as ssl; pub use chia_traits as traits; pub use clvm_traits; From 8479d9b0f5b729f298c9d3a4961b04227a5696ed Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 27 Sep 2024 11:03:33 -0400 Subject: [PATCH 56/59] Remove clvmr from dependencies for 3 crates --- Cargo.lock | 3 --- crates/chia-bls/Cargo.toml | 1 - crates/chia-traits/Cargo.toml | 1 - crates/chia_streamable_macro/Cargo.toml | 1 - 4 files changed, 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d4775ec7..422e5b1fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -311,7 +311,6 @@ dependencies = [ "chia-sha2", "chia-traits 0.11.0", "chia_py_streamable_macro", - "clvmr", "criterion", "hex", "hkdf", @@ -499,7 +498,6 @@ version = "0.11.0" dependencies = [ "chia-sha2", "chia_streamable_macro 0.11.0", - "clvmr", "pyo3", "thiserror", ] @@ -543,7 +541,6 @@ dependencies = [ name = "chia_streamable_macro" version = "0.11.0" dependencies = [ - "clvmr", "proc-macro-crate 1.3.1", "proc-macro2", "quote", diff --git a/crates/chia-bls/Cargo.toml b/crates/chia-bls/Cargo.toml index 352e2e4b0..89e6ed631 100644 --- a/crates/chia-bls/Cargo.toml +++ b/crates/chia-bls/Cargo.toml @@ -20,7 +20,6 @@ chia-traits = { workspace = true } chia-sha2 = { workspace = true } chia_py_streamable_macro = { workspace = true, optional = true } sha2 = { workspace = true } -clvmr = { workspace = true } hkdf = { workspace = true } blst = { workspace = true } hex = { workspace = true } diff --git a/crates/chia-traits/Cargo.toml b/crates/chia-traits/Cargo.toml index 9e3d21c13..09d5df737 100644 --- a/crates/chia-traits/Cargo.toml +++ b/crates/chia-traits/Cargo.toml @@ -16,5 +16,4 @@ py-bindings = ["dep:pyo3"] chia-sha2 = { workspace = true } pyo3 = { workspace = true, features = ["multiple-pymethods"], optional = true } chia_streamable_macro = { workspace = true } -clvmr = { workspace = true } thiserror = { workspace = true } diff --git a/crates/chia_streamable_macro/Cargo.toml b/crates/chia_streamable_macro/Cargo.toml index 9e6e3c3e5..7ef694065 100644 --- a/crates/chia_streamable_macro/Cargo.toml +++ b/crates/chia_streamable_macro/Cargo.toml @@ -15,7 +15,6 @@ workspace = true proc-macro = true [dependencies] -clvmr = { workspace = true } syn = { workspace = true } quote = { workspace = true } proc-macro-crate = { workspace = true } From fae93d976d1877c174bce25bfb60b5d5a898fd93 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 27 Sep 2024 11:40:31 -0400 Subject: [PATCH 57/59] Bump to 0.14.1 --- Cargo.lock | 66 +++++++++++----------- Cargo.toml | 8 +-- crates/chia-bls/Cargo.toml | 2 +- crates/chia-client/Cargo.toml | 2 +- crates/chia-consensus/Cargo.toml | 2 +- crates/chia-protocol/Cargo.toml | 2 +- crates/chia-puzzles/Cargo.toml | 2 +- crates/chia-sha2/Cargo.toml | 2 +- crates/chia-tools/Cargo.toml | 2 +- crates/chia-traits/Cargo.toml | 2 +- crates/chia_py_streamable_macro/Cargo.toml | 2 +- crates/chia_streamable_macro/Cargo.toml | 2 +- crates/clvm-traits/Cargo.toml | 2 +- crates/clvm-utils/Cargo.toml | 2 +- wheel/Cargo.toml | 2 +- 15 files changed, 50 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 422e5b1fc..a1dea13b0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -271,16 +271,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chia" -version = "0.14.0" +version = "0.14.1" dependencies = [ - "chia-bls 0.14.0", + "chia-bls 0.14.1", "chia-client", "chia-consensus", "chia-protocol", "chia-puzzles", "chia-sha2", "chia-ssl", - "chia-traits 0.11.0", + "chia-traits 0.14.1", "clvm-traits", "clvm-utils", "clvmr", @@ -304,12 +304,12 @@ dependencies = [ [[package]] name = "chia-bls" -version = "0.14.0" +version = "0.14.1" dependencies = [ "arbitrary", "blst", "chia-sha2", - "chia-traits 0.11.0", + "chia-traits 0.14.1", "chia_py_streamable_macro", "criterion", "hex", @@ -326,17 +326,17 @@ dependencies = [ name = "chia-bls-fuzz" version = "0.13.0" dependencies = [ - "chia-bls 0.14.0", + "chia-bls 0.14.1", "libfuzzer-sys", "pyo3", ] [[package]] name = "chia-client" -version = "0.14.0" +version = "0.14.1" dependencies = [ "chia-protocol", - "chia-traits 0.11.0", + "chia-traits 0.14.1", "futures-util", "thiserror", "tokio", @@ -346,15 +346,15 @@ dependencies = [ [[package]] name = "chia-consensus" -version = "0.14.0" +version = "0.14.1" dependencies = [ - "chia-bls 0.14.0", + "chia-bls 0.14.1", "chia-protocol", "chia-puzzles", "chia-sha2", - "chia-traits 0.11.0", + "chia-traits 0.14.1", "chia_py_streamable_macro", - "chia_streamable_macro 0.11.0", + "chia_streamable_macro 0.14.1", "clvm-traits", "clvm-utils", "clvmr", @@ -376,7 +376,7 @@ dependencies = [ "chia-consensus", "chia-protocol", "chia-sha2", - "chia-traits 0.11.0", + "chia-traits 0.14.1", "clvm-traits", "clvm-utils", "clvmr", @@ -386,14 +386,14 @@ dependencies = [ [[package]] name = "chia-protocol" -version = "0.14.0" +version = "0.14.1" dependencies = [ "arbitrary", - "chia-bls 0.14.0", + "chia-bls 0.14.1", "chia-sha2", - "chia-traits 0.11.0", + "chia-traits 0.14.1", "chia_py_streamable_macro", - "chia_streamable_macro 0.11.0", + "chia_streamable_macro 0.14.1", "clvm-traits", "clvm-utils", "clvmr", @@ -409,7 +409,7 @@ dependencies = [ "arbitrary", "chia-protocol", "chia-sha2", - "chia-traits 0.11.0", + "chia-traits 0.14.1", "clvm-traits", "clvmr", "hex", @@ -418,10 +418,10 @@ dependencies = [ [[package]] name = "chia-puzzles" -version = "0.14.0" +version = "0.14.1" dependencies = [ "arbitrary", - "chia-bls 0.14.0", + "chia-bls 0.14.1", "chia-protocol", "chia-sha2", "clvm-traits", @@ -444,7 +444,7 @@ dependencies = [ [[package]] name = "chia-sha2" -version = "0.14.0" +version = "0.14.1" dependencies = [ "openssl", "sha2", @@ -464,14 +464,14 @@ dependencies = [ [[package]] name = "chia-tools" -version = "0.14.0" +version = "0.14.1" dependencies = [ "blocking-threadpool", - "chia-bls 0.14.0", + "chia-bls 0.14.1", "chia-consensus", "chia-protocol", "chia-puzzles", - "chia-traits 0.11.0", + "chia-traits 0.14.1", "clap", "clvm-traits", "clvm-utils", @@ -494,17 +494,17 @@ dependencies = [ [[package]] name = "chia-traits" -version = "0.11.0" +version = "0.14.1" dependencies = [ "chia-sha2", - "chia_streamable_macro 0.11.0", + "chia_streamable_macro 0.14.1", "pyo3", "thiserror", ] [[package]] name = "chia_py_streamable_macro" -version = "0.13.0" +version = "0.14.1" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -514,9 +514,9 @@ dependencies = [ [[package]] name = "chia_rs" -version = "0.14.0" +version = "0.14.1" dependencies = [ - "chia-bls 0.14.0", + "chia-bls 0.14.1", "chia-consensus", "chia-protocol", "clvm-utils", @@ -539,7 +539,7 @@ dependencies = [ [[package]] name = "chia_streamable_macro" -version = "0.11.0" +version = "0.14.1" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -632,9 +632,9 @@ dependencies = [ [[package]] name = "clvm-traits" -version = "0.14.0" +version = "0.14.1" dependencies = [ - "chia-bls 0.14.0", + "chia-bls 0.14.1", "clvm-derive", "clvmr", "hex", @@ -655,7 +655,7 @@ dependencies = [ [[package]] name = "clvm-utils" -version = "0.14.0" +version = "0.14.1" dependencies = [ "chia-sha2", "clvm-traits", diff --git a/Cargo.toml b/Cargo.toml index 0fe04a9d5..dc501eaaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia" -version = "0.14.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "A meta-crate that exports all of the Chia crates in the workspace." @@ -99,14 +99,14 @@ openssl = ["chia-sha2/openssl", "clvmr/openssl"] lto = "thin" [workspace.dependencies] -chia_py_streamable_macro = { path = "./crates/chia_py_streamable_macro", version = "0.13.0" } -chia_streamable_macro = { path = "./crates/chia_streamable_macro", version = "0.11.0" } +chia_py_streamable_macro = { path = "./crates/chia_py_streamable_macro", version = "0.14.1" } +chia_streamable_macro = { path = "./crates/chia_streamable_macro", version = "0.14.1" } chia-bls = { path = "./crates/chia-bls", version = "0.14.0" } chia-client = { path = "./crates/chia-client", version = "0.14.0" } chia-consensus = { path = "./crates/chia-consensus", version = "0.14.0" } chia-protocol = { path = "./crates/chia-protocol", version = "0.14.0" } chia-ssl = { path = "./crates/chia-ssl", version = "0.11.0" } -chia-traits = { path = "./crates/chia-traits", version = "0.11.0" } +chia-traits = { path = "./crates/chia-traits", version = "0.14.1" } chia-puzzles = { path = "./crates/chia-puzzles", version = "0.14.0" } chia-sha2 = { path = "./crates/chia-sha2", version = "0.14.0" } clvm-traits = { path = "./crates/clvm-traits", version = "0.14.0" } diff --git a/crates/chia-bls/Cargo.toml b/crates/chia-bls/Cargo.toml index 89e6ed631..16fd564e9 100644 --- a/crates/chia-bls/Cargo.toml +++ b/crates/chia-bls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-bls" -version = "0.14.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "BLS signature, verification and aggregation functions for the Chia blockchain" diff --git a/crates/chia-client/Cargo.toml b/crates/chia-client/Cargo.toml index 4e7619a5e..bdb10f519 100644 --- a/crates/chia-client/Cargo.toml +++ b/crates/chia-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-client" -version = "0.14.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "Chia light client and async peer connections." diff --git a/crates/chia-consensus/Cargo.toml b/crates/chia-consensus/Cargo.toml index 6df32abb4..cee8ea85d 100644 --- a/crates/chia-consensus/Cargo.toml +++ b/crates/chia-consensus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-consensus" -version = "0.14.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "Utility functions and types used by the Chia blockchain full node" diff --git a/crates/chia-protocol/Cargo.toml b/crates/chia-protocol/Cargo.toml index c38be2472..6c8ec2cd0 100644 --- a/crates/chia-protocol/Cargo.toml +++ b/crates/chia-protocol/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-protocol" -version = "0.14.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "Chia network protocol message types" diff --git a/crates/chia-puzzles/Cargo.toml b/crates/chia-puzzles/Cargo.toml index 166f3144b..9e45357ad 100644 --- a/crates/chia-puzzles/Cargo.toml +++ b/crates/chia-puzzles/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-puzzles" -version = "0.14.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "Chia primitives needed for building wallets." diff --git a/crates/chia-sha2/Cargo.toml b/crates/chia-sha2/Cargo.toml index ad8a6a6be..c93fd2887 100644 --- a/crates/chia-sha2/Cargo.toml +++ b/crates/chia-sha2/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-sha2" -version = "0.14.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "A common wrapper around OpenSSL and sha2 implementations of sha256." diff --git a/crates/chia-tools/Cargo.toml b/crates/chia-tools/Cargo.toml index 0894f7b6f..51872f351 100644 --- a/crates/chia-tools/Cargo.toml +++ b/crates/chia-tools/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-tools" -version = "0.14.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "Utility functions and types used by the Chia blockchain full node" diff --git a/crates/chia-traits/Cargo.toml b/crates/chia-traits/Cargo.toml index 09d5df737..c8efd9acc 100644 --- a/crates/chia-traits/Cargo.toml +++ b/crates/chia-traits/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia-traits" -version = "0.11.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "Chia traits for Streamable types (chia's serialization format)" diff --git a/crates/chia_py_streamable_macro/Cargo.toml b/crates/chia_py_streamable_macro/Cargo.toml index c9dfd687a..7bc188af0 100644 --- a/crates/chia_py_streamable_macro/Cargo.toml +++ b/crates/chia_py_streamable_macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia_py_streamable_macro" -version = "0.13.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "Derive macro to create python bindings for Chia types" diff --git a/crates/chia_streamable_macro/Cargo.toml b/crates/chia_streamable_macro/Cargo.toml index 7ef694065..3cf796f7a 100644 --- a/crates/chia_streamable_macro/Cargo.toml +++ b/crates/chia_streamable_macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia_streamable_macro" -version = "0.11.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "Streamable derive macro for serializing/deserializing types in Chia protocol format" diff --git a/crates/clvm-traits/Cargo.toml b/crates/clvm-traits/Cargo.toml index 72cb8308e..e56887f8f 100644 --- a/crates/clvm-traits/Cargo.toml +++ b/crates/clvm-traits/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clvm-traits" -version = "0.14.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "Traits for encoding and decoding CLVM objects." diff --git a/crates/clvm-utils/Cargo.toml b/crates/clvm-utils/Cargo.toml index 09d636fd2..014a82e9c 100644 --- a/crates/clvm-utils/Cargo.toml +++ b/crates/clvm-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "clvm-utils" -version = "0.14.0" +version = "0.14.1" edition = "2021" license = "Apache-2.0" description = "Utility functions for processing clvm programs and structures" diff --git a/wheel/Cargo.toml b/wheel/Cargo.toml index 1ecf21c73..43da8e339 100644 --- a/wheel/Cargo.toml +++ b/wheel/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chia_rs" -version = "0.14.0" +version = "0.14.1" authors = ["Richard Kiss "] edition = "2021" license = "Apache-2.0" From 8a044371b2ceafe5ff54325587cd5e616dc9d5ed Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 27 Sep 2024 11:42:26 -0400 Subject: [PATCH 58/59] Fix Cargo.toml --- Cargo.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dc501eaaa..853251c6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -101,16 +101,16 @@ lto = "thin" [workspace.dependencies] chia_py_streamable_macro = { path = "./crates/chia_py_streamable_macro", version = "0.14.1" } chia_streamable_macro = { path = "./crates/chia_streamable_macro", version = "0.14.1" } -chia-bls = { path = "./crates/chia-bls", version = "0.14.0" } -chia-client = { path = "./crates/chia-client", version = "0.14.0" } -chia-consensus = { path = "./crates/chia-consensus", version = "0.14.0" } -chia-protocol = { path = "./crates/chia-protocol", version = "0.14.0" } +chia-bls = { path = "./crates/chia-bls", version = "0.14.1" } +chia-client = { path = "./crates/chia-client", version = "0.14.1" } +chia-consensus = { path = "./crates/chia-consensus", version = "0.14.1" } +chia-protocol = { path = "./crates/chia-protocol", version = "0.14.1" } chia-ssl = { path = "./crates/chia-ssl", version = "0.11.0" } chia-traits = { path = "./crates/chia-traits", version = "0.14.1" } -chia-puzzles = { path = "./crates/chia-puzzles", version = "0.14.0" } -chia-sha2 = { path = "./crates/chia-sha2", version = "0.14.0" } -clvm-traits = { path = "./crates/clvm-traits", version = "0.14.0" } -clvm-utils = { path = "./crates/clvm-utils", version = "0.14.0" } +chia-puzzles = { path = "./crates/chia-puzzles", version = "0.14.1" } +chia-sha2 = { path = "./crates/chia-sha2", version = "0.14.1" } +clvm-traits = { path = "./crates/clvm-traits", version = "0.14.1" } +clvm-utils = { path = "./crates/clvm-utils", version = "0.14.1" } clvm-derive = { path = "./crates/clvm-derive", version = "0.13.0" } chia-fuzz = { path = "./crates/chia-consensus/fuzz", version = "0.13.0" } blst = { version = "0.3.12", features = ["portable"] } From 2adf7e80d9346ee035ee66af4fbb1485d0e12276 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 27 Sep 2024 11:53:41 -0400 Subject: [PATCH 59/59] Fix clippy warnings and py-bindings on chia-consensus --- crates/chia-consensus/Cargo.toml | 7 +- .../chia-consensus/benches/run-generator.rs | 1 - .../src/gen/solution_generator.rs | 66 +++++++++---------- 3 files changed, 39 insertions(+), 35 deletions(-) diff --git a/crates/chia-consensus/Cargo.toml b/crates/chia-consensus/Cargo.toml index 6df32abb4..89a7ad3a1 100644 --- a/crates/chia-consensus/Cargo.toml +++ b/crates/chia-consensus/Cargo.toml @@ -12,7 +12,12 @@ repository = "https://github.com/Chia-Network/chia_rs" workspace = true [features] -py-bindings = ["dep:pyo3", "dep:chia_py_streamable_macro"] +py-bindings = [ + "dep:pyo3", + "dep:chia_py_streamable_macro", + "chia-traits/py-bindings", + "chia-protocol/py-bindings" +] [dependencies] clvmr = { workspace = true } diff --git a/crates/chia-consensus/benches/run-generator.rs b/crates/chia-consensus/benches/run-generator.rs index 588f0e1c5..9ee010abf 100644 --- a/crates/chia-consensus/benches/run-generator.rs +++ b/crates/chia-consensus/benches/run-generator.rs @@ -1,5 +1,4 @@ use chia_consensus::consensus_constants::TEST_CONSTANTS; -use chia_consensus::gen::conditions::MempoolVisitor; use chia_consensus::gen::flags::ALLOW_BACKREFS; use chia_consensus::gen::run_block_generator::{run_block_generator, run_block_generator2}; use clvmr::serde::{node_from_bytes, node_to_bytes_backrefs}; diff --git a/crates/chia-consensus/src/gen/solution_generator.rs b/crates/chia-consensus/src/gen/solution_generator.rs index c153a903a..1287bb42d 100644 --- a/crates/chia-consensus/src/gen/solution_generator.rs +++ b/crates/chia-consensus/src/gen/solution_generator.rs @@ -453,24 +453,24 @@ mod tests { #[case(0x7fff)] #[case(0x8000)] #[case(0xffff)] - #[case(0x7fffff)] - #[case(0x800000)] - #[case(0xffffff)] - #[case(0x7fffffff)] - #[case(0x80000000)] - #[case(0xffffffff)] - #[case(0x7fffffffff)] - #[case(0x8000000000)] - #[case(0xffffffffff)] - #[case(0x7fffffffffff)] - #[case(0x800000000000)] - #[case(0xffffffffffff)] - #[case(0x7fffffffffffff)] - #[case(0x80000000000000)] - #[case(0xffffffffffffff)] - #[case(0x7fffffffffffffff)] - #[case(0x8000000000000000)] - #[case(0xffffffffffffffff)] + #[case(0x7f_ffff)] + #[case(0x80_0000)] + #[case(0xff_ffff)] + #[case(0x7fff_ffff)] + #[case(0x8000_0000)] + #[case(0xffff_ffff)] + #[case(0x7f_ffff_ffff)] + #[case(0x80_0000_0000)] + #[case(0xff_ffff_ffff)] + #[case(0x7fff_ffff_ffff)] + #[case(0x8000_0000_0000)] + #[case(0xffff_ffff_ffff)] + #[case(0x7f_ffff_ffff_ffff)] + #[case(0x80_0000_0000_0000)] + #[case(0xff_ffff_ffff_ffff)] + #[case(0x7fff_ffff_ffff_ffff)] + #[case(0x8000_0000_0000_0000)] + #[case(0xffff_ffff_ffff_ffff)] #[case(0x7)] #[case(0x8)] #[case(0xf)] @@ -480,21 +480,21 @@ mod tests { #[case(0x7ffff)] #[case(0x80000)] #[case(0xfffff)] - #[case(0x7ffffff)] - #[case(0x8000000)] - #[case(0xfffffff)] - #[case(0x7ffffffff)] - #[case(0x800000000)] - #[case(0xfffffffff)] - #[case(0x7ffffffffff)] - #[case(0x80000000000)] - #[case(0xfffffffffff)] - #[case(0x7ffffffffffff)] - #[case(0x8000000000000)] - #[case(0xfffffffffffff)] - #[case(0x7ffffffffffffff)] - #[case(0x800000000000000)] - #[case(0xfffffffffffffff)] + #[case(0x7ff_ffff)] + #[case(0x800_0000)] + #[case(0xfff_ffff)] + #[case(0x7_ffff_ffff)] + #[case(0x8_0000_0000)] + #[case(0xf_ffff_ffff)] + #[case(0x7ff_ffff_ffff)] + #[case(0x800_0000_0000)] + #[case(0xfff_ffff_ffff)] + #[case(0x7_ffff_ffff_ffff)] + #[case(0x8_0000_0000_0000)] + #[case(0xf_ffff_ffff_ffff)] + #[case(0x7ff_ffff_ffff_ffff)] + #[case(0x800_0000_0000_0000)] + #[case(0xfff_ffff_ffff_ffff)] fn test_clvm_bytes_len(#[case] n: u64) { let len = clvm_bytes_len(n); let mut a = Allocator::new();