Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
40248d1c
Commit
40248d1c
authored
Nov 06, 2020
by
QM
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'upstream/master' into issues898_para_add_supervision
parents
d677c980
e04c4a42
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
10 deletions
+73
-10
build.yml
.github/workflows/build.yml
+3
-0
Makefile
Makefile
+5
-2
build.bat
build.bat
+1
-0
chain33.para.toml
chain33.para.toml
+1
-0
findlargefile.sh
findlargefile.sh
+58
-0
go.mod
go.mod
+5
-8
go.sum
go.sum
+0
-0
No files found.
.github/workflows/build.yml
View file @
40248d1c
...
@@ -12,6 +12,8 @@ jobs:
...
@@ -12,6 +12,8 @@ jobs:
id
:
go
id
:
go
-
name
:
checkout
-
name
:
checkout
uses
:
actions/checkout@v2
uses
:
actions/checkout@v2
with
:
fetch-depth
:
0
-
name
:
Intsall Golangci-lint
-
name
:
Intsall Golangci-lint
run
:
|
run
:
|
...
@@ -28,6 +30,7 @@ jobs:
...
@@ -28,6 +30,7 @@ jobs:
-
name
:
Lint
-
name
:
Lint
run
:
|
run
:
|
make largefile-check
make checkgofmt && make fmt_go
make checkgofmt && make fmt_go
make linter
make linter
...
...
Makefile
View file @
40248d1c
...
@@ -49,9 +49,9 @@ autotest_tick: autotest ## run with ticket mining
...
@@ -49,9 +49,9 @@ autotest_tick: autotest ## run with ticket mining
update
:
##
version 可以是git tag打的具体版本号
,
也可以是commit hash
,
什么都不填的情况下默认从master分支拉取最新版本
update
:
##
version 可以是git tag打的具体版本号
,
也可以是commit hash
,
什么都不填的情况下默认从master分支拉取最新版本
@
if
[
-n
"
$(version)
"
]
;
then
\
@
if
[
-n
"
$(version)
"
]
;
then
\
go get github.com/33cn/chain33@
${
version
}
;
\
go get
-v
github.com/33cn/chain33@
${
version
}
;
\
else
\
else
\
go get github.com/33cn/chain33@master
;
fi
go get
-v
github.com/33cn/chain33@master
;
fi
@
go mod tidy
@
go mod tidy
dep
:
dep
:
@
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0
@
go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.18.0
...
@@ -132,6 +132,9 @@ metrics:## build docker-compose for chain33 metrics
...
@@ -132,6 +132,9 @@ metrics:## build docker-compose for chain33 metrics
fork-test
:
##
build fork-test for chain33 run
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
../..
@
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
clean
:
##
Remove previous build
@
rm
-rf
$(
shell
find
.
-name
'datadir'
-not
-path
"./vendor/*"
)
@
rm
-rf
$(
shell
find
.
-name
'datadir'
-not
-path
"./vendor/*"
)
...
...
build.bat
View file @
40248d1c
go env -w CGO_ENABLED=0
go build -o chain33.exe
go build -o chain33.exe
go build -o chain33-cli.exe github.com/33cn/plugin/cli
go build -o chain33-cli.exe github.com/33cn/plugin/cli
chain33.para.toml
View file @
40248d1c
...
@@ -53,6 +53,7 @@ driver="leveldb"
...
@@ -53,6 +53,7 @@ driver="leveldb"
dbPath
=
"paradatadir/addrbook"
dbPath
=
"paradatadir/addrbook"
dbCache
=
4
dbCache
=
4
grpcLogFile
=
"grpc33.log"
grpcLogFile
=
"grpc33.log"
waitPid
=
true
[p2p.sub.dht]
[p2p.sub.dht]
DHTDataPath
=
"paradatadir/p2pstore"
DHTDataPath
=
"paradatadir/p2pstore"
...
...
findlargefile.sh
0 → 100755
View file @
40248d1c
#!/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
go.mod
View file @
40248d1c
...
@@ -3,7 +3,7 @@ module github.com/33cn/plugin
...
@@ -3,7 +3,7 @@ module github.com/33cn/plugin
go 1.12
go 1.12
require (
require (
github.com/33cn/chain33 v
0.0.0-20200729032621-0fbd543868cf
github.com/33cn/chain33 v
1.65.1-0.20201022110501-fde367b8c955
github.com/BurntSushi/toml v0.3.1
github.com/BurntSushi/toml v0.3.1
github.com/NebulousLabs/Sia v1.3.7
github.com/NebulousLabs/Sia v1.3.7
github.com/NebulousLabs/errors v0.0.0-20181203160057-9f787ce8f69e // indirect
github.com/NebulousLabs/errors v0.0.0-20181203160057-9f787ce8f69e // indirect
...
@@ -24,25 +24,22 @@ require (
...
@@ -24,25 +24,22 @@ require (
github.com/hashicorp/golang-lru v0.5.4
github.com/hashicorp/golang-lru v0.5.4
github.com/holiman/uint256 v1.1.1
github.com/holiman/uint256 v1.1.1
github.com/huin/goupnp v1.0.0
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/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/pborman/uuid v1.2.0
github.com/phoreproject/bls v0.0.0-20200525203911-a88a5ae26844
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/client_golang v0.9.2 // indirect
github.com/prometheus/common v0.4.1
github.com/prometheus/common v0.4.1
github.com/prometheus/procfs v0.0.3 // indirect
github.com/prometheus/procfs v0.0.3 // indirect
github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d
github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d
github.com/rs/cors v1.6.0
github.com/rs/cors v1.6.0
github.com/spf13/cobra v0.0.5
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/tjfoc/gmsm v1.3.1
github.com/valyala/fasthttp v1.5.0
github.com/valyala/fasthttp v1.5.0
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
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/crypto v0.0.0-20200604202706-70a84ac30bf9
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1
...
...
go.sum
View file @
40248d1c
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment