Skip to content

Commit dac837e

Browse files
authored
bump chia_rs (#19802)
1 parent b9710b1 commit dac837e

15 files changed

+57
-37
lines changed

chia/_tests/blockchain/test_blockchain.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4334,6 +4334,8 @@ async def test_include_spends_same_as_parent(
43344334
[],
43354335
[],
43364336
0,
4337+
0,
4338+
0,
43374339
)
43384340
],
43394341
0,
@@ -4388,7 +4390,10 @@ async def test_include_block_same_as_parent_coins(
43884390
test_setup = ForkInfoTestSetup.create(same_ph_as_parent, same_amount_as_parent)
43894391
# Now let's run the test
43904392
test_setup.fork_info.include_block(
4391-
[(test_setup.child_coin, None)], [test_setup.coin], test_setup.test_block, test_setup.test_block.header_hash
4393+
[(test_setup.child_coin, None)],
4394+
[(test_setup.coin.name(), test_setup.coin)],
4395+
test_setup.test_block,
4396+
test_setup.test_block.header_hash,
43924397
)
43934398
# Let's make sure the results are as expected
43944399
expected_same_as_parent_additions = (

chia/_tests/blockchain/test_build_chains.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def validate_coins(constants: ConsensusConstants, blocks: list[FullBlock]) -> No
7777
constants,
7878
)
7979

80-
for rem in removals:
80+
for _, rem in removals:
8181
try:
8282
unspent_coins.remove(rem)
8383
except KeyError: # pragma: no cover

chia/_tests/core/full_node/stores/test_coin_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async def test_basic_coin_store(db_version: int, softfork_height: uint32, bt: Bl
106106
additions, removals = additions_and_removals(
107107
bytes(block.transactions_generator), [], flags, bt.constants
108108
)
109-
tx_removals = [removal.name() for removal in removals]
109+
tx_removals = [name for name, _ in removals]
110110
tx_additions = [(addition.name(), addition, False) for addition, _ in additions]
111111
else:
112112
tx_removals, tx_additions = [], []

chia/_tests/core/full_node/test_full_node.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2551,11 +2551,12 @@ async def validate_coin_set(coin_store: CoinStoreProtocol, blocks: list[FullBloc
25512551
assert records == {}
25522552

25532553
records = {rec.coin.name(): rec for rec in await coin_store.get_coins_removed_at_height(block.height)}
2554-
for rem in removals:
2555-
rec = records.pop(rem.name())
2554+
for name, rem in removals:
2555+
rec = records.pop(name)
25562556
assert rec is not None
25572557
assert rec.spent_block_index == block.height
25582558
assert rec.coin == rem
2559+
assert name == rem.name()
25592560

25602561
if len(records) > 0: # pragma: no cover
25612562
print(f"height: {block.height} unexpected removals: {records} TX: Yes")

chia/_tests/core/full_node/test_generator_tools.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
[],
4242
[],
4343
0,
44+
execution_cost=0,
45+
condition_cost=0,
4446
),
4547
SpendConditions(
4648
coin_ids[1],
@@ -66,6 +68,8 @@
6668
[],
6769
[],
6870
0,
71+
execution_cost=0,
72+
condition_cost=0,
6973
),
7074
]
7175

chia/_tests/core/mempool/test_mempool_manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ def make_test_conds(
359359
[],
360360
[],
361361
flags,
362+
execution_cost=0,
363+
condition_cost=0,
362364
)
363365
for coin_id, parent_id, puzzle_hash, amount, flags, create_coin in spend_info
364366
],

chia/_tests/generator/test_rom.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ def test_get_name_puzzle_conditions(self, softfork_height: int) -> None:
155155
agg_sig_parent_amount=[],
156156
agg_sig_parent_puzzle=[],
157157
flags=0,
158+
# in run_block_generator() we don't have access to separate
159+
# execution cost, just in run_block_generator2()
160+
execution_cost=0 if softfork_height < DEFAULT_CONSTANTS.HARD_FORK_HEIGHT else 44,
161+
condition_cost=1800000,
158162
)
159163

160164
assert npc_result.conds.spends == [spend]

chia/_tests/util/test_condition_tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ def mk_agg_sig_conditions(
4949
agg_sig_puzzle=agg_sig_data if opcode == ConditionOpcode.AGG_SIG_PUZZLE else [],
5050
agg_sig_puzzle_amount=agg_sig_data if opcode == ConditionOpcode.AGG_SIG_PUZZLE_AMOUNT else [],
5151
flags=0,
52+
execution_cost=0,
53+
condition_cost=0,
5254
)
5355
return SpendBundleConditions([spend], 0, 0, 0, None, None, agg_sig_unsafe_data, 0, 0, 0, False, 0, 0)
5456

chia/_tests/util/test_replace_str_to_bytes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
POOL_SUB_SLOT_ITERS=uint64(37600000000),
6262
HARD_FORK_HEIGHT=uint32(5496000),
6363
HARD_FORK2_HEIGHT=uint32(0xFFFFFFFF),
64+
PLOT_V1_PHASE_OUT=uint32(1179648),
6465
PLOT_FILTER_128_HEIGHT=uint32(10542000),
6566
PLOT_FILTER_64_HEIGHT=uint32(15592000),
6667
PLOT_FILTER_32_HEIGHT=uint32(20643000),

chia/consensus/block_body_validation.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,17 @@ def include_spends(self, conds: Optional[SpendBundleConditions], block: FullBloc
128128
def include_block(
129129
self,
130130
additions: list[tuple[Coin, Optional[bytes]]],
131-
removals: list[Coin],
131+
removals: list[tuple[bytes32, Coin]],
132132
block: FullBlock,
133133
header_hash: bytes32,
134134
) -> None:
135135
self.update_fork_peak(block, header_hash)
136136
if block.foliage_transaction_block is not None:
137137
timestamp = block.foliage_transaction_block.timestamp
138138
spent_coins: dict[bytes32, Coin] = {}
139-
for spend in removals:
140-
spend_id = bytes32(spend.name())
141-
spent_coins[spend_id] = spend
142-
self.removals_since_fork[spend_id] = ForkRem(bytes32(spend.puzzle_hash), block.height)
139+
for spend_id, spend in removals:
140+
spent_coins[bytes32(spend_id)] = spend
141+
self.removals_since_fork[bytes32(spend_id)] = ForkRem(bytes32(spend.puzzle_hash), block.height)
143142
for coin, hint in additions:
144143
parent = spent_coins.get(coin.parent_coin_info)
145144
assert parent is not None

0 commit comments

Comments
 (0)