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

CurveSNARK1 exposed from mcl #113

Merged
merged 10 commits into from
May 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN apk add --update --no-cache \

FROM runtime AS cbuild

ENV BN_VERSION=d1a44d2f242692601b3e150b59044ab82f265b65
ENV BN_VERSION=1c96f7053ea1ebcdbe9f59ce46c79023ef6f8ba0

RUN apk add --update --no-cache \
clang \
Expand All @@ -28,7 +28,7 @@ RUN apk add --update --no-cache \
rm -rf /var/cache/apk && mkdir /var/cache/apk && \
rm -rf /usr/share/man

RUN git clone https://github.com/dfinity/bn /bn && \
RUN git clone https://github.com/keep-network/bn /bn && \
cd /bn && \
git reset --hard $BN_VERSION && \
make install && make && \
Expand Down
66 changes: 29 additions & 37 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

[[constraint]]
name = "github.com/dfinity/go-dfinity-crypto"
revision = "1db358303499a9879dd640c71f831897e06e9ddf"
revision = "1cfc23c8f712378febdf621f27e49dd67846e901"
source = "https://github.com/keep-network/go-dfinity-crypto.git"

[[constraint]]
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

func main() {
bls.Init(bls.CurveFp382_1)
bls.Init(bls.CurveSNARK1)

chainHandle := local.Connect()
chainCounter := chainHandle.BlockCounter()
Expand Down
6 changes: 3 additions & 3 deletions pkg/beacon/relay/dkg/dkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package dkg

import (
"fmt"
"math/rand"

"github.com/dfinity/go-dfinity-crypto/rand"
"github.com/keep-network/keep-core/pkg/chain"
"github.com/keep-network/keep-core/pkg/net"
"github.com/keep-network/keep-core/pkg/thresholdgroup"
Expand Down Expand Up @@ -34,10 +34,10 @@ func ExecuteDKG(
groupSize int,
threshold int,
) (*thresholdgroup.Member, error) {
// Generate a nonzero memberID; loop until rand.NewRand returns something
// Generate a nonzero memberID; loop until rand.Int31 returns something
// other than 0, hopefully no more than once :)
memberID := "0"
for memberID = rand.NewRand().String(); memberID == "0"; {
for memberID = fmt.Sprintf("%v", rand.Int31()); memberID == "0"; {
}
fmt.Printf("[member:%v] Initializing member.\n", memberID)
localMember := thresholdgroup.NewMember(memberID, threshold, groupSize)
Expand Down
2 changes: 1 addition & 1 deletion pkg/beacon/relay/dkg/marshaling_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func TestMain(m *testing.M) {
bls.Init(bls.CurveFp382_1)
bls.Init(bls.CurveSNARK1)

os.Exit(m.Run())
}
Expand Down