blackmennewstyle / miningcore

Miningcore is a high-performance Mining Pool Software for Linux and Windows.
MIT License
27 stars 49 forks source link

Master Slave setup #194

Open patelbhavinoutlook opened 1 week ago

patelbhavinoutlook commented 1 week ago

Hello

I was trying to implement minigcore from this fork. Need some help on how to configure master slave setup. Master miningcore server will host database and will process payment. And here will be two slave which will work as stratum for two continent and this will only use to connect miner and mining activity, shares and data will be send /share to master server.

I tried to look around wikis and all but dont get very clear understanding. Please if you can help me with this hat would be great help.

blackmennewstyle commented 6 days ago

Hello, Sorry for the late reply.

It should work as well with my repo but to be honest, i never tried to run miningcore that way.

There have been some tensions in the past between pool operators, since those who knew how to do it, would not want to share the configuration with others.

Your best bet is to make a deep search in the source code and then experiment with your pool config.json.

jon4hz commented 5 days ago

Take a look at the share relay config. That's what you need to push shares from a stratum server to a "master" instance that writes them down to the database: https://github.com/blackmennewstyle/miningcore/blob/1669d3f5638cba3b7e3b92ed0cc30f70b444fbe4/src/Miningcore/Configuration/ClusterConfig.cs#L1071-L1093

Note that the stratum servers still need access to the database. But they wont write down any shares directly.

patelbhavinoutlook commented 5 days ago

Hello

Thanks for your help. will see the configs and share relays and try my way what can be best.. also just wanted to check one more thing.. is this fork repo is asicboost compatible right

patelbhavinoutlook commented 5 days ago

Salve Node Config File

{ "logging": { "level": "debug", "enableConsoleLog": true, "enableConsoleColors": true, "logFile": "pool.log", "logBaseDirectory": "", "perPoolLogFile": true }, "banning": { "manager": "Integrated", "banOnJunkReceive": true, "banOnInvalidShares": false }, "notifications": { "enabled": false, "admin": { "enabled": false } }, "paymentProcessing": { "enabled": false },

"persistence": {}, "api": { "enabled": false }, "shareRelay": { "PublishUrl": "tcp://0.0.0.0:6000", "SharedEncryptionKey": "foobar" }, "pools": [ { "id": "btco1", "name": "BitcoinOil - PPLNS", "enabled": true, "coin": "bitcoinoil", "address": "BVc1LxLv61q4X5aYqXTbR2e9mueDtt8fnm", "rewardRecipients": [ { "address": "btco1q6fne6jnuz6n8cl5086jufgvkrvgld5p2j5a2r6", "percentage": 0.8 } ], "blockRefreshInterval": 60, "jobRebroadcastTimeout": 10, "clientConnectionTimeout": 600, "banning": { "enabled": true, "time": 600, "invalidPercent": 50, "checkThreshold": 50 }, "ports": { "3010": { "listenAddress": "0.0.0.0", "name": "Nicehash - MMR", "tls": false, "tlsAuto": false, "difficulty": 512000, "varDiff": { "minDiff": 20000, "targetTime": 15, "retargetTime": 90, "variancePercent": 30 } }, "3011": { "listenAddress": "0.0.0.0", "name": "ASIC - Low Diff", "tls": false, "tlsAuto": false, "difficulty": 31000, "varDiff": { "minDiff": 1000, "targetTime": 15, "retargetTime": 90, "variancePercent": 30 } } }, "daemons": [ { "host": "10.0.4.1", "port": 19711, "user": "rpc_user", "password": "BUaAMFyrbbyH429MBvRxsdgsBbi"

    }
  ]
}

] }

patelbhavinoutlook commented 5 days ago

Master node config file

{ "logging": { "level": "debug", "enableConsoleLog": true, "enableConsoleColors": true, "logFile": "pool.log", "logBaseDirectory": "", "perPoolLogFile": true }, "api": { "enabled": true, "listenAddress": "0.0.0.0", "port": 4000, }, "banning": { "manager": "Integrated", "banOnJunkReceive": true, "banOnInvalidShares": false }, "notifications": { "enabled": false, "email": { "host": "", "port": 25, "user": "", "password": "", "fromAddress": "", "fromName": "" }, "admin": { "enabled": false, "emailAddress": "", "notifyBlockFound": false } }, "persistence": { "postgres": { "host": "127.0.0.1", "port": 5432, "user": "coreuser", "password": "mccorepass", "database": "mcdbpool" } }, "shareRelays": [ { "Url": "tcp://10.0.4.4:6000", "SharedEncryptionKey": "foobar" } ], "paymentProcessing": { "enabled": true, "interval": 600, "shareRecoveryFile": "recovered-shares.txt" }, "pools": [ { "id": "btco1", "name": "BitcoinOil - PPLNS", "enabled": true, "coin": "bitcoinoil", "enableInternalStratum": false, "address": "BVc1LxLv61q4X5aYqXTbR2e9mueDtt8fnm", "rewardRecipients": [ { "address": "btco1q6fne6jnuz6n8cl5086jufgvkrvgld5p2j5a2r6", "percentage": 0.8 } ], "blockRefreshInterval": 60, "jobRebroadcastTimeout": 10, "clientConnectionTimeout": 600, "banning": { "enabled": true, "time": 600, "invalidPercent": 50, "checkThreshold": 50 }, "ports": { }, "daemons": [ { "host": "10.0.4.1", "port": 19711, "user": "rpc_user", "password": "BUaAMFyrbbyH429MBvRxsdgsBb" } ], "paymentProcessing": { "enabled": true, "minimumPayment": 0.01, "payoutScheme": "PPLNS", "payoutSchemeConfig": { "factor": 0.5 } } } ] }

patelbhavinoutlook commented 5 days ago

I was able to start the master and salve both but now when i check pool testing at nichehash it is not passing i get below error

Pool verification process is complete. Tested pool is incompatible!

and i get this error for both sha256 and sha256 asicboost

blackmennewstyle commented 4 days ago

The nefarious ASIC Boost, a term i hate since whoever created it, just wanted to force stratums to be against the BTC RPC standard because nicehack and ASICs manufacturers have no respect for standards.

It is just a small modification to do in a few files, someone actually made a PR for it a while back: https://github.com/blackmennewstyle/miningcore/pull/163

You need to modify all these files accordingly and it will work.