Skycoin is a next-generation cryptocurrency.
Skycoin improves on Bitcoin in too many ways to be addressed here.
Skycoin is a small part of OP Redecentralize and OP Darknet Plan.
- skycoin.net
- Skycoin Blog
- Skycoin Docs
- Skycoin Blockchain Explorer
- Skycoin Development Telegram Channel
- Changelog
- Installation
- API Documentation
- Integrating Skycoin with your application
- Contributing a node to the network
- URI Specification
- Development
Skycoin supports go1.9+. The preferred version is go1.10.
Golang 1.9+ Installation/Setup
go get github.com/skycoin/skycoin/...
This will download github.com/skycoin/skycoin
to $GOPATH/src/github.com/skycoin/skycoin
.
You can also clone the repo directly with git clone https://github.com/skycoin/skycoin
,
but it must be cloned to this path: $GOPATH/src/github.com/skycoin/skycoin
.
cd $GOPATH/src/github.com/skycoin/skycoin
make run
cd $GOPATH/src/github.com/skycoin/skycoin
make run-help
Example:
cd $GOPATH/src/github.com/skycoin/skycoin
make ARGS="--launch-browser=false -data-dir=/custom/path" run
$ docker volume create skycoin-data
$ docker volume create skycoin-wallet
$ docker run -ti --rm \
-v skycoin-data:/data \
-v skycoin-wallet:/wallet \
-p 6000:6000 \
-p 6420:6420 \
-p 6430:6430 \
skycoin/skycoin
With this image, the skycoin daemon will run as root by default inside the container. When you mount a volume in /data, the container will detect for the folder's owner UID and will create a skycoin user with the same UID.
Access the dashboard: http://localhost:6420.
Access the API: http://localhost:6420/version.
Skycoin Integration Documentation
Add your node's ip:port
to the peers.txt file.
This file will be periodically uploaded to https://downloads.skycoin.net/blockchain/peers.txt
and used to seed client with peers.
Note: Do not add Skywire nodes to peers.txt
.
Only add Skycoin nodes with high uptime and a static IP address (such as a Skycoin node hosted on a VPS).
Skycoin URIs obey the same rules as specified in Bitcoin's BIP21.
They use the same fields, except with the addition of an optional hours
parameter, specifying the coin hours.
Example Skycoin URIs:
skycoin:2hYbwYudg34AjkJJCRVRcMeqSWHUixjkfwY
skycoin:2hYbwYudg34AjkJJCRVRcMeqSWHUixjkfwY?amount=123.456&hours=70
skycoin:2hYbwYudg34AjkJJCRVRcMeqSWHUixjkfwY?amount=123.456&hours=70&label=friend&message=Birthday%20Gift
We have two branches: master
and develop
.
develop
is the default branch and will have the latest code.
master
will always be equal to the current stable release on the website, and should correspond with the latest release tag.
/src/cipher
- cryptography library/src/coin
- the blockchain/src/daemon
- networking and wire protocol/src/visor
- the top level, client/src/gui
- the web wallet and json client interface/src/wallet
- the private key storage library/src/api/webrpc
- JSON-RPC 2.0 API/src/api/cli
- CLI library
Skycoin implements client libraries which export core functionality for usage from other programming languages. Read the corresponding README file for further details.
lib/cgo/
- libskycoin C client library ( read more )
make test
There are integration tests for the CLI and HTTP API interfaces. They have two run modes, "stable" and "live.
The stable integration tests will use a skycoin daemon whose blockchain is synced to a specific point and has networking disabled so that the internal state does not change.
The live integration tests should be run against a synced or syncing node with networking enabled.
make integration-test-stable
or
./ci-scripts/integration-test-stable.sh -v -w
The -w
option, run wallet integrations tests.
The -v
option, show verbose logs.
The live integration tests run against a live runnning skycoin node, so before running the test, we need to start a skycoin node.
After the skycoin node is up, run the following command to start the live tests:
./ci-scripts/integration-test.live.sh -v
The above command will run all tests except the wallet related tests. To run wallet tests, we
need to manually specify a wallet file, and it must have at least 2 coins
and 256 coinhours
,
it also must have been loaded by the node.
We can specify the wallet by setting two environment variables: WALLET_DIR
and WALLET_NAME
. The WALLET_DIR
represents the absolute path of the wallet directory, and WALLET_NAME
represents the wallet file name.
export WALLET_DIR=$HOME/.skycoin/wallets
export WALLET_NAME=$wallet-file-name-meet-the-requirements
Then run the tests with the following command:
make integration-test-live
or
./ci-scripts/integration-test-live.sh -v -w
Run specific test case:
It's annoying and a waste of time to run all tests to see if the test we real care
is working correctly. There's an option: -r
, which can be used to run specific test case.
For exampe: if we only want to test TestStableAddressBalance
and see the result, we can run:
./ci-scripts/integration-test-stable.sh -v -r TestStableAddressBalance
Golden files are expected data responses from the CLI or HTTP API saved to disk. When the tests are run, their output is compared to the golden files.
To update golden files, use the -u
option:
./ci-scripts/integration-test-live.sh -v -u
./ci-scripts/integration-test-stable.sh -v -u
We can also update a specific test case's golden file with the -r
option.
All .go
source files should be formatted goimports
. You can do this with:
make format
Install prerequisites:
make install-linters
Run linters:
make lint
Dependencies are managed with dep.
To install dep
:
go get -u github.com/golang/dep
dep
vendors all dependencies into the repo.
If you change the dependencies, you should update them as needed with dep ensure
.
Use dep help
for instructions on vendoring a specific version of a dependency, or updating them.
When updating or initializing, dep
will find the latest version of a dependency that will compile.
Examples:
Initialize all dependencies:
dep init
Update all dependencies:
dep ensure -update -v
Add a single dependency (latest version):
dep ensure github.com/foo/bar
Add a single dependency (more specific version), or downgrade an existing dependency:
dep ensure github.com/foo/bar@tag
The compiled wallet source should be checked in to the repo, so that others do not need to install node to run the software.
Instructions for doing this:
- If the
master
branch has commits that are not indevelop
(e.g. due to a hotfix applied tomaster
), mergemaster
intodevelop
- Compile the
src/gui/dist/
to make sure that it is up to date (see Wallet GUI Development README) - Update all version strings in the repo (grep for them) to the new version
- Update
CHANGELOG.md
: move the "unreleased" changes to the version and add the date - Merge these changes to
develop
- Follow the steps in pre-release testing
- Make a PR merging
develop
intomaster
- Review the PR and merge it
- Tag the master branch with the version number. Version tags start with
v
, e.g.v0.20.0
. Sign the tag. Example:git tag -as v0.20.0 $COMMIT_ID
. - Make sure that the client runs properly from the
master
branch - Create the release builds from the
master
branch (see Create Release builds)
If there are problems discovered after merging to master, start over, and increment the 3rd version number.
For example, v0.20.0
becomes v0.20.1
, for minor fixes.
Performs these actions before releasing:
make check
make integration-test-live
(see live integration tests)go run cmd/cli/cli.go checkdb
against a synced node- On all OSes, make sure that the client runs properly from the command line (
./run.sh
) - Build the releases and make sure that the Electron client runs properly on Windows, Linux and macOS.
- Delete the database file and sync from scratch to confirm syncing works
- Load a test wallet with nonzero balance from seed to confirm wallet loading works
- Send coins to another wallet to confirm spending works
- Restart the client, confirm that it reloads properly
./run.sh -enable-wallet-api=false
and check that the wallet does not load, and/wallets
and/spend
fail
Releases are signed with this PGP key:
0x5801631BD27C7874
The fingerprint for this key is:
pub ed25519 2017-09-01 [SC] [expires: 2023-03-18]
10A7 22B7 6F2F FE7B D238 0222 5801 631B D27C 7874
uid GZ-C SKYCOIN <[email protected]>
sub cv25519 2017-09-01 [E] [expires: 2023-03-18]
Keybase.io account: https://keybase.io/gzc
Follow the Tor Project's instructions for verifying signatures.
If you can't or don't want to import the keys from a keyserver, the signing key is available in the repo: gz-c.asc.
Releases and their signatures can be found on the releases page.
Instructions for generating a PGP key, publishing it, signing the tags and binaries: https://gist.github.com/gz-c/de3f9c43343b2f1a27c640fe529b067c