ethash-mining-pool icon indicating copy to clipboard operation
ethash-mining-pool copied to clipboard

Make problem

Open kraymy opened this issue 4 years ago • 36 comments

I have a problem compiling open-ethereum-pool. Previously, everything was without problems, i.e. on 4 November 2020 and on 5 November 2020, something went together.

ERROR util/util.go:38:16: undefined: common.ToHex

kraymy avatar Nov 05 '20 13:11 kraymy

Same error here

ahonder avatar Nov 05 '20 14:11 ahonder

me too util/util.go:38:16: undefined: common.ToHex

maxinsur avatar Nov 05 '20 17:11 maxinsur

github.com/techievee/ethash-mining-pool/util

github.com/techievee/ethash-mining-pool/util

util/util.go:38:16: undefined: common.ToHex Makefile:10: recipe for target 'all' failed make: *** [all] Error 2

kraymy avatar Nov 06 '20 12:11 kraymy

please help solved problem

Simkas45 avatar Nov 10 '20 19:11 Simkas45

Work :D http://startmining.pl/

kraymy avatar Nov 10 '20 21:11 kraymy

What is solution?

ahonder avatar Nov 10 '20 21:11 ahonder

If you are trying to make open-ethereum-pool you will need to make changes in util.go and rpc.go to build it. in rpc.go you need to change line 15 from "github.com/ethereum/go-ethereum/common" TO "github.com/ethereum/go-ethereum/common/hexutil" Then on line 180 change rpcResp, err := r.doPost(r.Url, "eth_sign", []string{from, common.ToHex(hash[:])}) TO: rpcResp, err := r.doPost(r.Url, "eth_sign", []string{from, hexutil.Encode(hash[:])})

In util.go line 10 add: "github.com/ethereum/go-ethereum/common/hexutil"

line 38 change return string(common.ToHex(diff1.Bytes())) TO: return string(hexutil.Encode(diff1.Bytes()))

then make clean and make and you should be good to go

VercauterenK avatar Dec 23 '20 14:12 VercauterenK

If you are trying to make open-ethereum-pool you will need to make changes in util.go and rpc.go to build it. in rpc.go you need to change line 15 from "github.com/ethereum/go-ethereum/common" TO "github.com/ethereum/go-ethereum/common/hexutil" Then on line 180 change rpcResp, err := r.doPost(r.Url, "eth_sign", []string{from, common.ToHex(hash[:])}) TO: rpcResp, err := r.doPost(r.Url, "eth_sign", []string{from, hexutil.Encode(hash[:])})

In util.go line 10 add: "github.com/ethereum/go-ethereum/common/hexutil"

line 38 change return string(common.ToHex(diff1.Bytes())) TO: return string(hexutil.Encode(diff1.Bytes()))

then make clean and make and you should be good to go

Got the same problem with

Makefile:10: recipe for target 'all' failed make: *** [all] Error 2

image

aDavroult avatar Jan 21 '21 17:01 aDavroult

If you are trying to make open-ethereum-pool you will need to make changes in util.go and rpc.go to build it. in rpc.go you need to change line 15 from "github.com/ethereum/go-ethereum/common" TO "github.com/ethereum/go-ethereum/common/hexutil" Then on line 180 change rpcResp, err := r.doPost(r.Url, "eth_sign", []string{from, common.ToHex(hash[:])}) TO: rpcResp, err := r.doPost(r.Url, "eth_sign", []string{from, hexutil.Encode(hash[:])}) In util.go line 10 add: "github.com/ethereum/go-ethereum/common/hexutil" line 38 change return string(common.ToHex(diff1.Bytes())) TO: return string(hexutil.Encode(diff1.Bytes())) then make clean and make and you should be good to go

Got the same problem with

Makefile:10: recipe for target 'all' failed make: *** [all] Error 2

image

got the same error, bro how to fix it?

James1847 avatar Dec 22 '21 02:12 James1847

mp-classic/ETCpool working ETC pool with charts and modified frontend. Have fun

mp-classic avatar Dec 22 '21 02:12 mp-classic

