Mining-Pools

如何使用 pushpool 和 VARDIFF 設置層?(萊特幣)

  • October 20, 2016

我正在嘗試建立一個支持層協議和 VARDIFF(可變難度)的萊特幣挖礦池。

我在以下問題上閱讀了 cdecker 的答案How to setup pushpool。這很有幫助。我設法設置了 pushpool 並且一切都執行得很好(至少我可以看到 CGminer 連接並做某事)。

我只是堅持設置 startum 和 VARDIFF。我正在搜尋板,但找不到與我的問題相關的任何內容。我在 bitcointalk 上閱讀的唯一方法是使用"rpc.target.bits" : 18而不是"rpc.target.rewrite" : trueinserver.json來調整難度,但沒有成功 :( 對於 VARDIFF,我根本找不到任何東西。

任何幫助將不勝感激!

我回來為您發布所有資訊。

通過與 Stratum-mining 合作的最後幾個月,我得出了一些結論:你需要很好地了解 python 才能讓它在比特幣以外的任何東西上工作……話雖如此,它可以在目前的自定義 pushpool 安裝上安裝 Stratum通過我發布並正在研究的一個項目。(目前它適用於 freicoin,但您可以進行兩個微不足道的更改來讓我的實現在 litecoin 上執行)。還有另一個你可以使用的分層探勘實現,它最後一次更新是在 2013 年 6 月 6 日(如果你從頭開始安裝或目前使用 MMCFE,我建議使用這個而不是我的程式碼。我的程式碼版本被設計為對版本 2 的 getblocktemplate 更友好,因為萊特幣目前只支持 getblocktemplate 版本 1)。

將來區分這兩種實現可能非常有用,因為它們具有不同的數據庫模式……

同時,這裡是如何安裝stratum-mining-litecoion一個新系統或一個帶有MMCFE的系統

步驟 1) 備份您的數據庫 步驟 2) 備份您的數據庫 步驟 3) 備份您的數據庫

來自<https://github.com/Neozonz/stratum-mining-litecoin/blob/master/INSTALL>

"

> Installation Instructions
> =========================
> 
> Step 0. Install litecoind     NOTE: Litecoind currently only supports
> getblocktemplate version 1. This code was changed to support version
> 1.    Set it up and start it!     Downloading the blockchain can take a few hours to a couple days!
> 
> Step 1. Install the stratum core  git pull
> https://github.com/slush0/stratum.git     sudo easy_install stratum    
> (or if using alternate python: sudo /usr/local/bin/easy_install
> stratum)
> 
> Step 2. Pull a copy of the miner  git pull
> https://github.com/moopless/stratum-mining-litecoin.git
> 
> Step 3. Configure the Miner   cp conf/config_sample.py conf/config.py
>   make your changes to conf/config.py     Make sure you set the values in
> BASIC SETTINGS! These are how to connect to litecoind       and where
> your money goes!
> 
> Step 4. Run the pool  twistd -ny launcher.tac -l -    OR - using
> alternate python  /usr/local/bin/twistd -ny launcher.tac -l -
> 
> You can now set the URL on your stratum proxy (or miner that supports
> stratum) to: http://YOURHOSTNAME:3333
> 
> Database Setup
> ========================= Table Creation: Tables are auto-created if they don't exist (I will be adding a schema file later)
> 
> None: Well, this doesn't do anything, so there is nothing to set up
> 
> Sqlite: THIS IS THE DEFAULT! Just set the file path in the config file
> (or keep the default.) Support for sqlite3 is built into recent python
> versions. A couple notes for Sqlite:
>   - Sqlite and threading/concurancy just doesn't work right for that reason it is disabled.
>   - Since threading is disabled, The server will "pause" when archiving happens, this will affect         your miners. However this will not happen
> often (24 hours after finding a share)
> 
> Postgresql:
> 1. Set up your parameters in the config file.
> 2. Install the postgresql libraries in your os:   Redhat and the like:        yum install postgresql-libs postgresql-devel    Ubuntu and the like:
>       apt-get install postgresql postgresql-devel
> 3. Install the python bindings    easy_install psycopg2
> 
> Mysql:
> 1. Set up your parameters in the config file.
> 2. Install the mysql libraries in your os:    Redhat and the like:        yum install mysql mysql-devel   Ubuntu and the like:        apt-get install
> mysql mysql-devel
> 3. Install the python bindings    easy_install mysql-python
> 4. Create a database and user.
> 
> Problems????
> =========================
> 
> Is your firewall off? Is litecoin running?
> 
> TODO: are there other problems?

"

如果您已經在使用 pushpool 和自定義前端並且不想覆蓋您的系統,我有一個工作(但由於我的項目的性質,MBPM 有點錯誤)“安裝”版本的 freicoin 地層探勘可在此處獲取<https://bitbucket.org/joeswhite/joes-stratum-mining-freicoin/src/8eec8a0b11c6?at=master>

