From f9b7ddcfcf50b8a0cf7a39a9c9f5f53214702319 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 6 Dec 2024 00:43:49 +0100 Subject: [PATCH] [CHIA-1976] bump chia_rs to 0.16.0 and introduce soft-fork6 (#18988) * bump chia_rs to 0.16.0 and introduce soft-fork6 * add test for keccak256 operator --- chia/_tests/conftest.py | 10 +-- .../core/full_node/test_generator_tools.py | 2 +- chia/_tests/core/mempool/test_mempool.py | 82 ++++++++++++++++++- .../core/mempool/test_mempool_manager.py | 1 + .../test_fee_estimation_integration.py | 2 +- chia/_tests/util/test_condition_tools.py | 4 +- chia/_tests/util/test_replace_str_to_bytes.py | 2 +- chia/_tests/util/test_testnet_overrides.py | 2 +- chia/cmds/sim_funcs.py | 6 +- chia/consensus/default_constants.py | 6 +- chia/full_node/mempool_check_conditions.py | 6 +- chia/rpc/wallet_rpc_api.py | 2 +- chia/util/initial-config.yaml | 4 +- poetry.lock | 53 ++++++------ pyproject.toml | 2 +- tools/analyze-chain.py | 14 +++- 16 files changed, 141 insertions(+), 57 deletions(-) diff --git a/chia/_tests/conftest.py b/chia/_tests/conftest.py index 03db3411f14b..e0c80c213f45 100644 --- a/chia/_tests/conftest.py +++ b/chia/_tests/conftest.py @@ -197,12 +197,12 @@ def get_keychain(): class ConsensusMode(ComparableEnum): PLAIN = 0 HARD_FORK_2_0 = 1 - SOFT_FORK_5 = 2 + SOFT_FORK_6 = 2 @pytest.fixture( scope="session", - params=[ConsensusMode.PLAIN, ConsensusMode.HARD_FORK_2_0, ConsensusMode.SOFT_FORK_5], + params=[ConsensusMode.PLAIN, ConsensusMode.HARD_FORK_2_0, ConsensusMode.SOFT_FORK_6], ) def consensus_mode(request): return request.param @@ -218,9 +218,9 @@ def blockchain_constants(consensus_mode: ConsensusMode) -> ConsensusConstants: PLOT_FILTER_64_HEIGHT=uint32(15), PLOT_FILTER_32_HEIGHT=uint32(20), ) - if consensus_mode >= ConsensusMode.SOFT_FORK_5: + if consensus_mode >= ConsensusMode.SOFT_FORK_6: ret = ret.replace( - SOFT_FORK5_HEIGHT=uint32(2), + SOFT_FORK6_HEIGHT=uint32(2), ) return ret @@ -269,7 +269,7 @@ def db_version(request) -> int: return request.param -SOFTFORK_HEIGHTS = [1000000, 5496000, 5496100, 5716000, 5940000] +SOFTFORK_HEIGHTS = [1000000, 5496000, 5496100, 5716000, 6800000] @pytest.fixture(scope="function", params=SOFTFORK_HEIGHTS) diff --git a/chia/_tests/core/full_node/test_generator_tools.py b/chia/_tests/core/full_node/test_generator_tools.py index 14b1d9797286..f3b303f2100e 100644 --- a/chia/_tests/core/full_node/test_generator_tools.py +++ b/chia/_tests/core/full_node/test_generator_tools.py @@ -67,7 +67,7 @@ def test_tx_removals_and_additions() -> None: - conditions = SpendBundleConditions(spends, uint64(0), uint32(0), uint64(0), None, None, [], uint64(0), 0, 0) + conditions = SpendBundleConditions(spends, uint64(0), uint32(0), uint64(0), None, None, [], uint64(0), 0, 0, False) expected_rems = [coin_ids[0], coin_ids[1]] expected_additions = [] for spend in spends: diff --git a/chia/_tests/core/mempool/test_mempool.py b/chia/_tests/core/mempool/test_mempool.py index 0d49794cc396..84cd61bf9216 100644 --- a/chia/_tests/core/mempool/test_mempool.py +++ b/chia/_tests/core/mempool/test_mempool.py @@ -6,9 +6,10 @@ from typing import Callable, Dict, List, Optional, Tuple import pytest -from chia_rs import G1Element, G2Element +from chia_rs import G1Element, G2Element, get_flags_for_height_and_constants from clvm.casts import int_to_bytes from clvm_tools import binutils +from clvm_tools.binutils import assemble from chia._tests.blockchain.blockchain_test_utils import _validate_and_add_block from chia._tests.connection_utils import add_dummy_connection, connect_and_get_peer @@ -27,6 +28,7 @@ from chia._tests.util.time_out_assert import time_out_assert from chia.consensus.condition_costs import ConditionCost from chia.consensus.cost_calculator import NPCResult +from chia.consensus.default_constants import DEFAULT_CONSTANTS from chia.full_node.bitcoin_fee_estimator import create_bitcoin_fee_estimator from chia.full_node.fee_estimation import EmptyMempoolInfo, MempoolInfo from chia.full_node.full_node_api import FullNodeAPI @@ -107,7 +109,7 @@ def make_item( return MempoolItem( SpendBundle([], G2Element()), fee, - SpendBundleConditions([], 0, 0, 0, None, None, [], cost, 0, 0), + SpendBundleConditions([], 0, 0, 0, None, None, [], cost, 0, 0, False), spend_bundle_name, uint32(0), assert_height, @@ -3178,3 +3180,79 @@ def test_get_puzzle_and_solution_for_coin_failure() -> None: ValueError, match=f"Failed to get puzzle and solution for coin {TEST_COIN}, error: \\('coin not found', '80'\\)" ): get_puzzle_and_solution_for_coin(BlockGenerator(SerializedProgram.to(None), []), TEST_COIN, 0, test_constants) + + +# TODO: import this from chia_rs once we bump the version we depend on +ENABLE_KECCAK = 0x200 +ENABLE_KECCAK_OPS_OUTSIDE_GUARD = 0x100 + + +def test_flags_for_height() -> None: + + # the keccak operator is supposed to be enabled at soft-fork 6 height + flags = get_flags_for_height_and_constants(DEFAULT_CONSTANTS.SOFT_FORK6_HEIGHT, DEFAULT_CONSTANTS) + print(f"{flags:x}") + assert (flags & ENABLE_KECCAK) != 0 + + flags = get_flags_for_height_and_constants(DEFAULT_CONSTANTS.SOFT_FORK6_HEIGHT - 1, DEFAULT_CONSTANTS) + print(f"{flags:x}") + assert (flags & ENABLE_KECCAK) == 0 + + +def test_keccak() -> None: + + # the keccak operator is 62. The assemble() function doesn't support it + # (yet) + + # keccak256 is available when the softfork has activated + keccak_prg = Program.to( + assemble( + "(softfork (q . 1134) (q . 1) (q a (i " + "(= " + '(62 (q . "foobar"))' + "(q . 0x38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e))" + "(q . 0) (q x)) (q . ())) (q . ()))" + ) + ) + + cost, ret = keccak_prg.run_with_flags(1215, ENABLE_KECCAK, []) + assert cost == 1215 + assert ret.atom == b"" + + # keccak is ignored when the softfork has not activated + cost, ret = keccak_prg.run_with_flags(1215, 0, []) + assert cost == 1215 + assert ret.atom == b"" + + # make sure keccak is actually executed, by comparing with the wrong output + keccak_prg = Program.to( + assemble( + "(softfork (q . 1134) (q . 1) (q a (i " + '(= (62 (q . "foobar")) ' + "(q . 0x58d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e))" + "(q . 0) (q x)) (q . ())) (q . ()))" + ) + ) + with pytest.raises(ValueError, match="clvm raise"): + keccak_prg.run_with_flags(1215, ENABLE_KECCAK, []) + + # keccak is ignored when the softfork has not activated + cost, ret = keccak_prg.run_with_flags(1215, 0, []) + assert cost == 1215 + assert ret.atom == b"" + + # === HARD FORK === + # new operators *outside* the softfork guard + # keccak256 is available outside the guard with the appropriate flag + keccak_prg = Program.to( + assemble( + "(a (i (= " + '(62 (q . "foobar")) ' + "(q . 0x38d18acb67d25c8bb9942764b62f18e17054f66a817bd4295423adf9ed98873e)) " + "(q . 0) (q x)) (q . ()))" + ) + ) + + cost, ret = keccak_prg.run_with_flags(994, ENABLE_KECCAK | ENABLE_KECCAK_OPS_OUTSIDE_GUARD, []) + assert cost == 994 + assert ret.atom == b"" diff --git a/chia/_tests/core/mempool/test_mempool_manager.py b/chia/_tests/core/mempool/test_mempool_manager.py index 4d5ac4677679..8e0796202aad 100644 --- a/chia/_tests/core/mempool/test_mempool_manager.py +++ b/chia/_tests/core/mempool/test_mempool_manager.py @@ -227,6 +227,7 @@ def make_test_conds( cost, 0, 0, + False, ) diff --git a/chia/_tests/fee_estimation/test_fee_estimation_integration.py b/chia/_tests/fee_estimation/test_fee_estimation_integration.py index 5ba901a5406e..80129ecf75e4 100644 --- a/chia/_tests/fee_estimation/test_fee_estimation_integration.py +++ b/chia/_tests/fee_estimation/test_fee_estimation_integration.py @@ -42,7 +42,7 @@ def make_mempoolitem() -> MempoolItem: fee = uint64(10000000) spends: List[SpendConditions] = [] - conds = SpendBundleConditions(spends, 0, 0, 0, None, None, [], cost, 0, 0) + conds = SpendBundleConditions(spends, 0, 0, 0, None, None, [], cost, 0, 0, False) mempool_item = MempoolItem( spend_bundle, fee, diff --git a/chia/_tests/util/test_condition_tools.py b/chia/_tests/util/test_condition_tools.py index 29e6b1f0c74a..1a939c38baf7 100644 --- a/chia/_tests/util/test_condition_tools.py +++ b/chia/_tests/util/test_condition_tools.py @@ -53,7 +53,7 @@ def mk_agg_sig_conditions( agg_sig_puzzle_amount=agg_sig_data if opcode == ConditionOpcode.AGG_SIG_PUZZLE_AMOUNT else [], flags=0, ) - return SpendBundleConditions([spend], 0, 0, 0, None, None, agg_sig_unsafe_data, 0, 0, 0) + return SpendBundleConditions([spend], 0, 0, 0, None, None, agg_sig_unsafe_data, 0, 0, 0, False) @pytest.mark.parametrize( @@ -100,7 +100,7 @@ def test_pkm_pairs_vs_for_conditions_dict(opcode: ConditionOpcode) -> None: class TestPkmPairs: def test_empty_list(self) -> None: - conds = SpendBundleConditions([], 0, 0, 0, None, None, [], 0, 0, 0) + conds = SpendBundleConditions([], 0, 0, 0, None, None, [], 0, 0, 0, False) pks, msgs = pkm_pairs(conds, b"foobar") assert pks == [] assert msgs == [] diff --git a/chia/_tests/util/test_replace_str_to_bytes.py b/chia/_tests/util/test_replace_str_to_bytes.py index ef88a2370302..f16b50f1f762 100644 --- a/chia/_tests/util/test_replace_str_to_bytes.py +++ b/chia/_tests/util/test_replace_str_to_bytes.py @@ -56,7 +56,7 @@ MAX_GENERATOR_SIZE=uint32(1000000), MAX_GENERATOR_REF_LIST_SIZE=uint32(512), POOL_SUB_SLOT_ITERS=uint64(37600000000), - SOFT_FORK5_HEIGHT=uint32(5940000), + SOFT_FORK6_HEIGHT=uint32(6800000), HARD_FORK_HEIGHT=uint32(5496000), PLOT_FILTER_128_HEIGHT=uint32(10542000), PLOT_FILTER_64_HEIGHT=uint32(15592000), diff --git a/chia/_tests/util/test_testnet_overrides.py b/chia/_tests/util/test_testnet_overrides.py index 323d8c843789..e6fc7dc07473 100644 --- a/chia/_tests/util/test_testnet_overrides.py +++ b/chia/_tests/util/test_testnet_overrides.py @@ -9,7 +9,7 @@ def test_testnet11() -> None: overrides: Dict[str, Any] = {} update_testnet_overrides("testnet11", overrides) assert overrides == { - "SOFT_FORK5_HEIGHT": 1340000, + "SOFT_FORK6_HEIGHT": 2000000, } diff --git a/chia/cmds/sim_funcs.py b/chia/cmds/sim_funcs.py index bf0cde513d2c..d5be532ce12e 100644 --- a/chia/cmds/sim_funcs.py +++ b/chia/cmds/sim_funcs.py @@ -130,10 +130,10 @@ def create_chia_directory( # get fork heights then write back to config if "HARD_FORK_HEIGHT" not in sim_config: # this meh code is done so that we also write to the config file. sim_config["HARD_FORK_HEIGHT"] = 0 - if "SOFT_FORK5_HEIGHT" not in sim_config: - sim_config["SOFT_FORK5_HEIGHT"] = 0 + if "SOFT_FORK6_HEIGHT" not in sim_config: + sim_config["SOFT_FORK6_HEIGHT"] = 0 simulator_consts["HARD_FORK_HEIGHT"] = sim_config["HARD_FORK_HEIGHT"] - simulator_consts["SOFT_FORK5_HEIGHT"] = sim_config["SOFT_FORK5_HEIGHT"] + simulator_consts["SOFT_FORK6_HEIGHT"] = sim_config["SOFT_FORK6_HEIGHT"] # save config and return the config save_config(chia_root, "config.yaml", config) diff --git a/chia/consensus/default_constants.py b/chia/consensus/default_constants.py index a24d0aa37a0e..b5410d1f830b 100644 --- a/chia/consensus/default_constants.py +++ b/chia/consensus/default_constants.py @@ -72,7 +72,7 @@ MAX_GENERATOR_SIZE=uint32(1000000), MAX_GENERATOR_REF_LIST_SIZE=uint32(512), # Number of references allowed in the block generator ref list POOL_SUB_SLOT_ITERS=uint64(37600000000), # iters limit * NUM_SPS - SOFT_FORK5_HEIGHT=uint32(5940000), + SOFT_FORK6_HEIGHT=uint32(6800000), # June 2024 HARD_FORK_HEIGHT=uint32(5496000), # June 2027 @@ -86,5 +86,5 @@ def update_testnet_overrides(network_id: str, overrides: Dict[str, Any]) -> None: if network_id == "testnet11": - if "SOFT_FORK5_HEIGHT" not in overrides: - overrides["SOFT_FORK5_HEIGHT"] = 1340000 + if "SOFT_FORK6_HEIGHT" not in overrides: + overrides["SOFT_FORK6_HEIGHT"] = 2000000 diff --git a/chia/full_node/mempool_check_conditions.py b/chia/full_node/mempool_check_conditions.py index a84df7f04ed2..57b2f8e5fb63 100644 --- a/chia/full_node/mempool_check_conditions.py +++ b/chia/full_node/mempool_check_conditions.py @@ -3,7 +3,7 @@ import logging from typing import Dict, List, Optional -from chia_rs import MEMPOOL_MODE, get_flags_for_height_and_constants +from chia_rs import DONT_VALIDATE_SIGNATURE, MEMPOOL_MODE, G2Element, get_flags_for_height_and_constants from chia_rs import get_puzzle_and_solution_for_coin2 as get_puzzle_and_solution_for_coin_rust from chia_rs import run_block_generator, run_block_generator2, run_chia_program @@ -36,7 +36,7 @@ def get_name_puzzle_conditions( height: uint32, constants: ConsensusConstants, ) -> NPCResult: - flags = get_flags_for_height_and_constants(height, constants) + flags = get_flags_for_height_and_constants(height, constants) | DONT_VALIDATE_SIGNATURE if mempool_mode: flags = flags | MEMPOOL_MODE @@ -48,7 +48,7 @@ def get_name_puzzle_conditions( try: block_args = generator.generator_refs - err, result = run_block(bytes(generator.program), block_args, max_cost, flags, constants) + err, result = run_block(bytes(generator.program), block_args, max_cost, flags, G2Element(), None, constants) assert (err is None) != (result is None) if err is not None: return NPCResult(uint16(err), None) diff --git a/chia/rpc/wallet_rpc_api.py b/chia/rpc/wallet_rpc_api.py index 5d428c4eb48a..e1ddc151976e 100644 --- a/chia/rpc/wallet_rpc_api.py +++ b/chia/rpc/wallet_rpc_api.py @@ -1574,7 +1574,7 @@ async def get_spendable_coins(self, request: Dict[str, Any]) -> EndpointResult: excluded_coin_amounts = [] excluded_coins_input: Optional[Dict[str, Dict[str, Any]]] = request.get("excluded_coins") if excluded_coins_input is not None: - excluded_coins = [Coin.from_json_dict(json_coin) for json_coin in excluded_coins_input] + excluded_coins = [Coin.from_json_dict(json_coin) for json_coin in excluded_coins_input.values()] else: excluded_coins = [] excluded_coin_ids_input: Optional[List[str]] = request.get("excluded_coin_ids") diff --git a/chia/util/initial-config.yaml b/chia/util/initial-config.yaml index e3d419500716..c5eca8c5c0e3 100644 --- a/chia/util/initial-config.yaml +++ b/chia/util/initial-config.yaml @@ -37,7 +37,7 @@ network_overrides: &network_overrides SUB_SLOT_ITERS_STARTING: 67108864 # Forks activated from the beginning on this network HARD_FORK_HEIGHT: 0 - SOFT_FORK5_HEIGHT: 1340000 + SOFT_FORK6_HEIGHT: 2000000 PLOT_FILTER_128_HEIGHT: 6029568 PLOT_FILTER_64_HEIGHT: 11075328 PLOT_FILTER_32_HEIGHT: 16121088 @@ -672,4 +672,4 @@ simulator: # Fork Settings HARD_FORK_HEIGHT: 0 - SOFT_FORK5_HEIGHT: 0 + SOFT_FORK6_HEIGHT: 0 diff --git a/poetry.lock b/poetry.lock index 614967542ab4..f1cc29a5ed5a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "aiofiles" @@ -796,37 +796,32 @@ dev = ["black (>=23.1.0)", "pytest (>=7.2.1)", "ruff (>=0.0.252)"] [[package]] name = "chia-rs" -version = "0.14.0" +version = "0.16.0" description = "Code useful for implementing chia consensus." optional = false python-versions = "*" files = [ - {file = "chia_rs-0.14.0-cp310-cp310-macosx_13_0_arm64.whl", hash = "sha256:defa14a8a9532d2d0eb3b6b263ce6ad2c2c3ac5b37ff49e42a4202b1855d6ce9"}, - {file = "chia_rs-0.14.0-cp310-cp310-macosx_13_0_x86_64.whl", hash = "sha256:74724d50d18f48d3643e10308ab6b1ad98dbd47a136a9b293a4c985d91069b21"}, - {file = "chia_rs-0.14.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:dc1052c718dc930997b4ef50478d24973dad2b518ba0634347f7815b5b8f6643"}, - {file = "chia_rs-0.14.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:0aee2574d24c5db06a74cb0d69949f03575cdf33a7e7a8673cdab298bdf491a8"}, - {file = "chia_rs-0.14.0-cp310-none-win_amd64.whl", hash = "sha256:291a3821951c3505e1172c772ee329f75fe49961a52952d57fdd49eddf8ad22a"}, - {file = "chia_rs-0.14.0-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:4020b1086a8ab26aeee39be71c87b6e8c16481ce75eb82200d394f762ddbbc0b"}, - {file = "chia_rs-0.14.0-cp311-cp311-macosx_13_0_x86_64.whl", hash = "sha256:9e9e9f43259e7a8281a3a731f42bc14b2bf91bc2d3ef51cd5c49b1cefb6e2389"}, - {file = "chia_rs-0.14.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:a87faa328af72e105e3bf02f276e225aabcba4748c392555905bc8be211ef6d1"}, - {file = "chia_rs-0.14.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:138c0f42d522a97a9486440ecdd943dcd58b38b96d4830f4fe6f00413dcfadf1"}, - {file = "chia_rs-0.14.0-cp311-none-win_amd64.whl", hash = "sha256:4b6265ebe1349bfc743db19a2a9c33fc79e97826f2acfe26554375cd929628c8"}, - {file = "chia_rs-0.14.0-cp312-cp312-macosx_13_0_arm64.whl", hash = "sha256:740d4ac6222e82fc0dc2fddc04148d0504b383ee68f3ae094f91bc9a2936d20d"}, - {file = "chia_rs-0.14.0-cp312-cp312-macosx_13_0_x86_64.whl", hash = "sha256:e0757077264605cdaa7e0f49b95fc8c075808348cd640e30ce9c40132b107d42"}, - {file = "chia_rs-0.14.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:49c282441e23c089aa94d33b1a24d1324383aedb5e20af9b42d6e87a4f26ec1f"}, - {file = "chia_rs-0.14.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:c247aef6154194670338ad2e95783dadc5a82b5f671edb3c9314dd95505553a4"}, - {file = "chia_rs-0.14.0-cp312-none-win_amd64.whl", hash = "sha256:75a51561e3bd375884853492e7a8f41162694593f39deb1d2757f98795d311aa"}, - {file = "chia_rs-0.14.0-cp38-cp38-macosx_13_0_arm64.whl", hash = "sha256:40873da635ea0a253e006eb427f5823b2123ed9045bf0a548902035b0c7bd214"}, - {file = "chia_rs-0.14.0-cp38-cp38-macosx_13_0_x86_64.whl", hash = "sha256:fcb4fe4ebcaac87780c54a7fac12dea3dcd142c061c6b4d3e38e303c7e18857a"}, - {file = "chia_rs-0.14.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:636ba7435aa7f114f0cbf687c2ac7ea868f98c47c8c1b5e7894a1fbc8197d8d3"}, - {file = "chia_rs-0.14.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:db45d48d55554933d71bad7169aa3ea2c2d99d4bd8e37e43e7f84b0fdd5b97a5"}, - {file = "chia_rs-0.14.0-cp38-none-win_amd64.whl", hash = "sha256:5e813775655a41990dc6e9ef4f66c958aa11c0bc43b7a7e68c99c392aab9f560"}, - {file = "chia_rs-0.14.0-cp39-cp39-macosx_13_0_arm64.whl", hash = "sha256:4667bcb01fa2ffcaea02f6e9c9f492319abdd4c0133ab7c65e3601d8d70bfe9b"}, - {file = "chia_rs-0.14.0-cp39-cp39-macosx_13_0_x86_64.whl", hash = "sha256:3ac5861cc1a5093ecea80dbfc6bf152a8cc44610707a0ad4a88fea5c2b019e28"}, - {file = "chia_rs-0.14.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:faca2e80513eaef000663384f1abec39caed642dc5812729550448067322b1f9"}, - {file = "chia_rs-0.14.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:892623e6df27c41e344431bf2f4440f46aacc4a4aa48aff2728b144e6f6a270b"}, - {file = "chia_rs-0.14.0-cp39-none-win_amd64.whl", hash = "sha256:a03362e6283d0fc1bc5063db666dd75da7fd0e52df32eb5a68095e0564bae4ee"}, - {file = "chia_rs-0.14.0.tar.gz", hash = "sha256:6652e7c328e42b31e9be8e985c1bfc1ddcd83cf31e6b5eb9c0a31a641411677b"}, + {file = "chia_rs-0.16.0-cp310-cp310-macosx_13_0_arm64.whl", hash = "sha256:0f7ecd0bb611d0ec6a8e296cc8b29960fe1e05450871b474bc5ab729b88a3075"}, + {file = "chia_rs-0.16.0-cp310-cp310-macosx_13_0_x86_64.whl", hash = "sha256:eae0334749d1fcc52c263ed0991e914bbe7d55d985e8853470936801865147e7"}, + {file = "chia_rs-0.16.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:2dc430c8c6b9860c8cd1ae4ad197277d836d04389c0a69ff6565bde47fa2f2c6"}, + {file = "chia_rs-0.16.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:597221e27a35ed1925ef717ea079e3891e680e299fe6fa54110e25d82129a6ac"}, + {file = "chia_rs-0.16.0-cp310-none-win_amd64.whl", hash = "sha256:255737eb1fba7424e913b4741f132e30daf461b960d17ebf8d83d73707c67033"}, + {file = "chia_rs-0.16.0-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:109a0af6ad87a942a3a3d9ce9093a7c2dce15ce7bf69cf88fc1b738959ee0cf3"}, + {file = "chia_rs-0.16.0-cp311-cp311-macosx_13_0_x86_64.whl", hash = "sha256:c032e605519381306421586bd2460c5f9d776c8e2fab7e7ed856340da4ebacd3"}, + {file = "chia_rs-0.16.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:8aadaca51114a9d92fccd1408f8964a0217fa81088056943e54c902e5741cf0e"}, + {file = "chia_rs-0.16.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:4ab3a7c24724078c24c4c1a731f56425d1a4208e00760797266b9d7d57512410"}, + {file = "chia_rs-0.16.0-cp311-none-win_amd64.whl", hash = "sha256:b5e2c8dbc45b40e7bee457a49dd75f5bd192455d8ca7f8797257ad3fa35b59e4"}, + {file = "chia_rs-0.16.0-cp312-cp312-macosx_13_0_arm64.whl", hash = "sha256:9d1f513032499cb49652fa644f4543e107f9cb87af84b05d7b86ef07b0b30cab"}, + {file = "chia_rs-0.16.0-cp312-cp312-macosx_13_0_x86_64.whl", hash = "sha256:3b6e1463a8db8aafc9bc479d1abf8d5e7deec97f2aaf9a1653276bd9669621c2"}, + {file = "chia_rs-0.16.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:0f3db92c9bf78c654ee4ca661d6472122e878fc2a54e0b93454168b124a43cb1"}, + {file = "chia_rs-0.16.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:020dce6579da6e5727e4645d8ca4bee70a436bd16223bf6193c2c5c8b0151eca"}, + {file = "chia_rs-0.16.0-cp312-none-win_amd64.whl", hash = "sha256:0bcd47d6bd37564dc81482f87e602e1908f72648e1e4a53ca2f08ff1c108967a"}, + {file = "chia_rs-0.16.0-cp39-cp39-macosx_13_0_arm64.whl", hash = "sha256:40429d317d17a86cdb2c69296a3a3935b0a5e8292c1f271a962577b15652eff4"}, + {file = "chia_rs-0.16.0-cp39-cp39-macosx_13_0_x86_64.whl", hash = "sha256:fbda8ab4feb04515b5b90f308aa716dee82d15e9905016a30000363729e4c41b"}, + {file = "chia_rs-0.16.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:9fbbd0a13aae4e64ad34e3b1f8aae54aa5f46468e6bff898f6f7ae74ac03490e"}, + {file = "chia_rs-0.16.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:792855eccf035ba416e2525ba3c55f8959281d87181b0c2935ed9dee7342fbd8"}, + {file = "chia_rs-0.16.0-cp39-none-win_amd64.whl", hash = "sha256:9cdd0b2a36f025a7d288363952136ed1aa412785421f1b40d86348d1a4a0dc7c"}, + {file = "chia_rs-0.16.0.tar.gz", hash = "sha256:ffdec31f002efb170da85a8b79566ba416150041e482482efe1637fcf0467030"}, ] [package.dependencies] @@ -3438,4 +3433,4 @@ upnp = ["miniupnpc"] [metadata] lock-version = "2.0" python-versions = ">=3.9, <3.13" -content-hash = "1e4a888f73b84cf7d080789d29746c9112aacad37b5619c3a7a3a678e73170ac" +content-hash = "d9d043d3265b32d637d879181ffb7d5fa106b4fbdec1a2112245562fea9d6967" diff --git a/pyproject.toml b/pyproject.toml index f8c14d30f5c7..fc9af218e1ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ bitstring = "4.1.4" # Binary data management library boto3 = "1.34.143" # AWS S3 for Data Layer S3 plugin chiabip158 = "1.5.1" # bip158-style wallet filters chiapos = "2.0.4" # proof of space -chia_rs = "0.14.0" +chia_rs = "0.16.0" chiavdf = "1.1.6" # timelord and vdf verification click = "8.1.7" # For the CLI clvm = "0.9.10" diff --git a/tools/analyze-chain.py b/tools/analyze-chain.py index 0a69aed6e2da..2a3092b2f9e6 100755 --- a/tools/analyze-chain.py +++ b/tools/analyze-chain.py @@ -11,7 +11,15 @@ import click import zstd -from chia_rs import MEMPOOL_MODE, AugSchemeMPL, G1Element, SpendBundleConditions, run_block_generator +from chia_rs import ( + DONT_VALIDATE_SIGNATURE, + MEMPOOL_MODE, + AugSchemeMPL, + G1Element, + G2Element, + SpendBundleConditions, + run_block_generator, +) from chia.consensus.default_constants import DEFAULT_CONSTANTS from chia.types.block_protocol import BlockInfo @@ -34,7 +42,9 @@ def run_gen( bytes(generator_program), block_program_args, DEFAULT_CONSTANTS.MAX_BLOCK_COST_CLVM, - flags, + flags | DONT_VALIDATE_SIGNATURE, + G2Element(), + None, DEFAULT_CONSTANTS, ) run_time = time() - start_time