Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libp2p #1059

Merged
merged 18 commits into from
Jun 29, 2021
Merged

Update libp2p #1059

merged 18 commits into from
Jun 29, 2021

Conversation

yann-sjtu
Copy link
Collaborator

@yann-sjtu yann-sjtu commented Jun 22, 2021

升级libp2p版本,老版本偶现panic libp2p/go-libp2p#1108
Fixes #1000

  1. 新版本libp2p依赖更高版本的protobuf,会出现namespace conflict的warning,项目中不能出现同名的.proto文件,已修改文件名
  2. protobuf 1.4.x 与 1.3.x 处理空值的方式不同 compatibility question of protobuf reflection  golang/protobuf#1333
  3. github.com/dgraph-io/badger v1.6.1有bug,已升级到v1.6.2

@yann-sjtu yann-sjtu force-pushed the update_libp2p branch 7 times, most recently from ced1e4c to 6e56019 Compare June 22, 2021 07:39
types/types.go Outdated
@@ -18,7 +18,7 @@ import (
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/common/crypto"
log "github.com/33cn/chain33/common/log/log15"
"github.com/33cn/chain33/types/jsonpb"
"github.com/golang/protobuf/jsonpb"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我们的jsonpb 是自己修改过的,你对比一下原来的版本。

@yann-sjtu yann-sjtu force-pushed the update_libp2p branch 5 times, most recently from 159d6c3 to 99ef95c Compare June 24, 2021 10:27
@codecov
Copy link

codecov bot commented Jun 28, 2021

Codecov Report

Merging #1059 (8c08260) into master (f6099d6) will decrease coverage by 0.45%.
The diff coverage is 51.05%.

❗ Current head 8c08260 differs from pull request most recent head 6206e7a. Consider uploading reports for the commit 6206e7a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1059      +/-   ##
==========================================
- Coverage   60.86%   60.41%   -0.46%     
==========================================
  Files         153      157       +4     
  Lines       19634    19810     +176     
==========================================
+ Hits        11951    11968      +17     
- Misses       5850     6015     +165     
+ Partials     1833     1827       -6     
Impacted Files Coverage Δ
system/crypto/secp256r1/secp256r1.go 60.78% <ø> (ø)
system/crypto/sm2/sm2.go 63.36% <ø> (ø)
system/p2p/dht/protocol/broadcast/broadcastv1.go 4.47% <0.00%> (-0.07%) ⬇️
system/p2p/dht/protocol/p2pstore/handler.go 30.54% <0.00%> (-5.10%) ⬇️
system/p2p/dht/protocol/peer/handler.go 44.14% <ø> (-9.91%) ⬇️
system/p2p/dht/protocol/p2pstore/query.go 34.34% <26.66%> (-5.09%) ⬇️
system/p2p/dht/protocol/p2pstore/refresh.go 56.14% <40.00%> (+1.21%) ⬆️
system/crypto/btcscript/sign.pb.go 41.17% <41.17%> (ø)
system/p2p/dht/protocol/peer/peerinfo.go 40.09% <44.44%> (-10.85%) ⬇️
system/p2p/dht/manage/conns.go 54.81% <50.00%> (ø)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f6099d6...6206e7a. Read the comment docs.

@yann-sjtu yann-sjtu force-pushed the update_libp2p branch 4 times, most recently from 06dc264 to c520313 Compare June 29, 2021 03:53
@yann-sjtu yann-sjtu force-pushed the update_libp2p branch 2 times, most recently from 5c736fa to d543630 Compare June 29, 2021 04:08
// 因此此处对JoinData类型在判等时做一个特殊处理
if jd, ok := row.Data.(*JoinData); ok {
if oldJd, ok2 := row.old.(*JoinData); ok2 && proto.Equal(jd.Left, oldJd.Left) && proto.Equal(jd.Right, oldJd.Right) {
return nil, nil
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

写法上可以更加对称一点jd, ok := row.Data.(*JoinData)
oldJd, ok2 := row.old.(*JoinData)
if ok && ok2 && proto.Equal(jd.Left, oldJd.Left) && proto.Equal(jd.Right, oldJd.Right) {
    return nil, nil
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@vipwzw vipwzw merged commit 3c03c53 into 33cn:master Jun 29, 2021
@33cn
Copy link
Owner

33cn commented Oct 15, 2021

🎉 This PR is included in version 1.66.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@33cn 33cn added the released label Oct 15, 2021
@33cn
Copy link
Owner

33cn commented Oct 15, 2021

🎉 This PR is included in version 1.66.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libp2p数组越界,崩溃
3 participants