Skip to content
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

Defualt to using Self Pool pool_contract_address #803

Closed
zorner opened this issue Nov 10, 2022 · 15 comments
Closed

Defualt to using Self Pool pool_contract_address #803

zorner opened this issue Nov 10, 2022 · 15 comments
Assignees
Labels
enhancement New feature or request pending-release Available in development, but not yet in stable release.

Comments

@zorner
Copy link

zorner commented Nov 10, 2022

Describe the request
chia plotnft show - Show the pool_contract_address that can be used to create NFT plots/portable plots. This was shown in Setting -> Pools when self pooling, but that has gone away in version 0.8.5.

Chia plotting by default use this address for new plots, thus no more OG plots. (version 1.2.0)

Machinaris should follow suit and in plotman.yaml comment out the pool_pk (Leave the value) and define the pool_contract_address.

Documentation would need to be updated accordingly as it says one must join a pool to create portable plots.

@zorner zorner added the enhancement New feature or request label Nov 10, 2022
@guydavis
Copy link
Owner

Hi, thanks for the feedback. Could you share what you mean by "gone away in version 0.8.5"? How does the Settings | Plotting page compare to running chia plotnft show from the CLI of your install?

Here is what I see on the Settings | Pools page:

plotnft

Next, Machinaris will automatically replace the placeholder values on the Settings | Plotting page, IF you have a plotnft that has been found in the local blockchain (Settings | Pools page). You still need to review and click the Save button. On a brand new install, now plotnft exists yet (either created or in an blockchain not yet synced).

Thanks for the feedback on the documentation, I have improved the clarity of that section for new Chia users.

@guydavis guydavis self-assigned this Nov 10, 2022
@guydavis guydavis added the question Further information is requested label Nov 10, 2022
@zorner
Copy link
Author

zorner commented Nov 10, 2022

Thanks. That screen shot looks like what I recall in Machinaris 0.8.4, but this is what I am getting now:
image

@guydavis
Copy link
Owner

Interesting, thanks for reporting this discrepancy as I am not encountering it. What does chia plotnft show return for you from the Machinaris CLI in-container? What do you see on the Pools page itself in the Machinaris WebUI?

@zorner
Copy link
Author

zorner commented Nov 10, 2022

root@Full-Node-Chia:/chia-blockchain# chia plotnft show
Wallet height: 2797176
Sync status: Synced
Wallet id 3:
Current state: SELF_POOLING
Current state from block height: 2741439
Launcher ID: b7
Target address (not for plotting): xch1crc3fj2ueaeveccjl67qqk7384xh364dyeqz8zukwfhfjxxw4uzqh9a709
Number of plots: 240
Owner public key: b1
Pool contract address (use ONLY for plotting - do not send money to this address): xch
Claimable balance: 0.0 xch (0 mojo)

@zorner
Copy link
Author

zorner commented Nov 10, 2022

image

@guydavis
Copy link
Owner

Interesting. I note you have Wallet ID 3, while I have ID 2. Not sure if that makes a difference.

wallets

Please verify that you have only one set of keys, not multiple: chia keys show (no need to post, just confirm you are not prompted for a number 1,2, etc).

Please also check your log for errors loading plotnft status to Machinaris WebUI:

grep -A5 -i 'Running job "status_plotnft' /root/.chia/machinaris/logs/apisrv.log | tail -n 20

Thanks!

@zorner
Copy link
Author

zorner commented Nov 10, 2022

My wallet 2 is a holiday wallet that I do not recall creating. it was created in 07/2022, when I was too sick to keep a close eye on my chia setup. 3 is correct. 4 just got created today about the time of my last post. I am not sure what I did. It was not intentional.

image

@zorner
Copy link
Author

zorner commented Nov 10, 2022

There is a cold wallet, recently setup, although I see nothing on the wallet page. Not sure if it should be listed. There is only the one in the chia in the container.

