Commit 40248d1c authored by QM's avatar QM

Merge remote-tracking branch 'upstream/master' into issues898_para_add_supervision

parents d677c980 e04c4a42
......@@ -12,6 +12,8 @@ jobs:
id: go
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Intsall Golangci-lint
run: |
......@@ -28,6 +30,7 @@ jobs:
- name: Lint
run: |
make largefile-check
make checkgofmt && make fmt_go
make linter
......
......@@ -49,9 +49,9 @@ autotest_tick: autotest ## run with ticket mining
update: ## version 可以是git tag打的具体版本号,也可以是commit hash, 什么都不填的情况下默认从master分支拉取最新版本
@if [ -n "$(version)" ]; then \
go get github.com/33cn/chain33@${version} ; \
go get -v github.com/33cn/chain33@${version} ; \
else \
go get github.com/33cn/chain33@master ;fi
go get -v github.com/33cn/chain33@master ;fi
@go mod tidy
dep:
@go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0
......@@ -132,6 +132,9 @@ metrics:## build docker-compose for chain33 metrics
fork-test: ## build fork-test for chain33 run
@cd build && cp chain33* Dockerfile system-fork-test.sh docker-compose* ci/ && cd ci/ && ./docker-compose-pre.sh forktest $(proj) $(dapp) && cd ../..
largefile-check:
git gc
./findlargefile.sh
clean: ## Remove previous build
@rm -rf $(shell find . -name 'datadir' -not -path "./vendor/*")
......
go env -w CGO_ENABLED=0
go build -o chain33.exe
go build -o chain33-cli.exe github.com/33cn/plugin/cli
......@@ -53,6 +53,7 @@ driver="leveldb"
dbPath="paradatadir/addrbook"
dbCache=4
grpcLogFile="grpc33.log"
waitPid=true
[p2p.sub.dht]
DHTDataPath="paradatadir/p2pstore"
......
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see https://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
# set the internal field separator to line break, so that we can iterate easily over the verify-pack output
IFS=$'\n'
# list all objects including their size, sort by size, take top 10
objects=$(git verify-pack -v .git/objects/pack/pack-*.idx | grep -v chain | sort -k3nr | head -n 15)
echo "All sizes are in kB's. The pack column is the size of the object, compressed, inside the pack file."
# 46034 13074 650902c0f310f2f64e9ae5dfda35656ce8dadae3 chain33
# 42998 12325 5e8c0c3e6bc33034fd804d4c68b589c1eb66804b chain33-cli
# 30440 9801 d2d4a3aa838d85738e27ee474c785331bfe8e81c plugin/consensus/raft/tools/scripts/chain33.tgz
# 21292 10288 1e21797c3af8a4385c9169570b9b1c4072d7b3b6 plugin/dapp/exchange/test/cmd/main
# 4834 1113 9ec4f3d49403e8b9dd46885031a92e23af3828b9 vendor/golang.org/x/text/collate/tables.go
# 3468 1767 825659f96c308cd79ed2b32860d45d510dff6cce vendor/github.com/33cn/chain33/doc/golang/Go的50度灰:Golang新开发者要注意的陷阱和常见错误 .pdf
# 2556 863 9df156a7f0c9570431161873e3f605c7e4bb7ba9 vendor/github.com/haltingstate/secp256k1-go/secp256k1-go2/z_consts.go
# 2432 2159 0304d27f62317d2216c3288047a1a2a8bf37d94a vendor/github.com/33cn/chain33/doc/PBFT/pbft.pdf
history="650902c0f310f2f64e9ae5dfda35656ce8dadae3 5e8c0c3e6bc33034fd804d4c68b589c1eb66804b d2d4a3aa838d85738e27ee474c785331bfe8e81c \
1e21797c3af8a4385c9169570b9b1c4072d7b3b6 9ec4f3d49403e8b9dd46885031a92e23af3828b9 825659f96c308cd79ed2b32860d45d510dff6cce \
9df156a7f0c9570431161873e3f605c7e4bb7ba9 0304d27f62317d2216c3288047a1a2a8bf37d94a 0304d27f62317d2216c3288047a1a2a8bf37d94a"
oversize="false"
output="size,pack,SHA,location"
allObjects=$(git rev-list --all --objects)
for y in $objects; do
# extract the size in bytes
size=$(($(echo "$y" | cut -f 5 -d ' ') / 1024))
# extract the compressed size in bytes
compressedSize=$(($(echo "$y" | cut -f 6 -d ' ') / 1024))
# extract the SHA
sha=$(echo "$y" | cut -f 1 -d ' ')
if [[ ! $history =~ $sha ]]; then
if [ $size -ge 2000 ]; then
echo "over size file = $sha"
oversize="true"
fi
fi
# find the objects location in the repository tree
other=$(echo "${allObjects}" | grep "$sha")
#lineBreak=`echo -e "\n"`
output="${output}\n${size},${compressedSize},${other}"
done
echo -e "$output" | column -t -s ', '
if [ "$oversize" == "true" ]; then
echo "there are files over 2M size committed!!!"
exit 1
fi
......@@ -3,7 +3,7 @@ module github.com/33cn/plugin
go 1.12
require (
github.com/33cn/chain33 v0.0.0-20200729032621-0fbd543868cf
github.com/33cn/chain33 v1.65.1-0.20201022110501-fde367b8c955
github.com/BurntSushi/toml v0.3.1
github.com/NebulousLabs/Sia v1.3.7
github.com/NebulousLabs/errors v0.0.0-20181203160057-9f787ce8f69e // indirect
......@@ -24,25 +24,22 @@ require (
github.com/hashicorp/golang-lru v0.5.4
github.com/holiman/uint256 v1.1.1
github.com/huin/goupnp v1.0.0
github.com/jackpal/go-nat-pmp v1.0.2-0.20160603034137-1fa385a6f458
github.com/jackpal/go-nat-pmp v1.0.2
github.com/miguelmota/go-solidity-sha3 v0.1.0
github.com/mr-tron/base58 v1.1.3
github.com/mr-tron/base58 v1.2.0
github.com/pborman/uuid v1.2.0
github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844
github.com/pkg/errors v0.8.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v0.9.2 // indirect
github.com/prometheus/common v0.4.1
github.com/prometheus/procfs v0.0.3 // indirect
github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d
github.com/rs/cors v1.6.0
github.com/spf13/cobra v0.0.5
github.com/stretchr/testify v1.4.0
github.com/stretchr/testify v1.6.1
github.com/tjfoc/gmsm v1.3.1
github.com/valyala/fasthttp v1.5.0
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.uber.org/atomic v1.4.0 // indirect
go.uber.org/multierr v1.2.0 // indirect
go.uber.org/zap v1.10.0 // indirect
golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment