Code Monkey home page Code Monkey logo

not-only-mining-pool's Introduction

Not-Only-Mining-Pool(NOMP)

BitcoinCore(bitcoind)-variants' pool written in golang

Difference from NOMP(node-open-mining-portal)

This pool software is not a portal, but a standalone stratum server with high performance.

If you want, you can implement the portal page in frontend web.

Why standalone?

Keep standalone is better to assemble new algorithm/coin to your pool services, without dealing with C lib conflicts or restart the whole site to append new pool, what's more, most pool operators don't need a portal, they just get benefit from few different coins with different algorithms.

So it's obviously that standalone one with more advantages on deploying and maintaining.

In other words, "大人,時代變了!".

How to use it?

0x00 Check

Make sure your algorithm in support, if not, take an issue.

0x01 Configuration

Read config.example.json and modify the configurations

Then rename it to config.json

0x02 Build

go build .

0x03 Deploy

Copy go-stratum-pool or go-stratum-pool.exe and config.json to your VPS server and

And then

$ ./go-stratum-pool

or

> go-stratum-pool.exe

TODO

  • API(half done)
  • More algorithms
  • Web page
  • ...

Donation

LTC: LXxqHY4StG79nqRurdNNt1wF2yCf4Mc986

Tested Network

  • LTC Testnet

not-only-mining-pool's People

Contributors

c0mm4nd avatar deepsourcebot 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

Watchers

 avatar  avatar  avatar

not-only-mining-pool's Issues

Payments

Any plans to complete the payment methods?

Marshaling Problem

With the newest version of Bitcoind or BTCD

PANIC	daemonMgr	daemonManager/daemonManager.go:135	failed to unmarshal response body:[67 108 105 101 110 116 32 115 101 110 116 32 97 110 32 72 84 84 80 32 114 101 113 117 101 115 116 32 116 111 32 97 110 32 72 84 84 80 83 32 115 101 114 118 101 114 46 10]
panic: failed to unmarshal response body:[67 108 105 101 110 116 32 115 101 110 116 32 97 110 32 72 84 84 80 32 114 101 113 117 101 115 116 32 116 111 32 97 110 32 72 84 84 80 83 32 115 101 114 118 101 114 46 10]

I do believe that this needs to be updated in order to support Stratum v2

Main and Backup BTC Servers

Since it is industry standard to have a main node and a backup node, would it be possible to add a second server for this connect to if a main server goes down? For redundancy issues.

Scenario
Stratum Server is connected to main btc node, main btc node goes down, stratum server instantly connects to a backup btc node and continues to serve jobs.

Most Stratum services that I have seen offer this capability so this is just an idea.

Does nothing`?

Hello!

I started the Server, but i became no output or anything, i can't connect to the port....

'~/not-only-mining-pool# ./not-only-mining-pool -l info -c config.json'

the '-l debug' says:

'2021-04-07T02:26:40.067+0200 DEBUG daemons {"id":8956350422681574908,"method":"getblocktemplate","params":[{"capabilities":["coinbasetxn","workid","coinbase/append"],"rules":["segwit"]}]}
2021-04-07T02:26:40.100+0200 DEBUG daemons {"id":4396942698797891608,"method":"getblocktemplate","params":[{"capabilities":["coinbasetxn","workid","coinbase/append"],"rules":["segwit"]}]}
2021-04-07T02:26:40.175+0200 DEBUG daemons {"id":249728504336073616,"method":"getblocktemplate","params":[{"capabilities":["coinbasetxn","workid","coinbase/append"],"rules":["segwit"]}]}
2021-04-07T02:26:40.243+0200 DEBUG daemons {"id":4404283061090689657,"method":"getblocktemplate","params":[{"capabilities":["coinbasetxn","workid","coinbase/append"],"rules":["segwit"]}]}
2021-04-07T02:26:40.311+0200 DEBUG daemons {"id":204658955339984858,"method":"getblocktemplate","params":[{"capabilities":["coinbasetxn","workid","coinbase/append"],"rules":["segwit"]}]}
2021-04-07T02:26:40.345+0200 DEBUG daemons {"id":6710804005962334073,"method":"getblocktemplate","params":[{"capabilities":["coinbasetxn","workid","coinbase/append"],"rules":["segwit"]}]}
2021-04-07T02:26:40.367+0200 DEBUG daemons {"id":3648422331481775540,"method":"getblocktemplate","params":[{"capabilities":["coinbasetxn","workid","coinbase/append"],"rules":["segwit"]}]}
2021-04-07T02:26:40.383+0200 DEBUG daemons {"id":5774512521738552748,"method":"getblocktemplate","params":[{"capabilities":["coinbasetxn","workid","coinbase/append"],"rules":["segwit"]}]}
2021-04-07T02:26:40.448+0200 DEBUG daemons {"id":3359168175943390341,"method":"getblocktemplate","params":[{"capabilities":["coinbasetxn","workid","coinbase/append"],"rules":["segwit"]}]}'

what it does?

Install Issue

When running go build .

main.go:4:2: cannot find package "encoding/json" in any of:
/root/go/src/encoding/json (from $GOROOT)
/root/work/src/encoding/json (from $GOPATH)
main.go:5:2: cannot find package "flag" in any of:
/root/go/src/flag (from $GOROOT)
/root/work/src/flag (from $GOPATH)
main.go:8:2: cannot find package "github.com/ipfs/go-log/v2" in any of:
/root/go/src/github.com/ipfs/go-log/v2 (from $GOROOT)
/root/work/src/github.com/ipfs/go-log/v2 (from $GOPATH)
main.go:9:2: cannot find package "github.com/mining-pool/not-only-mining-pool/config" in any of:
/root/go/src/github.com/mining-pool/not-only-mining-pool/config (from $GOROOT)
/root/work/src/github.com/mining-pool/not-only-mining-pool/config (from $GOPATH)
main.go:10:2: cannot find package "github.com/mining-pool/not-only-mining-pool/pool" in any of:
/root/go/src/github.com/mining-pool/not-only-mining-pool/pool (from $GOROOT)
/root/work/src/github.com/mining-pool/not-only-mining-pool/pool (from $GOPATH)
main.go:11:2: cannot find package "github.com/mining-pool/not-only-mining-pool/utils" in any of:
/root/go/src/github.com/mining-pool/not-only-mining-pool/utils (from $GOROOT)
/root/work/src/github.com/mining-pool/not-only-mining-pool/utils (from $GOPATH)
main.go:6:2: cannot find package "os" in any of:
/root/go/src/os (from $GOROOT)
/root/work/src/os (from $GOPATH)
package .
imports runtime: cannot find package "runtime" in any of:
/root/go/src/runtime (from $GOROOT)
/root/work/src/runtime (from $GOPATH)

UpdateCurrentJob leads to invalid shares

First of all: great work you did there!
I discovered a small problem in the block polling process: The call to JobManager.ProcessTemplate -> UpdateCurrentJob modifies the current job which miners might still be working on. This can lead to miners submitting shares which are considered invalid by the pool (as the job changed in between notify and submit). For me it does not make a lot of sense to change the block template as long as the block height does not change (at least with a decent sized mempool). Please rectify this assumption if there is a good reason for updating the template.
An easy fix would be adding an additional condition in SetupBlockPolling:

if gbt != nil {
    if gbt.PreviousBlockHash != p.JobManager.CurrentJob.GetBlockTemplate.PreviousBlockHash {
        p.JobManager.ProcessTemplate(gbt)
    }
}

Another possibility would be to give the job a new id or notify all miners immediately about the new job.

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.