Compare commits

...

4 Commits

Author SHA1 Message Date
Jim McDonald
77df1bba43 Update documentation 2020-07-22 09:04:59 +01:00
Jim McDonald
1d4e52cb49 Update troubleshooting 2020-07-22 08:48:17 +01:00
Jim McDonald
c1e124fbd3 Defer relocking appropriately. 2020-07-21 19:00:24 +01:00
Jim McDonald
91bc6ec86d Update cross-compile 2020-07-21 18:38:06 +01:00
6 changed files with 35 additions and 27 deletions

View File

@@ -53,7 +53,7 @@ jobs:
go get github.com/suburbandad/xgo
- name: Cross-compile
run: xgo -v -x --targets="linux/amd64,linux/arm64,windows/amd64" github.com/wealdtech/ethdo
run: xgo -v -x -ldflags="-X github.com/wealdtech/ethdo/cmd.ReleaseVersion=${RELEASE_VERSION}" --targets="linux/amd64,linux/arm64,windows/amd64" github.com/wealdtech/ethdo
- name: Create windows zip file
run: |

View File

@@ -10,7 +10,9 @@ A command-line tool for managing common tasks in Ethereum 2.
## Table of Contents
- [Install](#install)
- [Binaries](#binaries)
- [Docker](#docker)
- [Source](#source)
- [Usage](#usage)
- [Maintainers](#maintainers)
- [Contribute](#contribute)
@@ -18,6 +20,19 @@ A command-line tool for managing common tasks in Ethereum 2.
## Install
### Binaries
Binaries for the latest version of `ethdo` can be obtained from [the releases page](https://github.com/wealdtech/ethdo/releases).
### Docker
You can obtain the latest version of `ethdo` using docker with:
```
docker pull wealdtech/ethdo
```
### Source
`ethdo` is a standard Go program which can be installed with:
```sh
@@ -28,15 +43,7 @@ Note that `ethdo` requires at least version 1.13 of go to operate. The version
If this does not work please see the [troubleshooting](https://github.com/wealdtech/ethdo/blob/master/docs/troubleshooting.md) page.
### Docker
You can obtain the latest version of `ethdo` using docker with:
```
docker pull wealdtech/ethdo
```
Or build `ethdo` using docker:
The docker image can be build locally with:
```sh
docker build -t ethdo .
@@ -142,6 +149,8 @@ There is a [HOWTO](https://github.com/wealdtech/ethdo/blob/master/docs/howto.md)
Jim McDonald: [@mcdee](https://github.com/mcdee).
Special thanks to [@SuburbanDad](https://github.com/SuburbanDad) for updating xgo to allow for cross-compilation of `ethdo` releaes.
## Contribute
Contributions welcome. Please check out [the issues](https://github.com/wealdtech/ethdo/issues).

View File

@@ -55,7 +55,7 @@ In quiet mode this will return 0 if the key can be obtained, otherwise 1.`,
}
}
assert(unlocked, "Failed to unlock account to obtain private key")
defer errCheck(locker.Lock(context.Background()), "failed to re-lock account")
defer relockAccount(locker)
}
privateKey, err := privateKeyProvider.PrivateKey(ctx)
errCheck(err, "Failed to obtain private key")

View File

@@ -272,7 +272,7 @@ func accountFromPath(ctx context.Context, path string) (e2wtypes.Account, error)
if err != nil {
return nil, errors.New("invalid wallet passphrase")
}
defer errCheck(locker.Lock(context.Background()), "failed to re-lock account")
defer relockAccount(locker)
}
}
@@ -403,3 +403,8 @@ func openNamedWallet(walletName string) (e2wtypes.Wallet, error) {
}
return walletFromPath(walletName)
}
// relockAccount locks an account; generally called as a defer after an account is unlocked.
func relockAccount(locker e2wtypes.AccountLocker) {
errCheck(locker.Lock(context.Background()), "failed to re-lock account")
}

View File

@@ -2,19 +2,7 @@
## Installing ethdo
1. To install `ethdo`, issue the following command:
```sh
GO111MODULE=on go get github.com/wealdtech/ethdo@latest
```
2. Ensure `ethdo` is installed properly by issuing the command:
```sh
ethdo version
```
Ensure the output matches the most recent version listed on the repository's [release history](https://github.com/wealdtech/ethdo/releases/).
1. To install `ethdo`, use the instructions on the [main page](https://github.com/wealdtech/ethdo).
## Typical validating setups

View File

@@ -1,11 +1,11 @@
# Troubleshooting
## Compilation problems
## Compilation problems on Linux
### gcc not found
### cannot find -lstdc++
This is usually an error on linux systems. If you receive errors of this type your computer is missing some files to allow `ethdo` to build. To resolve this run the following command:
If you receive errors of this type your computer is missing some files to allow `ethdo` to build. To resolve this, run the following command:
```sh
sudo apt install build-essential libstdc++6
@@ -13,6 +13,12 @@ sudo apt install build-essential libstdc++6
and then try to install `ethdo` again.
## Compilation problems on Windows
### gcc not found
If you receive errors of this type your computer is missing some files to allow `ethdo` to build. To resolve this install gcc by following the instructions at http://mingw-w64.org/doku.php
## ethdo not found after installing
This is usually due to an incorrectly set path. Go installs its binaries (such as `ethdo`) in a particular location. The defaults are: