Skip to content

Commit

Permalink
Merge pull request #1371 from skycoin/develop
Browse files Browse the repository at this point in the history
Merge v23 develop to master
  • Loading branch information
gz-c committed Apr 26, 2018
2 parents 1c99aae + 50f1675 commit 452491d
Show file tree
Hide file tree
Showing 411 changed files with 35,645 additions and 7,100 deletions.
26 changes: 20 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ cache:
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.npm/_prebuilds
- src/gui/static/node_modules

install:
# Install gox
- go get github.com/gz-c/gox
# Install dependences for building wallet
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" == false ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils &&nvm install 8; fi
# for test
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" == false ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils && nvm install 8; fi
- go get -t ./...
- make install-linters
- make install-deps-libc
- make install-deps-ui

before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" && "$TRAVIS_PULL_REQUEST" == false ]]; then ./ci-scripts/add-key.sh && npm install -g yarn ;fi
Expand All @@ -46,18 +47,31 @@ script:
- make lint
- make test-386
- make test-amd64
# stable integration tests
# Stable integration tests
- make integration-test-stable
# Disable wallet api test
- make integration-test-disable-wallet-api
# Disable seed api test
- make integration-test-disable-seed-api
# libskycoin tests
- make test-libc
# TODO: test pyskycoin
# - make test-libpy
# build wallets
# TODO: test ui
# - make test-ui
- make lint-ui
# Build wallets
- if [[ "$TRAVIS_PULL_REQUEST" == false ]]; then ./ci-scripts/build-wallet.sh; fi

# Check that the UI can build. this is done after the wallet build step, because make build-ui
# will change the dist/ folder.
# If make test-ui can verify that the wallet compiles, we can remove this step after we enable make test-ui
- make build-ui

notifications:
email: false
email:
- travis@skycoin.net
# https://github.com/kvld/travisci-telegram TravisCI Telegram Bot integration
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify

deploy:
provider: s3
Expand Down
45 changes: 44 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,53 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]

### Added
### Fixed
### Changed
### Removed

## [0.23.0] - 2018-04-22

### Added

