-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[LABS-359] PlotNFT Drivers #20352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: quex.multi_sig_chialisp_drivers
Are you sure you want to change the base?
[LABS-359] PlotNFT Drivers #20352
Conversation
bd60700 to
4952434
Compare
| if isinstance(unknown_inner_puzzle.puzzle, MofN): | ||
| unknown_inner_puzzle.fill_in_unknown_puzzles( | ||
| {SendMessageBanned().puzzle_hash(nonce=0): SendMessageBanned()} | ||
| ) |
There was a problem hiding this comment.
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.
| 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) |
There was a problem hiding this comment.
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.
There was a problem hiding this 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
chia-blockchain/chia/wallet/puzzles/custody/custody_architecture.py
Lines 340 to 345 in 4448bce
| return PuzzleWithRestrictions( | |
| nonce=self.nonce, | |
| restrictions=new_restrictions, | |
| puzzle=new_puzzle, | |
| ) |
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.
chia/pools/plotnft_drivers.pyimplementingPlotNFT,SelfCustody,PoolingCustody,RewardPuzzle,PoolRewardwith join/exit waiting-room flows and reward claim/forwarding.claim_pool_rewards_dpuz.clsp(+ hex) andsend_message_banned.clsp(+ hex); forward-to-pool helper.PuzzleWithRestrictionsmemo now carriesadditional_memos; updatefrom_memo/memoaccordingly.FixedCreateCoinDestinations; exposeValidatorStackRestriction.solve()and reverse wrapper application order; member puzzles addsolve()helpers.CreateCoinsupportsmemo_bloband updatedfrom_programparsing;parse_conditions_non_consensusused to extract new memo format.puzzle_for_singleton()accepts injectedsingleton_mod/hash.nonceinNotarizedPaymentpaths; DL wallet offer construction updated.test_plotnft_v2_drivers.pycovering transitions and rewards; extend restriction tests for fixed destinations and send-message ban.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.