Giter Club home page Giter Club logo

pool-reference's Introduction

Pool Reference V1

This code is provided under the Apache 2.0 license. Note: the draft specification is in the SPECIFICATION.md file.

Summary

This repository provides a sample server written in python, which is meant to serve as a basis for a Chia Pool. While this is a fully functional implementation, it requires some work in scalability and security to run in production. An FAQ is provided here: https://github.com/Chia-Network/chia-blockchain/wiki/Pooling-FAQ

Customizing

Several things are customizable in this pool reference. This includes:

  • How long the timeout is for leaving the pool
  • How difficulty adjustment happens
  • Fees to take, and how much to pay in blockchain fees
  • How farmers' points are counted when paying (PPS, PPLNS, etc)
  • How farmers receive payouts (XCH, BTC, ETH, etc), and how often
  • What store (DB) is used - by default it's an SQLite db. Users can use their own store implementations, based on AbstractPoolStore, by supplying them to pool_server.start_pool_server
  • What happens (in terms of response) after a successful login

However, some things cannot be changed. These are described in SPECIFICATION.md, and mostly relate to validation, protocol, and the singleton format for smart coins.

Pool Protocol Benefits

The Chia pool protocol has been designed for security, and decentralization, not relying on any 3rd party, closed code, or trusted behaviour.

  • The farmer can never steal from the pool by double farming
  • The farmer does not need collateral to join a pool, they only need a few cents to create a singleton
  • The farmer can easily and securely change pools if they want to
  • The farmer can run a full node (increasing decentralization)
  • The farmer can log into another computer with only the 24 words, and the pooling configuration is detected, without requiring a central server

Pool Protocol Summary

When not pooling, farmers receive signage points from full nodes every 9 seconds, and send these signage points to the harvester. Each signage point is sent along with the sub_slot_iters and difficulty, two network-wide parameters which are adjusted every day (4608 blocks). The sub_slot_iters is the number of VDF iterations performed in 10 minutes for the fastest VDF in the network. This increases if the fastest timelord's speed increases. The difficulty is similarly affected by timelord speed (it goes up when timelord speed increases, since blocks come faster), but it's also affected by the total amount of space in the network. These two parameters determine how difficult it is to "win" a block and find a proof.

Since only about 1 farmer worldwide finds a proof every 18.75 seconds, this means the chances of finding one are extremely small, with the default difficulty and sub_slot_iters. For pooling, what we do is we increase the sub_slot_iters to a constant, but very high number: 37600000000, and then we decrease the difficulty to an artificially lower one, so that proofs can be found more frequently.

The farmer communicates with one or several pools through an HTTPS protocol, and sets their own local difficulty for each pool. Then, when sending signage points to the harvester, the pool difficulty and sub_slot_iters are used. This means that the farmer can find proofs very often, perhaps every 10 minutes, even for small farmers. These proofs, however, are not sent to the full node to create a block. They are instead only sent to the pool. This means that the other full nodes in the network do not have to see and validate everyone else's proofs, and the network can scale to millions of farmers with no issue, as long as the pool scales properly. Since many farmers are part of the pool, only 1 farmer needs to win a block, for the entire pool to be rewarded proportionally to their space.

The pool then keeps track of how many proofs (partials) each farmer sends, weighing them by difficulty. Occasionally (for example every 3 days), the pool can perform a payout to farmers based on how many partials they submitted. Farmers with more space, and thus more points, will get linearly more rewards.

Instead of farmers using a pool_public_key when plotting, they now use a puzzle hash, referred to as the p2_singleton_puzzle_hash, also known as the pool_contract_address. These values go into the plot itself, and cannot be changed after creating the plot, since they are hashed into the plot_id. The pool contract address is the address of a chialisp contract called a singleton. The farmer must first create a singleton on the blockchain, which stores the pool information of the pool that that singleton is assigned to. When making a plot, the address of that singleton is used, and therefore that plot is tied to that singleton forever. When a block is found by the farmer, the pool portion of the block rewards (7/8, or 1.75XCH) go into the singleton, and when claimed, go directly to the pool's target address.

The farmer can also configure their payout instructions, so that the pool knows where to send the occasional rewards to.

Receiving partials

A partial is a proof of space with some additional metadata and authentication info from the farmer, which meets certain minimum difficulty requirements. Partials must be real proofs of space responding to blockchain signage points, and they must be submitted within the blockchain time window (28 seconds after the signage point).

The pool server works by receiving partials from the users, validating that they are correct and correspond to a valid signage point on the blockchain, and then adding them to a queue. A few minutes later, the pool pulls from the queue, and checks that the signage point for that partial is still in the blockchain. If everything is good, the partial is counted as valid, and the points are added for that farmer.

Collecting pool rewards

Pool absorbing rewards image

The pool periodically searches the blockchain for new pool rewards (1.75 XCH) that go to the various p2_singleton_puzzle_hashes of each of the farmers. These coins are locked, and can only be spent if they are spent along with the singleton that they correspond to. The singleton is also locked to a target_puzzle_hash, which in this diagram is the red pool address. Anyone can spend the singleton and the p2_singleton_puzzle_hash coin, as long as it's a block reward, and all the conditions are met. Some of these conditions require that the singleton always create exactly 1 new child singleton with the same launcher id, and that the coinbase funds are sent to the target_puzzle_hash.

Calculating farmer rewards

Periodically (for example once a day), the pool executes the code in create_payment_loop. This first sums up all the confirmed funds in the pool that have a certain number of confirmations.

Then, the pool divides the total amount by the points of all pool members, to obtain the mojo_per_point (minus the pool fee and the blockchain fee). A new coin gets created for each pool member (and for the pool), and the payments are added to the pending_payments list. Note that since blocks have a maximum size, we have to limit the size of each transaction. There is a configurable parameter: max_additions_per_transaction. After adding the payments to the pending list, the pool members' points are all reset to zero. This logic can be customized.

1/8 vs 7/8

Note that the coinbase rewards in Chia are divided into two coins: the farmer coin and the pool coin. The farmer coin (1/8) only goes to the puzzle hash signed by the farmer private key, while the pool coin (7/8) goes to the pool. The user transaction fees on the blockchain are included in the farmer coin as well. This split of 7/8 1/8 exists to prevent attacks where one pool tries to destroy another by farming partials, but never submitting winning blocks.

Difficulty

