question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Unable to claim SELF_POOLING rewards if coins are sent with diff puzzle hash

See original GitHub issue

I am solo farming, but I wanted to go ahead and start making pool-compatible plots. I made a plotnft, and started making plots (madmax) using the contract address from chia plotnft show.

Rather than wait weeks (months?) to win a block SELF_POOLING, only to find that I have no idea how to retrieve it, I decided to send some mojo to my plotnft wallet via a faucet, and test out the chia plotnft claim process.

See transactions here: https://www.chiaexplorer.com/blockchain/address/xch1wt3gthn43yy52d635ke7nv2rmcm048c3lntkxx27y70sqy5rz62qf8qmj3

chia plotnft show Wallet height: 562287 Sync status: Synced Wallet id 2: Current state: SELF_POOLING Current state from block height: 547731 Launcher ID: REDACTED Target address (not for plotting): BLAH Owner public key: BLAH P2 singleton address (pool contract address for plotting): xch1wt3gthn43yy52d635ke7nv2rmcm048c3lntkxx27y70sqy5rz62qf8qmj3 Claimable balance: 6.00212e-07 xch (600212 mojo)

Attempting to do a claim on this presents me with an error:

chia plotnft claim -i 2 Will claim rewards for wallet ID: 2. Error performing operation on Plot NFT -f <blahblah> wallet id: 2: {‘error’: “{‘amount’: 500000,\n ‘parent_coin_info’: ‘0xb9<blahblah>’,\n ‘puzzle_hash’: ‘0x72<blahblah>’}”, ‘success’: False}

from debug.log:

2021-07-12T16:20:44.685 wallet chia.rpc.rpc_server : WARNING Error while handling message: Traceback (most recent call last): File “<BLAH>/chia-blockchain/chia/rpc/rpc_server.py”, line 81, in inner res_object = await f(request_data) File “<BLAH>/chia-blockchain/chia/rpc/wallet_rpc_api.py”, line 1227, in pw_absorb_rewards transaction: TransactionRecord = await wallet.claim_pool_rewards(fee) File “<BLAH>/chia-blockchain/chia/pools/pool_wallet.py”, line 761, in claim_pool_rewards coin_to_height_farmed[coin_record.coin] KeyError: Coin(parent_coin_info=<bytes32: 2e9f-BLAH->, puzzle_hash=<bytes32: 72e2-BLAH->, amount=100

Hat tip to @cameroncooper for this:

It appears that the coin sent via faucet the uses a different puzzle than claim is using to spend pool rewards. Starting here: https://github.com/Chia-Network/chia-blockchain/blob/efd401ee35cff76c7fc4d6779c68f72f24fc0217/chia/cmds/plotnft_funcs.py#L330 calls absorb rewards: https://github.com/Chia-Network/chia-blockchain/blob/efd401ee35cff76c7fc4d6779c68f72f24fc0217/chia/rpc/wallet_rpc_api.py#L1217 tries to create a transaction: https://github.com/Chia-Network/chia-blockchain/blob/efd401ee35cff76c7fc4d6779c68f72f24fc0217/chia/pools/pool_wallet.py#L724 and here’s the money shot: https://github.com/Chia-Network/chia-blockchain/blob/efd401ee35cff76c7fc4d6779c68f72f24fc0217/chia/pools/pool_puzzles.py#L219

This behavior seems to be the same as https://github.com/Chia-Network/chia-blockchain/issues/7299

If the ability to anonymously send funds from a faucet to a plotnft contract address results in a corrupted pool wallet, I only request that we please nickname this problem #dripgate

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
emlowecommented, Jul 13, 2021

Thanks for this interesting bug report. This doesn’t create any permanent corruption of the pool wallet. Chia sent directly to the P2 address are not claimable and ideally shouldn’t be shown in the wallet at all. In testing with testnet, the current wallet code will return an error if you have “real” claimable rewards in your pool wallet in this case where you have a mix of claimable and non-claimable (T)XCH. However, this will be fixed in a future release of the wallet such that all truly claimable rewards are claimable while ignoring any other chia in the pooling wallet. Note we plan to make some further fixes to make it harder to get into this state (eg, we will prevent you from sending chia to your own P2 address).

0reactions
emlowecommented, Aug 12, 2021

This issue as written was resolved in version 1.2.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sending pool farming reward automatically to cold wallet : r/chia
Steps: Convert your (cold) wallet receiving address to a puzzle hash. Paste your wallet receiving address into the bar "Address" in the below ......
Read more >
Pooling | Chialisp
Plots can be made to send rewards directly to a puzzle hash, but you cannot change that puzzle hash once they are plotted....
Read more >
The risks of farming on Chia nft plots
When self-pooling your plots the reward is forwarded to your destination address, when in a pool it is forwarded to the pool's receive...
Read more >
Magic Jigsaw Puzzles - Facebook
Tell us the most annoying story when some tech showed an error. ⚙ Download working puzzles with modern tech ... Can't send coins...
Read more >
Pools in Chia - Chia Network
A puzzle hash determines how a coin can be spent. It's the Chia equivalent of what's called a scriptpubkey in Bitcoin. Pool block...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found