getamis / alice

Hierarchical Threshold Signature Scheme
Apache License 2.0
375 stars 75 forks source link

get protobuf namespace-conflict in run-time #170

Closed alexSmallWorld closed 1 year ago

alexSmallWorld commented 2 years ago

why I got this error in run-time? I import gg18.singer and frost.singer in example.

`panic: proto: file "github.com/getamis/alice/crypto/tss/eddsa/frost/signer/message.proto" has a name conflict over signer.Type previously from: "github.com/getamis/alice/crypto/tss/ecdsa/gg18/signer" currently from: "github.com/getamis/alice/crypto/tss/eddsa/frost/signer" See https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

goroutine 1 [running]: google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x4bfc640, 0xc0002194d0}, {0x4bfc640, 0xc000219510}) /Users/walker/work/golang_work17/pkg/mod/google.golang.org/protobuf@v1.26.0/reflect/protoregistry/registry.go:54 +0x1f4 google.golang.org/protobuf/reflect/protoregistry.(Files).RegisterFile.func1({0x4c20848, 0xc000249f80}) /Users/walker/work/golang_work17/pkg/mod/google.golang.org/protobuf@v1.26.0/reflect/protoregistry/registry.go:152 +0x28f google.golang.org/protobuf/reflect/protoregistry.rangeTopLevelDescriptors({0x4c297e0, 0xc000246000}, 0xc0006ef738) /Users/walker/work/golang_work17/pkg/mod/google.golang.org/protobuf@v1.26.0/reflect/protoregistry/registry.go:396 +0xab google.golang.org/protobuf/reflect/protoregistry.(Files).RegisterFile(0xc00011a2b0, {0x4c297e0, 0xc000246000}) /Users/walker/work/golang_work17/pkg/mod/google.golang.org/protobuf@v1.26.0/reflect/protoregistry/registry.go:147 +0x750 google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x4816b2a, 0x36}, {0x51e98c0, 0x27f, 0x27f}, 0x1, 0x3, 0x0, 0x0, {0x4c08b48, ...}, ...}) /Users/walker/work/golang_work17/pkg/mod/google.golang.org/protobuf@v1.26.0/internal/filedesc/build.go:113 +0x1d6 google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x4816b2a, 0x36}, {0x51e98c0, 0x27f, 0x27f}, 0x1, 0x3, 0x0, 0x0, {0x0, ...}, ...}, ...}) /Users/walker/work/golang_work17/pkg/mod/google.golang.org/protobuf@v1.26.0/internal/filetype/build.go:139 +0x198 github.com/getamis/alice/crypto/tss/eddsa/frost/signer.file_github_com_getamis_alice_crypto_tss_eddsa_frost_signer_message_proto_init() /Users/walker/work/common_work/tss/alice/crypto/tss/eddsa/frost/signer/message.pb.go:433 +0x238 github.com/getamis/alice/crypto/tss/eddsa/frost/signer.init.0() /Users/walker/work/common_work/tss/alice/crypto/tss/eddsa/frost/signer/message.pb.go:372 +0x17`

cychuang0924 commented 2 years ago

Thanks for your reply. We will check this problem and fix it.

markya0616 commented 2 years ago

@alexSmallWorld can you share your repository? I cannot reproduce it in my side.

alexSmallWorld commented 2 years ago

@alexSmallWorld can you share your repository? I cannot reproduce it in my side.

I had reply to you by email, please check. thanks.

cychuang0924 commented 1 year ago

Hi Hoodie-Kang,

Sorry for the late reply! If @Mark Lin @.***> has time, please help with this issue. Thanks a lot!

Sincerely,

Chih Yun

Hoodie-Kang @.***> 於 2022年12月14日 週三 下午1:52寫道:

@cychuang0924 https://github.com/cychuang0924 Hi, can you explain why this problem happen and how to fix it? Because I got very similar error when I import tss/ecdsa/cggmp/dkg in dkg example.

panic: proto: file "github.com/getamis/alice/crypto/tss/dkg/message.proto" has a name conflict over dkg.Type previously from: "github.com/getamis/alice/crypto/tss/ecdsa/cggmp/dkg" currently from: "github.com/getamis/alice/crypto/tss/dkg" ...

Thanks

— Reply to this email directly, view it on GitHub https://github.com/getamis/alice/issues/170#issuecomment-1350435385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK4AJBEIYO4KTMI4ZCHCLRDWNFOCDANCNFSM5ZH7M5WQ . You are receiving this because you were mentioned.Message ID: @.***>

cychuang0924 commented 1 year ago

This is solved in PR 237