image done build !

canhmai avatar Feb 22 '22 07:02 canhmai

mp-classic/ETCpool working ETC pool with charts and modified frontend. Have fun

Can u please help me in config.json ? I'm lost there, i've copied api.json to test but getting Syntax error. I'm not a programmer but i don't see nothing wrong in the renamed config.json (api.json) Actually this was the first fork i was able to compile but i dont unknown how to run it. BTW, i known its a hard work make a instructions tutorial. If you could give me some clues to follow I think it's enough. Thanks in advance

Teleloco avatar Mar 22 '22 01:03 Teleloco

I could set it up for you in couple of minutes. You should have a up and running VM with SSD, minimum 4 core vCPU (recommended 8vCPU) and 8GB ram at minimum. From there the pool takes about few minutes and the blockchain sync should take about few hours (2 to 6 hours). The only thing remaining is the look of the website pool to get it done as you like. You have attached to this email some screenshots that were made with the pool interface. Best regards, Cristian Vasiliu CIS ________________________________ From: Teleloco @.> Sent: Tuesday, March 22, 2022 1:38:58 AM To: techievee/ethash-mining-pool @.> Cc: cristianvsl @.>; Comment @.> Subject: Re: [techievee/ethash-mining-pool] Make problem (#7) mp-classic/ETCpool working ETC pool with charts and modified frontend. Have fun Can u please help me in config.json ? I'm lost there, i've copied api.json to test but getting Syntax error. I'm not a programmer but i don't see nothing wrong in the renamed config.json (api.json) Actually this was the first i was able to compile but i dont unknown how to run it. Thanks in advance — Reply to this email directly, view it on GitHub<#7 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARZGZD5CQPWPV3CCVYGS23LVBEQDFANCNFSM4TLLHYAQ. You are receiving this because you commented.Message ID: @.***>

Thanks for ur offer, but i dont trust anyone. Its my deffect. But if u want to help here i would really apreciate that. Regards

Teleloco avatar Mar 23 '22 09:03 Teleloco

You are very kind. What can I offer in exchange for you to make a video of no more than 5' and upload it to YT with the steps? You can put the link here. And what you want in return, first.

Teleloco avatar Mar 23 '22 12:03 Teleloco

U make me smile in a bad day. And now i'm sure that still exist good people out there. Thanks u. I really apreciate that.

Teleloco avatar Mar 23 '22 13:03 Teleloco

I have blockchain Classic up to date. Ubuntu on VM with 16 vCPU, 32gb RAM and 2tb of storage ( zvol, zraid3). Fork of mp-classic/ETCPool compiled, and all dependencies installed.

Teleloco avatar Mar 23 '22 14:03 Teleloco

Did you change all the ip's? including ip's from /www/config/environment.js? after changing the ip's from /www/config/environment.js you have to go back to the directory /www and run ( build.sh ). If you didnt got any "permission denied" from env.sh and build.sh, you`re ready to start the pool with this command ( ./build/bin/open-etc-pool-friends api.json ) You should run it like this: screen -S api ./build/bin/open-etc-pool-friends api.json. Same command for proxy.json, payouts.json, unlocker.json.

mp-classic avatar Mar 23 '22 14:03 mp-classic

I have saved the README.md with all the steps. Check it out

mp-classic avatar Mar 23 '22 14:03 mp-classic

No, i did not change the ip's of anything. I didn't understand how it works until you just explained it to me. So, I have to configure the frontend before executing something? It starts to make sense. I thought that only with the config.json I could get the system up and running even without a page. So, is the pool executed several times with different configuration files such as payments.json for that to work, as a module?

Teleloco avatar Mar 23 '22 14:03 Teleloco

Running every json separate is easier to know when or if any of the modules have crashed so you can restart it. Before building the frontend you need to change the IP's from: api.json, proxy.json, unlocker.json, payouts.json and from /www/config/environment.json. Where you see the IP 0.0.0.0, do not change it. Same if you see 127.0.0.1. Basically you`d need to change "etc.miningpub.uk" where you see it in any of the config files.

mp-classic avatar Mar 23 '22 14:03 mp-classic

After cloning the pool, did you run ( make ) command?

mp-classic avatar Mar 23 '22 14:03 mp-classic

Yeah, in api.json i've changed all adress to localhost (127.0.0.1) And, yes, after cloning i run make and was succesful. The changes, i assume mean to be before of make?

Teleloco avatar Mar 23 '22 14:03 Teleloco

Youll also need to install nginx. After installing nginx, and after building the frontend, go to the pool main folder /ETCpool and run this command ( sudo cp /misc/nginx-default.conf /etc/nginx/sites-available/default ) Then run ( sudo nano /etc/nginx/sites-available/default ) and youll see the following

` upstream api { server 127.0.0.1:8080; (Here you need to change the IP 127.0.0.1 with your IP used in the api.json file) }

server { listen 0.0.0.0:80; root /path/to/pool/www/dist; (Your path to pool - /home/yourUsername/ETCpool/www/dist) index index.html index.htm;

server_name localhost;

location /api {
	proxy_pass http://api;
}

location / {
	try_files $uri $uri/ /index.html;
}

} `

After this hit CTRL + x and Y to save it.

From this point if everything is alright, start running the pool modules one by one with "screen" command. To exit a screen (after running ./build/bin/open-etc-pool-friends api.json for example) just hit CTRL + a + d. To bring up any of the modules on screen you type: screen -r api or screen -r proxy and so on.

Let me know how it goes and maybe share a link to the pool frontend.

All the things i`ve said to you here, looks like a lot maybe but in practice should take you about few minutes to do everything. Cheers

mp-classic avatar Mar 23 '22 14:03 mp-classic

Attention tho to each module that only part of the code is "true". on api.json only the api part of the code is enabled, same for the rest of the json's.

mp-classic avatar Mar 23 '22 15:03 mp-classic

Having 16vCores you should set // Set to the number of CPU cores of your server "threads": 2, for each module.

Later on you`ll learn that the payouts module can be run only once a day so it doesn need to run continuosly.

mp-classic avatar Mar 23 '22 15:03 mp-classic

Now I think I can get it working. My plan is to firstly run the pool closely. For me and my friends, if everything works fine, pay to somebody to make a custom front end, assign a public domain domain and share. So in the future i can add more coins, like RVN and ETH. All this, if I have your permission. Thank u man. You explained it to me down to the last detail. One last question, about bandwith, 60MB/s simmetrics is enough?

Teleloco avatar Mar 23 '22 15:03 Teleloco

Did you change all the ip's? including ip's from /www/config/environment.js? after changing the ip's from /www/config/environment.js you have to go back to the directory /www and run ( build.sh ). If you didnt got any "permission denied" from env.sh and build.sh, you`re ready to start the pool with this command ( ./build/bin/open-etc-pool-friends api.json ) You should run it like this: screen -S api ./build/bin/open-etc-pool-friends api.json. Same command for proxy.json, payouts.json, unlocker.json.

I dont have environment.js in that path. is strictly necessary? Where i can find it? Seems like a lot of work for me, but is good to learn

Teleloco avatar Mar 23 '22 16:03 Teleloco

Okay,

Let's take it step by step.

  1. git clone https://github.com/mp-classic/ETCpool.git
  2. cd ETCpool
  3. chmod 775 /build/env.sh
  4. cd ..
  5. make
  6. cd www
  7. cd config
  8. nano environment.js (modify the IP's)
  9. cd .. (to go back to www folder)
  10. chmod 775 build.sh
  11. ./build.sh (and wait)
  12. After the build is done, install nginx and follow the steps ive already gave to you in the above comments!

mp-classic avatar Mar 23 '22 17:03 mp-classic

Before doing the above, make sure you have nodejs installed (use nvm from github) and [email protected] is also installed. Also before doing the above steps do this: npm install -g [email protected] npm install -g bower sudo chown -R $USER:$GROUP ~/.npm sudo chown -R $USER:$GROUP ~/.config npm install bower install

mp-classic avatar Mar 23 '22 17:03 mp-classic