Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
CaleHH authored and eva-networks committed Sep 18, 2021
1 parent b93792a commit 7a39a89
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 9 deletions.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ score=11438795269524584254274319733603080386142752749719967238153045665826607684
INFO [09-03|21:36:24.472] waiting for next mining epoch time duration (second)=294
```

6. If your mining work get the best score in this mining epoch, you will get mining reward and log prints:

```shell
INFO [09-18|12:18:28.865] Congratulations you got the best score! height=215,500
```

## Build

Building miner requires both a Go (version 1.14 or later) and a C compiler.
Expand Down Expand Up @@ -226,7 +232,7 @@ You can start mining with subcommand `mine`. There are some parameters for minin

- **--pk**: Path of the ZKP prove key (default: "./QmNpJg4jDFE4LMNvZUzysZ2Ghvo4UJFcsjguYcx4dTfwKx").
- **--key**: Path of the key file as miner address (default: "./keyfile.json").
- **--coinbase**: Coinbase Address where mining reward will be sent to. It's the same as miner address by default.
- **--coinbase**: Coinbase Address where mining reward will be sent to. No need to set this flag if you've already set coinbase address in Fortress wallet.
- **--passwordfile**: The file that contains the password for the keyfile.
- **--config**: Config file path (default: "./config.yml").
- **--url**: Set WebSocket raw url of Evanesco full node to connect to. (miner connects to official seed nodes by default)
Expand Down Expand Up @@ -266,6 +272,29 @@ miner_key: ./keyfile.json
coinbase_address: "Fill in an address to receive mining reward"
```
### Error Logs
**If any log with `ERROR` prefix prints, your mining work is not able to be successfully accepted.
Please follow the instruction to fix it.**

- Coinbase Address Incorrect:

This error may happen, if you've set coinbase address in Fortress and also use `--coinbase` flag when you start your coinbase.

If these two coinbase addresses are not the same, log prints an error:

`ERROR[09-18|11:21:50.702] coinbase address conflict, check the coinbase address setting in Fortress `

Fix: Check your coinbase settings and change your coinbase in Fortress or unset the `--coinbase`.

- Miner Address Not Valid:

If your miner address is not staked or not in the valid time period due to early or overtime, log prints an error:

`ERROR[09-18|11:21:50.702] miner address not staked or not in valid time period`

Fix: Check your miner address in Fortress, then stake for your miner address or wait till valid time period.

## Local Test

Check git branch `localtest` to locally test your mining device, no need to connect to real Evanesco node.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ require (
replace (
github.com/consensys/gnark v0.4.0 => github.com/Evanesco-Labs/gnark v0.4.1-0.20210810081143-48fdd25c1073
github.com/consensys/gnark-crypto v0.4.1-0.20210428083642-6bd055b79906 => github.com/Evanesco-Labs/gnark-crypto v0.4.1-0.20210810075744-74f0c8ad40b3
//github.com/ethereum/go-ethereum v1.10.6 => github.com/Evanesco-Labs/go-evanesco v0.0.3-0.20210906122038-8e44e60bf2ea
github.com/ethereum/go-ethereum v1.10.6 => github.com/calehh/go-evanesco v0.0.0-20210917073207-89d59654bcbd
github.com/ethereum/go-ethereum v1.10.6 => github.com/Evanesco-Labs/go-evanesco v0.0.3-0.20210918061520-9f6108a9352c
)
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ github.com/Evanesco-Labs/gnark v0.4.1-0.20210810081143-48fdd25c1073 h1:Bkj41fdvZ
github.com/Evanesco-Labs/gnark v0.4.1-0.20210810081143-48fdd25c1073/go.mod h1:DBzOTh4q+Kk8ZkZ0riR9gNMtzBWWwInW8kxIreuCKFY=
github.com/Evanesco-Labs/gnark-crypto v0.4.1-0.20210810075744-74f0c8ad40b3 h1:FWih6h7mdtD1L95x8BcT/yQxKtwZN1mf3QrJJ+MQkvA=
github.com/Evanesco-Labs/gnark-crypto v0.4.1-0.20210810075744-74f0c8ad40b3/go.mod h1:815PAHg3wvysy0SyIqanF8gZ0Y1wjk/hrDHD/iT88+Q=
github.com/Evanesco-Labs/go-evanesco v0.0.3-0.20210918061520-9f6108a9352c h1:bXI974wHZJMsBh1n556IAuCQ9QKG2nbVkXx3DVA7e3Y=
github.com/Evanesco-Labs/go-evanesco v0.0.3-0.20210918061520-9f6108a9352c/go.mod h1:dW57yRRWtcTycL3RMHIClId0A/YM+iNSr8bTF6HsK98=
github.com/Kubuxu/go-os-helper v0.0.1/go.mod h1:N8B+I7vPCT80IcP58r50u4+gEEcsZETFUpAzWW2ep1Y=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8=
Expand Down Expand Up @@ -107,10 +109,6 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY=
github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs=
github.com/c-bata/go-prompt v0.2.2/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34=
github.com/calehh/go-evanesco v0.0.0-20210906114609-ec03ebd5cc1c h1:ioLm9y4M/aLioZykNUkNZn5G7sQA3sKVvESKnYKFHl0=
github.com/calehh/go-evanesco v0.0.0-20210906114609-ec03ebd5cc1c/go.mod h1:dW57yRRWtcTycL3RMHIClId0A/YM+iNSr8bTF6HsK98=
github.com/calehh/go-evanesco v0.0.0-20210917073207-89d59654bcbd h1:RYLy1NPpyozKAs9Wtiv8dzmzyfRjkfYYHyAmYmjiCX8=
github.com/calehh/go-evanesco v0.0.0-20210917073207-89d59654bcbd/go.mod h1:dW57yRRWtcTycL3RMHIClId0A/YM+iNSr8bTF6HsK98=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk=
github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s=
Expand Down
3 changes: 1 addition & 2 deletions mine.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ import (
"time"
)

//var AvisWsURL = []string{"ws://3.128.151.194:7778", "ws://18.118.180.198:7778", "ws://18.191.121.77:7778", "ws://18.191.17.148:7778", "ws://18.219.122.241:7778"}
var AvisWsURL = []string{"ws://127.0.0.1:7777","ws://18.219.122.241:7779"}
var AvisWsURL = []string{"ws://3.128.151.194:7778", "ws://18.118.180.198:7778", "ws://18.191.121.77:7778", "ws://18.191.17.148:7778", "ws://18.219.122.241:7778"}

var (
configFlag = cli.StringFlag{
Expand Down

0 comments on commit 7a39a89

Please sign in to comment.