Giter Club home page Giter Club logo

hs-miner's People

Contributors

boymanjor avatar chjj avatar pinheadmz avatar thann avatar timxor avatar tuxcanfly avatar tynes 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hs-miner's Issues

Is solution configurable?

I see that the miner can return a solution that does not meet the target provided by a handshake node. Is there a way to configure what the miner considers to be a solution? For example: if I want to consider hashes further -or- closer to the target as a solution for submitting shares to a pool.

Have a way of testing GPU results

The drivers are often flaky, and a mode to verify mined results would indicate the users that computations don't work before trying to let it run.

Especially useful for development.

A possible solution using hs-bench: a flag sets all input params to constant values (I think this is done already), and a comparison against a table of results (this is not done).

API Endpoint /getwork Should Not Receive Parameters

hs-miner is attempting to submit ['00000000000000000000000000000000'] as the param value to /getwork on startup, which is resulting in the API returning a -1 error. This endpoint is documented as accepting no parameters.

"Error: Bad header size."

Does miner.js require updating to reflect changes in testnet 3?

$ ./hs-miner/bin/hs-miner --rpc-host localhost --rpc-port 13037

Miner params:
  Backend: lean-cuda
  CUDA: true
  Network: testnet
  Edge Bits: 23
  Proof Size: 42
  Easipct: 50

CUDA Devices:
  0: <Tesla M60> 7988903936 256 2505000

Starting miner...
Error: Bad header size.
    at Miner.getWork (/home/ubuntu/hs-miner/bin/miner.js:141:13)
    at process.internalTickCallback (internal/process/next_tick.js:77:7)

opencl: default work group size

Right now the work group size default is 512, but some devices might not support that. We can probably use CL_KERNEL_WORK_GROUP_SIZE to set the default based on the device.

Error: Cannot find module 'nan'

As you can see hs-miner fails to build.

$ make

> [email protected] install-main /seagate/sources/git/github.com/handshake-org/hs-miner
> ./scripts/rebuild main

++ test -z ''
++ echo g++
+ CXX=g++
++ ./scripts/get endian
+ ENDIAN=little
++ ./scripts/get cuda_has
+ CUDA_HAS=0
++ ./scripts/get nvcc
+ NVCC=/opt/cuda/bin/nvcc
++ ./scripts/get bits
+ BITS=29
++ ./scripts/get size
+ SIZE=42
++ ./scripts/get perc
+ PERC=50
++ ./scripts/get network
+ NETWORK=main
++ test little = little
++ echo -DHS_LITTLE_ENDIAN
+ DENDIAN=-DHS_LITTLE_ENDIAN
+ test 0 -eq 1
+ rm -f src/device.a
+ rm -f src/mean-cuda.a
+ rm -f src/lean-cuda.a
+ node-gyp rebuild
module.js:487
    throw err;
    ^

Error: Cannot find module 'nan'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at [eval]:1:1
    at ContextifyScript.Script.runInThisContext (vm.js:44:33)
    at Object.runInThisContext (vm.js:116:38)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:569:30)
    at evalScript (bootstrap_node.js:432:27)
gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib64/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.14.47-gentoo
gyp ERR! command "/usr/bin/node" "/usr/lib64/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /seagate/sources/git/github.com/handshake-org/hs-miner
gyp ERR! node -v v8.1.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install-main: `./scripts/rebuild main`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install-main script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/haelwenn/.npm/_logs/2018-08-06T15_29_53_598Z-debug.log

make: *** [Makefile:2: all] Fehler 1
$ node --version
v8.1.1
$ npm --version
5.0.3

OpenCL backend doesn't adjust local group size

The OpenCL backend takes the block size as the unchanging value:

src/opencl.c:264:  size_t local_size = options->blocks;

The default results in CL_INVALID_WORK_ITEM_SIZE (-55) on clEnqueueNDRangeKernel.

The given value should either be adjusted not to exceed CL_DEVICE_MAX_WORK_GROUP_SIZE from https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clGetDeviceInfo.html or the value can be changed to NULL to let the driver decide.

Source: https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/clEnqueueNDRangeKernel.html

MacOS sed awk grep error message

Would be better to a) tell them the package names from homebrew or b) automate it in the build script

=>make

> [email protected] install-main /Users/tim.siwula/handshake/hs-miner
> ./scripts/rebuild main

OSX requires GNU sed, awk and grep!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install-main: `./scripts/rebuild main`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install-main 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!     /Users/tim.siwula/.npm/_logs/2018-09-12T05_46_34_910Z-debug.log
make: *** [all] Error 1
=>sudo make

> [email protected] install-main /Users/tim.siwula/handshake/hs-miner
> ./scripts/rebuild main

OSX requires GNU sed, awk and grep!
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install-main: `./scripts/rebuild main`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install-main 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!     /Users/tim.siwula/.npm/_logs/2018-09-12T05_46_38_589Z-debug.log
make: *** [all] Error 1
=>pwd
/Users/tim.siwula/handshake/hs-miner
=>git branch
* master
=>git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
=>

Requests time out when CPU is used

Every request done after the work had started when using the CPU backend times out.

I'm not sure about the proper solution, but when I limited the number of CPUs used:

for (let i = 0; i < this.count - 1; i++) {

the requests don't time out any more.

hs-miner will not run

Each time I attempt to run the miner after running hsd, I get the following error:

user@Cyborg-637:~$ ./hs-miner/bin/hs-miner
/home/user/hs-miner/node_modules/bindings/bindings.js:88
throw e
^

Error: libcudart.so.9.2: cannot open shared object file: No such file or directory
at Object.Module._extensions..node (module.js:681:18)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at bindings (/home/user/hs-miner/node_modules/bindings/bindings.js:81:44)
at Object. (/home/user/hs-miner/lib/hs-miner.js:11:36)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)

$ node --version
v8.10.0
$ node --version
v8.10.0

CentOS Issue

Hey all,

I'm attempting to get hsk-miner running on a linux box here at the CoLab, and running into the issue in the screenshot below (dumped with strace).

screen shot 2018-03-30 at 5 48 35 pm

Relevant system details:

CentOS Linux release 7.4.1708 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.4.1708 (Core)
CentOS Linux release 7.4.1708 (Core)

Relevant process details:

I'm able to npm install, make, rebuild, etc. without issue. The problem arises when attempting to run the hsk-miner command.

Any suggestions? Thank you in advance, folks.

Mining before mainnet

Hi there,

I'm interested in participating in securing the HSN by running a miner. However, it is unclear to me whether there is a monetary incentive to do so before the mainnet is launched. Am I correct in assuming that only a HSN testnet exists as of now and thus mining on the testnet will have no effect on the eventual mainnet once it is deployed? Or am I missing something?

Thanks!

Error: No addresses available for coinbase

Hey folks,

So I have hskd running and now when firing up hsk-miner with the correct port, etc. I'm coming across the error in the photo below.

Starting miner...
Error: No addresses available for coinbase. -1
    at Miner.execute (/home/mining/hsk-miner/bin/miner.js:354:13)
    at <anonymous>

screen shot 2018-04-03 at 5 15 45 pm

Is there some init step I missed? Any pointers are appreciated :) Thank you in advance.

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.