Skip to content

Commit

Permalink
Switch back to upstream BDN (#661)
Browse files Browse the repository at this point in the history
Stick with our GNARK module, but switch back to upstream dedis/kyber for
everything else.
  • Loading branch information
Stebalien authored Sep 24, 2024
1 parent b7576c8 commit 12c0356
Show file tree
Hide file tree
Showing 25 changed files with 26 additions and 872 deletions.
2 changes: 1 addition & 1 deletion blssig/aggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"runtime/debug"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/sign/bdn"
"go.opentelemetry.io/otel/metric"

"github.com/filecoin-project/go-f3/gpbft"
"github.com/filecoin-project/go-f3/internal/bls/bdn"
"github.com/filecoin-project/go-f3/internal/measurements"
)

Expand Down
4 changes: 2 additions & 2 deletions blssig/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"testing"

"github.com/stretchr/testify/require"
"go.dedis.ch/kyber/v4/sign/bdn"

"github.com/filecoin-project/go-f3/gpbft"
"github.com/filecoin-project/go-f3/internal/bls/bdn"
bls12381 "github.com/filecoin-project/go-f3/internal/bls/gnark"
bls12381 "github.com/filecoin-project/go-f3/internal/gnark"
)

const maxCacheMemory uint64 = 10 << 20 // 10MiB
Expand Down
7 changes: 4 additions & 3 deletions blssig/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"context"
"errors"

"github.com/filecoin-project/go-f3/gpbft"
"github.com/filecoin-project/go-f3/internal/bls/bdn"
bls12381 "github.com/filecoin-project/go-f3/internal/bls/gnark"
"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/sign/bdn"

"github.com/filecoin-project/go-f3/gpbft"
bls12381 "github.com/filecoin-project/go-f3/internal/gnark"
)

var _ gpbft.Signer = (*Signer)(nil)
Expand Down
4 changes: 2 additions & 2 deletions blssig/verifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"sync"

"go.dedis.ch/kyber/v4"
"go.dedis.ch/kyber/v4/sign/bdn"
"go.opentelemetry.io/otel/metric"

"github.com/filecoin-project/go-f3/gpbft"
"github.com/filecoin-project/go-f3/internal/bls/bdn"
bls12381 "github.com/filecoin-project/go-f3/internal/bls/gnark"
bls12381 "github.com/filecoin-project/go-f3/internal/gnark"
"github.com/filecoin-project/go-f3/internal/measurements"
)

Expand Down
5 changes: 3 additions & 2 deletions blssig/verifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"testing"

"github.com/filecoin-project/go-f3/internal/bls/bdn"
bls12381 "github.com/filecoin-project/go-f3/internal/bls/gnark"
"github.com/stretchr/testify/require"
"go.dedis.ch/kyber/v4/sign/bdn"

bls12381 "github.com/filecoin-project/go-f3/internal/gnark"
)

func BenchmarkBLSSigning(b *testing.B) {
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.25.5
github.com/whyrusleeping/cbor-gen v0.1.1
go.dedis.ch/kyber/v4 v4.0.0-pre2.0.20240916105431-b283c0cdd30a
go.dedis.ch/kyber/v4 v4.0.0-pre2.0.20240924132404-4de33740016e
go.opentelemetry.io/otel v1.28.0
go.opentelemetry.io/otel/metric v1.28.0
go.uber.org/multierr v1.11.0
Expand Down Expand Up @@ -131,7 +131,6 @@ require (
github.com/stretchr/objx v0.5.2 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
go.dedis.ch/fixbuf v1.0.3 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.uber.org/dig v1.17.1 // indirect
go.uber.org/fx v1.21.1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZl
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/kilic/bls12-381 v0.1.0 h1:encrdjqKMEvabVQ7qYOKu1OvhqpK4s47wDYtNiPtlp4=
github.com/kilic/bls12-381 v0.1.0/go.mod h1:vDTTHJONJ6G+P2R74EhnyotQDTliQDnFEwhdmfzw1ig=
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
Expand Down Expand Up @@ -442,10 +444,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs=
go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw=
go.dedis.ch/kyber/v4 v4.0.0-pre2.0.20240916105431-b283c0cdd30a h1:FF9ZER1DSNuJWcpC/P9AJ9LpswxPxyyQ65YTOqdzDd0=
go.dedis.ch/kyber/v4 v4.0.0-pre2.0.20240916105431-b283c0cdd30a/go.mod h1:tg6jwKTYEjm94VxkFwiQy+ec9hoQvccIU989wNjXWVI=
go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo=
go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4=
go.dedis.ch/kyber/v4 v4.0.0-pre2.0.20240924132404-4de33740016e h1:BAGc1ommHzlhqHktWyRmoldVONj3QHMzdfGLW4ItltA=
go.dedis.ch/kyber/v4 v4.0.0-pre2.0.20240924132404-4de33740016e/go.mod h1:tg6jwKTYEjm94VxkFwiQy+ec9hoQvccIU989wNjXWVI=
go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo=
go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4=
Expand Down
1 change: 0 additions & 1 deletion internal/bls/README.md

This file was deleted.

221 changes: 0 additions & 221 deletions internal/bls/bdn/bdn.go

This file was deleted.

Loading

0 comments on commit 12c0356

Please sign in to comment.