Code Monkey home page Code Monkey logo

erg-gominer-demo's Introduction

Ergo(ERG) cpuminer written in Golang

Test only.

usage

go get -v github.com/leifjacky/erg-gominer-demo
cd $GOPATH/src/github.com/leifjacky/erg-gominer-demo
go run *.go

Ergo(ERG) stratum protocol

mining.subscribe

{"id":1,"method":"mining.subscribe","params":["ergminer-v1.0.0"]}

{"id":"mining.subscribe","result":[[["mining.set_difficulty","0.000031"],["mining.notify","000400001f164ca2"]],"d7eb83fe",4],"error":null}		// nonce1, nonce2 size

mining.authorize

{"id":2,"method":"mining.authorize","params":["3WyMz9efAu7XtQXKtjcDBrXBhQgak8AceQsnGtXg1JcK9ceCiw9x.worker1","x"]}	// params: [username, password]

{"id":2,"result":true,"error":null}
{"id":null,"method":"mining.set_target","params":["00007fffffffffffffffffffffffffffffffffffffffffffffffffffffff8000"]}

mining.notify

{
	"id": null,
	"method": "mining.notify",
	"params": ["47388824","b15c08abeb302e990330fda83cbf7835a2172bbfbd8542796fb4255c1aaf4bde",4738,true]
} // params: [jobId, msg, height, cleanJob]

mining.submit

{"id":102,"method":"mining.submit","params":["3WxsCRcd9e2fGDHgxk1ptn3stiXPG4p2fi6im4VzQgfQJuS9YSN8.worker1","47388824","00239534"]}  // params: [username, jobId, nonce2]

{"id":100,"result":true,"error":null}    // accepted share response
{"id":100,"result":false,"error":[21,"low difficulty",null]}  // rejected share response
MINER LOG:
solving nonce2: 00239534
msgWithNonce: b15c08abeb302e990330fda83cbf7835a2172bbfbd8542796fb4255c1aaf4bded7eb83fe00239534
msgHash: 576b18b99605a586654026614e50f690295580ab14a0dce645cb076480841eb5
i: 00841eb5
h: 00001282
e: 2c6b53fe68958f676183583d49040f95512992c576a100c4a32c716abcc874
J: [03ea5f7c 025f7cf6 037cf65e 00f65e81 025e81a4 0281a487 01a4878e 00878ecc 038ecc18 02cc1849 001849d4 0049d448 01d44880 004880d2 0080d2b8 00d2b833 02b83394 00339478 039478c7 0078c77c 00c77c47 037c4778 00477829 0378296d 00296ddb 016ddbf5 01dbf5b3 03f5b37a 01b37a21 037a2167 022167ea 0167ea5f]
f: 116ee0186a8bf4c0cfa57f0c2aa629e170fb0171ea526bb6d04ba05a6773fa6f
fh: 000079d2cfe14668445d1d78eb4fedf6676ae5c762260b0f1132752d84236b27
share found: 00239534 - 000079d2cfe14668445d1d78eb4fedf6676ae5c762260b0f1132752d84236b27

erg-gominer-demo's People

Contributors

leifjacky avatar

Watchers

 avatar

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.