项目作者: dakk

项目描述 :
Tezos烘焙再分配软件
高级语言: Python
项目地址: git://github.com/dakk/tezpool.git
创建时间: 2017-08-16T06:38:39Z
项目社区:https://github.com/dakk/tezpool

开源协议:MIT License

下载


TezPool

TezPool is an opensource redistribution software for tezos baking pools.

[!CAUTION]
This software does not work, since Tzpro API are not functional anymore.

Configuration

The software is configured by modifying the config.json file.

  • host: the host of your node; if you run the pool in the same server of the node, leave “http://127.0.0.1:8732
  • pkh: publickeyhash of the delegate
  • name: name of your pool
  • percentage: % of tezos to distribute
  • payto: could be “contract” if you want to pay rewards to KT addresses, or “manager” if you want to pay reward to tz addresses
  • deleguees: a dictionary with “address”: “alias”
  • private: true if you want to split the reward only between addresses defined in deleguees
  • startcycle: the cycle when your delegate started to be a baker
  • payout: a json object containing payment configuration

payout configuration

We will implement many method for payout; the only implemented at the moment, called ‘tezos-client’, generates bash strings for sending
transactions manually.

  • method: payment method (only tezosclient supported atm)
  • minpayout: the minimum amount to pay

Install

  1. git clone https://github.com/dakk/tezpool
  2. cd tezpool
  3. apt-get install python3-pip
  4. pip3 install requests

Remove my private pool data and logs:

  1. rm -r ./paylog.json ./docs/paylog.json ./docs/data.json

Usage

  1. usage: tezpool.py [-h] [-c config.json] [-cc cycle] action
  2. Tezos delegate redistribution script
  3. positional arguments:
  4. action action to perform (updatedocs, updatependings, paypendings)
  5. optional arguments:
  6. -h, --help show this help message and exit
  7. -c config.json, --config config.json
  8. set a config file (default: config.json)

Cycle snapshots and data update

Update the docs; this command will update the frontend with future cycles and reward estimation:

  1. python3 tezpool.py updatedocs

Update pending reward

Update the frozen / pending reward for deleguees; it will edit/generate a file called paylog.json
and data/paylog.json which contains pool payment data:

  1. python3 tezpool.py updatependings

Pay rewards

Pay pending reward (unfrozen rewards); it will edit paylog.json and data/paylog.json subtracting pending
reward and sending transactions to delegators. The behaviour of the commands depends on the payout method
specified in the config.json file: at the moment only the tezos-client method is available.

  1. python3 tezpool.py paypendings

tezos-client method

After updating paylog.json, it generates a file called payouts.sh; it contains tezos-client command
to pay for each deleguees reward.

Update

For every new cycle you have to run both updatedocs and updatependings, and upload the new frontend data.

Frontend

The docs/ folder contains a tiny frontend for the pool statistics; you have to run the updatedocs action in order to keep the frontend updated.

Terms

  • Estimated reward: reward value estimated for a future cycle
  • Frozen reward: reward of blocks already baked / endorsed, but still frozen for 5 cycles (PRESERVED_CYCLES)
  • Pending reward: reward value unfrozen, but pending redistribution among deleguees
  • Paid reward: reward value unfrozen and redistributed among deleguees

Donate

This software is free and opensource, but donations are always appreciated;
these are my donation addresses:

  • Tezos: tz1THsLcunLo8CmDm9f2y1xHuXttXZCpyFnq
  • Bitcoin: 13TRVwiqLMveg9aPAmZgcAix5ogKVgpe4T
  • Ethereum: 0x18F081247ad32af38404D071eb8c246CC4F33534

License

Copyright 2018-2020 Davide Gessa

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.