From 6cd7a7f5b3033def1c74d16e0c5223369eba858f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Tue, 22 Jun 2021 20:47:07 +0200 Subject: [PATCH] Bump clvm rs version (#6892) * use deserialize_and_run_program2 from clvm_rs * bump clvm_rs to 0.1.8 * bump clvm to 0.9.7 --- chia/types/blockchain_format/program.py | 7 +++---- setup.py | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/chia/types/blockchain_format/program.py b/chia/types/blockchain_format/program.py index b585c328c27ac..74af58e2a9b60 100644 --- a/chia/types/blockchain_format/program.py +++ b/chia/types/blockchain_format/program.py @@ -7,7 +7,7 @@ from clvm.casts import int_from_bytes from clvm.EvalError import EvalError from clvm.operators import OP_REWRITE, OPERATOR_LOOKUP from clvm.serialize import sexp_from_stream, sexp_to_stream -from clvm_rs import STRICT_MODE, deserialize_and_run_program, serialized_length +from clvm_rs import STRICT_MODE, deserialize_and_run_program2, serialized_length from clvm_tools.curry import curry, uncurry from chia.types.blockchain_format.sized_bytes import bytes32 @@ -212,7 +212,7 @@ class SerializedProgram: native_opcode_names_by_opcode = dict( ("op_%s" % OP_REWRITE.get(k, k), op) for op, k in KEYWORD_FROM_ATOM.items() if k not in "qa." ) - cost, ret = deserialize_and_run_program( + cost, ret = deserialize_and_run_program2( self._buf, serialized_args, KEYWORD_TO_ATOM["q"][0], @@ -221,8 +221,7 @@ class SerializedProgram: max_cost, flags, ) - # TODO this could be parsed lazily - return cost, Program.to(sexp_from_stream(io.BytesIO(ret), SExp.to)) + return cost, Program.to(ret) NIL = Program.from_bytes(b"\x80") diff --git a/setup.py b/setup.py index 349eba7fbafa6..b41ed42a8e3d5 100644 --- a/setup.py +++ b/setup.py @@ -5,8 +5,8 @@ dependencies = [ "chiavdf==1.0.2", # timelord and vdf verification "chiabip158==1.0", # bip158-style wallet filters "chiapos==1.0.3", # proof of space - "clvm==0.9.6", - "clvm_rs==0.1.7", + "clvm==0.9.7", + "clvm_rs==0.1.8", "clvm_tools==0.4.3", "aiohttp==3.7.4", # HTTP server for full node rpc "aiosqlite==0.17.0", # asyncio wrapper for sqlite, to store blocks