- Add wallet setup wizard
- Add wallet encryption, using chacha20+poly1305 for encryption and authentication and scrypt for key derivation. Encrypted data is stored in the wallet file in a `"secrets"` metadata field
- Add `GET /health` endpoint
- Add `POST /wallet/transaction` API endpoint, creates a transaction, allowing control of spending address and multiple destinations
- Add `POST /wallet/encrypt` API endpoint, encrypts wallet and returns encrypted wallet without sensitive data
- Add `POST /wallet/decrypt` API endpoint, decrypts wallet and returns decrypted wallet without sensitive data
- Add `POST /wallet/seed` API endpoint, returns the seed of an encrypted wallet. Unencrypted wallets will not expose their seeds over the API. Requires `-enable-seed-api` option
- `-enable-seed-api` option to enable `POST /wallet/seed`
- Add `"size"` to block API response data (affects `GET /block`, `GET /blocks` and `GET /last_blocks`)
- Write [specification for skycoin URIs](https://github.com/skycoin/skycoin#uri-specification) (based upon bip21)

### Fixed

- #1309, Float imprecision error in frontend malformed some spend amounts, preventing the spend
- Fix one aspect of sync stalling caused by a 5-second blocking channel write by switching it to a non-blocking write, decreasing timeouts and increasing buffer sizes

### Changed

- `GET /wallet` API endpoint, remove sensitive data from the response, and fix the data format to be the same as `POST /wallet/create`
- `GET /wallets` API endpoint, remove sensitive data from the response
- `POST /wallet/create` API endpoint, add `encrypt(bool)` and `password` argument
- `POST /wallet/newAddress` API endpoint, add `password` argument
- `POST /wallet/spend` API endpoint, add `password` argument
- Change `-disable-wallet-api` to `-enable-wallet-api`, and disable the wallet API by default
- `-launch-browser` is set to false by default
- A default wallet will not be created on startup if there is no wallet. Instead, the wallet setup wizard will run
- Replace [op/go-logging](https://github.com/op/go-logging) with [logrus](https://github.com/sirupsen/logrus)
- Disable JSON-RPC 2.0 interface when running the application with `run.sh` and electron
- Whitespace will be trimmed from the seed string by the frontend client before creating or loading a wallet
- Notify the user when their wallets have unconfirmed transactions
- Return an error when providing a transaction that spends to the null address in `POST /injectTransaction`
- Change accepted `-log-level` values to `debug`, `info`, `warn`, `error`, `fatal` and `panic` (previously were `debug`, `info`, `notice`, `warning`, `error` and `critical`)
- Default log level is `info`

### Removed

- Remove `"seed"`, `"lastSeed"` and `"secret_key"` in address entries from wallet API responses. A wallet's seed can be accessed through `POST /wallet/seed` only if the wallet is encrypted and the node is run with `-enable-seed-api`
- Remove unused `-logtogui` and `-logbufsize` options

## [0.22.0] - 2018-03-20

### Added
Expand All @@ -29,9 +69,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `/richlist` API method, returns top n address balances
- `/addresscount` API method, returns the number of addresses that have any amount of coins
- `/transactions` API method, returns transactions of addresses
- `/wallet/unload` API method, removes the wallet of given id from wallet services

### Fixed

- #1021, remove `SendOr404` and `SendOr500` as they do not work properly due to typed nils
- Add Read, Write and Idle timeouts to the HTTP listener, preventing file descriptor leaks
- Support absolute and relative paths for `-data-dir` option
- Prevent creating transactions whose size exceeds the maximum block size
Expand Down Expand Up @@ -80,7 +122,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Changed

- CLI's `walletBalance` and `addressBalance` commands return aggregate balances for confirmed, spendable and expected balances. Coins are formatted as droplet strings. Hours added as strings.
- CLI's `walletBalance` and `addressBalance` commands return aggregate balances for confirmed, spendable and expected balances. Coins are formatted as droplet strings. Hours added as strings.
- When splitting an odd number of hours in a spend, give the extra hour to the fee
- Add `block_seq` to `get_outputs` and `/outputs` API response
- Improve UxOut spend selection. Previously, they were spent oldest first. Now they are spent to ensure a non-zero coinhour input and otherwise minimize coinhours.
Expand Down Expand Up @@ -198,6 +240,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- #350 Wallet name always 'undefined' after loading wallet from seed

[Unreleased]: https://github.com/skycoin/skycoin/compare/master...develop
[0.23.0]: https://github.com/skycoin/skycoin/compare/v0.22.0...v0.23.0
[0.22.0]: https://github.com/skycoin/skycoin/compare/v0.21.1...v0.22.0
[0.21.1]: https://github.com/skycoin/skycoin/compare/v0.21.0...v0.21.1
[0.21.0]: https://github.com/skycoin/skycoin/compare/v0.20.4...v0.21.0
Expand Down
51 changes: 0 additions & 51 deletions Dockerfile

This file was deleted.

38 changes: 27 additions & 11 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
name = "github.com/boltdb/bolt"
version = "1.0.0"

[[constraint]]
name = "github.com/op/go-logging"
version = "1.0.0"

[[constraint]]
name = "github.com/toqueteos/webbrowser"
version = "1.0.0"
Expand Down
41 changes: 40 additions & 1 deletion INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If your application is written in Go, you can use these client libraries to inte
The wallet APIs in the REST API operate on wallets loaded from and saved to `~/.skycoin/wallets`.
Use the CLI tool to perform seed generation and transaction signing outside of the Skycoin node.

The Skycoin node's wallet APIs can be disabled with `-disable-wallet-api`.
The Skycoin node's wallet APIs can be enabled with `-enable-wallet-api`.

For a node used to support another application,
it is recommended to use the REST API for blockchain queries and disable the wallet APIs,
Expand All @@ -45,6 +45,7 @@ and to use the CLI tool for wallet operations (seed and address generation, tran
- [Using the CLI](#using-the-cli-1)
- [Using the REST API](#using-the-rest-api-1)
- [Using skycoin as a library in a Go application](#using-skycoin-as-a-library-in-a-go-application-1)
- [Coinhours](#coinhours)
- [Verifying addresses](#verifying-addresses)
- [Using the CLI](#using-the-cli-2)
- [Using the REST API](#using-the-rest-api-2)
Expand Down Expand Up @@ -169,6 +170,44 @@ directly, see [Skycoin CLI Godoc](https://godoc.org/github.com/skycoin/skycoin/s

A REST API client is also available: [Skycoin REST API Client Godoc](https://godoc.org/github.com/skycoin/skycoin/src/gui#Client).

#### Coinhours
Transaction fees in skycoin is paid in coinhours and is currently set to `50%`,
every transaction created burns `50%` of the total coinhours in all the input
unspents.

You need a minimum of `1` of coinhour to create a transaction.

Coinhours are generated at a rate of `1 coinsecond` per `second`
which are then converted to `coinhours`, `1` coinhour = `3600` coinseconds.

> Note: Coinhours don't have decimals and only show up in whole numbers.
##### REST API
When using the `REST API` the coinhours are distributed as follows:
- 50% of the total coinhours in the unspents being used are burned.
- 25% of the coinhours go to the the change address along with the remaining coins
- 25% of the coinhours are split equally between the receivers

For e.g, If an address has `10` skycoins and `50` coinhours and only `1` unspent.
If we send `5` skycoins to another address then that address will receive
`5` skycoins and `12` coinhours, `26` coinhours(burned coinhours are made even) will be burned.
The sending address will be left with `5` skycoins and `12` coinhours which
will then be sent to the change address.

##### CLI
When using the `CLI` the amount of coinhours sent to the receiver is capped to
the number of coins they receive with a minimum of `1` coinhour for transactions
with `<1` skycoin being sent.

The coinhours left after burning `50%` and sending to receivers are sent to the change address.

For eg. If an address has `10` skycoins and `50` coinhours and only `1` unspent.
If we send `5` skycoins to another address then that address will receive
`5` skycoins and `5` coinhours, `26` coinhours will be burned.
The sending address will be left with `5` skycoins and `19` coinhours which
will then be sent to the change address.


### Verifying addresses

#### Using the CLI
Expand Down

0 comments on commit 452491d

Please sign in to comment.