root@Full-Node-Chia:/chia-blockchain# grep -A5 -i 'Running job "status_plotnft' /root/.chia/machinaris/logs/apisrv.log | tail -n 20
2022-11-10 16:42:09 [230] [INFO] Running job "status_plotnfts (trigger: interval[0:02:00], next run at: 2022-11-10 16:45:00 EST)" (scheduled at 2022-11-10 16:42:09.676594-05:00)
2022-11-10 16:42:11 [282] [ERROR] Exception on /plotnfts/ [POST]
Traceback (most recent call last):
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/app.py", line 1518, in full_dispatch_request
--
2022-11-10 16:45:00 [230] [INFO] Running job "status_plotnfts (trigger: interval[0:02:00], next run at: 2022-11-10 16:47:23 EST)" (scheduled at 2022-11-10 16:45:00.760797-05:00)
2022-11-10 16:45:01 [282] [INFO] 192.168.1.222 - - [10/Nov/2022:16:45:01 -0500] "POST /drives/ HTTP/1.1" 400 59 "-" "python-requests/2.28.1"
2022-11-10 16:45:02 [282] [ERROR] Exception on /plotnfts/ [POST]
Traceback (most recent call last):
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
--
2022-11-10 16:47:23 [230] [INFO] Running job "status_plotnfts (trigger: interval[0:02:00], next run at: 2022-11-10 16:50:03 EST)" (scheduled at 2022-11-10 16:47:23.221586-05:00)
2022-11-10 16:47:24 [282] [ERROR] Exception on /plotnfts/ [POST]
Traceback (most recent call last):
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/app.py", line 1518, in full_dispatch_request

@guydavis
Copy link
Owner

Okay, this helps. We're getting closer to discovering why Machinaris is not handling your multiple plotnfts correctly. Let's enable some more debugging in your container:

cd /machinaris
./scripts/stop_machinaris.sh
sed -i 's/debug=False/debug=True/g' api/schedules/status_plotnfts.py
./scripts/start_machinaris.sh
tail -f /root/.chia/machinaris/logs/apisrv.log

Then watch the tailing logs for a few minutes. You should see line like Running job "status_plotnft"..., then a more verbose set of log lines indicating exactly what json payload (status info) is to be stored.

You can also get this by searching the logs (for a full 30 lines or so...) with this verboseness:

grep -A30 -i 'Running job "status_plotnft' /root/.chia/machinaris/logs/apisrv.log | tail -n 40

Hopefully this will help me understand the situation here. Thanks for all your feedback.

@zorner
Copy link
Author

zorner commented Nov 10, 2022

root@Full-Node-Chia:/machinaris# grep -A30 -i 'Running job "status_plotnft' /root/.chia/machinaris/logs/apisrv.log | tail -n 40
AttributeError: 'NoneType' object has no attribute 'strftime'
2022-11-10 17:49:25 [282] [INFO] 127.0.0.1 - - [10/Nov/2022:17:49:25 -0500] "POST /plotnfts/ HTTP/1.1" 500 46 "-" "python-requests/2.28.1"
2022-11-10 17:49:25 [230] [INFO] Job "status_plotnfts (trigger: interval[0:02:00], next run at: 2022-11-10 17:52:09 EST)" executed successfully
2022-11-10 17:49:26 [230] [INFO] Running job "status_wallets (trigger: interval[0:02:00], next run at: 2022-11-10 17:51:46 EST)" (scheduled at 2022-11-10 17:49:26.200208-05:00)
2022-11-10 17:49:27 [282] [INFO] Returning chia cold wallet balance of 0.0
2022-11-10 17:49:27 [282] [INFO] 127.0.0.1 - - [10/Nov/2022:17:49:27 -0500] "POST /wallets/ HTTP/1.1" 201 1622 "-" "python-requests/2.28.1"
2022-11-10 17:49:27 [230] [INFO] Job "status_wallets (trigger: interval[0:02:00], next run at: 2022-11-10 17:51:46 EST)" executed successfully
2022-11-10 17:49:30 [230] [INFO] Running job "status_exchange_prices (trigger: interval[0:02:00], next run at: 2022-11-10 17:52:01 EST)" (scheduled at 2022-11-10 17:49:30.656799-05:00)
--
2022-11-10 17:54:11 [4301] [INFO] Running job "status_plotnfts (trigger: interval[0:02:00], next run at: 2022-11-10 17:56:23 EST)" (scheduled at 2022-11-10 17:54:11.855576-05:00)
2022-11-10 17:54:13 [4322] [ERROR] Exception on /plotnfts/ [POST]
Traceback (most recent call last):
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/app.py", line 2073, in wsgi_app
    response = self.full_dispatch_request()
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/app.py", line 1518, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/app.py", line 1502, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/views.py", line 84, in view
    return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask/views.py", line 158, in dispatch_request
    return current_app.ensure_sync(meth)(*args, **kwargs)
  File "/chia-blockchain/venv/lib/python3.10/site-packages/webargs/core.py", line 594, in wrapper
    return func(*args, **kwargs)
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask_smorest/arguments.py", line 82, in wrapper
    return func(*f_args, **f_kwargs)
  File "/chia-blockchain/venv/lib/python3.10/site-packages/flask_smorest/response.py", line 90, in wrapper
    func(*args, **kwargs)
  File "/machinaris/api/views/plotnfts/resources.py", line 49, in post
    'created_at': item.created_at.strftime("%Y-%m-%d %H:%M:%S"),
