update and tidy README. (#55)

* update and tidy README.

* bumped version 0.34.1
This commit is contained in:
Anthony De Meulemeester 2018-03-25 16:03:38 +02:00 committed by GitHub
parent 94672cb9cc
commit 62ceb0b42c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 57 deletions

108
README.md
View file

@ -25,98 +25,93 @@
# Overview # Overview
> This project is currently in **alpha** and under active development. This project aims to be a full port of the original C# [NEO project](https://github.com/neo-project).
## Project Goals
Full port of the original C# [NEO project](https://github.com/neo-project).
A complete toolkit for the NEO blockchain, including: A complete toolkit for the NEO blockchain, including:
- Full consensus node - consensus node
- Full RPC node - RPC node
- RPC client - RPC client
- CLI tool - CLI tool
- Smart contract compiler - Smart contract compiler
- NEO virtual machine
## Current State # Getting started
The project will exist out of the following packages: ## Installation
| Package | State | Developer | Install dependencies.
|---------------|---------|--------------------------------------|
| core | started | [@anthdm](https://github.com/anthdm) |
| network | started | [@anthdm](https://github.com/anthdm) |
| vm | started | [@anthdm](https://github.com/anthdm) |
| compiler | started | [@anthdm](https://github.com/anthdm) |
| client | started | [@revett](https://github.com/revett) |
| cli | started | [@revett](https://github.com/revett) |
| wallet | started | [@pawanrawal](https://github.com/pawanrawal) |
# Getting Started `neo-go` uses [dep](https://github.com/golang/dep) as its dependency manager. After installing `deps` you can run:
## Node
Install dependencies, this requires [dep](https://github.com/golang/dep):
``` ```
make deps make deps
``` ```
## How to setup a node
Build the **neo-go** CLI: Build the **neo-go** CLI:
``` ```
make build make build
``` ```
Currently, there is a minimal subset of the NEO protocol implemented. Quick start a NEO node on the private network. This requires the [neo-privatenet](https://hub.docker.com/r/cityofzion/neo-privatenet/) Docker image running on your machine.
To start experimenting make sure you a have a private net running on your machine.
If you dont, take a look at [docker-privnet-with-gas](https://hub.docker.com/r/metachris/neo-privnet-with-gas/).
Start a NEO node:
``` ```
make run make run
``` ```
You can add multiple seeds if you want:
```
make run -e SEEDS="127.0.0.1:20333,127.0.01:20334"
```
By default the server will currently run on port 3000, for testing purposes.
You can change that by setting the tcp flag:
```
make run -e PORT="1337"
```
To run the binary directly: To run the binary directly:
``` ```
./bin/neo-go node -seed 127.0.0.1:20333 -tcp 1337 ./bin/neo-go node -seed 127.0.0.1:20333,127.0.0.1:20334
``` ```
## RPC By default the node will run on the `private network`, to change his:
If you want your node to also serve JSON-RPC, you can do that by setting the following flag:
``` ```
./bin/neo-go node -rpc 4000 ./bin/neo-go node --mainnet
``` ```
In this case the server will accept and respond JSON-RPC on port 4000. Available network flags:
Keep in mind that currently there is only a small subset of the JSON-RPC implemented. - `--mainnet, -m`
Feel free to make a PR with more functionality. - `--privnet, -p`
- `--testnet, -t`
## VM If you want in-depth customization for your node, there are `yaml` config files for each `network` available in the `config` directory. Those files are automaticly loaded, corresponding the provided `netmode` flag.
``` ```yaml
TODO ProtocolConfiguration:
Magic: 56753
AddressVersion: 23
StandbyValidators:
- 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2
- 02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e
- 03d90c07df63e690ce77912e10ab51acc944b66860237b608c4f8f8309e71ee699
- 02a7bc55fe8684e0119768d104ba30795bdcc86619e864add26156723ed185cd62
SeedList:
- 127.0.0.1:20333
- 127.0.0.1:20334
- 127.0.0.1:20335
- 127.0.0.1:20336
SystemFee:
EnrollmentTransaction: 1000
IssueTransaction: 500
PublishTransaction: 500
RegisterTransaction: 10000
ApplicationConfiguration:
DataDirectoryPath: "./chains/privnet"
RPCPort: 20332
NodePort: 20333
Relay: true
DialTimeout: 3
ProtoTickInterval: 2
MaxPeers: 50
``` ```
## Smart Contracts ## Writing smart contracts in Go
> In depth documentation about the neo-go compiler and smart contract examples can be found inside the [compiler package](https://github.com/CityOfZion/neo-go/tree/master/pkg/vm/compiler). In depth documentation about the **neo-go** compiler and smart contract examples can be found inside the [compiler package](https://github.com/CityOfZion/neo-go/tree/master/pkg/vm/compiler).
### Compile a smart contract ### Compile a smart contract
@ -124,7 +119,7 @@ TODO
./bin/neo-go contract compile -i mycontract.go ./bin/neo-go contract compile -i mycontract.go
``` ```
By default the filename will be the name of your .go file with the .avm extension, the file will be located in the same directory where you called the command from. If you want another location for your compiled contract: By default the filename will be the name of your `.go` file with the `.avm` extension, the file will be located in the same directory where you called the command from. If you want another location for your compiled contract:
``` ```
./bin/neo-go contract compile -i mycontract.go --out /Users/foo/bar/contract.avm ./bin/neo-go contract compile -i mycontract.go --out /Users/foo/bar/contract.avm
@ -166,8 +161,9 @@ describing the feauture/topic you are going to implement.
- [@anthdm](https://github.com/anthdm) on Github - [@anthdm](https://github.com/anthdm) on Github
- [@anthdm](https://twitter.com/anthdm) on Twitter - [@anthdm](https://twitter.com/anthdm) on Twitter
- Reach out to me on the [NEO Discord](https://discordapp.com/invite/R8v48YA) channel
- Send me an email anthony@cityofzion.io - Send me an email anthony@cityofzion.io
# License # License
- Open-source [MIT](https://github.com/anthdm/neo-go/blob/master/LICENCE.md) - Open-source [MIT](https://github.com/CityOfZion/neo-go/blob/master/LICENCE.md)

View file

@ -1 +1 @@
0.34.0 0.34.1