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

Build Atom error #1

Open
THONYLUO opened this issue Mar 6, 2018 · 9 comments
Open

Build Atom error #1

THONYLUO opened this issue Mar 6, 2018 · 9 comments

Comments

@THONYLUO
Copy link

THONYLUO commented Mar 6, 2018

I'm very interested in this project.
But when I try to install&run the source code, GO compiler tells the dedis lib has no such packages, not only crypto but also kyper, even in branch v0.
Can you tell me how to fix these problems in the dedis's current version and run this project correctly?
THANKS!

@kwonalbert
Copy link
Owner

Thanks for your interest! I think the reason is kyber recently moved to https://gopkg.in/dedis/kyber.v2 from their github. I will try to fix this ASAP.

@kwonalbert
Copy link
Owner

It seems like there's been somewhat of a significant change to the library (in particular, the "proof" and the "shuffle" package was removed in kyber.v2?). I'll have to dive in a bit more to figure out what the best way to fix this issue, which might involve contacting kyber authors.

@THONYLUO
Copy link
Author

THONYLUO commented Mar 8, 2018

That's very kind of you ^_^!

@kwonalbert
Copy link
Owner

Sorry it took so long to patch this issue! Now the code needs '-tags experimental' flag to compile, so you'd have to do 'go install -tags experimental' to install, and same for 'go test'. Do you mind trying this again?

@THONYLUO
Copy link
Author

THONYLUO commented Apr 2, 2018

But I also meet another problem. When I execute 'go install -tags experimental'. The go compiler tells me 'crypto/crypto.go:8:2: cannot find package "github.com/dedis/crypto/xof/blake" in any of:
'
I modify 'crypto' dir into 'kyper' to try it work, but I find it that there is no 'blake' only 'blake2xb' in 'oxf' dir in dedis/kyper master branch.
Maybe I should change dedis/kyper into another branch? Because I see some other branches have 'blake'. Which branch can I choose? And should I modify the import dir in crypto/crypto.go 8 line?

Thanks, and have a nice day!

@kwonalbert
Copy link
Owner

Sorry just fixed this! I have an older version of the crypto library still on my computer, and the import tool automatically used that instead of the new kyber. Could you try it again?

@THONYLUO
Copy link
Author

THONYLUO commented Apr 2, 2018

Cool! I can execute 'go install -tags experimental' to install. But when I execute 'go test -v -tags experimental'. There is something wrong.

=== RUN TestNIZKMixing
2018/04/02 15:48:24 rpc.Register: method "Close" has 1 input parameters; needs exactly three
Server started
2018/04/02 15:48:24 Registered server
panic: dkg: cannot process own deal: Error while decoding FieldName : Error while decoding FieldName : detected a 32bit machine, please use either int64 or int32

goroutine 69 [running]:
github.com/dedis/kyber/share/dkg/pedersen.(*DistKeyGenerator).Deals(0x1a624f00, 0x1a614090, 0x8459a60, 0x1a7148c0)
/home/cyril/go/src/github.com/dedis/kyber/share/dkg/pedersen/dkg.go:154 +0x257
github.com/kwonalbert/atom/crypto.NewThreshold(0x1, 0x5, 0x1a71a080, 0x1a868b40, 0x6, 0x6, 0x0)
/home/cyril/go/src/github.com/kwonalbert/atom/crypto/threshold.go:41 +0x1dc
github.com/kwonalbert/atom/server.NewMember(0x2, 0x1a71a080, 0x0, 0x1, 0x9, 0x4, 0x6, 0x0, 0xa, 0x10, ...)
/home/cyril/go/src/github.com/kwonalbert/atom/server/member.go:56 +0x3d2
github.com/kwonalbert/atom/server.(*Server).genGroups(0x1a58c410)
/home/cyril/go/src/github.com/kwonalbert/atom/server/server.go:246 +0x425
github.com/kwonalbert/atom/server.(*Server).getDirectory(0x1a58c410)
/home/cyril/go/src/github.com/kwonalbert/atom/server/server.go:217 +0x236
github.com/kwonalbert/atom/server.(*Server).Setup(0x1a58c410)
/home/cyril/go/src/github.com/kwonalbert/atom/server/server.go:135 +0x3b
github.com/kwonalbert/atom.setup.func1(0x1a622060, 0x1a60e8d0, 0x9, 0x9, 0x2)
/home/cyril/go/src/github.com/kwonalbert/atom/atom_test.go:210 +0x52
created by github.com/kwonalbert/atom.setup
/home/cyril/go/src/github.com/kwonalbert/atom/atom_test.go:208 +0x85b
exit status 2
FAIL github.com/kwonalbert/atom 0.129s

Do you see this panic msg before?

@kwonalbert
Copy link
Owner

Hmm I can't seem to reproduce this error, and I've never seen it before. Which version of Go are you running, and are you on a 32-bit machine?

@THONYLUO
Copy link
Author

THONYLUO commented Apr 2, 2018

Yeah! I use the wrong Go version. The former Go version is go version go1.10 linux/386. So I choose another amd64 version to solve this problem.

But, I run the './run.py --port 8000 --servers 8 --gsize 4 --groups 4 --clients 4 --trustees 4 --msgs 16 --msize 160 --type 1 --mode 1'. There is a error.


Traceback (most recent call last):
File "./run.py", line 36, in
if flags['branch'] == -1:
KeyError: 'branch'


I look run.py code, and ignore if statement. Only jumpping into flags['branch'] = flags['groups'], it tells me


Traceback (most recent call last):
File "./run.py", line 108, in
flag_branch])
NameError: name 'flag_branch' is not defined


Is the branch variable needed?

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

No branches or pull requests

2 participants