The difficulty allows the pool operator to control how many partials per day they are receiving from each farmer. The difficulty can be adjusted separately for each farmer. A reasonable target would be 300 partials per day, to ensure frequent feedback to the farmer, and low variability. A difficulty of 1 results in approximately 10 partials per day per k32 plot. This is the minimum difficulty that the V1 of the protocol supports is 1. However, a pool may set a higher minimum difficulty for efficiency. When calculating whether a proof is high quality enough for being awarded points, the pool should use sub_slot_iters=37600000000. If the farmer submits a proof that is not good enough for the current difficulty, the pool should respond by setting the current_difficulty in the response.

Points

X points are awarded for submitting a partial with difficulty X, which means that points scale linearly with difficulty. For example, 100 TiB of space should yield approximately 10,000 points per day, whether the difficulty is set to 100 or 200. It should not matter what difficulty is set for a farmer, as long as they are consistently submitting partials. The specification does not require pools to pay out proportionally by points, but the payout scheme should be clear to farmers, and points should be acknowledged and accumulated points returned in the response.

Difficulty adjustment algorithm

This is a simple difficulty adjustment algorithm executed by the pool. The pool can also improve this or change it however they wish. The farmer can provide their own suggested_difficulty, and the pool can decide whether or not to update that farmer's difficulty. Be careful to only accept the latest authentication_public_key when setting difficulty or pool payout info. The initial reference client and pool do not use the suggested_difficulty.

  • Obtain the last successful partial for this launcher id
  • If > 3 hours, divide difficulty by 5
  • If > 45 minutes < 6 hours, divide difficulty by 1.5
  • If < 45 minutes:
    • If have < 300 partials at this difficulty, maintain same difficulty
    • Else, multiply the difficulty by (24 * 3600 / (time taken for 300 partials))

The 6 hours is used to handle rare cases where a farmer's storage drops dramatically. The 45 minutes is similar, but for less extreme cases. Finally, the last case of < 45 minutes should properly handle users with increasing space, or slightly decreasing space. This targets 300 partials per day, but different numbers can be used based on performance and user preference.

Making payments

Note that the payout info is provided with each partial. The user can choose where rewards are paid out to, and this does not have to be an XCH address. The pool should ONLY update the payout info for successful partials with the latest seen authentication key for that launcher_id.

Install and run (Testnet)

To run a pool, you must use this along with the main branch of chia-blockchain.

  1. Checkout the main branch of chia-blockchain, and install it. Checkout this repo in another directory next to (not inside) chia-blockchain.
    If you want to connect to testnet, use export CHIA_ROOT=~/.chia/testnet9, or whichever testnet you want to join, and run chia configure -t true. You can also directly use the pools.testnet9 branch, although this branch will be removed in the future (or past).

  2. Create three keys, one which will be used for the block rewards from the blockchain, one to receive the pool fee that is kept by the pool, and the third to be a wallet that acts as a test user.

  3. Change the wallet_fingerprint and wallet_id in the config.yaml config file, using the information from the first key you created in step 2. These can be obtained by doing chia wallet show.

  4. Do chia keys show and get the first address for each of the keys created in step 2. Put these into the config.yaml config file in default_target_address and pool_fee_address respectively.

  5. Change the pool_url in config.yaml to point to your external ip or hostname. This must match exactly with what the user enters into their UI or CLI, and must start with https://.

  6. Start the node using chia start farmer, and log in to a different key (not the two keys created for the pool). This will be referred to as the farmer's key here. Sync up your wallet on testnet for the farmer key. You can log in to a key by running chia wallet show and then choosing each wallet in turn, to make them start syncing.

  7. Create a venv (different from chia-blockchain) and start the pool server using the following commands:

cd pool-reference
python3 -m venv ./venv
source ./venv/bin/activate
pip install ../chia-blockchain/ 
sudo CHIA_ROOT="/your/home/dir/.chia/testnet9" ./venv/bin/python -m pool

You should see something like this when starting, but no errors:

INFO:root:Logging in: {'fingerprint': 2164248527, 'success': True}
INFO:root:Obtaining balance: {'confirmed_wallet_balance': 0, 'max_send_amount': 0, 'pending_change': 0, 'pending_coin_removal_count': 0, 'spendable_balance': 0, 'unconfirmed_wallet_balance': 0, 'unspent_coin_count': 0, 'wallet_id': 1}
  1. Create a pool nft (on the farmer key) by doing chia plotnft create -s pool -u https://127.0.0.1:80, or whatever host:port you want to use for your pool. Approve it and wait for transaction confirmation. This url must match exactly with what the pool uses.

  2. Do chia plotnft show to ensure that your plotnft is created. Now start making some plots for this pool nft. You can make plots by specifying the -c argument in chia plots create. Make sure to not use the -p argument. The value you should use for -c is the P2 singleton address from chia plotnft show output. You can start with small k25 plots and see if partials are submitted from the farmer to the pool server. The output will be the following in the pool if everything is working:

INFO:root:Returning {'new_difficulty': 1963211364}, time: 0.017535686492919922 singleton: 0x1f8dab79a614a82f9834c8f395f5fe195ae020807169b71a10218b9788a7a573

Please send a message to @sorgente711 on keybase if you have questions about the 9 steps explained above. All other questions should be sent to the #pools channel in keybase.

pool-reference's People

Contributors

aqk avatar chiaautomation avatar chiaminejp avatar chuwt avatar cmmarslender avatar darkverbito avatar dependabot[bot] avatar efishcent avatar gdnx-dev avatar jack60612 avatar jianghushinian avatar lemur73 avatar loppefaaret avatar mariano54 avatar mpnowacki-reef avatar nirajpathak13 avatar odarriba avatar omahs avatar pchacker avatar ppolewicz avatar seeden avatar shamaevnn avatar spacefarmers avatar titusz avatar wallentx avatar william-gr avatar wjblanke avatar xdustinface avatar yijiasu avatar ylic2021 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pool-reference's Issues

errors after today's update

cureent version pool-reference 830b0d0 not work for me (the previous update I did the day before yesterday)

on branch Chia-Network/[email protected]

