guydavis/machinaris

Defualt to using Self Pool pool_contract_address

zorner opened this issue · 15 comments

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.

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.

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

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?

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)

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!

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

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

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.

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

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.

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.

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

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

Now available in version of 0.8.6 of Machinaris. Thanks!