AttributeError: 'NoneType' object has no attribute 'strftime'
2022-11-10 17:54:13 [4322] [INFO] 127.0.0.1 - - [10/Nov/2022:17:54:13 -0500] "POST /plotnfts/ HTTP/1.1" 500 46 "-" "python-requests/2.28.1"
2022-11-10 17:54:13 [4301] [INFO] Job "status_plotnfts (trigger: interval[0:02:00], next run at: 2022-11-10 17:56:23 EST)" executed successfully
2022-11-10 17:54:13 [4301] [INFO] Running job "status_blocks (trigger: interval[0:02:00], next run at: 2022-11-10 17:56:58 EST)" (scheduled at 2022-11-10 17:54:13.453384-05:00)
2022-11-10 17:54:13 [4301] [INFO] Job "status_blocks (trigger: interval[0:02:00], next run at: 2022-11-10 17:56:58 EST)" executed successfully
2022-11-10 17:54:15 [4301] [INFO] Running job "status_pools (trigger: interval[0:02:00], next run at: 2022-11-10 17:56:40 EST)" (scheduled at 2022-11-10 17:54:15.899103-05:00)
2022-11-10 17:54:15 [4322] [INFO] 127.0.0.1 - - [10/Nov/2022:17:54:15 -0500] "POST /pools/ HTTP/1.1" 201 2536 "-" "python-requests/2.28.1"
2022-11-10 17:54:15 [4301] [INFO] Job "status_pools (trigger: interval[0:02:00], next run at: 2022-11-10 17:56:40 EST)" executed successfully
root@Full-Node-Chia:/machinaris# send: b'POST /plotnfts/ HTTP/1.1\r\nHost: localhost:8927\r\nUser-Agent: python-requests/2.28.1\r\nAccept-Encoding: gzip, deflate\r\nAccept: application/json\r\nConnection: keep-alive\r\nContent-type: application/json\r\nContent-Length: 1810\r\n\r\n'
send: b'[{"unique_id": "192.168.1.98_chia_b7ad65620afc484dff385ee4a2bc461209581d0f3a3c9aea6cee77e86b3d2a28", "hostname": "192.168.1.98", "blockchain": "chia", "launcher": "b7ad65620afc484dff385ee4a2bc461209581d0f3a3c9aea6cee77e86b3d2a28", "wallet_num": 3, "header": "Wallet height: 2806738\\nSync status: Synced\\n", "details": "Wallet id 3: \\nCurrent state: SELF_POOLING\\nCurrent state from block height: 2741439\\nLauncher ID: b7ad65620afc484dff385ee4a2bc461209581d0f3a3c9aea6cee77e86b3d2a28\\nTarget address (not for plotting): xch1crc3fj2ueaeveccjl67qqk7384xh364dyeqz8zukwfhfjxxw4uzqh9a709\\nNumber of plots: 240\\nOwner public key: b1bd87b4b18ef271615a2318b4c43a7f2719fbc9826763b9a2452b73af3ea043d25b8ccdc0c7620f8bb6430a67cc42e9\\nPool contract address (use ONLY for plotting - do not send money to this address): xch1ekslymyyfrrv50nptterxuxgmwvw0vc8xz848sf3gzfhse7e8thqmjlqj4\\nClaimable balance: 0.0 xch (0 mojo)"}, {"unique_id": "192.168.1.98_chia_ddda3d0b7bec54893bde5e0c62aa60a14ae92a42560fcdbe3a136e8ae33ab559", "hostname": "192.168.1.98", "blockchain": "chia", "launcher": "ddda3d0b7bec54893bde5e0c62aa60a14ae92a42560fcdbe3a136e8ae33ab559", "wallet_num": 4, "header": "Wallet height: 2806738\\nSync status: Synced\\n", "details": "Wallet id 4: \\nCurrent state: SELF_POOLING\\nCurrent state from block height: 2806120\\nLauncher ID: ddda3d0b7bec54893bde5e0c62aa60a14ae92a42560fcdbe3a136e8ae33ab559\\nTarget address (not for plotting): xch1c0ep6srckumfc0m95nymzyuhd8sm6qxau0eqdl6me635jq9dnqyqqll6u3\\nNumber of plots: 0\\nOwner public key: 8e6fc4732e225d02c213e090beada5545cdce202b406107552582775528c7c8a2bd37b82b5cc0d92069932b782ac1a0c\\nPool contract address (use ONLY for plotting - do not send money to this address): xch1xrl66ycexmy2ap23lq6xt84227xkf5clf3s7u0wfvgzg6vjhhc9qcxx092\\nClaimable balance: 0.0 xch (0 mojo)"}]'
reply: 'HTTP/1.1 500 INTERNAL SERVER ERROR\r\n'
header: Server: gunicorn
header: Date: Thu, 10 Nov 2022 22:56:25 GMT
header: Connection: keep-alive
header: Content-Type: application/json
header: Content-Length: 46

