Asch在设计上也是开放的,并没有局限于某个细分领域,比如金融、文件存储、版权证明等,其提供的api都是较底层和抽象的,它们可以被自由组合实现各种不同的应用。在共识机制方面,Asch继承并增强了DPOS算法,大大降低了分叉几率和双重支付风险。另外,Asch的侧链即应用模式不但延缓了区块链膨胀问题,还使得dapp更加的灵活和个性化。
[hidecontent type="logged" desc="隐藏内容:登录后可查看"]
# Install dependency package
sudo apt-get install curl sqlite3 ntp wget git libssl-dev openssl make gcc g++ autoconf automake python build-essential -y
# libsodium for ubuntu 14.04
sudo apt-get install libtool -y
# libsodium for ubuntu 16.04
sudo apt-get install libtool libtool-bin -y
# Install nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
# This loads nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Install node and npm for current user.
nvm install v8
# check node version and it should be v8.x.x
node --version
# git clone sourece code
git clone https://github.com/AschPlatform/asch && cd asch
# Install node packages
npm install
# Build
> node build linux {localnet|testnet|mainnet}
# Run
> cd build/asch-linux-{version}-{localnet|testnet|mainnet}
> chmod +x aschd
> ./aschd start
# or run
> node app.js
请先安装 Docker
# pull asch code docker image
docker pull aschplatform/asch:v1.3.0
# run docker and asch
docker run -i -t --name asch1.3.0 -p 4096:4096 aschplatform/asch:v1.3.0 /bin/bash
root@e149b6732a48:/# cd /data/asch && ./aschd start
Asch server started as daemon ...
node app.js --help
Usage: app [options]
Options:
-h, --help output usage information
-V, --version output the version number
-c, --config <path> Config file path
-p, --port <port> Listening port number
-a, --address <ip> Listening host name or ip
-b, --blockchain <path> Blockchain db path
-g, --genesisblock <path> Genesisblock path
-x, --peers [peers...] Peers list
-l, --log <level> Log level
-d, --daemon Run asch node as daemon
--reindex Reindex blockchain
--base <dir> Base directory
这是本地网的创世记,其中有一亿个XAS。
{
"address": "ABuH9VHV3cFi9UKzcHXGMPGnSC4QqT2cZ5",
"publicKey": "116025d5664ce153b02c69349798ab66144edd2a395e822b13587780ac9c9c09",
"secret": "stone elephant caught wrong spend traffic success fetch inside blush virtual element" // password
}
[/hidecontent]