代码拉取完成,页面将自动刷新
同步操作将从 百度开源/XuperUnion 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
set -e -x
cd `dirname $0`
:<<!
# install protoc 3.7.1
# export GO111MODULES=on
# go install github.com/golang/protobuf/protoc-gen-go
# go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
protoc -I pb pb/xchain.proto pb/xchain_spv.proto pb/xcheck.proto pb/chainedbft.proto pb/xendorser.proto \
-I pb/googleapis \
--go_out=plugins=grpc:pb \
--grpc-gateway_out=logtostderr=true:pb
protoc -I p2pv2/pb p2pv2/pb/message.proto --go_out=p2pv2/pb
protoc -I xmodel/pb xmodel/pb/versioned_data.proto --go_out=xmodel/pb
protoc -I contractsdk/pb contractsdk/pb/contract_service.proto \
--go_out=plugins=grpc,paths=source_relative:contractsdk/go/pbrpc
protoc -I contractsdk/pb contractsdk/pb/contract.proto \
--go_out=paths=source_relative:contractsdk/go/pb
!
# build wasm2c
make -C xvm/compile/wabt -j 4
cp xvm/compile/wabt/build/wasm2c ./
# build framework and tools
function buildpkg() {
output=$1
pkg=$2
buildVersion=`git rev-parse --abbrev-ref HEAD`
buildDate=$(date "+%Y-%m-%d-%H:%M:%S")
commitHash=`git rev-parse --short HEAD`
go build -o $output -ldflags "-X main.buildVersion=$buildVersion -X main.buildDate=$buildDate -X main.commitHash=$commitHash" $pkg
}
buildpkg xchain-cli github.com/xuperchain/xuperunion/cmd/cli
buildpkg xchain github.com/xuperchain/xuperunion/cmd/xchain
buildpkg xc github.com/xuperchain/xuperunion/contractsdk/xc
go build -o xchain-httpgw gateway/http_gateway.go
go build -o dump_chain test/dump_chain.go
# build plugins
echo "OS:"${PLATFORM}
echo "## Build Plugins..."
mkdir -p plugins/kv plugins/crypto plugins/consensus plugins/contract
go build --buildmode=plugin --tags multi -o plugins/kv/kv-ldb-multi.so.1.0.0 github.com/xuperchain/xuperunion/kv/kvdb/plugin-ldb
go build --buildmode=plugin --tags single -o plugins/kv/kv-ldb-single.so.1.0.0 github.com/xuperchain/xuperunion/kv/kvdb/plugin-ldb
go build --buildmode=plugin -o plugins/kv/kv-badger.so.1.0.0 github.com/xuperchain/xuperunion/kv/kvdb/plugin-badger
go build --buildmode=plugin -o plugins/crypto/crypto-default.so.1.0.0 github.com/xuperchain/xuperunion/crypto/client/xchain
go build --buildmode=plugin -o plugins/crypto/crypto-schnorr.so.1.0.0 github.com/xuperchain/xuperunion/crypto/client/schnorr
go build --buildmode=plugin -o plugins/consensus/consensus-pow.so.1.0.0 github.com/xuperchain/xuperunion/consensus/pow
go build --buildmode=plugin -o plugins/consensus/consensus-single.so.1.0.0 github.com/xuperchain/xuperunion/consensus/single
go build --buildmode=plugin -o plugins/consensus/consensus-tdpos.so.1.0.0 github.com/xuperchain/xuperunion/consensus/tdpos/main
# build output dir
mkdir -p output
output_dir=output
mv xchain-cli xchain ${output_dir}
mv xchain-httpgw ${output_dir}
mv wasm2c ${output_dir}
mv dump_chain ${output_dir}
mv xc ${output_dir}
cp -rf plugins ${output_dir}
cp -rf data ${output_dir}
cp -rf conf ${output_dir}
cp -rf cmd/quick_shell/* ${output_dir}
mkdir -p ${output_dir}/data/blockchain
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。