Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #5066 from ethereum/rename-to-aleth
Browse files Browse the repository at this point in the history
Rename to aleth
  • Loading branch information
chfast authored Jun 14, 2018
2 parents 70d52b8 + 2683474 commit a3f2afe
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 187 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ install: |
export HOMEBREW_NO_AUTO_UPDATE=1
./scripts/install_deps.sh
before_script:
- ./scripts/prepare_ccache.sh
- travis_wait 150 ./scripts/build.sh $TRAVIS_BUILD_TYPE
- ./scripts/cleanup_ccache.sh
script:
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ endif()
add_subdirectory(aleth)

if (TOOLS)
add_subdirectory(ethkey)
add_subdirectory(ethvm)
add_subdirectory(aleth-key)
add_subdirectory(aleth-vm)
add_subdirectory(rlp)
endif()

Expand Down
3 changes: 3 additions & 0 deletions aleth-key/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add_executable(aleth-key KeyAux.h main.cpp)
target_link_libraries(aleth-key PRIVATE ethcore devcore Boost::program_options)
install(TARGETS aleth-key EXPORT alethTargets DESTINATION bin)
File renamed without changes.
4 changes: 2 additions & 2 deletions ethkey/main.cpp → aleth-key/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace po = boost::program_options;
void version()
{
const auto* buildinfo = aleth_get_buildinfo();
cout << "ethkey " << buildinfo->project_version << "\nBuild: " << buildinfo->system_name << "/"
cout << "aleth-key " << buildinfo->project_version << "\nBuild: " << buildinfo->system_name << "/"
<< buildinfo->build_type << endl;
exit(0);
}
Expand Down Expand Up @@ -109,7 +109,7 @@ int main(int argc, char** argv)
if (vm.count("help"))
{
cout
<< "Usage ethkey [OPTIONS]" << endl
<< "Usage aleth-key [OPTIONS]" << endl
<< "Options:" << endl << endl;
KeyCLI::streamHelp(cout);
cout << allowedOptions;
Expand Down
7 changes: 7 additions & 0 deletions aleth-vm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
add_executable(aleth-vm main.cpp)

target_link_libraries(aleth-vm PRIVATE ethereum evm ethashseal devcore Boost::program_options)

target_include_directories(aleth-vm PRIVATE ../utils)

install(TARGETS aleth-vm EXPORT alethTargets DESTINATION bin)
2 changes: 1 addition & 1 deletion ethvm/main.cpp → aleth-vm/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int64_t maxBlockGasLimit()
void version()
{
const auto* buildinfo = aleth_get_buildinfo();
cout << "ethvm " << buildinfo->project_version << "\n";
cout << "aleth-vm " << buildinfo->project_version << "\n";
cout << "Build: " << buildinfo->system_name << "/" << buildinfo->build_type << "\n";
exit(0);
}
Expand Down
5 changes: 2 additions & 3 deletions doc/gitbook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ cpp-ethereum is a distribution of software including a number of diverse tools.

The full software suite of cpp-ethereum includes:

- **eth** (`eth`) The mainline CLI Ethereum client. Run it in the background and it will connect to the Ethereum network; you can mine, make transactions and inspect the blockchain.
- `ethkey` A key/wallet management tool for Ethereum keys. This lets you add, remove and change your keys as well as *cold wallet device*-friendly transaction inspection and signing.
- **aleth** (`aleth`) The mainline CLI Ethereum client. Run it in the background and it will connect to the Ethereum network; you can mine, make transactions and inspect the blockchain.
- `aleth-key` A key/wallet management tool for Ethereum keys. This lets you add, remove and change your keys as well as *cold wallet device*-friendly transaction inspection and signing.
- `ethminer` A standalone miner. This can be used to check how fast you can mine and will mine for you in concert with `eth`, `geth` and `pyethereum`.
- `ethvm` The Ethereum virtual machine emulator. You can use this to run EVM code.
- `rlp` An serialisation/deserialisation tool for the Recursive Length Prefix format.
2 changes: 1 addition & 1 deletion doc/gitbook/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* [Getting started](getting_started.md)
* [Interactive Console](interactive_console.md)
* [Mining](mining.md)
* [ethkey](ethkey.md)
* [aleth-key](aleth-key.md)
* [Whisper](whisper.md)
* Recipes and How-tos
* [Cold Wallet Storage Device](cold_wallet_storage_device.md)
Expand Down
56 changes: 28 additions & 28 deletions doc/gitbook/ethkey.md → doc/gitbook/aleth-key.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ethkey
# aleth-key

`ethkey` is a CLI tool that allows you to interact with the Ethereum wallet. With it you can list, inspect, create, delete and modify keys and inspect, create and sign transactions.
`aleth-key` is a CLI tool that allows you to interact with the Ethereum wallet. With it you can list, inspect, create, delete and modify keys and inspect, create and sign transactions.

### Keys and Wallets

Expand All @@ -14,10 +14,10 @@ While all clients have keys, some do not have wallets; these clients typically s

We'll assume you have not yet run a client such as `eth` or anything in the Aleth series of clients. If you have, you should skip this section.

To create a wallet, run `ethkey` with the `createwallet` command:
To create a wallet, run `aleth-key` with the `createwallet` command:

```
> ethkey createwallet
> aleth-key createwallet
Please enter a MASTER passphrase to protect your key store (make it strong!):
```

Expand All @@ -28,7 +28,7 @@ You'll be asked for a "master" passphrase. This protects your privacy and acts a
We can list the keys within the wallet simply by using the `list` command:

```
> ethkey list
> aleth-key list
No keys found.
```

Expand All @@ -41,7 +41,7 @@ One of the nice things about Ethereum is that creating a key is tantamount to cr
To create a key, we use the `new` command. To use it we must pass a name - this is the name we'll give to this account in the wallet. Let's call it "test":

```
> ethkey new test
> aleth-key new test
Enter a passphrase with which to secure this account (or nothing to use the master passphrase):
```

Expand All @@ -54,7 +54,7 @@ Once you enter a passphrase, it'll ask you to confirm it by entering again. Ente
Because you gave it its own passphrase, it'll also ask you to provide a hint for this password which will be displayed to you whenever it asks you to enter it. The hint is stored in the wallet and is itself protected by the master passphrase. Enter the truly awful hint of `321 backwards`.

```
> ethkey new test
> aleth-key new test
Enter a passphrase with which to secure this account (or nothing to use the master passphrase):
Please confirm the passphrase by entering it again:
Enter a hint to help you remember this passphrase: 321 backwards
Expand All @@ -72,7 +72,7 @@ Notice also that the key has another identifier after `Created key`. This is kno
Now let's make sure it worked properly by listing the keys in the wallet:

```
> ethkey list
> aleth-key list
055dde03-47ff-dded-8950-0fe39b1fa101 0092e965… XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ test
```

Expand All @@ -82,12 +82,12 @@ It reports one key on each line (for a total of one key here). In this case our

You might see addresses passed as hex-only strings, especially with old software. These are dangerous since they don't include a checksum or special code to detect typos. You should generally try to keep clear of them.

Occasionally, however, it's important to convert between the two. `ethkey` provides the `inspect` command for this purpose. When passed any address, file or UUID, it will tell you information about it including both formats of address.
Occasionally, however, it's important to convert between the two. `aleth-key` provides the `inspect` command for this purpose. When passed any address, file or UUID, it will tell you information about it including both formats of address.

For example, to get it to tell us about our account, we might use:

```
> ethkey inspect test
> aleth-key inspect test
test (0092e965…)
ICAP: XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ
Raw hex: 0092e965928626f8880629cec353d3fd7ca5974f
Expand All @@ -96,11 +96,11 @@ test (0092e965…)
We could just as easily use the ICAP `XE472EVK...` or raw hex `0092e965...`:

```
> ethkey inspect XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ
> aleth-key inspect XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ
test (0092e965…)
ICAP: XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ
Raw hex: 0092e965928626f8880629cec353d3fd7ca5974f
> ethkey inspect 0092e965928626f8880629cec353d3fd7ca5974f
> aleth-key inspect 0092e965928626f8880629cec353d3fd7ca5974f
test (0092e965…)
ICAP: XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ
Raw hex: 0092e965928626f8880629cec353d3fd7ca5974f
Expand All @@ -118,10 +118,10 @@ Here's an unsigned transaction. It authorises the donation of 1 ether to me:
ec80850ba43b74008252089400be78bf8a425471eca0cf1d255118bc080abf95880de0b6b3a7640000801b8080
```

On its own, it won't do much. We can see this by decoding it in `ethkey`:
On its own, it won't do much. We can see this by decoding it in `aleth-key`:

```
> ethkey decode ec80850ba43b74008252089400be78bf8a425471eca0cf1d255118bc080abf95880de0b6b3a7640000801b8080
> aleth-key decode ec80850ba43b74008252089400be78bf8a425471eca0cf1d255118bc080abf95880de0b6b3a7640000801b8080
Transaction 705d490edc318b50223efa7bb9c19d65f05c3c527e4f8e60535b46a2ed128706
type: message
to: XE6934MX3U67M48MPHYMC1A1X306AFKEXH (00be78bf…)
Expand All @@ -138,12 +138,12 @@ Note that it states the transaction is `<unsigned>` to the right of `from:`. Thi

### Signing a Transaction

`ethkey` can be used to sign a pre-existing, but unsigned, transaction (it can also create a transaction and sign it itself). In this case, the transaction is actually harmless anyway since we're signing with the key of a fresh account that has no Ether to be transferred.
`aleth-key` can be used to sign a pre-existing, but unsigned, transaction (it can also create a transaction and sign it itself). In this case, the transaction is actually harmless anyway since we're signing with the key of a fresh account that has no Ether to be transferred.

The command we'll use is `sign`. To use it we must identify the account with which we wish to sign. This can be the ICAP (`XE472EVK...`), the hex address (`0092e965...`), the UUID (`055dde...`), the key file or simply the plain old name (`test`). Secondly you must describe transaction it should sign. This can be done through passing the hex or through a file containing the hex.

```
> ethkey sign test ec80850ba43b74008252089400be78bf8a425471eca0cf1d255118bc080abf95880de0b6b3a7640000801b8080
> aleth-key sign test ec80850ba43b74008252089400be78bf8a425471eca0cf1d255118bc080abf95880de0b6b3a7640000801b8080
Enter passphrase for key (hint:321 backwards):
```

Expand All @@ -156,7 +156,7 @@ a37c588c853dc20bbaef53b680e23642a03122897bbb9a53d25d0d8f3665a94f: f86c80850ba43b
Let's make sure it worked by decoding it.

```
> ethkey decode f86c80850ba43b74008252089400be78bf8a425471eca0cf1d255118bc080abf95880de0b6b3a7640000801ca07638c34170f3e04313bbb6c5bfc10a0c665200515a1aa5e922c7ae6c0dd085faa079ab46048e643bb4042bcb22da86d2646eb0b727f23aa3e165102b824563c70d
> aleth-key decode f86c80850ba43b74008252089400be78bf8a425471eca0cf1d255118bc080abf95880de0b6b3a7640000801ca07638c34170f3e04313bbb6c5bfc10a0c665200515a1aa5e922c7ae6c0dd085faa079ab46048e643bb4042bcb22da86d2646eb0b727f23aa3e165102b824563c70d
Transaction a37c588c853dc20bbaef53b680e23642a03122897bbb9a53d25d0d8f3665a94f
type: message
to: XE6934MX3U67M48MPHYMC1A1X306AFKEXH (00be78bf…)
Expand Down Expand Up @@ -195,7 +195,7 @@ or, for Windows:
Now, we'll delete the key with the `kill` command:

```
> ethkey kill test
> aleth-key kill test
1 key(s) deleted.
```

Expand All @@ -205,7 +205,7 @@ Check by calling `list`:


```
> ethkey list
> aleth-key list
No keys found.
```

Expand All @@ -218,13 +218,13 @@ We could simply copy it back into the original `keys` directory. This would inde
Better would be to reimport it into the wallet, which makes it addressable by its ICAP and hex, and gives it a name and password hint to boot. To do this, we need to use the `import` command, which takes the file and the name of the key:

```
> ethkey import ~/backup-keys/* test
> aleth-key import ~/backup-keys/* test
```

or, for Windows:

```
> ethkey import $HOME/backup-keys/*.* test
> aleth-key import $HOME/backup-keys/*.* test
```

Here it will need to know the passphrase for the key, mainly to determine the address of the key for placing into the wallet. There's no hint now because the wallet doesn't know anything about it. Enter the `123` passphrase.
Expand All @@ -246,7 +246,7 @@ Finally it will tell you that all went well and the key is reimported. We should
To double-check, we can list the keys:

```
> ethkey list
> aleth-key list
055dde03-47ff-dded-8950-0fe39b1fa101 0092e965… XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ test
```

Expand All @@ -256,23 +256,23 @@ All restored!

Because our keys all share the same format it's really easy to import keys from other clients like Geth. In fact it's exactly the same process as restoring a key from a previous backup as we did in the last step.

If we assume we have a geth key at `mygethkey.json`, then to import it to use `eth`, simply use:
If we assume we have a geth key at `mygeth-key.json`, then to import it to use `aleth`, simply use:

```
> ethkey import mygethkey.json "My Old Geth Key"
> aleth-key import mygeth-key.json "My Old Geth Key"
```

It will prompt you for your passphrase to ascertain the address for the key.


### Changing the Password

Security people reckon that it is prudent to change your password regularly. You can do so easily with `ethkey` using the `recode` command (which actually does a whole lot more, but that's advanced usage).
Security people reckon that it is prudent to change your password regularly. You can do so easily with `aleth-key` using the `recode` command (which actually does a whole lot more, but that's advanced usage).

To do so, simply pass in the name(s) of any keys whose passwords you wish to change. Let's change our key's password:

```
> ethkey recode test
> aleth-key recode test
Enter old passphrase for key 'test' (hint: 321 backwards):
```

Expand All @@ -291,9 +291,9 @@ You'll finally get a confirmation that the re-encoding took place; your key is n

## The Rest

There's much more to discover with `ethkey`; it provides a suite of commands for playing with "bare" secrets, those not in the wallet (the `listbare`, `newbare`, ... commands), and allows keys to be imported without actually ever being decrypted (`importwithaddress`) and conversion between ICAP and hex (`inspectbare`).
There's much more to discover with `aleth-key`; it provides a suite of commands for playing with "bare" secrets, those not in the wallet (the `listbare`, `newbare`, ... commands), and allows keys to be imported without actually ever being decrypted (`importwithaddress`) and conversion between ICAP and hex (`inspectbare`).

Options allow you to alter transactions before you sign them and even create transactions from scratch. You can also configure the method by which keys are encrypted, changing the encryption function or its parameters.

See `ethkey --help` for more information. Enjoy!
See `aleth-key --help` for more information. Enjoy!

22 changes: 11 additions & 11 deletions doc/gitbook/cold_wallet_storage_device.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ The first thing to do is to make sure you've disabled any network connection, wi

### Generate the keys

The next thing to do is to generate the key (or keys) that this machine will store. Run `ethkey` to create a wallet and then again to make as many keys as you would like to use. You can always make more later. For now I'll make one:
The next thing to do is to generate the key (or keys) that this machine will store. Run `aleth-key` to create a wallet and then again to make as many keys as you would like to use. You can always make more later. For now I'll make one:

```
> ethkey createwallet
> aleth-key createwallet
Please enter a MASTER passphrase to protect your key store (make it strong!): password
Please confirm the passphrase by entering it again: password
> ethkey new supersecret
> aleth-key new supersecret
Enter a passphrase with which to secure this account (or nothing to use the master passphrase): password
Please confirm the passphrase by entering it again: password
Enter a hint to help you remember this passphrase: just 'password'
Expand All @@ -35,16 +35,16 @@ This "supersecret" key has an address of `XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ`.

Signing with the keys can happen in two ways: The first is to export a transaction to sign from e.g. AlethZero, perhaps saving to a USB pendrive. Let's assume that is what we have done and we have the hex-encoded transaction at `/mnt/paygav.tx`.

In order to sign this transaction we just need a single `ethkey` invocation:
In order to sign this transaction we just need a single `aleth-key` invocation:

```
> ethkey sign supersecret /tmp/paygav.tx
> aleth-key sign supersecret /tmp/paygav.tx
```

It will prompt you for the passphrase and finally place the signed hex in a file `/mnt/paygav.tx.signed`. Easy. If we just want to copy and paste the hex (we're too paranoid to use pen drives!) then we would just do:

```
> echo "<hex-encoded transaction here>" | ethkey sign supersecret
> echo "<hex-encoded transaction here>" | aleth-key sign supersecret
```

At which it will ask for your passphrase and spit out the hex of the signed transaction.
Expand All @@ -54,7 +54,7 @@ Alternatively, if we don't yet have an unsigned transaction, but we actually wan
Let's assume our "supersecret" account has received some ether in the meantime and we want to pay somebody 2.1 grand of this ether (2100 ether for those not used to my English colloquialisms). That's easy, too.

```
> ethkey sign supersecret --tx-dest <destination address> --tx-gas 55000 --tx-gasprice 50000000000 --tx-value 2100000000000000000 --tx-nonce 0
> aleth-key sign supersecret --tx-dest <destination address> --tx-gas 55000 --tx-gasprice 50000000000 --tx-value 2100000000000000000 --tx-nonce 0
```

Note the `--tx-value` (the amount to transfer) and the `--tx-gasprice` (the price we pay for a single unit of gas) must be specified in Wei, hence the large numbers there. `--tx-nonce` only needs to be specified if it's not the first transaction sent from this account.
Expand All @@ -66,7 +66,7 @@ You may want to eventually import the key to your everyday device. This may be t
To do this, simply copy the JSON file(s) in your `~/.web3/keys` path to somewhere accessible on your other (non-CWSD) computer. Let's assume this other computer now has our "supersecret" key at `/mnt/supersecret.json`. There are two ways of importing it into your Ethereum wallet. The first is simplest:

```
> ethkey import /mnt/supersecret.json supersecret
> aleth-key import /mnt/supersecret.json supersecret
Enter the passphrase for the key: password
Enter a hint to help you remember the key's passphrase: just 'password'
Imported key 055dde03-47ff-dded-8950-0fe39b1fa101
Expand All @@ -76,16 +76,16 @@ Imported key 055dde03-47ff-dded-8950-0fe39b1fa101
Raw hex: 0092e965928626f8880629cec353d3fd7ca5974f
```

A key can only be added to the wallet whose address is known; to figure out the address, `ethkey` will you to type your passphrase.
A key can only be added to the wallet whose address is known; to figure out the address, `aleth-key` will you to type your passphrase.

This is less than ideal since if the machine is actually compromised (perhaps with a keylogger), then an attacker could slurp up your passphrase and key JSON and be able to fraudulently use that account as they pleased. Ouch.

A more secure way, especially if you're not planning on using the key directly from this hot machine in the near future, is to provide the address manually on import. It won't ask you for the passphrase and thus potentially compromise the secret's integrity (assuming the machine is actually compromised in the first place!).

To do this, I would remember the "supersecret" account was `XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ` and tell `ethkey` as such while importing:
To do this, I would remember the "supersecret" account was `XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ` and tell `aleth-key` as such while importing:

```
> ethkey importwithaddress XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ supersecret
> aleth-key importwithaddress XE472EVKU3CGMJF2YQ0J9RO1Y90BC0LDFZ supersecret
Enter a hint to help you remember the key's passphrase: just 'password'
Imported key 055dde03-47ff-dded-8950-0fe39b1fa101
Name: supersecret
Expand Down
2 changes: 0 additions & 2 deletions ethkey/CMakeLists.txt

This file was deleted.

7 changes: 0 additions & 7 deletions ethvm/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit a3f2afe

Please sign in to comment.