open-ethereum-pool以太坊礦池原始碼分析(1)-main入口分析
# open-ethereum-pool以太坊礦池-main入口
## 命令列啟動
```shell
./build/bin/open-ethereum-pool config.json
```
## Main入口流程圖
## config.json配置檔案
```json
{
"threads": 2,
"coin": "eth",
"name": "main",
"proxy": {
"enabled": true,
"listen": "0.0.0.0:8888",
"limitHeadersSize": 1024,
"limitBodySize": 256,
"behindReverseProxy": false,
"blockRefreshInterval": "120ms",
"stateUpdateInterval": "3s",
"difficulty": 2000000000,
"hashrateExpiration": "3h",
"healthCheck": true,
"maxFails": 100,
"stratum": {
"enabled": true,
"listen": "0.0.0.0:8008",
"timeout": "120s",
"maxConn": 8192
},
"policy": {
"workers": 8,
"resetInterval": "60m",
"refreshInterval": "1m",
"banning": {
"enabled": false,
"ipset": "blacklist",
"timeout": 1800,
"invalidPercent": 30,
"checkThreshold": 30,
"malformedLimit": 5
},
"limits": {
"enabled": false,
"limit": 30,
"grace": "5m",
"limitJump": 10
}
}
},
"api": {
"enabled": true,
"purgeOnly": false,
"purgeInterval": "10m",
"listen": "0.0.0.0:8080",
"statsCollectInterval": "5s",
"hashrateWindow": "30m",
"hashrateLargeWindow": "3h",
"luckWindow": [64, 128, 256],
"payments": 30,
"blocks": 50
},
"upstreamCheckInterval": "5s",
"upstream": [
{
"name": "main",
"url": "http://127.0.0.1:8545",
"timeout": "10s"
},
{
"name": "backup",
"url": "http://127.0.0.2:8545",
"timeout": "10s"
}
],
"redis": {
"endpoint": "127.0.0.1:6379",
"poolSize": 10,
"database": 0,
"password": ""
},
"unlocker": {
"enabled": false,
"poolFee": 1.0,
"poolFeeAddress": "",
"donate": true,
"depth": 120,
"immatureDepth": 20,
"keepTxFees": false,
"interval": "10m",
"daemon": "http://127.0.0.1:8545",
"timeout": "10s"
},
"payouts": {
"enabled": false,
"requirePeers": 25,
"interval": "120m",
"daemon": "http://127.0.0.1:8545",
"timeout": "10s",
"address": "0x0",
"gas": "21000",
"gasPrice": "50000000000",
"autoGas": true,
"threshold": 500000000,
"bgsave": false
},
"newrelicEnabled": false,
"newrelicName": "MyEtherProxy",
"newrelicKey": "SECRET_KEY",
"newrelicVerbose": false
}
```
## 參考文件
* [Open Source Ethereum Mining Pool](https://github.com/sammy007/open-ethereum-pool)
* [New Relic agent for Go runtime](https://github.com/yvasiyarov/gorelic)
* [New Relic:效能監測商業工具](http://hao.jobbole.com/new-relic/)
網址:http://www.qukuailianxueyuan.io/
欲領取造幣技術與全套虛擬機器資料
區塊鏈技術交流QQ群:756146052 備註:CSDN
尹成學院微信:備註:CSDN
網址:http://www.qukuailianxueyuan.io/
欲領取造幣技術與全套虛擬機器資料
區塊鏈技術交流QQ群:756146052 備註:CSDN
尹成學院微信:備註:CSDN
相關文章
- open-ethereum-pool以太坊礦池原始碼分析(2)API分析原始碼API
- open-ethereum-pool以太坊礦池原始碼分析(1)環境安裝原始碼
- open-ethereum-pool以太坊礦池原始碼分析(3)payouts模組原始碼
- open-ethereum-pool以太坊礦池原始碼分析(4)-policy模組原始碼
- open-ethereum-pool以太坊礦池原始碼分析(5)proxy模組原始碼
- open-ethereum-pool以太坊礦池原始碼分析(6)-redis模組原始碼Redis
- open-ethereum-pool以太坊礦池原始碼分析(7)unlocker模組原始碼
- 以太坊原始碼分析(16)挖礦分析原始碼
- 以太坊交易池原始碼分析原始碼
- btcpool礦池原始碼分析(1)環境搭建TCP原始碼
- 以太坊原始碼分析(42)miner挖礦部分原始碼分析CPU挖礦原始碼
- 以太坊原始碼分析(26)core-txpool交易池原始碼分析原始碼
- 死磕以太坊原始碼分析之挖礦流程分析原始碼
- btcpool礦池原始碼分析(8)-slparserTCP原始碼
- btcpool礦池原始碼分析(3)-BlockMaker模組解析TCP原始碼BloC
- btcpool礦池原始碼分析(5)-JobMaker模組解析TCP原始碼
- btcpool礦池原始碼分析(6)-nmcauxmaker模組解析TCP原始碼UX
- btcpool礦池原始碼分析(9)-statshttpd模組解析TCP原始碼httpd
- btcpool礦池原始碼分析(10)-StratumServer模組解析TCP原始碼Server
- 以太坊原始碼分析(36)ethdb原始碼分析原始碼
- 以太坊原始碼分析(38)event原始碼分析原始碼
- 以太坊原始碼分析(41)hashimoto原始碼分析原始碼
- 以太坊原始碼分析(43)node原始碼分析原始碼
- 以太坊原始碼分析(52)trie原始碼分析原始碼
- btcpool礦池原始碼分析(4)-GbtMaker模組解析TCP原始碼
- btcpool礦池原始碼分析(6)-PoolWatcher模組解析TCP原始碼
- 以太坊原始碼分析(51)rpc原始碼分析原始碼RPC
- 以太坊原始碼分析(18)以太坊交易執行分析原始碼
- 以太坊原始碼分析(37)eth以太坊協議分析原始碼協議
- 以太坊原始碼分析(20)core-bloombits原始碼分析原始碼OOM
- 以太坊原始碼分析(24)core-state原始碼分析原始碼
- 以太坊原始碼分析(29)core-vm原始碼分析原始碼
- 以太坊原始碼分析(5)accounts程式碼分析原始碼
- 以太坊原始碼分析(8)區塊分析原始碼
- 以太坊原始碼分析(9)cmd包分析原始碼
- 以太坊原始碼分析(13)RPC分析原始碼RPC
- vue原始碼分析系列之入口檔案分析Vue原始碼
- 以太坊原始碼分析(23)core-state-process原始碼分析原始碼