diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 38819078a2a0240bb7bdaef7b96a61eb1d896ced..478e7b06e75f36b0730a6d396aae055bf55a134a 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -163,6 +163,10 @@ "ImportPath": "github.com/tendermint/tendermint/vm", "Rev": "46bd0e5d51692347647bb2e250fd0e637fc63a11" }, + { + "ImportPath": "github.com/tommy351/gin-cors", + "Rev": "f7219a698f21b23d73ae9330d3c5842951ce0b6a" + }, { "ImportPath": "golang.org/x/net/context", "Rev": "3cffabab72adf04f8e3b01c5baf775361837b5fe" diff --git a/README.md b/README.md index 90a5f8df2d86081961875c746f31293456bf5f40..6a6834ef56f948aa5c52ea7d0d0f78a47fe3e4c1 100644 --- a/README.md +++ b/README.md @@ -8,38 +8,30 @@ The server allows requests to be made over HTTP - either using JSON-RPC 2.0 or a There are no binary downloads, and probably won't be before `1.0`. -#### Ubuntu/OSX +#### Ubuntu 14.04 (OSX ?) -Make sure you have the proper [Go](https://golang.org/) distribution for your OS and architecture. The recommended version is `1.4.2`. +Make sure you have the proper [Go](https://golang.org/) distribution for your OS and architecture. The recommended version is `1.4.2`. Follow the instructions on how to set up GOROOT and GOPATH. -Start by installing [godep](https://github.com/tools/godep). +You will also need the following libraries: `git, mercurial, libgmp3-dev` -Get the code: +On Ubuntu: `sudo apt-get install git mercurial libgmp3-dev` -`godep go get github.com/eris-ltd/erisdb/cmd/erisdb` +Then download [godep](https://github.com/tools/godep). It is needed for dependency management. It is recommended to set up a separate workspace for this project. -Note that it uses `godep` before the regular go command. +`go get github.com/tools/godep` -This will download and install the program. From there on you can run the same command with the `-u` flag when you want to update. +Next you pull in the code. It uses godep so I would recommend making a new workspace: -If you want to re-install code that you already have, use: +`go get github.com/eris-ltd/erisdb` -`godep go install github.com/eris-ltd/erisdb/cmd/erisdb` +It's gonna say no buildable sources but that's fine. Just cd into `$GOPATH/src/github.com/eris-ltd/erisdb` and run: `$ godep restore` -Installing will build the `erisdb` executable and put it in `$GOPATH/bin`, which should be on your PATH. If not, then add it. +After that, run `$ go install ./cmd/erisdb` +This will build the `erisdb` executable and put it in `$GOPATH/bin`, which should be on your PATH. If not, then add it. To run `erisdb`, just type `$ erisdb /path/to/working/folder` -This will start the node using the provided folder as working dir. If the path is omitted, it will default to `~/.erisdb` - -##### Summary - -* Install Go and Godep. -* `$ godep go get github.com/eris-ltd/erisdb/cmd/erisdb` - -#### Others - -There is no docker container for this library yet, but it will be soon. +This will start the node using the provided folder as working dir. If the path is omitted it defaults to `~/.erisdb` ##### Windows @@ -47,6 +39,10 @@ The server itself run on Windows, and it is possible to tweak Tendermint so that Tendermint officially supports only 64 bit Ubuntu. +#### Docker + +There is no docker container for this library yet, but it will be added. + ### Usage The simplest way to get started is by simply running `$ erisdb`. That will start a fresh node with `~/.erisdb` as the working directory, and the default settings. You will be asked to type in a hostname, which could be anything. `anonymous` is a commonly used one. @@ -161,7 +157,7 @@ The library includes a "server-server". This server accepts POST requests with s NOTE: This is not safe in production, as it requires private keys to be passed over a network, but it is very useful when doing tests. If the same chain data is used, then each node is guaranteed to give the same output (for the same input) when calling the methods. -To start one up, just run `godep go install` in the `erisdb/cmd/erisdbss` directory, then run `erisdbss`. It takes no parameters. There are many examples on how to call it in the javascript library, and if people find it useful there will be a tutorial. +To start one up, just run `go install` in the `erisdb/cmd/erisdbss` directory, then run `erisdbss`. It takes no parameters. There are many examples on how to call it in the javascript library, and if people find it useful there will be a tutorial. ### Testing diff --git a/api.md b/api.md index d8c996a4096a27f860035b5f01446fa3cde50d02..775e142aaacf4c9fafc914dc1369518c4415f91b 100644 --- a/api.md +++ b/api.md @@ -451,7 +451,7 @@ Event object: | Name | RPC method name | REST method | REST endpoint | | :--- | :-------------- | :---------: | :------------ | | [BroadcastTx](#broadcast-tx) | erisdb.broadcastTx | POST | `/txpool` | -| [GetUnconfirmedTxs](#get-unconfirmed-txs) | erisdb.broadcastTx | GET | `/txpool` | +| [GetUnconfirmedTxs](#get-unconfirmed-txs) | erisdb.getUnconfirmedTxs | GET | `/txpool` | ###Code execution | Name | RPC method name | REST method | REST endpoint |