@guydavis
Copy link
Owner

Hi, this last log really helped a lot. Would you mind pulling the machinaris:develop image? I'd like to see if a fix I just committed helps after a container restart and about ~15 minutes to get running.

@zorner
Copy link
Author

zorner commented Nov 11, 2022

In less than 5 min I had this:

image

Wallet 4 has similar info. I guessing wallet 4 got created by me trying to run plotman in a wsl v1 Ubuntu instances.

@zorner
Copy link
Author

zorner commented Nov 11, 2022

root@Full-Node-Chia:/chia-blockchain# grep -A30 -i 'Running job "status_plotnft' /root/.chia/machinaris/logs/apisrv.log | tail -n 40
2022-11-10 21:48:00 [230] [INFO] Running job "status_blocks (trigger: interval[0:02:00], next run at: 2022-11-10 21:50:17 EST)" (scheduled at 2022-11-10 21:48:00.275636-05:00)
2022-11-10 21:48:00 [230] [INFO] Job "status_blocks (trigger: interval[0:02:00], next run at: 2022-11-10 21:50:17 EST)" executed successfully
2022-11-10 21:48:04 [230] [INFO] Running job "status_wallets (trigger: interval[0:02:00], next run at: 2022-11-10 21:50:28 EST)" (scheduled at 2022-11-10 21:48:04.854279-05:00)
2022-11-10 21:48:06 [230] [INFO] Running job "status_challenges (trigger: interval[0:02:00], next run at: 2022-11-10 21:50:16 EST)" (scheduled at 2022-11-10 21:48:06.110239-05:00)
2022-11-10 21:48:06 [263] [INFO] 127.0.0.1 - - [10/Nov/2022:21:48:06 -0500] "POST /challenges/ HTTP/1.1" 201 3614 "-" "python-requests/2.28.1"
2022-11-10 21:48:06 [230] [INFO] Job "status_challenges (trigger: interval[0:02:00], next run at: 2022-11-10 21:50:16 EST)" executed successfully
2022-11-10 21:48:06 [263] [INFO] Returning chia cold wallet balance of 0.0
2022-11-10 21:48:06 [263] [INFO] 127.0.0.1 - - [10/Nov/2022:21:48:06 -0500] "POST /wallets/ HTTP/1.1" 201 1622 "-" "python-requests/2.28.1"
--
2022-11-10 21:50:09 [230] [INFO] Running job "status_plotnfts (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:44 EST)" (scheduled at 2022-11-10 21:50:09.209800-05:00)
2022-11-10 21:50:10 [263] [INFO] 127.0.0.1 - - [10/Nov/2022:21:50:10 -0500] "POST /plotnfts/ HTTP/1.1" 201 1952 "-" "python-requests/2.28.1"
2022-11-10 21:50:10 [230] [INFO] Job "status_plotnfts (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:44 EST)" executed successfully
2022-11-10 21:50:13 [230] [INFO] Running job "status_exchange_prices (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:13 EST)" (scheduled at 2022-11-10 21:50:13.706780-05:00)
2022-11-10 21:50:13 [230] [INFO] Job "status_exchange_prices (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:13 EST)" executed successfully
2022-11-10 21:50:16 [230] [INFO] Running job "status_challenges (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:22 EST)" (scheduled at 2022-11-10 21:50:16.787672-05:00)
2022-11-10 21:50:16 [230] [INFO] Job "status_challenges (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:22 EST)" executed successfully
2022-11-10 21:50:16 [263] [INFO] 127.0.0.1 - - [10/Nov/2022:21:50:16 -0500] "POST /challenges/ HTTP/1.1" 201 3614 "-" "python-requests/2.28.1"
2022-11-10 21:50:17 [230] [INFO] Running job "status_blocks (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:17 EST)" (scheduled at 2022-11-10 21:50:17.199850-05:00)
2022-11-10 21:50:17 [230] [INFO] Job "status_blocks (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:17 EST)" executed successfully
2022-11-10 21:50:28 [230] [INFO] Running job "status_wallets (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:33 EST)" (scheduled at 2022-11-10 21:50:28.912962-05:00)
2022-11-10 21:50:30 [263] [INFO] Returning chia cold wallet balance of 0.0
2022-11-10 21:50:30 [263] [INFO] 127.0.0.1 - - [10/Nov/2022:21:50:30 -0500] "POST /wallets/ HTTP/1.1" 201 1622 "-" "python-requests/2.28.1"
2022-11-10 21:50:30 [230] [INFO] Job "status_wallets (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:33 EST)" executed successfully
2022-11-10 21:50:35 [230] [INFO] Running job "status_blockchain_networks (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:19 EST)" (scheduled at 2022-11-10 21:50:35.437519-05:00)
2022-11-10 21:50:35 [230] [INFO] Job "status_blockchain_networks (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:19 EST)" executed successfully
2022-11-10 21:50:35 [230] [INFO] Running job "plot_checks (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:54 EST)" (scheduled at 2022-11-10 21:50:35.943177-05:00)
2022-11-10 21:50:35 [230] [INFO] Job "plot_checks (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:54 EST)" executed successfully
2022-11-10 21:50:42 [230] [INFO] Running job "status_partials (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:15 EST)" (scheduled at 2022-11-10 21:50:42.765979-05:00)
2022-11-10 21:50:42 [263] [INFO] 127.0.0.1 - - [10/Nov/2022:21:50:42 -0500] "POST /partials/ HTTP/1.1" 400 65 "-" "python-requests/2.28.1"
2022-11-10 21:50:42 [230] [INFO] Job "status_partials (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:15 EST)" executed successfully
2022-11-10 21:50:44 [230] [INFO] Running job "status_pools (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:32 EST)" (scheduled at 2022-11-10 21:50:44.552602-05:00)
2022-11-10 21:50:44 [263] [INFO] 127.0.0.1 - - [10/Nov/2022:21:50:44 -0500] "POST /pools/ HTTP/1.1" 201 2536 "-" "python-requests/2.28.1"
2022-11-10 21:50:44 [230] [INFO] Job "status_pools (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:32 EST)" executed successfully
2022-11-10 21:50:45 [230] [INFO] Running job "status_controller (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:42 EST)" (scheduled at 2022-11-10 21:50:45.824821-05:00)
2022-11-10 21:50:45 [263] [INFO] 172.18.0.1 - - [10/Nov/2022:21:50:45 -0500] "GET /ping/ HTTP/1.1" 200 6 "-" "python-requests/2.28.1"
2022-11-10 21:50:45 [230] [INFO] Job "status_controller (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:42 EST)" executed successfully
2022-11-10 21:50:47 [230] [INFO] Running job "status_blockchains (trigger: interval[0:02:00], next run at: 2022-11-10 21:53:30 EST)" (scheduled at 2022-11-10 21:50:47.805484-05:00)
2022-11-10 21:50:48 [230] [INFO] Running job "plottings (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:50 EST)" (scheduled at 2022-11-10 21:50:48.414187-05:00)
2022-11-10 21:50:48 [230] [INFO] Failed to load and send plotting jobs because Plotter not yet built at /usr/bin/chia_plot. Please allow 15 minutes for startup.
2022-11-10 21:50:48 [230] [INFO] Job "plottings (trigger: interval[0:02:00], next run at: 2022-11-10 21:52:50 EST)" executed successfully

@guydavis
Copy link
Owner

Great, glad we were able to sort out this issue.

@guydavis guydavis added the pending-release Available in development, but not yet in stable release. label Nov 13, 2022
@guydavis guydavis removed the question Further information is requested label Nov 28, 2022
@guydavis
Copy link
Owner

guydavis commented Jan 5, 2023

Now available in version of 0.8.6 of Machinaris. Thanks!

@guydavis guydavis closed this as completed Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pending-release Available in development, but not yet in stable release.
Projects
None yet
Development

No branches or pull requests

2 participants