(venv) chia@pool:~/pool-reference$ python3 pool/pool_server.py
Traceback (most recent call last):
  File "pool/pool_server.py", line 21, in <module>
    from pool import Pool
  File "/home/chia/pool-reference/pool/pool.py", line 30, in <module>
    from singleton import create_absorb_transaction
  File "/home/chia/pool-reference/pool/singleton.py", line 20, in <module>
    POOL_ESCAPING_MOD = load_clvm("pool_escaping_innerpuz.clvm")
  File "/home/chia/chia-blockchain/chia/wallet/puzzles/load_clvm.py", line 37, in load_clvm
    return Program.from_bytes(bytes(load_serialized_clvm(clvm_filename, package_or_requirement=__name__)))
  File "/home/chia/chia-blockchain/chia/wallet/puzzles/load_clvm.py", line 31, in load_serialized_clvm
    clvm_hex = pkg_resources.resource_string(package_or_requirement, hex_filename).decode("utf8")
  File "/home/chia/chia-blockchain/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1142, in resource_string
    return get_provider(package_or_requirement).get_resource_string(
  File "/home/chia/chia-blockchain/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1388, in get_resource_string
    return self._get(self._fn(self.module_path, resource_name))
  File "/home/chia/chia-blockchain/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1611, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/home/chia/chia-blockchain/chia/wallet/puzzles/pool_escaping_innerpuz.clvm.hex'

ok, pool_escaping_innerpuz.clvm.hex found in branch ak.pools
but ...
on branch Chia-Network/[email protected]

(venv) chia@pool:~/pool-reference$ python pool/pool_server.py
Traceback (most recent call last):
  File "pool/pool_server.py", line 10, in <module>
    from chia.protocols.pool_protocol import SubmitPartial, PoolInfo
ImportError: cannot import name 'SubmitPartial' from 'chia.protocols.pool_protocol' (/home/chia/chia-blockchain/venv/lib/python3.8/site-packages/chia/protocols/pool_protocol.py)

We need mining pool stratum

Current implementation isn't good.

Please refer other PoW mining stratum, there are some suggestions:

  1. Use JSON RPC, (including mining.authorize, mining.subscribe, mining.notify, mining.submit methods), BitCoin Stratum mining protocol.
  2. Make pool harvester stateless, like hpool's harvester client, only communicate with pool server.
  3. Use PPLNS payment method, we need a block unlocker to distribute block rewards among mining accounts base on their submitted shares(points), and payment system schedule those pending payouts.

If the reference pool supports such features, other pools can adapt those to their system easily which will make chia more decentralized.

Bug?

Should

escape_inner_puzzle: Program = POOL_ESCAPING_MOD.curry(
        farmer_record.pool_puzzle_hash,
        relative_lock_height,
        bytes(farmer_record.owner_public_key),
        farmer_record.p2_singleton_puzzle_hash,
    )

be

    escape_inner_puzzle: Program = POOL_ESCAPING_MOD.curry(
        farmer_record.target_puzzle_hash,
        relative_lock_height,
        bytes(farmer_record.owner_public_key),
        farmer_record.p2_singleton_puzzle_hash,
    )

?I have not seen pool_puzzle_hash in FarmerRecord

Bug in calculate farmer distribution

coin_records: List[CoinRecord] = await self.node_rpc_client.get_coin_records_by_puzzle_hash(
    self.default_target_puzzle_hash, include_spent_coins=False
)

coins_to_distribute: List[Coin] = []
    for coin_record in coin_records:
        assert not coin_record.spent
        if (
            coin_record.spent_block_index
            > self.blockchain_state["peak"].height - self.confirmation_security_threshold
        ):
            continue
        coins_to_distribute.append(coin_record.coin)
    
    if len(coins_to_distribute) == 0:
        self.log.info("No funds to distribute.")
        await asyncio.sleep(120)
        continue
    
    total_amount_claimed = sum([c.amount for c in coins_to_distribute])
    pool_coin_amount = int(total_amount_claimed * self.pool_fee)
    amount_to_distribute = total_amount_claimed - pool_coin_amount

total_amount_claimed calculated from block 0 is not correct. Must be the block of previous calculation.

Request in SPECIFICATION is not correct

        "proof_of_space": {
            "challenge": "0xe0e55d45eef8d53a6b68220abeec8f14f57baaa80dbd7b37430e42f9ac6e2c0e",
            "pool_contract_puzzle_hash": "0x9e3e9b37b54cf6c7467e277b6e4ca9ab6bdea53cdc1d79c000dc95b6a3908a3b",
            "plot_public_key": "0xa7ad70989cc8f18e555e9b698d197cdfc32465e0b99fd6cf5fdbac8aa2da04b0704ba04d2d50d852402f9dd6eec47a4d",
            "size": 32,
            "proof": "0xb2cd6374c8db249ad3b638199dbb6eb9eaefe55042cef66c43cf1e31161f4a1280455d8b53c2823c747fd4f8823c44de3a52cc85332431630857c359935660c3403ae3a92728d003dd66ef5966317cd49894d265a3e4c43f0530a1192874ed327e6f35862a25dfb67c5d0d573d078b4b8ba9bfb1cce52fd17939ae9d7033d3aa09d6c449e392ba2472a1fecf992abcc51c3bf5d56a72fef9900e79b8dba88a5afc39e04993325a0cd6b67757355b836f"
        },

plot size is 32 the proof size should be 512; and launcher_id doesn't match pool_contract_puzzle_hash?

Add License

Hi there,

Would be great if a license / license file could be added, to make it possible for people to use this as a reference.

Singleton id is spent

INFO:root:Scanning for block rewards from 150000 to 174554. Found: 4
INFO:root:Claimable amount: 7.0
INFO:root:Not claimable amount: 0.0
INFO:root:Not buried amounts: 0.0
WARNING:root:Singleton coin 4aa679c4812dbfd6d66afa5952a686565bdf0aece596530c3c4acf9d6246877b is spent, will not claim rewards

Create payment loop will run again before payment is confirmed

My suspicion here is that create payment loop will schedule the payment, submit payment loop will run, but before the payment is confirmed (still in mempool), create payment loop will run again and create another payment using the amount that is still in the wallet.

[2021-06-09 18:14:54,074] (INFO) pool.create_payment_loop():355 - Total amount claimed: 1.75
[2021-06-09 18:14:54,075] (INFO) pool.create_payment_loop():356 - Pool coin amount (includes blockchain fee) 0.0175
[2021-06-09 18:14:54,075] (INFO) pool.create_payment_loop():357 - Total amount to distribute: 1.7325
[2021-06-09 18:14:54,076] (INFO) pool.create_payment_loop():368 - Paying out 69289 mojo / point
[2021-06-09 18:14:54,076] (INFO) pool.create_payment_loop():382 - Will make payments: [{'puzzle_hash': <bytes32: 35b57f5de0f81875b4a452861a4253d6d565dab4e463f0e199cbe9397f390ce9>, 'amount': 17500000000}, {'puzzle_hash': <bytes32: 9c6d0d3ca55da68f8df18daa0bea5acb42ce03b636df84fdd108000434c269ef>, 'amount': 1732466333587}, {'puzzle_hash': <bytes32: cfcf146d57d98a8599581ae2b0cccaa9d8bf412de97ea3dd9c8f298ac7dd5342>, 'amount': 13164910}]
[2021-06-09 18:14:54,078] (INFO) pool.submit_payment_loop():411 - Submitting a payment: [{'puzzle_hash': <bytes32: 35b57f5de0f81875b4a452861a4253d6d565dab4e463f0e199cbe9397f390ce9>, 'amount': 17500000000}, {'puzzle_hash': <bytes32: 9c6d0d3ca55da68f8df18daa0bea5acb42ce03b636df84fdd108000434c269ef>, 'amount': 1732466333587}, {'puzzle_hash': <bytes32: cfcf146d57d98a8599581ae2b0cccaa9d8bf412de97ea3dd9c8f298ac7dd5342>, 'amount': 13164910}]
...
...
...
[2021-06-09 18:15:44,409] (INFO) pool.submit_payment_loop():439 - Not confirmed. In mempool? True
[2021-06-09 18:15:54,230] (INFO) pool.create_payment_loop():330 - Starting to create payment
[2021-06-09 18:15:54,414] (INFO) pool.submit_payment_loop():436 - Waiting for transaction to obtain 6 confirmations
[2021-06-09 18:15:54,415] (INFO) pool.submit_payment_loop():439 - Not confirmed. In mempool? True
[2021-06-09 18:15:54,528] (INFO) pool.create_payment_loop():355 - Total amount claimed: 1.75
[2021-06-09 18:15:54,529] (INFO) pool.create_payment_loop():356 - Pool coin amount (includes blockchain fee) 0.0175
[2021-06-09 18:15:54,529] (INFO) pool.create_payment_loop():357 - Total amount to distribute: 1.7325
[2021-06-09 18:15:54,530] (INFO) pool.create_payment_loop():368 - Paying out 86625000000 mojo / point

If that is correct, we may need a lock instead of check for the payment queue size, since .get() will consume and allow the create payment loop to run

                if self.pending_payments.qsize() != 0:
                    self.log.warning(f"Pending payments ({self.pending_payments.qsize()}), waiting")
                    await asyncio.sleep(60)
                    continue

Chia-Network / chia-blockchain install-timelord.sh

I want to install timelord for pool-reference. I shared details on: Chia-Network/chia-blockchain#6418 . I tried to start pool reference without timelord. I got this error:
``
(venv) [root@node pool-reference]# sudo CHIA_ROOT="/root/.chia/testnet7" ./venv/bin/python pool/pool_server.py
Traceback (most recent call last):
File "pool/pool_server.py", line 10, in
from chia.protocols.pool_protocol import SubmitPartial, PoolInfo
ImportError: cannot import name 'SubmitPartial' from 'chia.protocols.pool_protocol' (/root/pool-reference/venv/lib/python3.7/site-packages/chia/protocols/pool_protocol.py)
(venv) [root@node pool-reference]# sudo CHIA_ROOT="/root/.chia/testnet7" ./venv/bin/python pool/pool_server.py
Traceback (most recent call last):
File "pool/pool_server.py", line 10, in
from chia.protocols.pool_protocol import SubmitPartial, PoolInfo
ImportError: cannot import name 'SubmitPartial' from 'chia.protocols.pool_protocol' (/root/pool-reference/venv/lib/python3.7/site-packages/chia/protocols/pool_protocol.py)
(venv) [root@node pool-reference]#

``

Error when submit partial

When submit partial got error:
ERROR:root:Error getting singleton: 'FullNodeRpcClient' object has no attribute 'get_puzzle_and_solution'

Error creating plot NFT: 'transaction'

I recive the error message every time i try to create a plotnft when connecting to the pool
Have tried localy on the pool and on a remote farmer.

Error creating plot NFT: 'transaction'

The pool guide says to use this command chia poolnft create -u 127.0.0.1:80 But it is not recognised at all. Is it not implemented?
plotnft works but then i get the first error message 'transaction'.

No module named 'aiohttp but is installed on system

Today i try start the pool server, install all requirements but.
When a try start the server a receive this error.
root@4b6de2fd419c:~# CHIA_ROOT="/root/.chia/mainnet" ./bin/python pool-reference-main/pool_server.py Traceback (most recent call last): File "pool-reference-main/pool_server.py", line 7, in <module> import aiohttp ModuleNotFoundError: No module named 'aiohttp'

Using pip to install module a receive.

root@4b6de2fd419c:~# pip install aiohttp Requirement already satisfied: aiohttp in /usr/local/lib/python3.8/dist-packages (3.7.4.post0) Requirement already satisfied: async-timeout<4.0,>=3.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp) (3.0.1) Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp) (21.2.0) Requirement already satisfied: typing-extensions>=3.6.5 in /usr/local/lib/python3.8/dist-packages (from aiohttp) (3.10.0.0) Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.8/dist-packages (from aiohttp) (5.1.0) Requirement already satisfied: chardet<5.0,>=2.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp) (4.0.0) Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.8/dist-packages (from aiohttp) (1.6.3) Requirement already satisfied: idna>=2.0 in /usr/local/lib/python3.8/dist-packages (from yarl<2.0,>=1.0->aiohttp) (3.1)

I try again using setup.

Type of fee does not match between `SPECIFICATION.md` and `pool_server.py`

Looking over both SPECIFICATION.md and pool_server.py, type of fee seems ambiguous.
Which type is the correct one, 'str'? or 'float'?

In SPECIFICATION.md

{
    "description": "(example) The Reference Pool allows you to pool with low fees, paying out daily using Chia.",
    "fee": 0.01, // <- Looks to be `float` type
    "logo_url": "https://www.chia.net/img/chia_logo.svg",
    "minimum_difficulty": 10,
    "name": "The Reference Pool",
    "protocol_version": "1.0",
    "relative_lock_height": 100,
    "target_puzzle_hash": "0x344587cf06a39db471d2cc027504e8688a0a67cce961253500c956c73603fd58"
}

In pool/pool_server.py

    async def get_pool_info(self, _) -> web.Response:
        res: PoolInfo = PoolInfo(
            "The Reference Pool",
            "https://www.chia.net/img/chia_logo.svg",
            uint64(self.pool.min_difficulty),
            uint32(self.pool.relative_lock_height),
            "1.0.0",
            str(self.pool.pool_fee), # <-- Looks `str` type
            "(example) The Reference Pool allows you to pool with low fees, paying out daily using Chia.",
            self.pool.default_target_puzzle_hash,
        )
        return obj_to_response(res)

ERROR Exception fetching pool info from

What could be wrong with this ?
This is from Client pooling on testnet >

2021-06-07T06:06:18.443 farmer chia.farmer.farmer : ERROR Exception fetching pool info from http:// pooladdressblahblah. org, Cannot connect to host http:80 ssl:default [Temporary failure in name resolution]

This is from Pool Server >

ERROR:aiohttp.server:Error handling request
Traceback (most recent call last):
File "/home/chia/pool-reference/venv/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 314, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp/_http_parser.pyx", line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'invalid HTTP method"

Harvester is working, and we are getting points in gui-pool info. But we have this error on Client and Server side from logs.

pool_escaping_innerpuz.clvm.hex not found ... when starting pool_server.py since the update of branch pools.2021-june-4

Not sure if this is a bug or the fact that i screw up de update.

Should i do a fresh install? of both? revert? (chia-blockchain & pool-reference)
If it is a bug, where can i find the instruction fill a proper bug report?
Thanks in adavance


I have followed the update process from https://github.com/Chia-Network/chia-blockchain/wiki/INSTALL#ubuntudebian on the chia-blockchain repo and then did the step #7 on the pool refrence side https://github.com/Chia-Network/pool-reference#install-and-run-testnet and when i run sudo CHIA_ROOT="/home/user/chia-pools/.chia/testnet7" ./venv/bin/python pool/pool_server.py i get :

Traceback (most recent call last):
File "pool/pool_server.py", line 21, in
from pool import Pool
File "/home/user/pool-reference/pool/pool.py", line 30, in
from singleton import create_absorb_transaction
File "/home/user/pool-reference/pool/singleton.py", line 20, in
POOL_ESCAPING_MOD = load_clvm("pool_escaping_innerpuz.clvm")
File "/home/user/pool-reference/venv/lib/python3.8/site-packages/chia/wallet/puzzles/load_clvm.py", line 37, in load_clvm
return Program.from_bytes(bytes(load_serialized_clvm(clvm_filename, package_or_requirement=name)))
File "/home/user/pool-reference/venv/lib/python3.8/site-packages/chia/wallet/puzzles/load_clvm.py", line 31, in load_serialized_clvm
clvm_hex = pkg_resources.resource_string(package_or_requirement, hex_filename).decode("utf8")
File "/home/lltuserpool-reference/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 1156, in resource_string
return get_provider(package_or_requirement).get_resource_string(
File "/home/user/pool-reference/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 1401, in get_resource_string
return self._get(self._fn(self.module_path, resource_name))
File "/home/user/pool-reference/venv/lib/python3.8/site-packages/pkg_resources/init.py", line 1616, in _get
with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/pool-reference/venv/lib/python3.8/site-packages/chia/wallet/puzzles/pool_escaping_innerpuz.clvm.hex'

Wrong message during import chia module

Hello devs,

Thanks for your hard work on chia pool. I got message once pool_server.py is executed by python3.

ImportError: cannot import name 'SubmitPartial' from 'chia.protocols.pool_protocol' (/usr/local/lib/python3.8/site-packages/chia/protocols/pool_protocol.py)

I have installed chia packet 1.1.6 from rpm and pip install.

Does anything I missed?

python3 setup.py install error

[ 95%] Built target options_test
[ 95%] Built target chiapos
[ 97%] Linking CXX executable ProofOfSpace
[ 97%] Built target ProofOfSpace
[100%] Linking CXX executable RunTests
[100%] Built target RunTests
removing '/data/clvm/clvm_env/lib/python3.6/site-packages/chiapos-0.0.0-py3.6-linux-x86_64.egg' (and everything under it)
creating /data/clvm/clvm_env/lib/python3.6/site-packages/chiapos-0.0.0-py3.6-linux-x86_64.egg
Extracting chiapos-0.0.0-py3.6-linux-x86_64.egg to /data/clvm/clvm_env/lib/python3.6/site-packages
chiapos 0.0.0 is already the active version in easy-install.pth

Installed /data/clvm/clvm_env/lib/python3.6/site-packages/chiapos-0.0.0-py3.6-linux-x86_64.egg
error: The 'chiapos==1.0.2' distribution was not found and is required by chia-blockchain

Error claiming rewards

Unexpected error in collect_pool_rewards_loop: Traceback (most recent call last):
File "data/chia/pool-reference/pool/pool.py", line 279, in collect_pool_rewards_loop
spend_bundle = await create_absorb_transaction(
File "data/chia/pool-reference/pool/singleton.py", line 135, in create_absorb_transaction
absorb_spend: List[CoinSolution] = create_absorb_spend(
File "data/chia/pool-reference/venv/lib64/python3.8/site-packages/chia/pools/pool_puzzles.py", line 215, in create_absorb_spend
assert full_puzzle.get_tree_hash() == coin.puzzle_hash
AssertionError

Run pool_server.py error.

CHIA_ROOT="/data/chia-blockchain/.chia/testnet7" ./venv/bin/python pool/pool_server.py

Error info

Traceback (most recent call last):
  File "pool/pool_server.py", line 21, in <module>
    from pool import Pool
  File "/data/pool-reference/pool/pool.py", line 30, in <module>
    from singleton import create_absorb_transaction
  File "/data/pool-reference/pool/singleton.py", line 20, in <module>
    POOL_ESCAPING_MOD = load_clvm("pool_escaping_innerpuz.clvm")
  File "/data/pool-reference/venv/lib/python3.7/site-packages/chia/wallet/puzzles/load_clvm.py", line 37, in load_clvm
    return Program.from_bytes(bytes(load_serialized_clvm(clvm_filename, package_or_requirement=__name__)))
  File "/data/pool-reference/venv/lib/python3.7/site-packages/chia/wallet/puzzles/load_clvm.py", line 31, in load_serialized_clvm
    clvm_hex = pkg_resources.resource_string(package_or_requirement, hex_filename).decode("utf8")
  File "/data/pool-reference/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1210, in resource_string
    self, resource_name
  File "/data/pool-reference/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1452, in get_resource_string
    return self._get(self._fn(self.module_path, resource_name))
  File "/data/pool-reference/venv/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1572, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/data/pool-reference/venv/lib/python3.7/site-packages/chia/wallet/puzzles/pool_escaping_innerpuz.clvm.hex'

ERROR: Can't select amount higher than our spendable balance (double spend when >1 Claimable amount)

Pool payout creates double spend when >1 Claimable amount is collected.. see log below

  1. first payout accounts for both
  2. payout tries to send the same payouts again
INFO:root:Scanning for block rewards from 1000 to 178298. Found: 2
INFO:root:Claimable amount: 3.5
INFO:root:Not claimable amount: 0.0
INFO:root:Not buried amounts: 0.0
INFO:root:Submitted transaction successfully: 096ca00bc761d4351c7404f9e443a415731387fe7550fd45f8173f27cad718a7

INFO:root:Starting to create payment
INFO:root:Total amount claimed: 3.5
INFO:root:Pool coin amount (includes blockchain fee) 0.035
INFO:root:Total amount to distribute: 3.465
INFO:root:Paying out 355 mojo / point
INFO:root:Will make payments: [{'puzzle_hash': <bytes32: 0c9e8b32539ec4559c81dd272a4a29f608cd96641a4acc0f7dd9debecd2b4905>, 'amount': 35000000000}, {'puzzle_hash': <bytes32: c50cd93bf87bc50604a8c6ba4ffc7c74f8ad123e8ae92d2f928417d769c2b17c>, 'amount': 3005670955185}, {'puzzle_hash': <bytes32: 4e5c713d2dc9daad94af550aeb6cd56c471d62f05801ee5f719f76a1a86441a2>, 'amount': 453497893880}, {'puzzle_hash': <bytes32: 537de8b8a1a78e1512862c800db1ad367a1a63f2f991946174222a2a6ddd76c0>, 'amount': 10203765}]
INFO:root:Submitting a payment: [{'puzzle_hash': <bytes32: 0c9e8b32539ec4559c81dd272a4a29f608cd96641a4acc0f7dd9debecd2b4905>, 'amount': 35000000000}, {'puzzle_hash': <bytes32: c50cd93bf87bc50604a8c6ba4ffc7c74f8ad123e8ae92d2f928417d769c2b17c>, 'amount': 3005670955185}, {'puzzle_hash': <bytes32: 4e5c713d2dc9daad94af550aeb6cd56c471d62f05801ee5f719f76a1a86441a2>, 'amount': 453497893880}, {'puzzle_hash': <bytes32: 537de8b8a1a78e1512862c800db1ad367a1a63f2f991946174222a2a6ddd76c0>, 'amount': 10203765}]
INFO:root:Transaction: {'additions': [{'amount': 3005670955185,
                'parent_coin_info': '0x849c2cd8fd0b444d9eae5c652c26bd0206414a5217fb1257410ce712539ced86',
                'puzzle_hash': '0xc50cd93bf87bc50604a8c6ba4ffc7c74f8ad123e8ae92d2f928417d769c2b17c'},
               {'amount': 453497893880,
                'parent_coin_info': '0x849c2cd8fd0b444d9eae5c652c26bd0206414a5217fb1257410ce712539ced86',
                'puzzle_hash': '0x4e5c713d2dc9daad94af550aeb6cd56c471d62f05801ee5f719f76a1a86441a2'},
               {'amount': 10203765,
                'parent_coin_info': '0x849c2cd8fd0b444d9eae5c652c26bd0206414a5217fb1257410ce712539ced86',
                'puzzle_hash': '0x537de8b8a1a78e1512862c800db1ad367a1a63f2f991946174222a2a6ddd76c0'},
               {'amount': 35000000000,
                'parent_coin_info': '0x849c2cd8fd0b444d9eae5c652c26bd0206414a5217fb1257410ce712539ced86',
                'puzzle_hash': '0x0c9e8b32539ec4559c81dd272a4a29f608cd96641a4acc0f7dd9debecd2b4905'},
               {'amount': 5820947170,
                'parent_coin_info': '0x849c2cd8fd0b444d9eae5c652c26bd0206414a5217fb1257410ce712539ced86',
                'puzzle_hash': '0x41533475e97f5a526cf85185226b008fb73fe8e4e005302f9ab6c317eef22ab5'}],
 'amount': 3494179052830,
 'confirmed': False,
 'confirmed_at_height': 0,
 'created_at_time': 1623340190,
 'fee_amount': 0,
 'name': '0x7f4df74785255d88278313647403b842f503cf27fa8a883b1ae186a0b7ee1cc0',
 'removals': [{'amount': 1750000000000,
               'parent_coin_info': '0xe0238891f563c0b04190f98aa3ca462304e9f1066d4be01c417d07a7994e8197',
               'puzzle_hash': '0x38737d10729bb92f459a2000545eb849d1694ae83e357e801f5cfbed6fd24a90'},
              {'amount': 1750000000000,
               'parent_coin_info': '0xf30448c44f979fbb5659288b7bb7ae04f7778e924be9efa063b38ff497594879',
               'puzzle_hash': '0x38737d10729bb92f459a2000545eb849d1694ae83e357e801f5cfbed6fd24a90'}],
 'sent': 0,
 'sent_to': [],
 'spend_bundle': {'aggregated_signature': '0xb2f60be5deb01f29f93ccf10bd746aaca2bc2918463dc76def4f6cb16ab788c5584bbc40d99d2d7bb6a78e6a7d35dfc6154864aa4194326eccbf0227c5d824b71e36e9f90fdc2d4b17e52541b4eec194e65d40d767e1b983b711cec9d17bdd93',
                  'coin_solutions': [{'coin': {'amount': 1750000000000,
                                               'parent_coin_info': '0xe0238891f563c0b04190f98aa3ca462304e9f1066d4be01c417d07a7994e8197',
                                               'puzzle_hash': '0x38737d10729bb92f459a2000545eb849d1694ae83e357e801f5cfbed6fd24a90'},
                                      'puzzle_reveal': '0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b08138d9333b98960600df8faf6120bc56fdd85799c907732a18f85dfdf706f2a805afbc1d46756a9b3b926a814a6efa15ff018080',
                                      'solution': '0xff80ffff01ffff33ffa0c50cd93bf87bc50604a8c6ba4ffc7c74f8ad123e8ae92d2f928417d769c2b17cff8602bbcff318b180ffff33ffa04e5c713d2dc9daad94af550aeb6cd56c471d62f05801ee5f719f76a1a86441a2ff85699694b3f880ffff33ffa0537de8b8a1a78e1512862c800db1ad367a1a63f2f991946174222a2a6ddd76c0ff84009bb27580ffff33ffa00c9e8b32539ec4559c81dd272a4a29f608cd96641a4acc0f7dd9debecd2b4905ff850826299e0080ffff33ffa041533475e97f5a526cf85185226b008fb73fe8e4e005302f9ab6c317eef22ab5ff85015af49ae280ffff3cffa059f2e6f75b3debcee364d0ec952b7254a562c9921c38cd4406d570d32a7bcb418080ff8080'},
                                     {'coin': {'amount': 1750000000000,
                                               'parent_coin_info': '0xf30448c44f979fbb5659288b7bb7ae04f7778e924be9efa063b38ff497594879',
                                               'puzzle_hash': '0x38737d10729bb92f459a2000545eb849d1694ae83e357e801f5cfbed6fd24a90'},
                                      'puzzle_reveal': '0xff02ffff01ff02ffff01ff02ffff03ff0bffff01ff02ffff03ffff09ff05ffff1dff0bffff1effff0bff0bffff02ff06ffff04ff02ffff04ff17ff8080808080808080ffff01ff02ff17ff2f80ffff01ff088080ff0180ffff01ff04ffff04ff04ffff04ff05ffff04ffff02ff06ffff04ff02ffff04ff17ff80808080ff80808080ffff02ff17ff2f808080ff0180ffff04ffff01ff32ff02ffff03ffff07ff0580ffff01ff0bffff0102ffff02ff06ffff04ff02ffff04ff09ff80808080ffff02ff06ffff04ff02ffff04ff0dff8080808080ffff01ff0bffff0101ff058080ff0180ff018080ffff04ffff01b08138d9333b98960600df8faf6120bc56fdd85799c907732a18f85dfdf706f2a805afbc1d46756a9b3b926a814a6efa15ff018080',
                                      'solution': '0xff80ffff01ffff3dffa069ece43c9c7f4f9c97a3cc5674b2d1fd5eaf51b2cafff0dd5084e2bc2def9bd28080ff8080'}]},
 'to_puzzle_hash': '0x0c9e8b32539ec4559c81dd272a4a29f608cd96641a4acc0f7dd9debecd2b4905',
 'trade_id': None,
 'type': 1,
 'wallet_id': 1}
INFO:root:Total amount claimed: 3.5
INFO:root:Pool coin amount (includes blockchain fee) 0.035
INFO:root:Total amount to distribute: 3.465
INFO:root:Paying out 1102 mojo / point
INFO:root:Will make payments: [{'puzzle_hash': <bytes32: 0c9e8b32539ec4559c81dd272a4a29f608cd96641a4acc0f7dd9debecd2b4905>, 'amount': 35000000000}, {'puzzle_hash': <bytes32: 537de8b8a1a78e1512862c800db1ad367a1a63f2f991946174222a2a6ddd76c0>, 'amount': 2436522}, {'puzzle_hash': <bytes32: 4e5c713d2dc9daad94af550aeb6cd56c471d62f05801ee5f719f76a1a86441a2>, 'amount': 351939914828}, {'puzzle_hash': <bytes32: c50cd93bf87bc50604a8c6ba4ffc7c74f8ad123e8ae92d2f928417d769c2b17c>, 'amount': 3110093326398}]
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Not confirmed. In mempool? True
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Not confirmed. In mempool? True
WARNING:root:Pending payments (1), waiting
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Not confirmed. In mempool? True
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: -1
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 0
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 2
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 2
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 2
WARNING:root:Pending payments (1), waiting
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 2
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 2
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 2
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 3
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 3
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 3
WARNING:root:Pending payments (1), waiting
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 4
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 4
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 4
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 4
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 4
WARNING:root:Pending payments (1), waiting
INFO:root:Waiting for transaction to obtain 6 confirmations
INFO:root:Confirmations: 7
INFO:root:Farmer 8e86495a1a2b33f1875d554dc59960f5f71cd537f1f00530e35d2b69ae0039588593c0cc677b651f484d752f0fb5e109 updated points to: 958094142
INFO:root:Successfully confirmed payments [{'puzzle_hash': <bytes32: 0c9e8b32539ec4559c81dd272a4a29f608cd96641a4acc0f7dd9debecd2b4905>, 'amount': 35000000000}, {'puzzle_hash': <bytes32: c50cd93bf87bc50604a8c6ba4ffc7c74f8ad123e8ae92d2f928417d769c2b17c>, 'amount': 3005670955185}, {'puzzle_hash': <bytes32: 4e5c713d2dc9daad94af550aeb6cd56c471d62f05801ee5f719f76a1a86441a2>, 'amount': 453497893880}, {'puzzle_hash': <bytes32: 537de8b8a1a78e1512862c800db1ad367a1a63f2f991946174222a2a6ddd76c0>, 'amount': 10203765}]
INFO:root:Submitting a payment: [{'puzzle_hash': <bytes32: 0c9e8b32539ec4559c81dd272a4a29f608cd96641a4acc0f7dd9debecd2b4905>, 'amount': 35000000000}, {'puzzle_hash': <bytes32: 537de8b8a1a78e1512862c800db1ad367a1a63f2f991946174222a2a6ddd76c0>, 'amount': 2436522}, {'puzzle_hash': <bytes32: 4e5c713d2dc9daad94af550aeb6cd56c471d62f05801ee5f719f76a1a86441a2>, 'amount': 351939914828}, {'puzzle_hash': <bytes32: c50cd93bf87bc50604a8c6ba4ffc7c74f8ad123e8ae92d2f928417d769c2b17c>, 'amount': 3110093326398}]
ERROR:root:Error making payment: {'error': "Can't select amount higher than our spendable balance.  Amount: 3497035677748, spendable:  682189676671", 'success': False}
INFO:root:Submitting a payment: [{'puzzle_hash': <bytes32: 0c9e8b32539ec4559c81dd272a4a29f608cd96641a4acc0f7dd9debecd2b4905>, 'amount': 35000000000}, {'puzzle_hash': <bytes32: 537de8b8a1a78e1512862c800db1ad367a1a63f2f991946174222a2a6ddd76c0>, 'amount': 2436522}, {'puzzle_hash': <bytes32: 4e5c713d2dc9daad94af550aeb6cd56c471d62f05801ee5f719f76a1a86441a2>, 'amount': 351939914828}, {'puzzle_hash': <bytes32: c50cd93bf87bc50604a8c6ba4ffc7c74f8ad123e8ae92d2f928417d769c2b17c>, 'amount': 3110093326398}]
ERROR:root:Error making payment: {'error': "Can't select amount higher than our spendable balance.  Amount: 3497035677748, spendable:  682189676671", 'success': False}

SubmitPartial function in pool_protocol

Traceback (most recent call last): File "pool_server.py", line 10, in <module> from chia.protocols.pool_protocol import SubmitPartial, PoolInfo ImportError: cannot import name 'SubmitPartial' from 'chia.protocols.pool_protocol' (/usr/local/lib/python3.8/site-packages/chia/protocols/pool_protocol.py)

SubmitPartial not found in pool_protocol
i'm using last https://github.com/Chia-Network/chia-blockchain

thanks

How to get the miner's payment address?

How to find out the miner's payment address through ad2560a7e327d01668e8f9a2091fc23696b9a0c3fa1a9aecba1ebb10fc8fe13f93f30cfba18ae8acc0536140ea1c967f ?

INFO:root:Farmer ad2560a7e327d01668e8f9a2091fc23696b9a0c3fa1a9aecba1ebb10fc8fe13f93f30cfba18ae8acc0536140ea1c967f updated points to: 220
INFO:root:Farmer ad2560a7e327d01668e8f9a2091fc23696b9a0c3fa1a9aecba1ebb10fc8fe13f93f30cfba18ae8acc0536140ea1c967f updated points to: 230
INFO:root:Farmer ad2560a7e327d01668e8f9a2091fc23696b9a0c3fa1a9aecba1ebb10fc8fe13f93f30cfba18ae8acc0536140ea1c967f updated points to: 240

[BUG] Pool can run out of available balance because of low pool fee

Having the pool fee hardcoded presents an issue where if lots of miners are participating the pool can run out of funds.

If the total transaction fees + miner rewards > block reward (this would be extreme and probably a flood case) or total transaction fees > pool fee.

Instead the fee should be a multi part calculation.

The pool takes a flat fee (or percentage of reward) and then the total cost for transaction fees is calculated by the number of transactions required, then the remaining balance is what is divided up into the transaction amounts. Well or something along those lines anyway...

Please add farmer machine id in submit partial request

Something like this request.headers["X-Chia-Worker-Name"] = "rig1", so pool side can track each farmer's machine's points.

@DataClass(frozen=True)
@streamable
class SubmitPartial(Streamable):
payload: PartialPayload
rewards_and_partial_aggregate_signature: G2Element # Signature of rewards by singleton key, and partial by plot key
machine_id: Optional[str]

is better, contains a machine_id in the partial payload can help pool side track each machine's data, it's useful for anonymous pool to show farmer's machines, vardiff target to launcher_id or launcher_id+machine_id depends on each pool's implementation.

I have a problem

FileNotFoundError: [Errno 2] No such file or directory: '/root/chia-blockchain/venv/lib/python3.7/site-packages/chia/wallet/puzzles/p2_singleton.clvm.hex'

Can't select amount higher than our spendable balance

How to solve this error?

INFO:root:Submitting a payment: [{'puzzle_hash': <bytes32: 1b25b30ce5c5cc0a9c7329a44fdd2332bd9a850c8baf276c5de74613c5a05935>, 'amount': 10000000000}, {'puzzle_hash': <bytes32: 681ffb60270df72fbe7f068cad2452b8e52013a22afb483712785585e06a9ffe>, 'amount': 990000000000.0001}]
ERROR:root:Error making payment: {'error': "Can't select amount higher than our spendable balance.  Amount: 1000020000000, spendable:  1000000000000", 'success': False}

problem after reboot, SSL Verification

Hello

I followed all steps and installed the chia blockchain pools.2021-may-25 and then the pool-reference.
I got the pool to run and everything looked like it worked well.
However i rebooted the computer and when i tried to start the pool again i get a SSL verification problem, and i have tried to reinstall on a new virtual machine just to make sure i did not mess anything up and it is the same thing after reboot.

I have not made any changes to any files exept the steps on how to start.

aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host localhost:85
55 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verif
y failed: certificate signature failure (_ssl.c:1123)')]

Maby someone here have an idea on how i messed up?

SubmitPartial, PoolInfo not found

Traceback (most recent call last):
File "pool_server.py", line 10, in
from chia.protocols.pool_protocol import SubmitPartial, PoolInfo
ImportError: cannot import name 'SubmitPartial' from 'chia.protocols.pool_protocol'

image

get_wallet_balance(self.wallet_id) results in Unknown Error

Hey there 👋
I have a wallet and full node running but upon starting the server I get the following:

INFO:root:Logging in: {'error': 'Unknown Error', 'success': False}
Traceback (most recent call last):
  File "/code/pool_server.py", line 153, in <module>
    asyncio.run(start_pool_server())
  File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/code/pool_server.py", line 128, in start_pool_server
    await server.start()
  File "/code/pool_server.py", line 31, in start
    await self.pool.start()
  File "/code/pool.py", line 170, in start
    res = await self.wallet_rpc_client.get_wallet_balance(self.wallet_id)
  File "/usr/local/lib/python3.8/dist-packages/chia/rpc/wallet_rpc_client.py", line 92, in get_wallet_balance
    return (await self.fetch("get_wallet_balance", {"wallet_id": wallet_id}))["wallet_balance"]
  File "/usr/local/lib/python3.8/dist-packages/chia/rpc/rpc_client.py", line 45, in fetch
    raise ValueError(res_json)
ValueError: {'error': '', 'success': False}

I have verified that I can communicate with the wallet via RPC so I am not sure what is going on here.
Are there any additional steps I am missing? Please advise.

I should note that I am pointing to the pooling branch here as opposed to master (when installing Chia).

Thank you!

How to test

  1. how do maintainers test the functions? is there any reference or unit test available?
  2. with regard of issue #1 some SubmitPartial and PoolInfo are not available. do you run based on a custom branch of chia-blockchain?

Small issues i notice a few times now

It doesn't really seems to affect anything but while you are doing a chia wallet show on the farmers side,
ERROR:root:Unexpected error in get_peak_loop: {'error': '', 'success': False} is thrown in the pool-server output.
And it seems to recover by itself.

Is this the right place to report small incident like this? If not please advise.
Regards.

Screenshot from 2021-06-05 15-11-17

Using the pools.2021-june-4 branch on ubuntu 20.04, and did the following to resolve my previus issue at #44

FileNotFoundError: [Errno 2] No such file or directory: '/home/llt/pool-reference/venv/lib/python3.8/site-packages/chia/wallet/puzzles/pool_escaping_innerpuz.clvm.hex'

cd venv/lib/python3.8/site-packages/chia/wallet/puzzles/
wget https://raw.githubusercontent.com/Chia-Network/chia-blockchain/d72452c5c7c468df24a093d24617cf1e57dedf3e/chia/wallet/puzzles/pool_escaping_innerpuz.clvm
cd ~/pool-reference
sudo CHIA_ROOT="/home/llt/.chia/testnet7" ./venv/bin/python pool/pool_server.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.