這是安裝我的版本的方法(除非您有編碼經驗,否則請勿安裝此版本!),萊特幣實施有一個附加步驟,但我尚未對其進行測試。

"

> stratum-mining Basic implementation of bitcoin mining pool using
> Stratum mining protocol. This fork includes a database implementation
> for: None Sqlite Mysql Postgresql Basic worker stats are provided (and
> updated) See the INSTALL file for install instructions. For more info
> on Stratum: http://mining.bitcoin.cz/stratum-mining. Original version
> by Slush Updated version by GeneralFault (Tips Welcome:
> 15Zk7DoFYJ7hESpZzmix1WLkomTMGW81c2 ) This version by Joe White
> http://pool.cr.rs (freicoin mining pool) Joe's Stratum Mining Freicoin
> Implementation of generalfault's
> https://github.com/generalfault/stratum-mining that works with Mark
> Friedenbach's https://github.com/freicoin/stratum-mining This
> installation can be put directly over top of your current pushpoold
> Known bugs: Does not handle subscriptions properly upon connection,
> but properly pushes block template and everything submits without
> issue To do: add Joe's Pool front end in to implementation
> (simplebtc's implementation heavily modified) add firewalls, security
> services, add google authenticator, add other things like tripwire.
> how to: Easy: download vmware image go to town make sure to set up any
> and all firewalls, security measures, and other information. manual:
> first download freicoin from freico.in/downloads install freicoin edit
> your freicoin.conf file change the rpc port for security (i like to
> mix it up on each server i use) nano .freicoin/freicoin.conf something
> like this works (freicoin.conf file): server=1
> rpcuser=changethisusername rpcpassword=changethispassword rpcport=4252
> rpcallowip=127.0.0.1 test to make sure freicoind works once you are
> sure of that, then get the git package git clone make the stratum log
> directories mkdir /stratum mkdir /stratum/log/ touch
> /stratum/log/stratum.log recurse in to the directory and edit
> conf/config.py MAKE SURE TO READ AND CONFIGURE ALL SETTINGS!!!! I HAVE
> DISABLED PLUG AND PLAY FOR YOUR SAFETY/SECURITY nano conf/config.py
> ALWAYS BACK UP BEFORE STARTING ANYTHING!!! YOUR DATABASE COULD GET
> SCREWED! I CAN NOT BE HELD LIABLE FOR ANYTHING, ESP THAT! import the
> database if you are starting from scratch (it is not standard and is
> not optimized, you could opt to make your own database and edit
> DB_Mysql.py (or corresponding database) and edit anything that is a
> sql execution (anything that has "select * from, or any other sql
> statements can be easily updated without changing most or anythign on
> the server side schema.sql &lt;- THIS IS THE SCHEMA FOR THIS
> IMPLEMENTATION OF joe's THIS SCHEMA IS NOT OPTIMIZED AT ALL! ALWAYS
> BACK UP BEFORE STARTING ANYTHING!!! YOUR DATABASE COULD GET SCREWED! I
> CAN NOT BE HELD LIABLE FOR ANYTHING, ESP THAT! start a new screen so
> you don't log out and stratum crashes (this is helpful for logging
> too) screen

"

*litecoin specific step
At this point you need to go back and write over (at very least) the halfnode.py block_template.py and coinbasetx.py files with the files provided in stratum-mining-litecoion. most likely you will need to write over all of them. (This is the untested part i was talking about).


"

> ./startjoes.sh it should load up and work, you will see one error on
> submission at this time it is okay this error does not affect any pool
> performance, it is tested working. please update this as there are
> many probable errors. I have included the sql architecture for this
> implementation as it is not standard and can plug-and-play over an
> existing pushpool implementation ALWAYS BACK UP BEFORE STARTING
> ANYTHING!!! YOUR DATABASE COULD GET SCREWED! I CAN NOT BE HELD LIABLE
> FOR ANYTHING, ESP THAT!

"

我正在嘗試在今天或明天進行實施,並且可以報告我當時需要進行的任何更改。

請讓我知道這是否是一個令人滿意的答案,如果不是。我會更新它,直到它是。謝謝你不抨擊我;)

您可能想嘗試這個版本的層:

<https://github.com/ahmedbodi/stratum-mining>

<https://github.com/ahmedbodi/stratum>

它帶有內置的萊特幣元件。此外,您可能希望考慮目前維護的池,因為根據比特幣 wiki 未維護 pushpool:

<https://en.bitcoin.it/wiki/Software>

如果您是初學者,我會推薦 P2Pool,如果您有更多經驗,請嘗試 Eloipool。

引用自:https://bitcoin.stackexchange.com/questions/10044