Skip to content

Commit

Permalink
Switch crypto library to onflow/crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
SupunS committed Jul 11, 2023
1 parent 70a431d commit bc100b2
Show file tree
Hide file tree
Showing 106 changed files with 177 additions and 102 deletions.
3 changes: 2 additions & 1 deletion access/legacy/convert/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import (
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/onflow/flow-go/access"
"github.com/onflow/flow-go/crypto"
"github.com/onflow/flow-go/crypto/hash"
"github.com/onflow/flow-go/engine/common/rpc/convert"
"github.com/onflow/flow-go/model/flow"

"github.com/onflow/crypto"
)

var ErrEmptyMessage = errors.New("protobuf message is empty")
Expand Down
3 changes: 2 additions & 1 deletion access/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import (
"errors"
"fmt"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/state"

"github.com/onflow/cadence/runtime/parser"
Expand Down
2 changes: 1 addition & 1 deletion cmd/access/node_builder/access_node_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/credentials/insecure"

"github.com/onflow/crypto"
"github.com/onflow/flow/protobuf/go/flow/access"
"github.com/onflow/go-bitswap"

Expand All @@ -34,7 +35,6 @@ import (
hotstuffvalidator "github.com/onflow/flow-go/consensus/hotstuff/validator"
"github.com/onflow/flow-go/consensus/hotstuff/verification"
recovery "github.com/onflow/flow-go/consensus/recovery/protocol"
"github.com/onflow/flow-go/crypto"
"github.com/onflow/flow-go/engine/access/ingestion"
pingeng "github.com/onflow/flow-go/engine/access/ping"
"github.com/onflow/flow-go/engine/access/rpc"
Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/cmd/access_keygen.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import (

"github.com/spf13/cobra"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/utils/grpcutils"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/cmd/dkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package cmd
import (
"fmt"

"github.com/onflow/crypto"

bootstrapDKG "github.com/onflow/flow-go/cmd/bootstrap/dkg"
"github.com/onflow/flow-go/crypto"
model "github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/model/dkg"
"github.com/onflow/flow-go/model/encodable"
Expand Down
2 changes: 1 addition & 1 deletion cmd/bootstrap/cmd/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/multiformats/go-multiaddr"
"github.com/spf13/cobra"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

model "github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/model/flow"
Expand Down
2 changes: 1 addition & 1 deletion cmd/bootstrap/cmd/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/onflow/flow-go/cmd/bootstrap/utils"
"github.com/onflow/flow-go/model/flow/order"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

model "github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/model/encodable"
Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/cmd/machine_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import (

"github.com/spf13/cobra"

"github.com/onflow/crypto"

"github.com/onflow/flow-go/cmd"
"github.com/onflow/flow-go/crypto"
model "github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/model/flow"
ioutils "github.com/onflow/flow-go/utils/io"
Expand Down
2 changes: 1 addition & 1 deletion cmd/bootstrap/cmd/machine_account_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"path"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/cmd/bootstrap/utils"

Expand Down
2 changes: 1 addition & 1 deletion cmd/bootstrap/cmd/observer_network_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/spf13/cobra"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/cmd"
"github.com/onflow/flow-go/cmd/bootstrap/utils"
Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/cmd/observer_network_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/utils/io"
"github.com/onflow/flow-go/utils/unittest"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/bootstrap/cmd/partner_infos.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"strings"

"github.com/onflow/cadence"
"github.com/onflow/flow-go/crypto"
"github.com/spf13/cobra"

client "github.com/onflow/flow-go-sdk/access/grpc"
"github.com/onflow/flow-go/cmd"
"github.com/onflow/flow-go/cmd/util/cmd/common"
"github.com/onflow/flow-go/crypto"
"github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/model/encodable"
"github.com/onflow/flow-go/model/flow"
Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (
"os"
"path/filepath"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

model "github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/model/flow"
"github.com/onflow/flow-go/utils/io"
Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/dkg/dkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package dkg
import (
"fmt"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

model "github.com/onflow/flow-go/model/dkg"
"github.com/onflow/flow-go/module/signature"
)
Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/dkg/dkg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/utils/unittest"
)

Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/run/execution_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import (
"github.com/rs/zerolog"
"go.uber.org/atomic"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/crypto/hash"
"github.com/onflow/flow-go/engine/execution/state/bootstrap"
"github.com/onflow/flow-go/fvm"
Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/run/qc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import (

"github.com/rs/zerolog"

"github.com/onflow/crypto"

"github.com/onflow/flow-go/consensus/hotstuff"
"github.com/onflow/flow-go/consensus/hotstuff/committees"
"github.com/onflow/flow-go/consensus/hotstuff/model"
hotstuffSig "github.com/onflow/flow-go/consensus/hotstuff/signature"
"github.com/onflow/flow-go/consensus/hotstuff/validator"
"github.com/onflow/flow-go/consensus/hotstuff/verification"
"github.com/onflow/flow-go/consensus/hotstuff/votecollector"
"github.com/onflow/flow-go/crypto"
"github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/model/dkg"
"github.com/onflow/flow-go/model/flow"
Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/run/qc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/model/flow"
"github.com/onflow/flow-go/model/flow/order"
Expand Down
3 changes: 2 additions & 1 deletion cmd/bootstrap/utils/key_generation.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import (

sdkcrypto "github.com/onflow/flow-go-sdk/crypto"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/model/flow"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/bootstrap/utils/key_generation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/onflow/crypto"
sdkcrypto "github.com/onflow/flow-go-sdk/crypto"
"github.com/onflow/flow-go/crypto"

"github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/model/flow"
Expand Down
3 changes: 2 additions & 1 deletion cmd/dynamic_startup.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import (
"github.com/rs/zerolog"
"github.com/sethvargo/go-retry"

"github.com/onflow/crypto"

client "github.com/onflow/flow-go-sdk/access/grpc"
"github.com/onflow/flow-go/cmd/util/cmd/common"
"github.com/onflow/flow-go/crypto"
"github.com/onflow/flow-go/model/bootstrap"
"github.com/onflow/flow-go/state/protocol"
badgerstate "github.com/onflow/flow-go/state/protocol/badger"
Expand Down
3 changes: 2 additions & 1 deletion cmd/node_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import (
"github.com/rs/zerolog"
"github.com/spf13/pflag"

"github.com/onflow/crypto"

"github.com/onflow/flow-go/admin/commands"
"github.com/onflow/flow-go/config"
"github.com/onflow/flow-go/crypto"
"github.com/onflow/flow-go/fvm"
"github.com/onflow/flow-go/model/flow"
"github.com/onflow/flow-go/module"
Expand Down
3 changes: 2 additions & 1 deletion cmd/observer/node_builder/observer_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (
"github.com/rs/zerolog"
"github.com/spf13/pflag"

"github.com/onflow/crypto"

"github.com/onflow/flow-go/cmd"
"github.com/onflow/flow-go/consensus"
"github.com/onflow/flow-go/consensus/hotstuff"
Expand All @@ -26,7 +28,6 @@ import (
hotstuffvalidator "github.com/onflow/flow-go/consensus/hotstuff/validator"
"github.com/onflow/flow-go/consensus/hotstuff/verification"
recovery "github.com/onflow/flow-go/consensus/recovery/protocol"
"github.com/onflow/flow-go/crypto"
"github.com/onflow/flow-go/engine/access/apiproxy"
"github.com/onflow/flow-go/engine/access/rpc"
"github.com/onflow/flow-go/engine/access/rpc/backend"
Expand Down
3 changes: 2 additions & 1 deletion engine/access/access_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ import (
"github.com/stretchr/testify/suite"
"google.golang.org/protobuf/testing/protocmp"

"github.com/onflow/crypto"

"github.com/onflow/flow-go/access"
"github.com/onflow/flow-go/cmd/build"
hsmock "github.com/onflow/flow-go/consensus/hotstuff/mocks"
"github.com/onflow/flow-go/consensus/hotstuff/model"
"github.com/onflow/flow-go/crypto"
"github.com/onflow/flow-go/engine/access/ingestion"
accessmock "github.com/onflow/flow-go/engine/access/mock"
"github.com/onflow/flow-go/engine/access/rpc/backend"
Expand Down
3 changes: 2 additions & 1 deletion engine/access/secure_grpcr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

accessmock "github.com/onflow/flow-go/engine/access/mock"
"github.com/onflow/flow-go/engine/access/rpc"
"github.com/onflow/flow-go/model/flow"
Expand Down
2 changes: 1 addition & 1 deletion engine/common/rpc/convert/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/onflow/flow/protobuf/go/flow/entities"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"
"github.com/onflow/flow-go/model/flow"
)

Expand Down
2 changes: 1 addition & 1 deletion engine/consensus/approvals/signature_collector.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package approvals

import (
"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"
"github.com/onflow/flow-go/model/flow"
)

Expand Down
3 changes: 2 additions & 1 deletion engine/consensus/dkg/reactor_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import (

"github.com/rs/zerolog"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/engine"
"github.com/onflow/flow-go/model/flow"
"github.com/onflow/flow-go/model/flow/filter"
Expand Down
3 changes: 2 additions & 1 deletion engine/consensus/dkg/reactor_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/engine/consensus/dkg"
"github.com/onflow/flow-go/model/flow"
dkgmodule "github.com/onflow/flow-go/module/dkg"
Expand Down
3 changes: 2 additions & 1 deletion engine/execution/computation/computer/result_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (

otelTrace "go.opentelemetry.io/otel/trace"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/crypto/hash"
"github.com/onflow/flow-go/engine/execution"
"github.com/onflow/flow-go/engine/execution/computation/result"
Expand Down
2 changes: 1 addition & 1 deletion engine/execution/computation/computer/spock_norelic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package computer

import (
"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"
"github.com/onflow/flow-go/crypto/hash"
)

Expand Down
2 changes: 1 addition & 1 deletion engine/execution/computation/computer/spock_relic.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package computer

import (
"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"
"github.com/onflow/flow-go/crypto/hash"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/engine/execution"
"github.com/onflow/flow-go/engine/execution/computation/committer"
Expand Down
2 changes: 1 addition & 1 deletion engine/execution/ingestion/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

enginePkg "github.com/onflow/flow-go/engine"
"github.com/onflow/flow-go/engine/execution"
Expand Down
3 changes: 2 additions & 1 deletion engine/execution/state/unittest/fixtures.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package unittest

import (
"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/engine/execution"
"github.com/onflow/flow-go/fvm/storage/snapshot"
"github.com/onflow/flow-go/model/flow"
Expand Down
3 changes: 2 additions & 1 deletion engine/execution/testutil/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import (
jsoncdc "github.com/onflow/cadence/encoding/json"
"github.com/stretchr/testify/require"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/crypto/hash"
"github.com/onflow/flow-go/engine/execution"
"github.com/onflow/flow-go/engine/execution/utils"
Expand Down
3 changes: 2 additions & 1 deletion engine/testutil/mocklocal/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

"github.com/onflow/flow-go/crypto"
"github.com/onflow/crypto"

"github.com/onflow/flow-go/crypto/hash"
"github.com/onflow/flow-go/model/flow"
"github.com/onflow/flow-go/model/flow/filter"
Expand Down
Loading

0 comments on commit bc100b2

Please sign in to comment.