Open Ealrann opened 1 month ago
Hi @mariano54, @aqk,
Quick question on an update pool from 2.1.x to 2.3.x
In this code, need to replace Announcement
by CreateCoinAccouncement
?
transaction = await wallet['rpc_client'].create_signed_transaction(
additions=[{'puzzle_hash': wallet['puzzle_hash'], 'amount': 0}],
tx_config=DEFAULT_TX_CONFIG,
coins=[spend_coin],
coin_announcements=[Announcement(p2_coin.name(), b"$")],
fee=uint64(1),
)
Same here?
transaction = await wallet['rpc_client'].create_signed_transaction(
additions=[{'puzzle_hash': wallet['puzzle_hash'], 'amount': spend_coin.amount - fee}],
tx_config=DEFAULT_TX_CONFIG,
coins=[spend_coin],
coin_announcements=[Announcement(p2_coin.name(), b"$")],
fee=uint64(fee),
)
And here, it's AssertCoinAnnouncement
?
solution: Program = w.make_solution(
primaries=primaries,
coin_announcements={message},
fee=fee,
coin_announcements_to_assert={Announcement(p2_coin.name(), bytes(b"$")).name()},
)
Thanks
Hello,
The reference pool doesn't compile anymore with the last version of chia (2.3.0) because the
chia.types.Announcement
no longer exists.It's used in the
create_absorb_transaction
method insingleton.py
. I tried to simply remove the announcements, and directly pass the coin list increate_signed_transaction
, but the pool claim then fail with an error ("No key for puzzle hash", I attach the log).Any hint how to fix the
singleton.py
for chia 2.3.0?err.txt