Tutorial: Mining AE on Ubuntu 18.04

Hey everyone,

We are happy to share the step-by-step guide on how to start mining on the æternity Testnet.

It was created to help æternity users start mining on the Testnet and be ready to quickly switch to the Mainnet, once it launches.

We are grateful to our Chinese æmbassador @imae.one for preparing this :slight_smile:

Best regards,
Albena

5 Likes

chinese developers can see the video record here : https://v.qq.com/x/page/b0718t5ta5w.html

2 Likes

Thank you for preparing this guide @imae.one!

Thank you for the tutorial :+1: I will try to do this in the coming week but i have some questions .
Is this cpu mining?
No gpu mining? No ccminer or other software?It’s like solo mining… If multiple rigs is there way to let them join the rig on the solo pool?
Or you have to do this on each rig?

Hi @JeanD,

Indeed the tutorial covers CPU mining only. You can read more about GPU mining in the technical document.

In regards to mining pools, there is in-progress PT ticket to add API endpoints that would allow implementation of mining pools.

2 Likes

I just did the whole tutorial on both Arch and Ubuntu, but I have the same problems on both distros.

When I do step 6, curl http://31.13.249.70:3013/v2/blocks/top I get the error `curl: (7) Failed to connect to 31.13.249.70 port 3013: No route to host.

Also when I do curl http://localhost:3013/v2/accounts/<my address> I get the error: {"reason":"Account not found"} even though the node has been running all night and seems to have sucesfully mined blocks (according to epoch_mining.log).

What am I doing wrong?

You can switch to the following URLS

And ‘account not found’, i guess it’s not mined new block yet

2 Likes

This seed node has been shutdown. It will be announced in the next release notes. In the meantime you can get the up-to-date seed nodes list at https://github.com/aeternity/epoch/blob/master/docs/release-notes/RELEASE-NOTES-0.24.0.md#inspect-the-testnet

The tutorial has been updated to change the outdated seed address.

3 Likes

Thank you for the links. That solved that part indeed. However I do notice that my node is completely out of sync.

curl http://127.0.0.1:3013/v2/blocks/top
{"beneficiary":"ak_2mgfokMgpxQCCdf1r8c7c5GVWmh7rf8cEJvUemqpVF3HMdEYvY","hash":"kh_2f6khUB2x1EF1LTnR9kmzD9MntZjo6HX26P379yE7hhvuMPmN3","height":117,"miner":"ak_2qakSDSDRcoUjbRyrnQ66FhHYo5e978iv64bgBR3TnWeokpCKZ","nonce":12532875263896348072,"pow":[6746261,14206720,17697457,20743520,28304355,30166821,42465577,82330514,96889088,102087353,112112603,120570918,141662953,170175798,197807952,208389556,221171602,223216487,238984161,243343720,279168987,290507138,309577906,314190392,320762426,322184812,324187321,344540743,354243991,355629187,372425899,411195760,424677362,438156695,454659913,469202488,475683844,477697913,497324246,517512524,519058696,529089816],"prev_hash":"kh_2727nL5UmKYXMG7aiPjVYammpSTR1C5WtNkCA1972WNZ8W1LEc","prev_key_hash":"kh_2727nL5UmKYXMG7aiPjVYammpSTR1C5WtNkCA1972WNZ8W1LEc","state_hash":"bs_2ALk5KSSwXVBkkkqzxySQXqpSJkQ5fzw3pRfAQsC1ReQheh97C","target":553713663,"time":1539164501271,"version":23}
curl http://52.10.46.160:3013/v2/blocks/top
{"beneficiary":"ak_tjnw1KcmnwfqXvhtGa9GRjanbHM3t6PmEWEWtNMM3ouvNKRu5","hash":"kh_gUJLYUxMcs6ryeHTCxuFbkWPpjv6gusC1DamkeL8E58UhDZon","height":6304,"miner":"ak_2sXtKD9spG4KQFnhJQmsRfW5qodbsQ8cDxULWDKoYwv2237CuT","nonce":17025220746222929804,"pow":[6088007,12755242,14200443,21116762,27654412,51335278,66954700,68927537,89603722,127647866,144214196,148381576,175502503,180271690,190496712,203376642,207660266,210344089,215508076,215701894,222695710,224037887,225182824,226007559,232328818,237706889,244361973,297528832,323239953,340509741,341211470,354680823,377618738,383839028,393012103,407987867,414762809,481919740,494609657,504732338,505805993,509745964],"prev_hash":"kh_2vGisMqdQRnuaUysKsAvHRkpvcr3r6mrnGBtxXZr6UqG4MVHWp","prev_key_hash":"kh_2vGisMqdQRnuaUysKsAvHRkpvcr3r6mrnGBtxXZr6UqG4MVHWp","state_hash":"bs_2mNK1HU1ts1yaXsy2rhP5qAsH7m3TmzSNCiMpgQHNjjT9gikHt","target":538634022,"time":1539165747250,"version":24}
curl http://127.0.0.1:3013/v2/status
{"difficulty":1.0,"genesis_key_block_hash":"kh_2ngPedVNMHwLSVvbeqo1EYk9KzK6ajy3yLJ9eehKbF4hVYM7nR","listening":true,"node_revision":"0648df63218bffa8c2a9c79255c83fc7a5a45b1a","node_version":"0.22.0","peer_count":4,"pending_transactions_count":0,"protocols":[{"protocol":{"effective_at_height":0,"version":23}}],"solutions":0,"syncing":true}[arjan@arjan-dev1 node]

