0xbitcoin / tokenpool Goto Github PK
View Code? Open in Web Editor NEWA pool mining coordinator that communicates with mining software using JSONRPC
License: GNU General Public License v3.0
A pool mining coordinator that communicates with mining software using JSONRPC
License: GNU General Public License v3.0
I have deployed contracts and in minterhelper i have set payoutswallet as Batchpayment address and minterwallet as my account address but the transaction is coming to my batchpayment address after that it is not coming in my wallet.
Basically, when a block is found, all miners are awarded payout based on share %, and then their share count is reset to 0. I observed an unawarded block for my own address when running at mine0xbtc.eu.
To put it another way - after a long, unlucky block, every miner was awarded payout but me. As a result, my share count was also not reset to 0, although other miners were. This resulted in me starting with a huge amount of shares on the next round, and I earned a dis-proportionally large amount of tokens on the next block.
Screenshot of the miner list a few minutes after the start of the next round:
https://cdn.discordapp.com/attachments/434009347442606090/436395910893797386/unknown.png
The title pretty much says it all. To be more technically correct, the pool currently returns boolean 'true' for all share submissions. Expected behavior is that the pool should return boolean 'false' when a submitted share is invalid.
Due to increased complexity for the pool and miner interface, the following pool method has been added to the JSONRPC protocol:
getPoolProtocolVersion()
In order to make everyone's life easier, we intend to develop a common specification. In 1.00 the following methods are used:
ping()
getPoolEthAddress()
getMinimumShareDifficulty(minerAddress) //Really used to understand a particular miners recommended diff.. so misnamed
getMinimumShareTarget(minerAddress) ////Really used to understand a particular miners recommended target.. so misnamed
getChallengeNumber()
submitShare(nonce,minerEthAddress,digest,difficulty,challengeNumber)
getMinerData //returns ALL miners data .. maybe should rename
What sorts of changes should we consider ?? I do not like how vardiff works right now we should probably lock it or something.. I like how Mikers uses different ports for this!! Let us know your thoughts
Does the pool ( or will it ) support stratum protocol ?
Followed the instructions and ran
During npm install
, there is an error building sha3. How can we fix this?
Running node v10.4,0, npm v6.1.0, Ubuntu 18.04
npm WARN deprecated [email protected]: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated [email protected]: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.com/tar
> [email protected] install /root/tokenpool/node_modules/sha3
> node-gyp rebuild
make: Entering directory '/root/tokenpool/node_modules/sha3/build'
CXX(target) Release/obj.target/sha3/src/addon.o
In file included from ../src/addon.cpp:4:0:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:840:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, func, argc, argv);
^
In file included from ../src/addon.cpp:1:0:
/root/.node-gyp/10.4.0/include/node/node.h:172:50: note: declared here
NODE_EXTERN v8::Local<v8::Value> MakeCallback(
^
/root/.node-gyp/10.4.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
__attribute__((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/addon.cpp:4:0:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:855:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, symbol, argc, argv);
^
In file included from ../src/addon.cpp:1:0:
/root/.node-gyp/10.4.0/include/node/node.h:165:50: note: declared here
NODE_EXTERN v8::Local<v8::Value> MakeCallback(
^
/root/.node-gyp/10.4.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
__attribute__((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/addon.cpp:4:0:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:870:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, method, argc, argv);
^
In file included from ../src/addon.cpp:1:0:
/root/.node-gyp/10.4.0/include/node/node.h:158:50: note: declared here
NODE_EXTERN v8::Local<v8::Value> MakeCallback(
^
/root/.node-gyp/10.4.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
__attribute__((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/addon.cpp:4:0:
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’:
../../nan/nan.h:1484:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
));
^
In file included from ../src/addon.cpp:1:0:
/root/.node-gyp/10.4.0/include/node/node.h:172:50: note: declared here
NODE_EXTERN v8::Local<v8::Value> MakeCallback(
^
/root/.node-gyp/10.4.0/include/node/node.h:88:42: note: in definition of macro ‘NODE_DEPRECATED’
__attribute__((deprecated(message))) declarator
^~~~~~~~~~
../src/addon.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE SHA3Hash::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/addon.cpp:49:23: warning: ‘new’ of type ‘SHA3Hash’ with extended alignment 32 [-Waligned-new=]
obj = new SHA3Hash();
^
../src/addon.cpp:49:23: note: uses ‘void* operator new(std::size_t)’, which does not have an alignment parameter
../src/addon.cpp:49:23: note: use ‘-faligned-new’ to enable C++17 over-aligned new support
../src/addon.cpp:59:58: error: no matching function for call to ‘v8::Function::NewInstance(const int&, v8::Local<v8::Value> [1])’
info.GetReturnValue().Set(cons->NewInstance(argc, argv));
^
In file included from /root/.node-gyp/10.4.0/include/node/node.h:63:0,
from ../src/addon.cpp:1:
/root/.node-gyp/10.4.0/include/node/v8.h:3905:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^~~~~~~~~~~
/root/.node-gyp/10.4.0/include/node/v8.h:3905:44: note: candidate expects 3 arguments, 2 provided
/root/.node-gyp/10.4.0/include/node/v8.h:3908:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^~~~~~~~~~~
/root/.node-gyp/10.4.0/include/node/v8.h:3908:44: note: candidate expects 1 argument, 2 provided
sha3.target.mk:99: recipe for target 'Release/obj.target/sha3/src/addon.o' failed
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
make: Leaving directory '/root/tokenpool/node_modules/sha3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 4.15.0-22-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/tokenpool/node_modules/sha3
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^4.0.0-beta.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN [email protected] scripts['server'] should probably be scripts['start'].
npm WARN The package mocha is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-06-06T16_37_55_183Z-debug.log
Here is debug.log:
2229 silly saveTree │ └─┬ [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ └── [email protected]
2229 silly saveTree │ │ └─┬ [email protected]
2229 silly saveTree │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ ├── [email protected]
2229 silly saveTree │ │ │ └── [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ └── [email protected]
2229 silly saveTree ├─┬ [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ │ └─┬ [email protected]
2229 silly saveTree │ │ │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ │ │ └── [email protected]
2229 silly saveTree │ │ │ │ └── [email protected]
2229 silly saveTree │ │ │ ├── [email protected]
2229 silly saveTree │ │ │ ├── [email protected]
2229 silly saveTree │ │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ │ └── [email protected]
2229 silly saveTree │ │ │ ├── [email protected]
2229 silly saveTree │ │ │ └── [email protected]
2229 silly saveTree │ │ ├── [email protected]
2229 silly saveTree │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ └── [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ ├── [email protected]
2229 silly saveTree │ │ ├── [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ └─┬ [email protected]
2229 silly saveTree │ │ ├── [email protected]
2229 silly saveTree │ │ └─┬ [email protected]
2229 silly saveTree │ │ ├── [email protected]
2229 silly saveTree │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ │ ├─┬ [email protected]
2229 silly saveTree │ │ │ │ │ └── [email protected]
2229 silly saveTree │ │ │ │ └── [email protected]
2229 silly saveTree │ │ │ ├── [email protected]
2229 silly saveTree │ │ │ └── [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ ├─┬ [email protected]
2229 silly saveTree │ │ └─┬ [email protected]
2229 silly saveTree │ │ └── [email protected]
2229 silly saveTree │ └─┬ [email protected]
2229 silly saveTree │ ├── [email protected]
2229 silly saveTree │ └─┬ [email protected]
2229 silly saveTree │ └── [email protected]
2229 silly saveTree └── [email protected]
2230 warn [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
2231 warn [email protected] requires a peer of webpack@^4.0.0-beta.1 but none is installed. You must install peer dependencies yourself.
2232 warn [email protected] No repository field.
2233 warn [email protected] scripts['server'] should probably be scripts['start'].
2234 warn The package mocha is included as both a dev and production dependency.
2235 warn optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
2236 warn notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid OS: darwin
2237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Valid Arch: any
2237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual OS: linux
2237 verbose notsup SKIPPING OPTIONAL DEPENDENCY: Actual Arch: x64
2238 verbose stack Error: [email protected] install: `node-gyp rebuild`
2238 verbose stack Exit status 1
2238 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
2238 verbose stack at EventEmitter.emit (events.js:182:13)
2238 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
2238 verbose stack at ChildProcess.emit (events.js:182:13)
2238 verbose stack at maybeClose (internal/child_process.js:961:16)
2238 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
2239 verbose pkgid [email protected]
2240 verbose cwd /root/tokenpool
2241 verbose Linux 4.15.0-22-generic
2242 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
2243 verbose node v10.4.0
2244 verbose npm v6.1.0
2245 error code ELIFECYCLE
2246 error errno 1
2247 error [email protected] install: `node-gyp rebuild`
2247 error Exit status 1
2248 error Failed at the [email protected] install script.
2248 error This is probably not a problem with npm. There is likely additional logging output above.
2249 verbose exit [ 1, true ]
always lowercase them all
When I try to run tokenpool on my vps I get this error:
UnhandledPromiseRejectionWarning: Error: Invalid JSON RPC response: ""
It looks like it isn't getting a valid response from mainnet on web3
1 per month (or one every 10000 blocks) - maybe over the JSONRPC interface from the miner??
@0xbitcoin hey guys
I've installed the pool, all seems well such but website isn't showing up rather getting this out put on the browser
Installed and started the pool server, then connected a Cosmic-new v3.4t miner to it . Unfortunately every share submitted appears to be a solution to the miner. What is the problem here?
[06/06 13:07:36] Sol'n Found: 0x417a6c65687269612790d577d382b6f56a000000a6519cc55bd756ef11544344
[06/06 13:07:37] Sol'n Found: 0x417a6c65687269612790d577fcc970fc6a000000a6519cc55bd756ef11544344
[06/06 13:07:37] Sol'n Found: 0x417a6c65687269612790d577902a52026b000000a6519cc55bd756ef11544344
[06/06 13:07:38] Sol'n Found: 0x417a6c65687269612790d577ede0965c6b000000a6519cc55bd756ef11544344
[06/06 13:07:38] Sol'n Found: 0x417a6c65687269612790d5771db6996c6b000000a6519cc55bd756ef11544344
New challenge received: 0x26ad18d6415f78a04cb60b008df11ae0b01483611063946c9492fae4a066f684
[06/06 13:07:40] Sol'n Found: 0x417a6c65687269612790d577ee7dfbd16b000000a6519cc55bd756ef11544344
[06/06 13:07:41] Sol'n Found: 0x417a6c65687269612790d577566c2ee96b000000a6519cc55bd756ef11544344
[06/06 13:07:41] Sol'n Found: 0x417a6c65687269612790d5770b7804166c000000a6519cc55bd756ef11544344
[06/06 13:07:42] Sol'n Found: 0x417a6c65687269612790d5779ef9a21f6c000000a6519cc55bd756ef11544344
[06/06 13:07:43] Sol'n Found: 0x417a6c65687269612790d577573ffecf6c000000a6519cc55bd756ef11544344
[06/06 13:07:44] Sol'n Found: 0x417a6c65687269612790d5773f90f0da6c000000a6519cc55bd756ef11544344
[06/06 13:07:45] Sol'n Found: 0x417a6c65687269612790d577522add0d6d000000a6519cc55bd756ef11544344
[06/06 13:07:46] Sol'n Found: 0x417a6c65687269612790d577231b25406d000000a6519cc55bd756ef11544344
On the node server there are many messages like
handle valid share
handle valid share
handle valid new share
credit amt 105 105 394331266
awarding shares : 105
miner data - award shares 0xBf82E00cBB8F4dC2B816ec7c12ea1cBE41AABC1F {"shareCredits":35910,"tokenBalance":0,"tokensAwarded":0,"varDiff":126,"validSubmittedSolutionsCount":71,"usingCustomDifficulty":true,"lastSubmittedSolutionTime":1528304672,"avgFindingTime":1,"hashRate":"621608960"}
share is not a solution!
handle valid share
handle valid new share
credit amt 105 105 394331266
awarding shares : 105
miner data - award shares 0xBf82E00cBB8F4dC2B816ec7c12ea1cBE41AABC1F {"shareCredits":36015,"tokenBalance":0,"tokensAwarded":0,"varDiff":126,"validSubmittedSolutionsCount":72,"usingCustomDifficulty":true,"lastSubmittedSolutionTime":1528304673,"avgFindingTime":1,"hashRate":"621608960"}
share is not a solution!
Running google closure compiler on bundle.js cuts the bundle.js file size from around 700KB to 350KB
We should figure out a way to package it and include it in our webpack process
https://developers.google.com/closure/compiler/docs/gettingstarted_app
via discord:
"would be neat to see a full solutions counter against a profile"
I think it would be nice to have a system requirements on README.md
To inform people about server cpu & RAM minimum and recommended specs or even recommended EC2 instances to run on.
To avoid people running pools on small servers and leading to performance issues
Something like:
RAM: 1GB
CPU: Single core shared CPU
OS: Ubuntu Server 16.04 or newer
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.