Skip to content

Commit

Permalink
update install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ebuchman committed Jan 2, 2019
1 parent 8d5df53 commit b445318
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 37 deletions.
46 changes: 46 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Install

## Go

- [Install Go](https://golang.org/doc/install)
- [Set the `$GOPATH` variable](https://github.com/golang/go/wiki/SettingGOPATH)
- Add `$GOPATH/bin` to your `$PATH`
- [Install dep](https://github.com/golang/dep#installation)


## evm-tools

Download this repo and install the tools:

```
mkdir -p $GOPATH/src/github.com/CoinCulture
git clone https://github.com/CoinCulture/evm-tools $GOPATH/src/github.com/CoinCulture/evm-tools
cd $GOPATH/src/github.com/CoinCulture/evm-tools
dep ensure
make
```

This will install the `evm`, `disasm`, and `evm-deploy` tools to your
`$GOPATH/bin`.

## Python

We also use some python, and in particular the `sha3` and `rlp` packages.
It's recommended to use `virtualenv` for installing them, with specific versions:

```
virtualenv evm-tools
source evm-tools/bin/activate
pip install pysha3==0.3 rlp==0.6.0
```

Note there are two incompatible versions of `sha3`,
and Ethereum uses the `Keccak` version, so make sure you have the right one.
You can verify with:

```
$ python -c "import sha3; print sha3.sha3_256('').hexdigest()"
c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470
```

More recent versions of the `sha3` package have a different API.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ See the [analysis/guide.md](analysis/guide.md) for an extensive guide of the EVM

# Install

Uses [`dep`](https://github.com/golang/dep) for dependencies:
Uses [`dep`](https://github.com/golang/dep) for dependencies and `make` to build
all tools:

```
dep ensure
make
```

See the [install instructions](INSTALL.md) for more details.
37 changes: 1 addition & 36 deletions analysis/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,42 +207,7 @@ a significant DoS attack vector against miners.

Let us look at some simple executions. To do so, I have collected some useful tools in a single repo,
including forks of some nice nice tools provided by go-ethereum.
Make sure you have Go installed, set your `GOPATH` environment variable to whatever you want,
and add `$GOPATH/bin` to your `PATH`. Then run:

```
go get github.com/ebuchman/evm-tools/...
```

This will install the following tools, now accessible from $GOPATH/bin: `evm`, `disasm`, `evm-deploy`.

If you already have the tools installed, but something doesn't work, update to the latest with

```
cd $GOPATH/src/github.com/ebuchman/evm-tools
git pull origin master
go install disasm evm evm-deploy
```

We also use some python, and in particular the `sha3` and `rlp` packages.
It's recommended to use `virtualenv` for installing them, with specific versions:

```
virtualenv evm-tools
source evm-tools/bin/activate
pip install pysha3==0.3 rlp==0.6.0
```

Note there are two incompatible versions of `sha3`,
and Ethereum uses the `Keccak` version, so make sure you have the right one.
You can verify with:

```
$ python -c "import sha3; print sha3.sha3_256('').hexdigest()"
c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470
```

More recent versions of the `sha3` package have a different API.
To install the tools, see the [install instructions](/INSTALL.md).

Now, here is some very simple bytecode I wrote:

Expand Down

0 comments on commit b445318

Please sign in to comment.