contents of epoch.yaml:

---
sync:
  port: 3115
  external_port: 3015

keys:
  dir: keys
  password: "password"

http:
  external:
    port: 3013
  internal:
    port: 3113

websocket:
  internal:
    port: 3114
  channel:
    port: 3014

mining:
  beneficiary: "ak_2mgfokMgpxQCCdf1r8c7c5GVWmh7rf8cEJvUemqpVF3HMdEYvY"
  autostart: true

chain:
  persist: true
  db_path: ./my_db

yean, make sure the hash is sync to the testnet.

Somehow the node doesn’t want to sync. My node keeps being stuck on the above mentioned block 117.

When I check log/epoch_sync.log I see quite a lot of this kind of errors:

2018-10-10 14:21:56.860 [info] <0.4538.0>@aec_peer_connection:handle_info:322 Connection handshake failed - timeout was from <<"52.10.46.160">>
2018-10-10 14:21:56.860 [debug] <0.3358.0>@aec_peers:on_connection_failed:805 Peer "pp_QU9CvhA...G4o16Bf" - connection to 52.10.46.160:3015 failed by process <0.4538.0>
2018-10-10 14:21:56.860 [debug] <0.3358.0>@aec_peers:schedule_connect:715 Waiting 100 ms for the next connection
2018-10-10 14:21:56.961 [debug] <0.3358.0>@aec_peers:connect:677 No peers available befor 566180 ms
2018-10-10 14:21:56.961 [debug] <0.3358.0>@aec_peers:schedule_connect:715 Waiting 566180 ms for the next connection
2018-10-10 14:21:59.032 [info] <0.4540.0>@aec_peer_connection:handle_info:322 Connection handshake failed - timeout was from <<"13.250.162.250">>
2018-10-10 14:21:59.032 [debug] <0.3358.0>@aec_peers:on_connection_failed:805 Peer "pp_27xmgQ4...jxtFuAu" - connection to 13.250.162.250:3015 failed by process <0.4540.0>
2018-10-10 14:21:59.032 [debug] <0.3358.0>@aec_peers:schedule_connect:715 Waiting 100 ms for the next connection
2018-10-10 14:21:59.133 [debug] <0.3358.0>@aec_peers:connect:677 No peers available befor 564008 ms
2018-10-10 14:21:59.133 [debug] <0.3358.0>@aec_peers:schedule_connect:715 Waiting 564008 ms for the next connection

@imae.one @zkvonsnarkenstein.chain, I have the same issue. Any news/solution on this?

Thanks!

i thought it might be problem of version.

you should check the version , run ‘’http://18.130.148.7:3013/v2/blocks/top‘’
and ‘’http://127.0.0.1:3013/v2/blocks/top‘’,

Compare the local version with the testnet.

If the version dont match, then download and use the latest version epoch.

Indeed, it does not match the version. I seem to have version 23 instead of 25 as I can see at: ’http://18.130.148.7:3013/v2/blocks/top

I’m going to try and update epoch. Can I reuse the already generated pub key?

Thanks @imae.one!

It depends on the version you had, but I would try. It should work in recent few releases.

@rrotteveel @zkvonsnarkenstein.chain Indeed it looks like version mismatch to me as well.

My Epoch version is 0.22: epoch-0.22.0-ubuntu-x86_64.tar.gz

Do I need to compile the latest?

You would need the latest release to join the testnet for sure. My comment was about the keypairs, sorry for not being explicit enough.

1 Like

I compiled the latest Maintenance release and it’s working like a charm! Thanks @dincho.chain! Kudos to you!

3 Likes