Skip to content

Conversation

@Quexington
Copy link
Contributor

@Quexington Quexington commented Dec 16, 2025

Note

Introduces PlotNFT drivers enabling self-custody ↔ pooling transitions and pool reward claim/forwarding, adds CLVM wrappers (fixed create-coin destinations, send-message ban), and extends condition/custody utilities to support new memos and restrictions.

  • Pools / PlotNFT:
    • Add chia/pools/plotnft_drivers.py implementing PlotNFT, SelfCustody, PoolingCustody, RewardPuzzle, PoolReward with join/exit waiting-room flows and reward claim/forwarding.
    • New CLVM: claim_pool_rewards_dpuz.clsp (+ hex) and send_message_banned.clsp (+ hex); forward-to-pool helper.
  • Custody Framework:
    • PuzzleWithRestrictions memo now carries additional_memos; update from_memo/memo accordingly.
    • New restriction FixedCreateCoinDestinations; expose ValidatorStackRestriction.solve() and reverse wrapper application order; member puzzles add solve() helpers.
  • Conditions / Serialization:
    • CreateCoin supports memo_blob and updated from_program parsing; parse_conditions_non_consensus used to extract new memo format.
  • Singleton utils:
    • puzzle_for_singleton() accepts injected singleton_mod/hash.
  • Data Layer / Offers:
    • Use keyword nonce in NotarizedPayment paths; DL wallet offer construction updated.
  • Tests:
    • Add test_plotnft_v2_drivers.py covering transitions and rewards; extend restriction tests for fixed destinations and send-message ban.
  • Misc:
    • Add condition_codes.clib, curry.clib; update deployed puzzle hashes.

Written by Cursor Bugbot for commit 4448bce. This will update automatically on new commits. Configure here.

@Quexington Quexington requested a review from a team as a code owner December 16, 2025 19:45
@github-actions github-actions bot added the merge_conflict Branch has conflicts that prevent merge to main label Dec 16, 2025
@github-actions github-actions bot removed the merge_conflict Branch has conflicts that prevent merge to main label Dec 16, 2025
@Quexington Quexington added the Added Required label for PR that categorizes merge commit message as "Added" for changelog label Dec 16, 2025
if isinstance(unknown_inner_puzzle.puzzle, MofN):
unknown_inner_puzzle.fill_in_unknown_puzzles(
{SendMessageBanned().puzzle_hash(nonce=0): SendMessageBanned()}
)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Discarded return value from fill_in_unknown_puzzles method

The fill_in_unknown_puzzles method returns a new PuzzleWithRestrictions object (the dataclass is frozen, so it creates a new instance), but the return value is discarded. The unknown_inner_puzzle variable remains unchanged after this call, making the operation ineffective. While the subsequent exiting determination logic at line 423-426 still works due to checking different puzzle hashes, the intent of filling in known puzzles is not achieved, which could cause issues if the code logic changes or if the result was meant to be used elsewhere.

Fix in Cursor Fix in Web

with_opcode: Program = Program.to((51, condition)) # Gotta do this because the super class is expecting it
p = CreateCoin.from_program(with_opcode)
return cls(p.puzzle_hash, p.amount, p.memos, nonce)
return cls(p.puzzle_hash, p.amount, p.memos, nonce=nonce)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: NotarizedPayment.from_condition_and_nonce loses memo_blob data

The from_condition_and_nonce method creates a NotarizedPayment by passing only p.memos from the parsed CreateCoin, but doesn't pass p.memo_blob. Since CreateCoin.from_program may set memo_blob instead of memos when memos can't be parsed as atoms, conditions with blob-style memos will have their memo data silently lost in the resulting NotarizedPayment.

Fix in Cursor Fix in Web

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: `fill_in_unknown_puzzles` loses `additional_memos` field value

The fill_in_unknown_puzzles method constructs a new PuzzleWithRestrictions object but doesn't pass the additional_memos field. Since additional_memos defaults to None, this causes loss of memo data when the original object had additional_memos set. The returned object will always have additional_memos=None even if self.additional_memos contained important data like the BLS key and pool configuration in PlotNFT.

chia/wallet/puzzles/custody/custody_architecture.py#L340-L345

return PuzzleWithRestrictions(
nonce=self.nonce,
restrictions=new_restrictions,
puzzle=new_puzzle,
)

Fix in Cursor Fix in Web


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Added Required label for PR that categorizes merge commit message as "Added" for changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants