diff --git a/Makefile b/Makefile index 571ffe45fc..2a38f9ef3a 100644 --- a/Makefile +++ b/Makefile @@ -164,8 +164,4 @@ mockgen-install: .PHONY: format format: -# both format commands must ignore generated files which are named *mock* or enr_fork_id_encoding.go -# the argument to gopls format can be a list of files - find . -name "*.go" ! -path '*mock*' ! -name 'enr_fork_id_encoding.go' -type f -print0 | xargs -0 -P 1 sh -c 'gopls -v format -w $0' -# the argument to gopls imports must be a single file so this entire command takes a few mintues to run - find . -name "*.go" ! -path '*mock*' ! -name 'enr_fork_id_encoding.go' -type f -print0 | xargs -0 -P 10 -I{} sh -c 'gopls -v imports -w "{}"' + gci write -s standard -s default -s blank -s dot -s localmodule -s "prefix(github.com/ssvlabs/ssv-spec)" $$(find . -type f -name '*.go' -not -path "*mock*" -not -name "*.gen.go") diff --git a/api/handlers/exporter.go b/api/handlers/exporter.go index 5eb1aa01b9..9f24aa94ac 100644 --- a/api/handlers/exporter.go +++ b/api/handlers/exporter.go @@ -6,12 +6,13 @@ import ( "net/http" "github.com/attestantio/go-eth2-client/spec/phase0" + spectypes "github.com/ssvlabs/ssv-spec/types" - "github.com/ssvlabs/ssv/networkconfig" - qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" "github.com/ssvlabs/ssv/api" ibftstorage "github.com/ssvlabs/ssv/ibft/storage" + "github.com/ssvlabs/ssv/networkconfig" + qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" ) type Exporter struct { diff --git a/api/handlers/validators.go b/api/handlers/validators.go index 5a047cad69..8f262335c5 100644 --- a/api/handlers/validators.go +++ b/api/handlers/validators.go @@ -7,7 +7,9 @@ import ( "strings" "github.com/attestantio/go-eth2-client/spec/phase0" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/api" "github.com/ssvlabs/ssv/protocol/v2/types" registrystorage "github.com/ssvlabs/ssv/registry/storage" diff --git a/api/handlers/validators_test.go b/api/handlers/validators_test.go index ec930d3f7d..3fef96be34 100644 --- a/api/handlers/validators_test.go +++ b/api/handlers/validators_test.go @@ -4,6 +4,7 @@ import ( "testing" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/types" ) diff --git a/beacon/goclient/attest_test.go b/beacon/goclient/attest_test.go index 8f1eb5048b..6a300133b5 100644 --- a/beacon/goclient/attest_test.go +++ b/beacon/goclient/attest_test.go @@ -13,10 +13,11 @@ import ( "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/sourcegraph/conc/pool" - "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" "go.uber.org/zap" + "github.com/ssvlabs/ssv-spec/types" + operatordatastore "github.com/ssvlabs/ssv/operator/datastore" "github.com/ssvlabs/ssv/operator/slotticker" "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" diff --git a/beacon/goclient/goclient.go b/beacon/goclient/goclient.go index 99b829f0aa..ec26cc00ed 100644 --- a/beacon/goclient/goclient.go +++ b/beacon/goclient/goclient.go @@ -19,11 +19,12 @@ import ( "github.com/jellydator/ttlcache/v3" "github.com/pkg/errors" "github.com/rs/zerolog" - specssv "github.com/ssvlabs/ssv-spec/ssv" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" "tailscale.com/util/singleflight" + specssv "github.com/ssvlabs/ssv-spec/ssv" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" operatordatastore "github.com/ssvlabs/ssv/operator/datastore" "github.com/ssvlabs/ssv/operator/slotticker" diff --git a/beacon/goclient/goclient_test.go b/beacon/goclient/goclient_test.go index 1e313a0eee..4d5734c8c8 100644 --- a/beacon/goclient/goclient_test.go +++ b/beacon/goclient/goclient_test.go @@ -13,10 +13,11 @@ import ( "github.com/attestantio/go-eth2-client/api" v1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" "go.uber.org/zap" + "github.com/ssvlabs/ssv-spec/types" + operatordatastore "github.com/ssvlabs/ssv/operator/datastore" "github.com/ssvlabs/ssv/operator/slotticker" "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" diff --git a/beacon/goclient/observability.go b/beacon/goclient/observability.go index f895869d91..400a495fb6 100644 --- a/beacon/goclient/observability.go +++ b/beacon/goclient/observability.go @@ -8,7 +8,6 @@ import ( "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/spec/phase0" - "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" diff --git a/beacon/goclient/proposer.go b/beacon/goclient/proposer.go index 9c57596b23..7e078f0410 100644 --- a/beacon/goclient/proposer.go +++ b/beacon/goclient/proposer.go @@ -20,9 +20,10 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" ssz "github.com/ferranbt/fastssz" "github.com/sourcegraph/conc/pool" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/operator/slotticker" ) diff --git a/beacon/goclient/signing.go b/beacon/goclient/signing.go index 034121a8b1..03f0824324 100644 --- a/beacon/goclient/signing.go +++ b/beacon/goclient/signing.go @@ -13,8 +13,9 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" ssz "github.com/ferranbt/fastssz" "github.com/pkg/errors" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + + spectypes "github.com/ssvlabs/ssv-spec/types" ) func (gc *GoClient) computeVoluntaryExitDomain(ctx context.Context) (phase0.Domain, error) { diff --git a/beacon/goclient/sync_committee.go b/beacon/goclient/sync_committee.go index a110991ce0..b36e0f62ac 100644 --- a/beacon/goclient/sync_committee.go +++ b/beacon/goclient/sync_committee.go @@ -8,11 +8,10 @@ import ( "github.com/attestantio/go-eth2-client/api" eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" - "go.uber.org/zap" - "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/altair" "github.com/attestantio/go-eth2-client/spec/phase0" + "go.uber.org/zap" ) // SyncCommitteeDuties returns sync committee duties for a given epoch diff --git a/beacon/goclient/sync_committee_contribution.go b/beacon/goclient/sync_committee_contribution.go index 0c6cc1b57e..53679b618e 100644 --- a/beacon/goclient/sync_committee_contribution.go +++ b/beacon/goclient/sync_committee_contribution.go @@ -12,9 +12,10 @@ import ( "github.com/attestantio/go-eth2-client/spec/altair" "github.com/attestantio/go-eth2-client/spec/phase0" ssz "github.com/ferranbt/fastssz" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" "golang.org/x/sync/errgroup" + + spectypes "github.com/ssvlabs/ssv-spec/types" ) // IsSyncCommitteeAggregator returns tru if aggregator diff --git a/cli/bootnode/boot_node.go b/cli/bootnode/boot_node.go index 5bcc72dbb5..1d834f6212 100644 --- a/cli/bootnode/boot_node.go +++ b/cli/bootnode/boot_node.go @@ -4,17 +4,15 @@ import ( "fmt" "log" - "github.com/ssvlabs/ssv/networkconfig" - "github.com/ssvlabs/ssv/utils/commons" - - "github.com/ssvlabs/ssv/logging" - "github.com/ilyakaznacheev/cleanenv" "github.com/spf13/cobra" "go.uber.org/zap" global_config "github.com/ssvlabs/ssv/cli/config" + "github.com/ssvlabs/ssv/logging" + "github.com/ssvlabs/ssv/networkconfig" bootnode "github.com/ssvlabs/ssv/utils/boot_node" + "github.com/ssvlabs/ssv/utils/commons" ) type config struct { diff --git a/cli/generate_operator_keys.go b/cli/generate_operator_keys.go index b4054bb288..145509b821 100644 --- a/cli/generate_operator_keys.go +++ b/cli/generate_operator_keys.go @@ -5,13 +5,12 @@ import ( "os" "path/filepath" - "github.com/ssvlabs/ssv/operator/keystore" - "github.com/spf13/cobra" "go.uber.org/zap" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/operator/keys" + "github.com/ssvlabs/ssv/operator/keystore" ) var generateOperatorKeysCmd = &cobra.Command{ diff --git a/cli/operator/node.go b/cli/operator/node.go index 291370994c..69c3512efa 100644 --- a/cli/operator/node.go +++ b/cli/operator/node.go @@ -19,9 +19,10 @@ import ( "github.com/ilyakaznacheev/cleanenv" "github.com/pkg/errors" "github.com/spf13/cobra" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/api/handlers" apiserver "github.com/ssvlabs/ssv/api/server" "github.com/ssvlabs/ssv/beacon/goclient" diff --git a/cli/threshold.go b/cli/threshold.go index a690a3f601..af2d7d71b6 100644 --- a/cli/threshold.go +++ b/cli/threshold.go @@ -8,11 +8,10 @@ import ( "github.com/spf13/cobra" "go.uber.org/zap" + "github.com/ssvlabs/ssv/cli/flags" "github.com/ssvlabs/ssv/logging" ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" "github.com/ssvlabs/ssv/utils/threshold" - - "github.com/ssvlabs/ssv/cli/flags" ) // createThreshold is the command to create threshold based on the given private key diff --git a/e2e/beacon_proxy/intercept/slashinginterceptor/attestations.go b/e2e/beacon_proxy/intercept/slashinginterceptor/attestations.go index 40c607409f..4671b10be4 100644 --- a/e2e/beacon_proxy/intercept/slashinginterceptor/attestations.go +++ b/e2e/beacon_proxy/intercept/slashinginterceptor/attestations.go @@ -4,10 +4,11 @@ import ( "context" "crypto/rand" "fmt" + "sort" + v1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" "go.uber.org/zap" - "sort" ) type AttesterSlashingTest struct { diff --git a/e2e/beacon_proxy/intercept/slashinginterceptor/proposals.go b/e2e/beacon_proxy/intercept/slashinginterceptor/proposals.go index c71fe155bc..833ea70c08 100644 --- a/e2e/beacon_proxy/intercept/slashinginterceptor/proposals.go +++ b/e2e/beacon_proxy/intercept/slashinginterceptor/proposals.go @@ -5,12 +5,13 @@ import ( "crypto/rand" "encoding/json" "fmt" + "sort" + v1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/capella" "github.com/attestantio/go-eth2-client/spec/phase0" "go.uber.org/zap" - "sort" ) type ProposerSlashingTest struct { diff --git a/e2e/beacon_proxy/intercept/slashinginterceptor/slashing.go b/e2e/beacon_proxy/intercept/slashinginterceptor/slashing.go index b929d225a8..ee3f33d62b 100644 --- a/e2e/beacon_proxy/intercept/slashinginterceptor/slashing.go +++ b/e2e/beacon_proxy/intercept/slashinginterceptor/slashing.go @@ -8,11 +8,11 @@ import ( v1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec" "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" "go.uber.org/zap" "golang.org/x/exp/maps" beaconproxy "github.com/ssvlabs/ssv/e2e/beacon_proxy" + "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" ) const startEndEpochsDiff = 2 diff --git a/e2e/cmd/ssv-e2e/beacon_proxy.go b/e2e/cmd/ssv-e2e/beacon_proxy.go index 538162e998..99cf2d072e 100644 --- a/e2e/cmd/ssv-e2e/beacon_proxy.go +++ b/e2e/cmd/ssv-e2e/beacon_proxy.go @@ -13,12 +13,12 @@ import ( "github.com/attestantio/go-eth2-client/http" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/rs/zerolog" - "github.com/ssvlabs/ssv/networkconfig" "go.uber.org/zap" "golang.org/x/exp/maps" beaconproxy "github.com/ssvlabs/ssv/e2e/beacon_proxy" "github.com/ssvlabs/ssv/e2e/beacon_proxy/intercept/slashinginterceptor" + "github.com/ssvlabs/ssv/networkconfig" ) type BeaconProxyCmd struct { diff --git a/e2e/cmd/ssv-e2e/share_update.go b/e2e/cmd/ssv-e2e/share_update.go index ff621df35c..ddd53e19be 100644 --- a/e2e/cmd/ssv-e2e/share_update.go +++ b/e2e/cmd/ssv-e2e/share_update.go @@ -9,7 +9,11 @@ import ( "path/filepath" "github.com/attestantio/go-eth2-client/spec/phase0" + "go.uber.org/zap" + "gopkg.in/yaml.v3" + "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/e2e/logs_catcher" "github.com/ssvlabs/ssv/ekm" "github.com/ssvlabs/ssv/networkconfig" @@ -18,8 +22,6 @@ import ( "github.com/ssvlabs/ssv/storage/kv" "github.com/ssvlabs/ssv/utils/blskeygen" "github.com/ssvlabs/ssv/utils/rsaencryption" - "go.uber.org/zap" - "gopkg.in/yaml.v3" ) type ShareUpdateCmd struct { diff --git a/e2e/logs_catcher/docker/docker_reader.go b/e2e/logs_catcher/docker/docker_reader.go index 17632c201b..bf7d635238 100644 --- a/e2e/logs_catcher/docker/docker_reader.go +++ b/e2e/logs_catcher/docker/docker_reader.go @@ -3,12 +3,14 @@ package docker import ( "bufio" "context" + "io" + "strings" + "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/pkg/errors" + "github.com/ssvlabs/ssv/e2e/logs_catcher/logs" - "io" - "strings" ) type Streamer interface { diff --git a/e2e/logs_catcher/docker/restarter.go b/e2e/logs_catcher/docker/restarter.go index 82fd0f1a82..25165908eb 100644 --- a/e2e/logs_catcher/docker/restarter.go +++ b/e2e/logs_catcher/docker/restarter.go @@ -2,6 +2,7 @@ package docker import ( "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" ) diff --git a/e2e/logs_catcher/logs.go b/e2e/logs_catcher/logs.go index c26bd29dd5..53c98146fd 100644 --- a/e2e/logs_catcher/logs.go +++ b/e2e/logs_catcher/logs.go @@ -3,10 +3,12 @@ package logs_catcher import ( "context" "fmt" + "github.com/pkg/errors" + "go.uber.org/zap" + "github.com/ssvlabs/ssv/e2e/logs_catcher/docker" "github.com/ssvlabs/ssv/e2e/logs_catcher/parser" - "go.uber.org/zap" ) const MesasgeKey = "msg" // todo: pass to struct/load from config diff --git a/e2e/logs_catcher/logs_test.go b/e2e/logs_catcher/logs_test.go index f88de0c818..22cf228551 100644 --- a/e2e/logs_catcher/logs_test.go +++ b/e2e/logs_catcher/logs_test.go @@ -3,9 +3,10 @@ package logs_catcher import ( "context" "encoding/binary" + "io" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" - "io" ) type mockDockerClient struct { diff --git a/e2e/logs_catcher/matcher.go b/e2e/logs_catcher/matcher.go index 6581204721..9e90653b15 100644 --- a/e2e/logs_catcher/matcher.go +++ b/e2e/logs_catcher/matcher.go @@ -2,11 +2,10 @@ package logs_catcher import ( "context" + "errors" "fmt" "time" - "errors" - "go.uber.org/zap" "github.com/ssvlabs/ssv/e2e/logs_catcher/docker" diff --git a/e2e/logs_catcher/matcher_bls.go b/e2e/logs_catcher/matcher_bls.go index 41e664d038..dabd516622 100644 --- a/e2e/logs_catcher/matcher_bls.go +++ b/e2e/logs_catcher/matcher_bls.go @@ -7,16 +7,16 @@ import ( "strings" "time" - "github.com/ssvlabs/ssv/e2e/logs_catcher/logs" - "github.com/ssvlabs/ssv/e2e/logs_catcher/parser" - "github.com/attestantio/go-eth2-client/spec/phase0" + "go.uber.org/zap" + "github.com/ssvlabs/ssv-spec/qbft" "github.com/ssvlabs/ssv-spec/types" - "github.com/ssvlabs/ssv/protocol/v2/message" - "go.uber.org/zap" "github.com/ssvlabs/ssv/e2e/logs_catcher/docker" + "github.com/ssvlabs/ssv/e2e/logs_catcher/logs" + "github.com/ssvlabs/ssv/e2e/logs_catcher/parser" + "github.com/ssvlabs/ssv/protocol/v2/message" ) const ( diff --git a/ekm/signer_key_manager_test.go b/ekm/signer_key_manager_test.go index e31d6796da..4ca71d1f8e 100644 --- a/ekm/signer_key_manager_test.go +++ b/ekm/signer_key_manager_test.go @@ -19,11 +19,12 @@ import ( "github.com/prysmaticlabs/go-bitfield" "github.com/ssvlabs/eth2-key-manager/core" "github.com/ssvlabs/eth2-key-manager/wallets/hd" - spectypes "github.com/ssvlabs/ssv-spec/types" - "github.com/ssvlabs/ssv-spec/types/testingutils" "github.com/stretchr/testify/require" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/networkconfig" "github.com/ssvlabs/ssv/operator/keys" diff --git a/ekm/signer_storage_test.go b/ekm/signer_storage_test.go index fbf3021cb8..e4e3fa6430 100644 --- a/ekm/signer_storage_test.go +++ b/ekm/signer_storage_test.go @@ -18,9 +18,8 @@ import ( "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/networkconfig" - "github.com/ssvlabs/ssv/storage/kv" - "github.com/ssvlabs/ssv/storage/basedb" + "github.com/ssvlabs/ssv/storage/kv" "github.com/ssvlabs/ssv/utils/threshold" ) diff --git a/eth/eventhandler/event_handler.go b/eth/eventhandler/event_handler.go index a437e203d3..89364d2cfd 100644 --- a/eth/eventhandler/event_handler.go +++ b/eth/eventhandler/event_handler.go @@ -9,22 +9,22 @@ import ( "math/big" "time" - "github.com/ssvlabs/ssv/ekm" - "github.com/ssvlabs/ssv/observability" - "go.opentelemetry.io/otel/metric" - "github.com/attestantio/go-eth2-client/spec/phase0" ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - spectypes "github.com/ssvlabs/ssv-spec/types" + "go.opentelemetry.io/otel/metric" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + + "github.com/ssvlabs/ssv/ekm" "github.com/ssvlabs/ssv/eth/contract" "github.com/ssvlabs/ssv/eth/eventparser" "github.com/ssvlabs/ssv/eth/executionclient" "github.com/ssvlabs/ssv/eth/localevents" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/networkconfig" + "github.com/ssvlabs/ssv/observability" operatordatastore "github.com/ssvlabs/ssv/operator/datastore" "github.com/ssvlabs/ssv/operator/keys" nodestorage "github.com/ssvlabs/ssv/operator/storage" diff --git a/eth/eventhandler/event_handler_test.go b/eth/eventhandler/event_handler_test.go index a4e101d563..bf8916f00c 100644 --- a/eth/eventhandler/event_handler_test.go +++ b/eth/eventhandler/event_handler_test.go @@ -21,6 +21,10 @@ import ( "github.com/herumi/bls-eth-go-binary/bls" "github.com/pkg/errors" ekmcore "github.com/ssvlabs/eth2-key-manager/core" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + "go.uber.org/zap" + "github.com/ssvlabs/ssv/ekm" "github.com/ssvlabs/ssv/eth/contract" "github.com/ssvlabs/ssv/eth/eventparser" @@ -42,9 +46,6 @@ import ( "github.com/ssvlabs/ssv/utils" "github.com/ssvlabs/ssv/utils/blskeygen" "github.com/ssvlabs/ssv/utils/threshold" - "github.com/stretchr/testify/require" - "go.uber.org/mock/gomock" - "go.uber.org/zap" ) var ( diff --git a/eth/eventhandler/handlers.go b/eth/eventhandler/handlers.go index 813d9ec108..b7cdb6bb2c 100644 --- a/eth/eventhandler/handlers.go +++ b/eth/eventhandler/handlers.go @@ -9,7 +9,10 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" ethcommon "github.com/ethereum/go-ethereum/common" "github.com/herumi/bls-eth-go-binary/bls" + "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/ekm" "github.com/ssvlabs/ssv/eth/contract" "github.com/ssvlabs/ssv/logging/fields" @@ -17,7 +20,6 @@ import ( ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" registrystorage "github.com/ssvlabs/ssv/registry/storage" "github.com/ssvlabs/ssv/storage/basedb" - "go.uber.org/zap" ) // b64 encrypted key length is 256 diff --git a/eth/eventhandler/local_events_test.go b/eth/eventhandler/local_events_test.go index 9fdd852c00..76afac74ad 100644 --- a/eth/eventhandler/local_events_test.go +++ b/eth/eventhandler/local_events_test.go @@ -6,11 +6,12 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" "go.uber.org/zap/zaptest" "gopkg.in/yaml.v3" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/eth/contract" "github.com/ssvlabs/ssv/eth/localevents" "github.com/ssvlabs/ssv/registry/storage" diff --git a/eth/eventhandler/observability.go b/eth/eventhandler/observability.go index 013b15e2bb..4773c5a2b9 100644 --- a/eth/eventhandler/observability.go +++ b/eth/eventhandler/observability.go @@ -4,10 +4,11 @@ import ( "context" "fmt" - "github.com/ssvlabs/ssv/observability" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" + + "github.com/ssvlabs/ssv/observability" ) const ( diff --git a/eth/eventhandler/options.go b/eth/eventhandler/options.go index 6cff373f9d..3e7d07a91e 100644 --- a/eth/eventhandler/options.go +++ b/eth/eventhandler/options.go @@ -1,8 +1,9 @@ package eventhandler import ( - "github.com/ssvlabs/ssv/logging" "go.uber.org/zap" + + "github.com/ssvlabs/ssv/logging" ) // Option defines EventHandler configuration option. diff --git a/eth/eventhandler/task.go b/eth/eventhandler/task.go index 67c3d90ad0..adfe2ce6aa 100644 --- a/eth/eventhandler/task.go +++ b/eth/eventhandler/task.go @@ -3,6 +3,7 @@ package eventhandler import ( "github.com/attestantio/go-eth2-client/spec/phase0" ethcommon "github.com/ethereum/go-ethereum/common" + spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv/protocol/v2/types" diff --git a/eth/eventhandler/task_executor_test.go b/eth/eventhandler/task_executor_test.go index d41474fc00..665acf4b44 100644 --- a/eth/eventhandler/task_executor_test.go +++ b/eth/eventhandler/task_executor_test.go @@ -5,15 +5,15 @@ import ( "encoding/binary" "testing" - "go.uber.org/mock/gomock" - ethcommon "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" "go.uber.org/zap" "go.uber.org/zap/zaptest/observer" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/eth/executionclient" ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" "github.com/ssvlabs/ssv/registry/storage" diff --git a/eth/localevents/local_events_test.go b/eth/localevents/local_events_test.go index 1526405e86..8d9decc727 100644 --- a/eth/localevents/local_events_test.go +++ b/eth/localevents/local_events_test.go @@ -3,10 +3,11 @@ package localevents_test import ( "testing" - "github.com/ssvlabs/ssv/eth/contract" - "github.com/ssvlabs/ssv/eth/localevents" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" + + "github.com/ssvlabs/ssv/eth/contract" + "github.com/ssvlabs/ssv/eth/localevents" ) func TestLocalEventsUnmarshalYAML(t *testing.T) { diff --git a/exporter/api/decided/stream.go b/exporter/api/decided/stream.go index 1708474a85..52a02a6c7c 100644 --- a/exporter/api/decided/stream.go +++ b/exporter/api/decided/stream.go @@ -4,14 +4,14 @@ import ( "fmt" "time" - "github.com/ssvlabs/ssv/exporter/api" - "github.com/ssvlabs/ssv/networkconfig" - qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" - "github.com/patrickmn/go-cache" + "go.uber.org/zap" + + "github.com/ssvlabs/ssv/exporter/api" "github.com/ssvlabs/ssv/logging/fields" + "github.com/ssvlabs/ssv/networkconfig" "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" - "go.uber.org/zap" + qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" ) // NewStreamPublisher handles incoming newly decided messages. diff --git a/exporter/api/msg.go b/exporter/api/msg.go index 4c78ba9648..9c28b50d95 100644 --- a/exporter/api/msg.go +++ b/exporter/api/msg.go @@ -6,8 +6,10 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" ) diff --git a/exporter/api/query_handlers.go b/exporter/api/query_handlers.go index 9b09dda0ac..4894221952 100644 --- a/exporter/api/query_handlers.go +++ b/exporter/api/query_handlers.go @@ -5,13 +5,14 @@ import ( "fmt" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" - qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/ibft/storage" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/message" + qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" ) const ( diff --git a/exporter/api/query_handlers_test.go b/exporter/api/query_handlers_test.go index c7466e8f50..f1c3906330 100644 --- a/exporter/api/query_handlers_test.go +++ b/exporter/api/query_handlers_test.go @@ -13,6 +13,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + qbftstorage "github.com/ssvlabs/ssv/ibft/storage" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/networkconfig" diff --git a/exporter/api/server_test.go b/exporter/api/server_test.go index a87cba3957..b9047ebfca 100644 --- a/exporter/api/server_test.go +++ b/exporter/api/server_test.go @@ -10,9 +10,8 @@ import ( "testing" "time" - "go.uber.org/zap" - "github.com/stretchr/testify/require" + "go.uber.org/zap" "go.uber.org/zap/zaptest" registrystorage "github.com/ssvlabs/ssv/registry/storage" diff --git a/exporter/api/test_utils.go b/exporter/api/test_utils.go index 55c391a4ad..646d45b452 100644 --- a/exporter/api/test_utils.go +++ b/exporter/api/test_utils.go @@ -6,11 +6,11 @@ import ( "net/url" "sync" - "github.com/ssvlabs/ssv/logging/fields" - "github.com/gorilla/websocket" "github.com/pkg/errors" "go.uber.org/zap" + + "github.com/ssvlabs/ssv/logging/fields" ) // WSClient represents a client connection to be used in tests diff --git a/ibft/storage/store.go b/ibft/storage/store.go index 0e98cd90a7..61a04b1488 100644 --- a/ibft/storage/store.go +++ b/ibft/storage/store.go @@ -13,6 +13,7 @@ import ( "go.uber.org/zap" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/operator/slotticker" qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" diff --git a/ibft/storage/store_test.go b/ibft/storage/store_test.go index 03a159dd30..7eee6224e2 100644 --- a/ibft/storage/store_test.go +++ b/ibft/storage/store_test.go @@ -18,6 +18,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/operator/slotticker" mockslotticker "github.com/ssvlabs/ssv/operator/slotticker/mocks" qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" diff --git a/ibft/storage/stores.go b/ibft/storage/stores.go index e68fef548f..0adeff58db 100644 --- a/ibft/storage/stores.go +++ b/ibft/storage/stores.go @@ -2,6 +2,7 @@ package storage import ( spectypes "github.com/ssvlabs/ssv-spec/types" + qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" "github.com/ssvlabs/ssv/storage/basedb" "github.com/ssvlabs/ssv/utils/hashmap" diff --git a/integration/qbft/tests/setup_test.go b/integration/qbft/tests/setup_test.go index e420132d99..f50a4c58bb 100644 --- a/integration/qbft/tests/setup_test.go +++ b/integration/qbft/tests/setup_test.go @@ -6,14 +6,16 @@ import ( "testing" eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/network" p2pv1 "github.com/ssvlabs/ssv/network/p2p" ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" - "github.com/stretchr/testify/require" - "go.uber.org/zap" ) const ( diff --git a/integration/qbft/tests/temp_testing_beacon_network.go b/integration/qbft/tests/temp_testing_beacon_network.go index 1a0a15fcf7..771d836fea 100644 --- a/integration/qbft/tests/temp_testing_beacon_network.go +++ b/integration/qbft/tests/temp_testing_beacon_network.go @@ -6,8 +6,10 @@ import ( "github.com/attestantio/go-eth2-client/spec/altair" "github.com/attestantio/go-eth2-client/spec/phase0" ssz "github.com/ferranbt/fastssz" + spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" ) diff --git a/logging/fields/fields.go b/logging/fields/fields.go index cd7aa7e025..2e411cbb93 100644 --- a/logging/fields/fields.go +++ b/logging/fields/fields.go @@ -15,11 +15,12 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/p2p/enode" "github.com/libp2p/go-libp2p/core/peer" - specqbft "github.com/ssvlabs/ssv-spec/qbft" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" "go.uber.org/zap/zapcore" + specqbft "github.com/ssvlabs/ssv-spec/qbft" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/eth/contract" "github.com/ssvlabs/ssv/logging/fields/stringer" "github.com/ssvlabs/ssv/network/records" diff --git a/logging/global.go b/logging/global.go index ccc9d23002..e219e4b825 100644 --- a/logging/global.go +++ b/logging/global.go @@ -7,10 +7,9 @@ import ( "runtime/debug" "time" - "gopkg.in/natefinch/lumberjack.v2" - "go.uber.org/zap" "go.uber.org/zap/zapcore" + "gopkg.in/natefinch/lumberjack.v2" ) func parseConfigLevel(levelName string) (zapcore.Level, error) { diff --git a/message/validation/common_checks.go b/message/validation/common_checks.go index 11e36ddb9f..c55fd04621 100644 --- a/message/validation/common_checks.go +++ b/message/validation/common_checks.go @@ -5,6 +5,7 @@ import ( "time" "github.com/attestantio/go-eth2-client/spec/phase0" + spectypes "github.com/ssvlabs/ssv-spec/types" ) diff --git a/message/validation/consensus_state.go b/message/validation/consensus_state.go index f5d4b2c121..c1aa827c1f 100644 --- a/message/validation/consensus_state.go +++ b/message/validation/consensus_state.go @@ -4,6 +4,7 @@ import ( "sync" "github.com/attestantio/go-eth2-client/spec/phase0" + spectypes "github.com/ssvlabs/ssv-spec/types" ) diff --git a/message/validation/consensus_validation.go b/message/validation/consensus_validation.go index ae3176198b..11388cbb99 100644 --- a/message/validation/consensus_validation.go +++ b/message/validation/consensus_validation.go @@ -11,6 +11,7 @@ import ( "time" "github.com/attestantio/go-eth2-client/spec/phase0" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" diff --git a/message/validation/consensus_validation_test.go b/message/validation/consensus_validation_test.go index b1edbb8a3d..6dc4ef18ec 100644 --- a/message/validation/consensus_validation_test.go +++ b/message/validation/consensus_validation_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - specqbft "github.com/ssvlabs/ssv-spec/qbft" - "github.com/stretchr/testify/require" + specqbft "github.com/ssvlabs/ssv-spec/qbft" + "github.com/ssvlabs/ssv/protocol/v2/qbft/roundtimer" ) diff --git a/message/validation/logger_fields.go b/message/validation/logger_fields.go index 5e63b5ad55..24e871467b 100644 --- a/message/validation/logger_fields.go +++ b/message/validation/logger_fields.go @@ -2,11 +2,12 @@ package validation import ( "github.com/attestantio/go-eth2-client/spec/phase0" - specqbft "github.com/ssvlabs/ssv-spec/qbft" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" "go.uber.org/zap/zapcore" + specqbft "github.com/ssvlabs/ssv-spec/qbft" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" ssvmessage "github.com/ssvlabs/ssv/protocol/v2/message" "github.com/ssvlabs/ssv/protocol/v2/ssv/queue" diff --git a/message/validation/observability.go b/message/validation/observability.go index 9f4ade32ef..b3848b4d47 100644 --- a/message/validation/observability.go +++ b/message/validation/observability.go @@ -9,6 +9,7 @@ import ( "go.opentelemetry.io/otel/metric" "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/observability" ) diff --git a/message/validation/partial_validation.go b/message/validation/partial_validation.go index 68d2b1d36e..a3300e3399 100644 --- a/message/validation/partial_validation.go +++ b/message/validation/partial_validation.go @@ -8,6 +8,7 @@ import ( "time" "github.com/attestantio/go-eth2-client/spec/phase0" + specqbft "github.com/ssvlabs/ssv-spec/qbft" "github.com/ssvlabs/ssv-spec/types" spectypes "github.com/ssvlabs/ssv-spec/types" diff --git a/message/validation/self.go b/message/validation/self.go index 123bfe6b17..c561518390 100644 --- a/message/validation/self.go +++ b/message/validation/self.go @@ -1,11 +1,11 @@ package validation import ( - spectypes "github.com/ssvlabs/ssv-spec/types" - pubsub "github.com/libp2p/go-libp2p-pubsub" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/ssv/queue" ) diff --git a/message/validation/signed_ssv_message.go b/message/validation/signed_ssv_message.go index 1a18e200f9..e436dc8090 100644 --- a/message/validation/signed_ssv_message.go +++ b/message/validation/signed_ssv_message.go @@ -7,6 +7,7 @@ import ( "slices" pubsub "github.com/libp2p/go-libp2p-pubsub" + spectypes "github.com/ssvlabs/ssv-spec/types" ssvmessage "github.com/ssvlabs/ssv/protocol/v2/message" diff --git a/message/validation/signer_state.go b/message/validation/signer_state.go index a8dab8c02c..3b33757e93 100644 --- a/message/validation/signer_state.go +++ b/message/validation/signer_state.go @@ -6,6 +6,7 @@ import ( "crypto/sha256" "github.com/attestantio/go-eth2-client/spec/phase0" + specqbft "github.com/ssvlabs/ssv-spec/qbft" ) diff --git a/message/validation/utils_test.go b/message/validation/utils_test.go index afeac033ab..140945d7e6 100644 --- a/message/validation/utils_test.go +++ b/message/validation/utils_test.go @@ -4,9 +4,10 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "github.com/stretchr/testify/require" ) func TestMessageValidator_maxRound(t *testing.T) { diff --git a/message/validation/validation.go b/message/validation/validation.go index 5cc8bcbb27..93f98958d3 100644 --- a/message/validation/validation.go +++ b/message/validation/validation.go @@ -14,14 +14,16 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/libp2p/go-libp2p/core/peer" + "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/message/signatureverifier" "github.com/ssvlabs/ssv/network/commons" "github.com/ssvlabs/ssv/networkconfig" "github.com/ssvlabs/ssv/operator/duties/dutystore" "github.com/ssvlabs/ssv/protocol/v2/ssv/queue" "github.com/ssvlabs/ssv/registry/storage" - "go.uber.org/zap" ) // MessageValidator defines methods for validating pubsub messages. diff --git a/message/validation/validation_test.go b/message/validation/validation_test.go index 3dbb0fdf69..6f7c17f412 100644 --- a/message/validation/validation_test.go +++ b/message/validation/validation_test.go @@ -18,9 +18,16 @@ import ( "github.com/herumi/bls-eth-go-binary/bls" pubsub "github.com/libp2p/go-libp2p-pubsub" pspb "github.com/libp2p/go-libp2p-pubsub/pb" + "github.com/stretchr/testify/require" + eth2types "github.com/wealdtech/go-eth2-types/v2" + "go.uber.org/mock/gomock" + "go.uber.org/zap/zaptest" + "golang.org/x/exp/maps" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/message/signatureverifier" "github.com/ssvlabs/ssv/network/commons" "github.com/ssvlabs/ssv/networkconfig" @@ -34,11 +41,6 @@ import ( "github.com/ssvlabs/ssv/storage/basedb" "github.com/ssvlabs/ssv/storage/kv" "github.com/ssvlabs/ssv/utils" - "github.com/stretchr/testify/require" - eth2types "github.com/wealdtech/go-eth2-types/v2" - "go.uber.org/mock/gomock" - "go.uber.org/zap/zaptest" - "golang.org/x/exp/maps" ) func Test_ValidateSSVMessage(t *testing.T) { diff --git a/migrations/migration_1_example.go b/migrations/migration_1_example.go index 288b12a818..60bc261273 100644 --- a/migrations/migration_1_example.go +++ b/migrations/migration_1_example.go @@ -3,9 +3,9 @@ package migrations import ( "context" + "github.com/pkg/errors" "go.uber.org/zap" - "github.com/pkg/errors" "github.com/ssvlabs/ssv/storage/basedb" ) diff --git a/migrations/migration_2_encrypt_shares.go b/migrations/migration_2_encrypt_shares.go index 13a8011831..2f2b790c48 100644 --- a/migrations/migration_2_encrypt_shares.go +++ b/migrations/migration_2_encrypt_shares.go @@ -6,11 +6,10 @@ import ( "crypto/x509" "fmt" - "github.com/ssvlabs/ssv/utils/rsaencryption" + "go.uber.org/zap" "github.com/ssvlabs/ssv/storage/basedb" - - "go.uber.org/zap" + "github.com/ssvlabs/ssv/utils/rsaencryption" ) var migration_2_encrypt_shares = Migration{ diff --git a/migrations/migration_5_gob.go b/migrations/migration_5_gob.go index 1b153ac8b0..1205864ba6 100644 --- a/migrations/migration_5_gob.go +++ b/migrations/migration_5_gob.go @@ -7,7 +7,9 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/ethereum/go-ethereum/common" + spectypes "github.com/ssvlabs/ssv-spec/types" + beaconprotocol "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" "github.com/ssvlabs/ssv/protocol/v2/types" ) diff --git a/migrations/migration_5_share_gob_to_ssz.go b/migrations/migration_5_share_gob_to_ssz.go index be45b70258..fc0e7a32a5 100644 --- a/migrations/migration_5_share_gob_to_ssz.go +++ b/migrations/migration_5_share_gob_to_ssz.go @@ -6,10 +6,11 @@ import ( "fmt" "github.com/sanity-io/litter" + "go.uber.org/zap" + opstorage "github.com/ssvlabs/ssv/operator/storage" "github.com/ssvlabs/ssv/registry/storage" "github.com/ssvlabs/ssv/storage/basedb" - "go.uber.org/zap" ) // This migration changes share format used for storing share in DB from gob to ssz. diff --git a/migrations/migration_5_share_gob_to_ssz_test.go b/migrations/migration_5_share_gob_to_ssz_test.go index 82017ba7b2..948430dbb3 100644 --- a/migrations/migration_5_share_gob_to_ssz_test.go +++ b/migrations/migration_5_share_gob_to_ssz_test.go @@ -2,11 +2,14 @@ package migrations import ( "encoding/hex" + "testing" + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" - "github.com/stretchr/testify/require" - "testing" ) func TestMigration5_shareGOB_Decode(t *testing.T) { diff --git a/migrations/migrations.go b/migrations/migrations.go index 220413889f..e83d2e2a78 100644 --- a/migrations/migrations.go +++ b/migrations/migrations.go @@ -6,12 +6,13 @@ import ( "time" "github.com/pkg/errors" + "go.uber.org/zap" + "github.com/ssvlabs/ssv/ekm" "github.com/ssvlabs/ssv/logging/fields" operatorstorage "github.com/ssvlabs/ssv/operator/storage" "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" "github.com/ssvlabs/ssv/storage/basedb" - "go.uber.org/zap" ) var ( diff --git a/network/commons/common.go b/network/commons/common.go index f0fb905eb2..fc18ee431a 100644 --- a/network/commons/common.go +++ b/network/commons/common.go @@ -10,6 +10,7 @@ import ( "github.com/cespare/xxhash/v2" "github.com/libp2p/go-libp2p" + spectypes "github.com/ssvlabs/ssv-spec/types" ) diff --git a/network/commons/common_test.go b/network/commons/common_test.go index e1e6f53104..15e090c820 100644 --- a/network/commons/common_test.go +++ b/network/commons/common_test.go @@ -5,8 +5,9 @@ import ( "math/big" "testing" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" + + spectypes "github.com/ssvlabs/ssv-spec/types" ) func TestCommitteeSubnet(t *testing.T) { diff --git a/network/commons/keys.go b/network/commons/keys.go index db1bca55f7..42355c36c7 100644 --- a/network/commons/keys.go +++ b/network/commons/keys.go @@ -6,9 +6,8 @@ import ( "crypto/rsa" "crypto/x509" - gcrypto "github.com/ethereum/go-ethereum/crypto" - "github.com/btcsuite/btcd/btcec/v2" + gcrypto "github.com/ethereum/go-ethereum/crypto" "github.com/libp2p/go-libp2p/core/crypto" "github.com/pkg/errors" ) diff --git a/network/discovery/dv5_filters.go b/network/discovery/dv5_filters.go index e32bddbbf7..bb5b54ff90 100644 --- a/network/discovery/dv5_filters.go +++ b/network/discovery/dv5_filters.go @@ -4,8 +4,9 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" "github.com/ethereum/go-ethereum/p2p/enr" libp2pnetwork "github.com/libp2p/go-libp2p/core/network" - "github.com/ssvlabs/ssv/network/records" "go.uber.org/zap" + + "github.com/ssvlabs/ssv/network/records" ) // limitNodeFilter returns true if the limit is exceeded diff --git a/network/discovery/dv5_service_test.go b/network/discovery/dv5_service_test.go index 36a70ce0bf..9e354f013b 100644 --- a/network/discovery/dv5_service_test.go +++ b/network/discovery/dv5_service_test.go @@ -8,10 +8,11 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" "github.com/pkg/errors" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/network/commons" "github.com/ssvlabs/ssv/network/peers" "github.com/ssvlabs/ssv/network/peers/connections/mock" diff --git a/network/discovery/enode_test.go b/network/discovery/enode_test.go index 547a326ec8..ec1a4207b6 100644 --- a/network/discovery/enode_test.go +++ b/network/discovery/enode_test.go @@ -7,8 +7,9 @@ import ( "github.com/ethereum/go-ethereum/p2p/enode" "github.com/libp2p/go-libp2p/core/crypto" - "github.com/ssvlabs/ssv/network/commons" "github.com/stretchr/testify/require" + + "github.com/ssvlabs/ssv/network/commons" ) func Test_ToMultiAddr(t *testing.T) { diff --git a/network/discovery/forking_dv5_listener.go b/network/discovery/forking_dv5_listener.go index 45f08a5168..b2a9f8b05e 100644 --- a/network/discovery/forking_dv5_listener.go +++ b/network/discovery/forking_dv5_listener.go @@ -5,10 +5,11 @@ import ( "time" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ssvlabs/ssv/networkconfig" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" "go.uber.org/zap" + + "github.com/ssvlabs/ssv/networkconfig" ) const ( diff --git a/network/discovery/forking_dv5_listener_test.go b/network/discovery/forking_dv5_listener_test.go index c5db74b8cc..b32fdaf919 100644 --- a/network/discovery/forking_dv5_listener_test.go +++ b/network/discovery/forking_dv5_listener_test.go @@ -5,10 +5,11 @@ import ( "time" "github.com/ethereum/go-ethereum/p2p/enode" - "github.com/ssvlabs/ssv/networkconfig" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/zap" + + "github.com/ssvlabs/ssv/networkconfig" ) const iteratorTimeout = 5 * time.Millisecond diff --git a/network/discovery/node_record.go b/network/discovery/node_record.go index d20d46c4eb..a52039e98d 100644 --- a/network/discovery/node_record.go +++ b/network/discovery/node_record.go @@ -4,7 +4,9 @@ import ( "fmt" "github.com/ethereum/go-ethereum/p2p/enode" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/network/records" ) diff --git a/network/discovery/options.go b/network/discovery/options.go index 49ea588860..b715e35328 100644 --- a/network/discovery/options.go +++ b/network/discovery/options.go @@ -4,15 +4,14 @@ import ( "crypto/ecdsa" "net" - "github.com/ssvlabs/ssv/logging" - compatible_logger "github.com/ssvlabs/ssv/network/discovery/logger" - - "github.com/ssvlabs/ssv/network/commons" - "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/p2p/discover" "github.com/pkg/errors" "go.uber.org/zap" + + "github.com/ssvlabs/ssv/logging" + "github.com/ssvlabs/ssv/network/commons" + compatible_logger "github.com/ssvlabs/ssv/network/discovery/logger" ) var DefaultSSVProtocolID = [6]byte{'s', 's', 'v', 'd', 'v', '5'} diff --git a/network/discovery/service_test.go b/network/discovery/service_test.go index cef16171e7..9a17e1895f 100644 --- a/network/discovery/service_test.go +++ b/network/discovery/service_test.go @@ -12,6 +12,7 @@ import ( "go.uber.org/zap" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/network/records" "github.com/ssvlabs/ssv/networkconfig" ) diff --git a/network/discovery/util_test.go b/network/discovery/util_test.go index 79da7233e3..b36fc68561 100644 --- a/network/discovery/util_test.go +++ b/network/discovery/util_test.go @@ -18,12 +18,14 @@ import ( "github.com/libp2p/go-libp2p/core/peer" "github.com/pkg/errors" "github.com/prysmaticlabs/go-bitfield" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/network/peers" "github.com/ssvlabs/ssv/network/records" "github.com/ssvlabs/ssv/networkconfig" - "github.com/stretchr/testify/require" - "go.uber.org/zap" ) var ( diff --git a/network/network.go b/network/network.go index 160190626a..de80a9caa6 100644 --- a/network/network.go +++ b/network/network.go @@ -5,7 +5,6 @@ import ( "io" "github.com/libp2p/go-libp2p/core/peer" - "go.uber.org/zap" "github.com/ssvlabs/ssv/network/records" diff --git a/network/p2p/observability.go b/network/p2p/observability.go index a4a87bb31a..1dc944399a 100644 --- a/network/p2p/observability.go +++ b/network/p2p/observability.go @@ -5,13 +5,13 @@ import ( "fmt" "sort" + "github.com/libp2p/go-libp2p/core/host" + "github.com/libp2p/go-libp2p/core/network" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" "go.uber.org/zap" - "github.com/libp2p/go-libp2p/core/host" - "github.com/libp2p/go-libp2p/core/network" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/network/peers" "github.com/ssvlabs/ssv/network/topics" diff --git a/network/p2p/p2p.go b/network/p2p/p2p.go index ca9efbb41f..6477fc0142 100644 --- a/network/p2p/p2p.go +++ b/network/p2p/p2p.go @@ -14,9 +14,10 @@ import ( "github.com/libp2p/go-libp2p/core/peer" libp2pdiscbackoff "github.com/libp2p/go-libp2p/p2p/discovery/backoff" ma "github.com/multiformats/go-multiaddr" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/message/validation" diff --git a/network/p2p/p2p_pubsub.go b/network/p2p/p2p_pubsub.go index 831d9ce70c..fb304105f5 100644 --- a/network/p2p/p2p_pubsub.go +++ b/network/p2p/p2p_pubsub.go @@ -9,9 +9,10 @@ import ( pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/pkg/errors" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/network" "github.com/ssvlabs/ssv/network/commons" diff --git a/network/p2p/p2p_reporter.go b/network/p2p/p2p_reporter.go index da44e87efc..b75d670203 100644 --- a/network/p2p/p2p_reporter.go +++ b/network/p2p/p2p_reporter.go @@ -3,12 +3,12 @@ package p2pv1 import ( "math" - "github.com/ssvlabs/ssv/logging/fields" - "github.com/ssvlabs/ssv/network/commons" + "go.uber.org/zap" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" + "github.com/ssvlabs/ssv/logging/fields" + "github.com/ssvlabs/ssv/network/commons" ssvpeers "github.com/ssvlabs/ssv/network/peers" protocolp2p "github.com/ssvlabs/ssv/protocol/v2/p2p" ) diff --git a/network/p2p/p2p_test.go b/network/p2p/p2p_test.go index a7e811d61e..13c2fb6057 100644 --- a/network/p2p/p2p_test.go +++ b/network/p2p/p2p_test.go @@ -12,15 +12,17 @@ import ( eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/network" "github.com/ssvlabs/ssv/networkconfig" ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.uber.org/zap" ) func TestGetMaxPeers(t *testing.T) { diff --git a/network/p2p/p2p_validation_test.go b/network/p2p/p2p_validation_test.go index c9df7faafd..4edc256e44 100644 --- a/network/p2p/p2p_validation_test.go +++ b/network/p2p/p2p_validation_test.go @@ -19,14 +19,16 @@ import ( pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/libp2p/go-libp2p/core/peer" "github.com/sourcegraph/conc/pool" + "github.com/stretchr/testify/require" + "golang.org/x/exp/slices" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/message/validation" "github.com/ssvlabs/ssv/protocol/v2/ssv/queue" ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" - "github.com/stretchr/testify/require" - "golang.org/x/exp/slices" ) // TestP2pNetwork_MessageValidation tests p2pNetwork would score peers according diff --git a/network/p2p/test_utils.go b/network/p2p/test_utils.go index 3153b96996..21bb6a122f 100644 --- a/network/p2p/test_utils.go +++ b/network/p2p/test_utils.go @@ -9,10 +9,11 @@ import ( "github.com/ethereum/go-ethereum/common" pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/libp2p/go-libp2p/core/peer" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" "golang.org/x/sync/errgroup" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/message/validation" "github.com/ssvlabs/ssv/network" "github.com/ssvlabs/ssv/network/commons" diff --git a/network/peers/connections/filters_test.go b/network/peers/connections/filters_test.go index 8ba410b7d6..a615aa198e 100644 --- a/network/peers/connections/filters_test.go +++ b/network/peers/connections/filters_test.go @@ -3,8 +3,9 @@ package connections import ( "testing" - "github.com/ssvlabs/ssv/network/records" "github.com/stretchr/testify/require" + + "github.com/ssvlabs/ssv/network/records" ) func TestNetworkIDFilter(t *testing.T) { diff --git a/network/peers/connections/handshaker.go b/network/peers/connections/handshaker.go index 26b94051db..14b1c2292a 100644 --- a/network/peers/connections/handshaker.go +++ b/network/peers/connections/handshaker.go @@ -9,9 +9,10 @@ import ( "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/p2p/protocol/identify" "github.com/pkg/errors" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/network/peers" "github.com/ssvlabs/ssv/network/records" diff --git a/network/peers/connections/observability.go b/network/peers/connections/observability.go index 9fba01e059..224617ab01 100644 --- a/network/peers/connections/observability.go +++ b/network/peers/connections/observability.go @@ -4,10 +4,10 @@ import ( "context" "fmt" + "github.com/libp2p/go-libp2p/core/network" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/metric" - "github.com/libp2p/go-libp2p/core/network" "github.com/ssvlabs/ssv/observability" ) diff --git a/network/peers/gossipsub_score_index.go b/network/peers/gossipsub_score_index.go index 19aef42a92..b97cb4a0e4 100644 --- a/network/peers/gossipsub_score_index.go +++ b/network/peers/gossipsub_score_index.go @@ -4,6 +4,7 @@ import ( "sync" "github.com/libp2p/go-libp2p/core/peer" + "github.com/ssvlabs/ssv/network/topics/params" ) diff --git a/network/peers/peer_info.go b/network/peers/peer_info.go index 9487907330..b5ab609cd5 100644 --- a/network/peers/peer_info.go +++ b/network/peers/peer_info.go @@ -7,6 +7,7 @@ import ( "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-libp2p/core/peer" ma "github.com/multiformats/go-multiaddr" + "github.com/ssvlabs/ssv/network/records" ) diff --git a/network/peers/scores_test.go b/network/peers/scores_test.go index d16064a752..b74470c520 100644 --- a/network/peers/scores_test.go +++ b/network/peers/scores_test.go @@ -6,9 +6,10 @@ import ( "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/peer" + "github.com/stretchr/testify/require" + "github.com/ssvlabs/ssv/network/commons" nettesting "github.com/ssvlabs/ssv/network/testing" - "github.com/stretchr/testify/require" ) func TestScoresIndex(t *testing.T) { diff --git a/network/streams/controller.go b/network/streams/controller.go index 257309ddd9..9d7a1a3e28 100644 --- a/network/streams/controller.go +++ b/network/streams/controller.go @@ -4,14 +4,13 @@ import ( "context" "time" - libp2pnetwork "github.com/libp2p/go-libp2p/core/network" - "go.opentelemetry.io/otel/metric" - "github.com/libp2p/go-libp2p/core" "github.com/libp2p/go-libp2p/core/host" + libp2pnetwork "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/core/protocol" "github.com/pkg/errors" + "go.opentelemetry.io/otel/metric" "go.uber.org/zap" ) diff --git a/network/streams/controller_test.go b/network/streams/controller_test.go index 05e8db4a49..dbc3be203b 100644 --- a/network/streams/controller_test.go +++ b/network/streams/controller_test.go @@ -8,9 +8,10 @@ import ( libp2pnetwork "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-libp2p/core/protocol" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" ) diff --git a/network/streams/observability.go b/network/streams/observability.go index 72569dec48..9248e298cc 100644 --- a/network/streams/observability.go +++ b/network/streams/observability.go @@ -3,11 +3,11 @@ package streams import ( "fmt" + "github.com/libp2p/go-libp2p/core/protocol" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" - "github.com/libp2p/go-libp2p/core/protocol" "github.com/ssvlabs/ssv/observability" ) diff --git a/network/topics/controller_test.go b/network/topics/controller_test.go index 39746be94e..8b6634caf3 100644 --- a/network/topics/controller_test.go +++ b/network/topics/controller_test.go @@ -17,8 +17,13 @@ import ( "github.com/libp2p/go-libp2p/core/host" libp2pnetwork "github.com/libp2p/go-libp2p/core/network" "github.com/libp2p/go-libp2p/core/peer" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/message/signatureverifier" "github.com/ssvlabs/ssv/message/validation" @@ -30,9 +35,6 @@ import ( "github.com/ssvlabs/ssv/registry/storage/mocks" "github.com/ssvlabs/ssv/storage/basedb" "github.com/ssvlabs/ssv/storage/kv" - "github.com/stretchr/testify/require" - "go.uber.org/mock/gomock" - "go.uber.org/zap" ) // TODO: fix this test to run post-fork diff --git a/network/topics/msg_validator_test.go b/network/topics/msg_validator_test.go index afe6120805..ac2a349138 100644 --- a/network/topics/msg_validator_test.go +++ b/network/topics/msg_validator_test.go @@ -9,9 +9,13 @@ import ( pubsub "github.com/libp2p/go-libp2p-pubsub" ps_pb "github.com/libp2p/go-libp2p-pubsub/pb" pspb "github.com/libp2p/go-libp2p-pubsub/pb" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zaptest" + "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/message/signatureverifier" "github.com/ssvlabs/ssv/message/validation" "github.com/ssvlabs/ssv/network/commons" @@ -23,8 +27,6 @@ import ( "github.com/ssvlabs/ssv/storage/basedb" "github.com/ssvlabs/ssv/storage/kv" "github.com/ssvlabs/ssv/utils/rsaencryption" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zaptest" ) func TestMsgValidator(t *testing.T) { diff --git a/network/topics/params/message_rate_test.go b/network/topics/params/message_rate_test.go index 75db598f7a..17b8697f70 100644 --- a/network/topics/params/message_rate_test.go +++ b/network/topics/params/message_rate_test.go @@ -4,9 +4,10 @@ import ( "testing" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/types" "github.com/ssvlabs/ssv/registry/storage" ) diff --git a/network/topics/scoring.go b/network/topics/scoring.go index c7f5323b59..ea9cd5ef5c 100644 --- a/network/topics/scoring.go +++ b/network/topics/scoring.go @@ -7,16 +7,15 @@ import ( "strings" "time" - "github.com/ssvlabs/ssv/logging/fields" - "github.com/ssvlabs/ssv/network/commons" - "github.com/ssvlabs/ssv/registry/storage" - pubsub "github.com/libp2p/go-libp2p-pubsub" "github.com/libp2p/go-libp2p/core/peer" "go.uber.org/zap" + "github.com/ssvlabs/ssv/logging/fields" + "github.com/ssvlabs/ssv/network/commons" "github.com/ssvlabs/ssv/network/peers" "github.com/ssvlabs/ssv/network/topics/params" + "github.com/ssvlabs/ssv/registry/storage" ) // DefaultScoringConfig returns the default scoring config diff --git a/network/topics/sub_filter.go b/network/topics/sub_filter.go index e51ec8486d..fce631b556 100644 --- a/network/topics/sub_filter.go +++ b/network/topics/sub_filter.go @@ -6,9 +6,8 @@ import ( "github.com/libp2p/go-libp2p/core/peer" "go.uber.org/zap" - "github.com/ssvlabs/ssv/utils/hashmap" - "github.com/ssvlabs/ssv/network/commons" + "github.com/ssvlabs/ssv/utils/hashmap" ) // SubFilter is a wrapper on top of pubsub.SubscriptionFilter, diff --git a/network/topics/tracer.go b/network/topics/tracer.go index adb835fd26..c1a97baed5 100644 --- a/network/topics/tracer.go +++ b/network/topics/tracer.go @@ -3,12 +3,12 @@ package topics import ( "encoding/hex" - "github.com/ssvlabs/ssv/logging" - pubsub "github.com/libp2p/go-libp2p-pubsub" ps_pb "github.com/libp2p/go-libp2p-pubsub/pb" "github.com/libp2p/go-libp2p/core/peer" "go.uber.org/zap" + + "github.com/ssvlabs/ssv/logging" ) // psTracer helps to trace pubsub events diff --git a/networkconfig/config.go b/networkconfig/config.go index 347924993c..85abe25159 100644 --- a/networkconfig/config.go +++ b/networkconfig/config.go @@ -7,7 +7,9 @@ import ( "time" "github.com/attestantio/go-eth2-client/spec/phase0" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" ) diff --git a/observability/attributes.go b/observability/attributes.go index df70237974..d7d3a9625b 100644 --- a/observability/attributes.go +++ b/observability/attributes.go @@ -5,9 +5,9 @@ import ( "strconv" "strings" + "github.com/libp2p/go-libp2p/core/network" "go.opentelemetry.io/otel/attribute" - "github.com/libp2p/go-libp2p/core/network" "github.com/ssvlabs/ssv-spec/qbft" "github.com/ssvlabs/ssv-spec/types" ) diff --git a/operator/duties/attester.go b/operator/duties/attester.go index c48291e309..0f527ab4b1 100644 --- a/operator/duties/attester.go +++ b/operator/duties/attester.go @@ -7,9 +7,10 @@ import ( eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/operator/duties/dutystore" ) diff --git a/operator/duties/attester_test.go b/operator/duties/attester_test.go index d09097f0f3..b38c88ca15 100644 --- a/operator/duties/attester_test.go +++ b/operator/duties/attester_test.go @@ -8,14 +8,14 @@ import ( eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - "github.com/ssvlabs/ssv/utils/hashmap" + spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv/operator/duties/dutystore" "github.com/ssvlabs/ssv/protocol/v2/types" + "github.com/ssvlabs/ssv/utils/hashmap" ) func setupAttesterDutiesMock( diff --git a/operator/duties/committee.go b/operator/duties/committee.go index f2232907f1..922f6769f3 100644 --- a/operator/duties/committee.go +++ b/operator/duties/committee.go @@ -9,6 +9,7 @@ import ( "go.uber.org/zap" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/operator/duties/dutystore" ) diff --git a/operator/duties/committee_test.go b/operator/duties/committee_test.go index bd3478bd52..0f24c6a261 100644 --- a/operator/duties/committee_test.go +++ b/operator/duties/committee_test.go @@ -8,15 +8,15 @@ import ( eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - "github.com/ssvlabs/ssv/utils/hashmap" + spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv/operator/duties/dutystore" mocknetwork "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon/mocks" ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" + "github.com/ssvlabs/ssv/utils/hashmap" ) func setupCommitteeDutiesMock( diff --git a/operator/duties/observability.go b/operator/duties/observability.go index 6e7f213fe8..8dcdfc3d01 100644 --- a/operator/duties/observability.go +++ b/operator/duties/observability.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/otel/metric" "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/observability" ) diff --git a/operator/duties/proposer.go b/operator/duties/proposer.go index c57488adde..52e56339f5 100644 --- a/operator/duties/proposer.go +++ b/operator/duties/proposer.go @@ -7,9 +7,10 @@ import ( eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/operator/duties/dutystore" ) diff --git a/operator/duties/proposer_test.go b/operator/duties/proposer_test.go index e9a8b5d2a7..2e86cde668 100644 --- a/operator/duties/proposer_test.go +++ b/operator/duties/proposer_test.go @@ -9,12 +9,11 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - "github.com/ssvlabs/ssv/utils/hashmap" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv/operator/duties/dutystore" "github.com/ssvlabs/ssv/protocol/v2/types" + "github.com/ssvlabs/ssv/utils/hashmap" ) func setupProposerDutiesMock(s *Scheduler, dutiesMap *hashmap.Map[phase0.Epoch, []*eth2apiv1.ProposerDuty]) (chan struct{}, chan []*spectypes.ValidatorDuty) { diff --git a/operator/duties/scheduler.go b/operator/duties/scheduler.go index dd470f1f81..37531bdf5d 100644 --- a/operator/duties/scheduler.go +++ b/operator/duties/scheduler.go @@ -14,9 +14,10 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/prysmaticlabs/prysm/v4/async/event" "github.com/sourcegraph/conc/pool" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/beacon/goclient" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/logging/fields" diff --git a/operator/duties/scheduler_test.go b/operator/duties/scheduler_test.go index 685187f2e3..d3cb0a302a 100644 --- a/operator/duties/scheduler_test.go +++ b/operator/duties/scheduler_test.go @@ -9,11 +9,12 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/prysmaticlabs/prysm/v4/async/event" "github.com/sourcegraph/conc/pool" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/networkconfig" "github.com/ssvlabs/ssv/operator/slotticker" diff --git a/operator/duties/sync_committee.go b/operator/duties/sync_committee.go index 75e7bace63..9eaab9c6e7 100644 --- a/operator/duties/sync_committee.go +++ b/operator/duties/sync_committee.go @@ -8,9 +8,10 @@ import ( eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/operator/duties/dutystore" ) diff --git a/operator/duties/sync_committee_test.go b/operator/duties/sync_committee_test.go index 7ab07d1324..e4c969276c 100644 --- a/operator/duties/sync_committee_test.go +++ b/operator/duties/sync_committee_test.go @@ -11,13 +11,12 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" - "github.com/ssvlabs/ssv/utils/hashmap" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv/operator/duties/dutystore" mocknetwork "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon/mocks" ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" + "github.com/ssvlabs/ssv/utils/hashmap" ) func setupSyncCommitteeDutiesMock( diff --git a/operator/duties/validatorregistration.go b/operator/duties/validatorregistration.go index 9757d0eceb..8e0704266e 100644 --- a/operator/duties/validatorregistration.go +++ b/operator/duties/validatorregistration.go @@ -5,8 +5,9 @@ import ( "encoding/hex" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + + spectypes "github.com/ssvlabs/ssv-spec/types" ) const validatorRegistrationEpochInterval = uint64(10) diff --git a/operator/duties/voluntary_exit.go b/operator/duties/voluntary_exit.go index 470e5718bc..2de1b82e78 100644 --- a/operator/duties/voluntary_exit.go +++ b/operator/duties/voluntary_exit.go @@ -5,9 +5,10 @@ import ( "math/big" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/operator/duties/dutystore" ) diff --git a/operator/fee_recipient/controller.go b/operator/fee_recipient/controller.go index 7ebccd2408..eda114c637 100644 --- a/operator/fee_recipient/controller.go +++ b/operator/fee_recipient/controller.go @@ -7,13 +7,14 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" + "go.uber.org/zap" + "github.com/ssvlabs/ssv/networkconfig" operatordatastore "github.com/ssvlabs/ssv/operator/datastore" "github.com/ssvlabs/ssv/operator/slotticker" beaconprotocol "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" "github.com/ssvlabs/ssv/protocol/v2/types" "github.com/ssvlabs/ssv/registry/storage" - "go.uber.org/zap" ) //go:generate mockgen -package=mocks -destination=./mocks/controller.go -source=./controller.go diff --git a/operator/fee_recipient/controller_test.go b/operator/fee_recipient/controller_test.go index 64e91aa01d..eb61a997e6 100644 --- a/operator/fee_recipient/controller_test.go +++ b/operator/fee_recipient/controller_test.go @@ -12,7 +12,12 @@ import ( "github.com/attestantio/go-eth2-client/spec/bellatrix" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + gomock "go.uber.org/mock/gomock" + "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/networkconfig" operatordatastore "github.com/ssvlabs/ssv/operator/datastore" @@ -23,9 +28,6 @@ import ( registrystorage "github.com/ssvlabs/ssv/registry/storage" "github.com/ssvlabs/ssv/storage/basedb" "github.com/ssvlabs/ssv/storage/kv" - "github.com/stretchr/testify/require" - gomock "go.uber.org/mock/gomock" - "go.uber.org/zap" ) func TestSubmitProposal(t *testing.T) { diff --git a/operator/keystore/file.go b/operator/keystore/file.go index 44cddaa2cc..62549e6e03 100644 --- a/operator/keystore/file.go +++ b/operator/keystore/file.go @@ -3,8 +3,9 @@ package keystore import ( "encoding/json" "fmt" - keystorev4 "github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4" "strings" + + keystorev4 "github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4" ) // DecryptKeystore decrypts a keystore JSON file using the provided password. diff --git a/operator/keystore/file_test.go b/operator/keystore/file_test.go index 8a359a740e..d143608e58 100644 --- a/operator/keystore/file_test.go +++ b/operator/keystore/file_test.go @@ -2,8 +2,9 @@ package keystore import ( "encoding/json" - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func TestDecryptKeystoreWithInvalidData(t *testing.T) { diff --git a/operator/slotticker/slotticker.go b/operator/slotticker/slotticker.go index 098a75b2bf..f2880c9f44 100644 --- a/operator/slotticker/slotticker.go +++ b/operator/slotticker/slotticker.go @@ -4,8 +4,9 @@ import ( "time" "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/ssvlabs/ssv/utils/casts" "go.uber.org/zap" + + "github.com/ssvlabs/ssv/utils/casts" ) //go:generate mockgen -package=mocks -destination=./mocks/slotticker.go -source=./slotticker.go diff --git a/operator/storage/storage.go b/operator/storage/storage.go index cb72751058..9a0c44ff6e 100644 --- a/operator/storage/storage.go +++ b/operator/storage/storage.go @@ -8,11 +8,13 @@ import ( "github.com/attestantio/go-eth2-client/spec/bellatrix" "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" + "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + registry "github.com/ssvlabs/ssv/protocol/v2/blockchain/eth1" registrystorage "github.com/ssvlabs/ssv/registry/storage" "github.com/ssvlabs/ssv/storage/basedb" - "go.uber.org/zap" ) var HashedPrivateKey = "hashed-private-key" diff --git a/operator/storage/storage_test.go b/operator/storage/storage_test.go index 8197362010..fff83bef8a 100644 --- a/operator/storage/storage_test.go +++ b/operator/storage/storage_test.go @@ -8,6 +8,10 @@ import ( "github.com/attestantio/go-eth2-client/spec/bellatrix" "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/networkconfig" "github.com/ssvlabs/ssv/operator/keys" @@ -15,9 +19,6 @@ import ( registrystorage "github.com/ssvlabs/ssv/registry/storage" "github.com/ssvlabs/ssv/storage/basedb" "github.com/ssvlabs/ssv/storage/kv" - "github.com/stretchr/testify/require" - - spectypes "github.com/ssvlabs/ssv-spec/types" ) var ( diff --git a/operator/validator/controller.go b/operator/validator/controller.go index 0b088c9ad9..c478719e37 100644 --- a/operator/validator/controller.go +++ b/operator/validator/controller.go @@ -14,8 +14,11 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/jellydator/ttlcache/v3" "github.com/pkg/errors" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/ibft/storage" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/logging/fields" @@ -43,7 +46,6 @@ import ( ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" registrystorage "github.com/ssvlabs/ssv/registry/storage" "github.com/ssvlabs/ssv/storage/basedb" - "go.uber.org/zap" ) //go:generate mockgen -package=mocks -destination=./mocks/controller.go -source=./controller.go diff --git a/operator/validator/controller_test.go b/operator/validator/controller_test.go index 1a8856362f..1f87a90d36 100644 --- a/operator/validator/controller_test.go +++ b/operator/validator/controller_test.go @@ -16,8 +16,13 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/herumi/bls-eth-go-binary/bls" "github.com/pkg/errors" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/ekm" ibftstorage "github.com/ssvlabs/ssv/ibft/storage" "github.com/ssvlabs/ssv/logging" @@ -41,9 +46,6 @@ import ( registrystoragemocks "github.com/ssvlabs/ssv/registry/storage/mocks" "github.com/ssvlabs/ssv/storage/basedb" "github.com/ssvlabs/ssv/storage/kv" - "github.com/stretchr/testify/require" - "go.uber.org/mock/gomock" - "go.uber.org/zap" ) const ( diff --git a/operator/validator/metadata/syncer.go b/operator/validator/metadata/syncer.go index b5ce97ee26..62b21d1c33 100644 --- a/operator/validator/metadata/syncer.go +++ b/operator/validator/metadata/syncer.go @@ -7,9 +7,10 @@ import ( "time" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" networkcommons "github.com/ssvlabs/ssv/network/commons" "github.com/ssvlabs/ssv/network/records" diff --git a/operator/validator/metadata/syncer_test.go b/operator/validator/metadata/syncer_test.go index d1e8aa5c0e..b7f19b0bc0 100644 --- a/operator/validator/metadata/syncer_test.go +++ b/operator/validator/metadata/syncer_test.go @@ -9,12 +9,13 @@ import ( eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/mock/gomock" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/network/records" "github.com/ssvlabs/ssv/networkconfig" diff --git a/operator/validator/metrics.go b/operator/validator/metrics.go index b41a85b8fe..9636b3e08f 100644 --- a/operator/validator/metrics.go +++ b/operator/validator/metrics.go @@ -1,9 +1,10 @@ package validator import ( + "go.uber.org/zap" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/types" - "go.uber.org/zap" ) func (c *controller) reportValidatorStatus(share *types.SSVShare) { diff --git a/operator/validator/router_test.go b/operator/validator/router_test.go index a358ae5397..439da28f50 100644 --- a/operator/validator/router_test.go +++ b/operator/validator/router_test.go @@ -9,6 +9,7 @@ import ( "github.com/stretchr/testify/require" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/networkconfig" "github.com/ssvlabs/ssv/protocol/v2/ssv/queue" diff --git a/operator/validator/task_executor.go b/operator/validator/task_executor.go index 2ab9d52567..9b3511ea5a 100644 --- a/operator/validator/task_executor.go +++ b/operator/validator/task_executor.go @@ -6,10 +6,11 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/ethereum/go-ethereum/common" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/multierr" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/operator/duties" "github.com/ssvlabs/ssv/protocol/v2/ssv/validator" diff --git a/operator/validator/task_executor_test.go b/operator/validator/task_executor_test.go index b0ba2d5b58..008effe5c8 100644 --- a/operator/validator/task_executor_test.go +++ b/operator/validator/task_executor_test.go @@ -9,8 +9,12 @@ import ( v1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/ethereum/go-ethereum/common" "github.com/herumi/bls-eth-go-binary/bls" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv-spec/types/testingutils" + ibftstorage "github.com/ssvlabs/ssv/ibft/storage" "github.com/ssvlabs/ssv/networkconfig" operatordatastore "github.com/ssvlabs/ssv/operator/datastore" @@ -18,8 +22,6 @@ import ( "github.com/ssvlabs/ssv/protocol/v2/ssv/runner" "github.com/ssvlabs/ssv/protocol/v2/ssv/validator" "github.com/ssvlabs/ssv/protocol/v2/types" - "github.com/stretchr/testify/require" - "go.uber.org/mock/gomock" ) func TestController_LiquidateCluster(t *testing.T) { diff --git a/protocol/v2/blockchain/beacon/network.go b/protocol/v2/blockchain/beacon/network.go index c47fa700ed..ed7b8a4ce2 100644 --- a/protocol/v2/blockchain/beacon/network.go +++ b/protocol/v2/blockchain/beacon/network.go @@ -4,6 +4,7 @@ import ( "time" "github.com/attestantio/go-eth2-client/spec/phase0" + spectypes "github.com/ssvlabs/ssv-spec/types" ) diff --git a/protocol/v2/blockchain/beacon/network_test.go b/protocol/v2/blockchain/beacon/network_test.go index 6145dd7667..bc4bc7fc9d 100644 --- a/protocol/v2/blockchain/beacon/network_test.go +++ b/protocol/v2/blockchain/beacon/network_test.go @@ -4,8 +4,9 @@ import ( "testing" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" + + spectypes "github.com/ssvlabs/ssv-spec/types" ) func TestNetwork_GetSlotEndTime(t *testing.T) { diff --git a/protocol/v2/message/consensus_test.go b/protocol/v2/message/consensus_test.go index 9cfbb1248a..00b06956d5 100644 --- a/protocol/v2/message/consensus_test.go +++ b/protocol/v2/message/consensus_test.go @@ -5,12 +5,13 @@ import ( "sort" "testing" - "github.com/ssvlabs/ssv/protocol/v2/message" - protocoltesting "github.com/ssvlabs/ssv/protocol/v2/testing" + "github.com/stretchr/testify/require" specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "github.com/stretchr/testify/require" + + "github.com/ssvlabs/ssv/protocol/v2/message" + protocoltesting "github.com/ssvlabs/ssv/protocol/v2/testing" ) func TestAggregateSorting(t *testing.T) { diff --git a/protocol/v2/p2p/network.go b/protocol/v2/p2p/network.go index 5024adbe79..26747bfd2c 100644 --- a/protocol/v2/p2p/network.go +++ b/protocol/v2/p2p/network.go @@ -5,10 +5,11 @@ import ( "fmt" "strings" + "go.uber.org/zap" + "github.com/ssvlabs/ssv-spec/p2p" specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" ) var ( diff --git a/protocol/v2/qbft/config.go b/protocol/v2/qbft/config.go index cdf694e9b7..f925964509 100644 --- a/protocol/v2/qbft/config.go +++ b/protocol/v2/qbft/config.go @@ -3,6 +3,7 @@ package qbft import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/qbft/roundtimer" ) diff --git a/protocol/v2/qbft/controller/controller.go b/protocol/v2/qbft/controller/controller.go index 2a4060f76f..b93074fc26 100644 --- a/protocol/v2/qbft/controller/controller.go +++ b/protocol/v2/qbft/controller/controller.go @@ -8,13 +8,14 @@ import ( "fmt" "github.com/pkg/errors" - qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" "go.uber.org/zap" specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/qbft" "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" + qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" ) diff --git a/protocol/v2/qbft/controller/controller_test.go b/protocol/v2/qbft/controller/controller_test.go index 8aa6c8d08f..a7753d9dcd 100644 --- a/protocol/v2/qbft/controller/controller_test.go +++ b/protocol/v2/qbft/controller/controller_test.go @@ -5,9 +5,10 @@ import ( "encoding/json" "testing" + "github.com/stretchr/testify/require" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" - "github.com/stretchr/testify/require" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/protocol/v2/qbft" diff --git a/protocol/v2/qbft/controller/decided.go b/protocol/v2/qbft/controller/decided.go index 112a2458ad..659bc14826 100644 --- a/protocol/v2/qbft/controller/decided.go +++ b/protocol/v2/qbft/controller/decided.go @@ -8,6 +8,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/qbft" "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" ) diff --git a/protocol/v2/qbft/controller/types.go b/protocol/v2/qbft/controller/types.go index f21a998bc6..ba9224e3a6 100644 --- a/protocol/v2/qbft/controller/types.go +++ b/protocol/v2/qbft/controller/types.go @@ -6,6 +6,7 @@ import ( "strings" specqbft "github.com/ssvlabs/ssv-spec/qbft" + "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" ) diff --git a/protocol/v2/qbft/controller/types_test.go b/protocol/v2/qbft/controller/types_test.go index 47b68a1ac6..d928af6535 100644 --- a/protocol/v2/qbft/controller/types_test.go +++ b/protocol/v2/qbft/controller/types_test.go @@ -5,10 +5,11 @@ import ( "sort" "testing" - "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" + "github.com/stretchr/testify/require" specqbft "github.com/ssvlabs/ssv-spec/qbft" - "github.com/stretchr/testify/require" + + "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" ) func TestInstances_FindInstance(t *testing.T) { diff --git a/protocol/v2/qbft/instance/commit.go b/protocol/v2/qbft/instance/commit.go index 0f6db704cd..3c94986622 100644 --- a/protocol/v2/qbft/instance/commit.go +++ b/protocol/v2/qbft/instance/commit.go @@ -6,9 +6,10 @@ import ( "sort" "github.com/pkg/errors" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/qbft" diff --git a/protocol/v2/qbft/instance/compact_test.go b/protocol/v2/qbft/instance/compact_test.go index 074796adc4..a56653c190 100644 --- a/protocol/v2/qbft/instance/compact_test.go +++ b/protocol/v2/qbft/instance/compact_test.go @@ -3,10 +3,11 @@ package instance import ( "testing" + "github.com/stretchr/testify/require" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv-spec/types/testingutils" - "github.com/stretchr/testify/require" ) var TestingSK = testingutils.Testing4SharesSet() diff --git a/protocol/v2/qbft/instance/instance.go b/protocol/v2/qbft/instance/instance.go index b6eee6b99b..9856899a67 100644 --- a/protocol/v2/qbft/instance/instance.go +++ b/protocol/v2/qbft/instance/instance.go @@ -7,9 +7,10 @@ import ( "sync" "github.com/pkg/errors" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/qbft" diff --git a/protocol/v2/qbft/instance/instance_test.go b/protocol/v2/qbft/instance/instance_test.go index b340254614..84e292f26a 100644 --- a/protocol/v2/qbft/instance/instance_test.go +++ b/protocol/v2/qbft/instance/instance_test.go @@ -3,10 +3,11 @@ package instance import ( "testing" + "github.com/stretchr/testify/require" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv-spec/types/testingutils" - "github.com/stretchr/testify/require" ) func TestInstance_Marshaling(t *testing.T) { diff --git a/protocol/v2/qbft/instance/metrics.go b/protocol/v2/qbft/instance/metrics.go index 0b1dfc3c3a..78907af3bb 100644 --- a/protocol/v2/qbft/instance/metrics.go +++ b/protocol/v2/qbft/instance/metrics.go @@ -4,9 +4,11 @@ import ( "context" "time" + "go.opentelemetry.io/otel/metric" + "github.com/ssvlabs/ssv-spec/qbft" + "github.com/ssvlabs/ssv/observability" - "go.opentelemetry.io/otel/metric" ) type metrics struct { diff --git a/protocol/v2/qbft/instance/prepare.go b/protocol/v2/qbft/instance/prepare.go index 4c660a0241..918b989f26 100644 --- a/protocol/v2/qbft/instance/prepare.go +++ b/protocol/v2/qbft/instance/prepare.go @@ -5,9 +5,10 @@ import ( "context" "github.com/pkg/errors" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/qbft" diff --git a/protocol/v2/qbft/instance/proposal.go b/protocol/v2/qbft/instance/proposal.go index eb0127ff68..ba419c1323 100644 --- a/protocol/v2/qbft/instance/proposal.go +++ b/protocol/v2/qbft/instance/proposal.go @@ -5,9 +5,10 @@ import ( "context" "github.com/pkg/errors" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/qbft" diff --git a/protocol/v2/qbft/instance/round_change.go b/protocol/v2/qbft/instance/round_change.go index 1b1eb47d72..ce5ba5aab4 100644 --- a/protocol/v2/qbft/instance/round_change.go +++ b/protocol/v2/qbft/instance/round_change.go @@ -5,9 +5,10 @@ import ( "context" "github.com/pkg/errors" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/qbft" diff --git a/protocol/v2/qbft/instance/timeout.go b/protocol/v2/qbft/instance/timeout.go index 0d6bae8974..a365616e46 100644 --- a/protocol/v2/qbft/instance/timeout.go +++ b/protocol/v2/qbft/instance/timeout.go @@ -4,9 +4,10 @@ import ( "context" "github.com/pkg/errors" - specqbft "github.com/ssvlabs/ssv-spec/qbft" "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" + "github.com/ssvlabs/ssv/logging/fields" ) diff --git a/protocol/v2/qbft/roundtimer/timer.go b/protocol/v2/qbft/roundtimer/timer.go index a8bbec5ee2..fba13d97f0 100644 --- a/protocol/v2/qbft/roundtimer/timer.go +++ b/protocol/v2/qbft/roundtimer/timer.go @@ -7,8 +7,10 @@ import ( "time" "github.com/attestantio/go-eth2-client/spec/phase0" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/utils/casts" ) diff --git a/protocol/v2/qbft/roundtimer/timer_test.go b/protocol/v2/qbft/roundtimer/timer_test.go index 4f284c068e..a97f26497a 100644 --- a/protocol/v2/qbft/roundtimer/timer_test.go +++ b/protocol/v2/qbft/roundtimer/timer_test.go @@ -9,11 +9,13 @@ import ( "time" "github.com/attestantio/go-eth2-client/spec/phase0" + "github.com/stretchr/testify/require" + gomock "go.uber.org/mock/gomock" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/qbft/roundtimer/mocks" - "github.com/stretchr/testify/require" - gomock "go.uber.org/mock/gomock" ) func TestTimeoutForRound(t *testing.T) { diff --git a/protocol/v2/qbft/spectest/controller_type.go b/protocol/v2/qbft/spectest/controller_type.go index 6b297b159b..b034b6dc94 100644 --- a/protocol/v2/qbft/spectest/controller_type.go +++ b/protocol/v2/qbft/spectest/controller_type.go @@ -19,6 +19,7 @@ import ( spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" typescomparable "github.com/ssvlabs/ssv-spec/types/testingutils/comparable" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/protocol/v2/qbft" "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" diff --git a/protocol/v2/qbft/spectest/create_msg_type.go b/protocol/v2/qbft/spectest/create_msg_type.go index d7a0ba7068..d050835ad6 100644 --- a/protocol/v2/qbft/spectest/create_msg_type.go +++ b/protocol/v2/qbft/spectest/create_msg_type.go @@ -7,13 +7,13 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" - "github.com/ssvlabs/ssv-spec/qbft" specqbft "github.com/ssvlabs/ssv-spec/qbft" spectests "github.com/ssvlabs/ssv-spec/qbft/spectest/tests" spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" + + "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" ) type CreateMsgSpecTest struct { diff --git a/protocol/v2/qbft/spectest/msg_processing_type.go b/protocol/v2/qbft/spectest/msg_processing_type.go index f685117ba7..60a6d2c8d3 100644 --- a/protocol/v2/qbft/spectest/msg_processing_type.go +++ b/protocol/v2/qbft/spectest/msg_processing_type.go @@ -9,12 +9,13 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectests "github.com/ssvlabs/ssv-spec/qbft/spectest/tests" spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" typescomparable "github.com/ssvlabs/ssv-spec/types/testingutils/comparable" - "github.com/stretchr/testify/require" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/protocol/v2/qbft" diff --git a/protocol/v2/qbft/spectest/msg_type.go b/protocol/v2/qbft/spectest/msg_type.go index 4aba60f465..7e8fbc1530 100644 --- a/protocol/v2/qbft/spectest/msg_type.go +++ b/protocol/v2/qbft/spectest/msg_type.go @@ -3,9 +3,9 @@ package qbft import ( "testing" - specqbft "github.com/ssvlabs/ssv-spec/qbft" "github.com/stretchr/testify/require" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectests "github.com/ssvlabs/ssv-spec/qbft/spectest/tests" ) diff --git a/protocol/v2/qbft/spectest/qbft_mapping_test.go b/protocol/v2/qbft/spectest/qbft_mapping_test.go index 9d4cc70fb7..bd0c453563 100644 --- a/protocol/v2/qbft/spectest/qbft_mapping_test.go +++ b/protocol/v2/qbft/spectest/qbft_mapping_test.go @@ -7,14 +7,16 @@ import ( "strings" "testing" + "github.com/stretchr/testify/require" + spectests "github.com/ssvlabs/ssv-spec/qbft/spectest/tests" "github.com/ssvlabs/ssv-spec/qbft/spectest/tests/timeout" "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" testing2 "github.com/ssvlabs/ssv/protocol/v2/qbft/testing" protocoltesting "github.com/ssvlabs/ssv/protocol/v2/testing" - "github.com/stretchr/testify/require" ) func TestQBFTMapping(t *testing.T) { diff --git a/protocol/v2/qbft/spectest/timeout_type.go b/protocol/v2/qbft/spectest/timeout_type.go index 2741553363..2e831d6213 100644 --- a/protocol/v2/qbft/spectest/timeout_type.go +++ b/protocol/v2/qbft/spectest/timeout_type.go @@ -6,14 +6,14 @@ import ( "fmt" "testing" + "github.com/stretchr/testify/require" + spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv-spec/types/testingutils" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" "github.com/ssvlabs/ssv/protocol/v2/qbft/roundtimer" - - "github.com/stretchr/testify/require" ) type SpecTest struct { diff --git a/protocol/v2/qbft/storage/participant_store.go b/protocol/v2/qbft/storage/participant_store.go index fe6ff67b44..ac7290360a 100644 --- a/protocol/v2/qbft/storage/participant_store.go +++ b/protocol/v2/qbft/storage/participant_store.go @@ -9,6 +9,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/operator/slotticker" ) diff --git a/protocol/v2/qbft/testing/storage.go b/protocol/v2/qbft/testing/storage.go index f41f955c3a..bfd2f10b82 100644 --- a/protocol/v2/qbft/testing/storage.go +++ b/protocol/v2/qbft/testing/storage.go @@ -4,11 +4,13 @@ import ( "context" "sync" + "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + qbftstorage "github.com/ssvlabs/ssv/ibft/storage" "github.com/ssvlabs/ssv/storage/basedb" "github.com/ssvlabs/ssv/storage/kv" - "go.uber.org/zap" ) var db basedb.Database diff --git a/protocol/v2/qbft/testing/utils.go b/protocol/v2/qbft/testing/utils.go index 0671b8b4a0..ed3546a571 100644 --- a/protocol/v2/qbft/testing/utils.go +++ b/protocol/v2/qbft/testing/utils.go @@ -9,6 +9,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/protocol/v2/qbft" "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" "github.com/ssvlabs/ssv/protocol/v2/qbft/roundtimer" diff --git a/protocol/v2/ssv/partial_sig_container.go b/protocol/v2/ssv/partial_sig_container.go index cac0934f91..712333d57f 100644 --- a/protocol/v2/ssv/partial_sig_container.go +++ b/protocol/v2/ssv/partial_sig_container.go @@ -5,6 +5,7 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" + specssv "github.com/ssvlabs/ssv-spec/ssv" spectypes "github.com/ssvlabs/ssv-spec/types" diff --git a/protocol/v2/ssv/queue/message_prioritizer.go b/protocol/v2/ssv/queue/message_prioritizer.go index bf36afbfcf..08f9cec749 100644 --- a/protocol/v2/ssv/queue/message_prioritizer.go +++ b/protocol/v2/ssv/queue/message_prioritizer.go @@ -2,6 +2,7 @@ package queue import ( "github.com/attestantio/go-eth2-client/spec/phase0" + "github.com/ssvlabs/ssv-spec/qbft" ) diff --git a/protocol/v2/ssv/queue/message_prioritizer_test.go b/protocol/v2/ssv/queue/message_prioritizer_test.go index 0d01b7f94f..46a3aacf3a 100644 --- a/protocol/v2/ssv/queue/message_prioritizer_test.go +++ b/protocol/v2/ssv/queue/message_prioritizer_test.go @@ -11,11 +11,12 @@ import ( "github.com/aquasecurity/table" "github.com/attestantio/go-eth2-client/spec/phase0" + "github.com/stretchr/testify/require" + "github.com/ssvlabs/ssv-spec/qbft" specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv-spec/types/testingutils" - "github.com/stretchr/testify/require" "github.com/ssvlabs/ssv/protocol/v2/message" "github.com/ssvlabs/ssv/protocol/v2/types" diff --git a/protocol/v2/ssv/queue/queue_test.go b/protocol/v2/ssv/queue/queue_test.go index a9b5519de7..c7a130ad5c 100644 --- a/protocol/v2/ssv/queue/queue_test.go +++ b/protocol/v2/ssv/queue/queue_test.go @@ -9,11 +9,12 @@ import ( "testing" "time" - "github.com/ssvlabs/ssv-spec/qbft" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" "golang.org/x/text/language" "golang.org/x/text/message" + + "github.com/ssvlabs/ssv-spec/qbft" + spectypes "github.com/ssvlabs/ssv-spec/types" ) var mockState = &State{ diff --git a/protocol/v2/ssv/runner/aggregator.go b/protocol/v2/ssv/runner/aggregator.go index 0807a574d0..22058add25 100644 --- a/protocol/v2/ssv/runner/aggregator.go +++ b/protocol/v2/ssv/runner/aggregator.go @@ -15,6 +15,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" diff --git a/protocol/v2/ssv/runner/observability.go b/protocol/v2/ssv/runner/observability.go index 234e81d9df..ab38b1fd5e 100644 --- a/protocol/v2/ssv/runner/observability.go +++ b/protocol/v2/ssv/runner/observability.go @@ -6,10 +6,10 @@ import ( "sync" "time" + "github.com/attestantio/go-eth2-client/spec/phase0" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/metric" - "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/ssvlabs/ssv-spec/qbft" "github.com/ssvlabs/ssv-spec/types" diff --git a/protocol/v2/ssv/runner/proposer.go b/protocol/v2/ssv/runner/proposer.go index 430f190608..77a5244413 100644 --- a/protocol/v2/ssv/runner/proposer.go +++ b/protocol/v2/ssv/runner/proposer.go @@ -22,6 +22,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" diff --git a/protocol/v2/ssv/runner/runner.go b/protocol/v2/ssv/runner/runner.go index 306010ff39..d89fabdd34 100644 --- a/protocol/v2/ssv/runner/runner.go +++ b/protocol/v2/ssv/runner/runner.go @@ -12,6 +12,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" "github.com/ssvlabs/ssv/protocol/v2/ssv" diff --git a/protocol/v2/ssv/runner/runner_signatures.go b/protocol/v2/ssv/runner/runner_signatures.go index cf8b7c9958..b5b37b4e68 100644 --- a/protocol/v2/ssv/runner/runner_signatures.go +++ b/protocol/v2/ssv/runner/runner_signatures.go @@ -7,6 +7,7 @@ import ( ssz "github.com/ferranbt/fastssz" "github.com/herumi/bls-eth-go-binary/bls" "github.com/pkg/errors" + spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv/protocol/v2/ssv" diff --git a/protocol/v2/ssv/runner/runner_state.go b/protocol/v2/ssv/runner/runner_state.go index 8bf543e323..a8603e68e6 100644 --- a/protocol/v2/ssv/runner/runner_state.go +++ b/protocol/v2/ssv/runner/runner_state.go @@ -6,6 +6,7 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/pkg/errors" + spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" diff --git a/protocol/v2/ssv/runner/runner_validations.go b/protocol/v2/ssv/runner/runner_validations.go index 7fdec51ac5..0f0f532713 100644 --- a/protocol/v2/ssv/runner/runner_validations.go +++ b/protocol/v2/ssv/runner/runner_validations.go @@ -7,7 +7,9 @@ import ( spec "github.com/attestantio/go-eth2-client/spec/phase0" ssz "github.com/ferranbt/fastssz" "github.com/pkg/errors" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/ssv" ) diff --git a/protocol/v2/ssv/runner/sync_committee_aggregator.go b/protocol/v2/ssv/runner/sync_committee_aggregator.go index edad6ce165..abd42c3d71 100644 --- a/protocol/v2/ssv/runner/sync_committee_aggregator.go +++ b/protocol/v2/ssv/runner/sync_committee_aggregator.go @@ -15,6 +15,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" diff --git a/protocol/v2/ssv/runner/timer.go b/protocol/v2/ssv/runner/timer.go index 430ff474ab..a151e92a42 100644 --- a/protocol/v2/ssv/runner/timer.go +++ b/protocol/v2/ssv/runner/timer.go @@ -1,9 +1,10 @@ package runner import ( + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" "github.com/ssvlabs/ssv/protocol/v2/qbft/instance" "github.com/ssvlabs/ssv/protocol/v2/qbft/roundtimer" diff --git a/protocol/v2/ssv/runner/validator_registration.go b/protocol/v2/ssv/runner/validator_registration.go index 8d73a3aace..a5282caba7 100644 --- a/protocol/v2/ssv/runner/validator_registration.go +++ b/protocol/v2/ssv/runner/validator_registration.go @@ -5,10 +5,10 @@ import ( "crypto/sha256" "encoding/hex" "encoding/json" + "github.com/attestantio/go-eth2-client/api" "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec" - "github.com/attestantio/go-eth2-client/spec/phase0" ssz "github.com/ferranbt/fastssz" "github.com/pkg/errors" @@ -16,6 +16,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" diff --git a/protocol/v2/ssv/runner/voluntary_exit.go b/protocol/v2/ssv/runner/voluntary_exit.go index 2bff31db67..2d46500247 100644 --- a/protocol/v2/ssv/runner/voluntary_exit.go +++ b/protocol/v2/ssv/runner/voluntary_exit.go @@ -13,6 +13,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" diff --git a/protocol/v2/ssv/spectest/committee_msg_processing_type.go b/protocol/v2/ssv/spectest/committee_msg_processing_type.go index 14af6d2071..ddc1ceeb53 100644 --- a/protocol/v2/ssv/spectest/committee_msg_processing_type.go +++ b/protocol/v2/ssv/spectest/committee_msg_processing_type.go @@ -18,6 +18,7 @@ import ( spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" typescomparable "github.com/ssvlabs/ssv-spec/types/testingutils/comparable" + "github.com/ssvlabs/ssv/integration/qbft/tests" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/protocol/v2/ssv/queue" diff --git a/protocol/v2/ssv/spectest/debug_states.go b/protocol/v2/ssv/spectest/debug_states.go index efd80cfa7b..4e696fa538 100644 --- a/protocol/v2/ssv/spectest/debug_states.go +++ b/protocol/v2/ssv/spectest/debug_states.go @@ -7,8 +7,9 @@ import ( "testing" "github.com/google/go-cmp/cmp" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" + + spectypes "github.com/ssvlabs/ssv-spec/types" ) var ( diff --git a/protocol/v2/ssv/spectest/msg_processing_type.go b/protocol/v2/ssv/spectest/msg_processing_type.go index a5aad2ae05..2cb3d76273 100644 --- a/protocol/v2/ssv/spectest/msg_processing_type.go +++ b/protocol/v2/ssv/spectest/msg_processing_type.go @@ -18,6 +18,7 @@ import ( spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" typescomparable "github.com/ssvlabs/ssv-spec/types/testingutils/comparable" + "github.com/ssvlabs/ssv/integration/qbft/tests" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/networkconfig" diff --git a/protocol/v2/ssv/spectest/multi_msg_processing_type.go b/protocol/v2/ssv/spectest/multi_msg_processing_type.go index d7a3e41841..63ba59ecdf 100644 --- a/protocol/v2/ssv/spectest/multi_msg_processing_type.go +++ b/protocol/v2/ssv/spectest/multi_msg_processing_type.go @@ -6,8 +6,9 @@ import ( "strings" "testing" - "github.com/ssvlabs/ssv/logging" "go.uber.org/zap" + + "github.com/ssvlabs/ssv/logging" ) type MultiMsgProcessingSpecTest struct { diff --git a/protocol/v2/ssv/spectest/multi_start_new_runner_duty_type.go b/protocol/v2/ssv/spectest/multi_start_new_runner_duty_type.go index 2a956a3618..28009b5991 100644 --- a/protocol/v2/ssv/spectest/multi_start_new_runner_duty_type.go +++ b/protocol/v2/ssv/spectest/multi_start_new_runner_duty_type.go @@ -16,6 +16,7 @@ import ( spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" typescomparable "github.com/ssvlabs/ssv-spec/types/testingutils/comparable" + "github.com/ssvlabs/ssv/protocol/v2/ssv/runner" protocoltesting "github.com/ssvlabs/ssv/protocol/v2/testing" ) diff --git a/protocol/v2/ssv/spectest/runner_construction_type.go b/protocol/v2/ssv/spectest/runner_construction_type.go index c948b2e2cd..4f81c159a6 100644 --- a/protocol/v2/ssv/spectest/runner_construction_type.go +++ b/protocol/v2/ssv/spectest/runner_construction_type.go @@ -4,9 +4,10 @@ import ( "testing" "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" + "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" runnertesting "github.com/ssvlabs/ssv/protocol/v2/ssv/testing" ) diff --git a/protocol/v2/ssv/spectest/ssv_mapping_test.go b/protocol/v2/ssv/spectest/ssv_mapping_test.go index f91763ad3f..ac41ce3c28 100644 --- a/protocol/v2/ssv/spectest/ssv_mapping_test.go +++ b/protocol/v2/ssv/spectest/ssv_mapping_test.go @@ -10,6 +10,9 @@ import ( "testing" "github.com/attestantio/go-eth2-client/spec/phase0" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + specssv "github.com/ssvlabs/ssv-spec/ssv" "github.com/ssvlabs/ssv-spec/ssv/spectest/tests" "github.com/ssvlabs/ssv-spec/ssv/spectest/tests/committee" @@ -21,6 +24,7 @@ import ( spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv-spec/types/testingutils" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" + tests2 "github.com/ssvlabs/ssv/integration/qbft/tests" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/networkconfig" @@ -31,8 +35,6 @@ import ( ssvtesting "github.com/ssvlabs/ssv/protocol/v2/ssv/testing" "github.com/ssvlabs/ssv/protocol/v2/ssv/validator" protocoltesting "github.com/ssvlabs/ssv/protocol/v2/testing" - "github.com/stretchr/testify/require" - "go.uber.org/zap" ) func TestSSVMapping(t *testing.T) { diff --git a/protocol/v2/ssv/spectest/sync_committee_aggregator_proof_type.go b/protocol/v2/ssv/spectest/sync_committee_aggregator_proof_type.go index 55aed66e89..ed44c87966 100644 --- a/protocol/v2/ssv/spectest/sync_committee_aggregator_proof_type.go +++ b/protocol/v2/ssv/spectest/sync_committee_aggregator_proof_type.go @@ -14,6 +14,7 @@ import ( spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv-spec/types/testingutils" typescomparable "github.com/ssvlabs/ssv-spec/types/testingutils/comparable" + "github.com/ssvlabs/ssv/integration/qbft/tests" "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/protocol/v2/ssv/queue" diff --git a/protocol/v2/ssv/testing/runner.go b/protocol/v2/ssv/testing/runner.go index b91402ad68..cbdab8ab5d 100644 --- a/protocol/v2/ssv/testing/runner.go +++ b/protocol/v2/ssv/testing/runner.go @@ -10,6 +10,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" + "github.com/ssvlabs/ssv/integration/qbft/tests" "github.com/ssvlabs/ssv/networkconfig" "github.com/ssvlabs/ssv/protocol/v2/qbft/controller" diff --git a/protocol/v2/ssv/testing/validator.go b/protocol/v2/ssv/testing/validator.go index 16c03a77ec..6b09c21b97 100644 --- a/protocol/v2/ssv/testing/validator.go +++ b/protocol/v2/ssv/testing/validator.go @@ -3,9 +3,10 @@ package testing import ( "context" + "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" spectestingutils "github.com/ssvlabs/ssv-spec/types/testingutils" - "go.uber.org/zap" "github.com/ssvlabs/ssv/integration/qbft/tests" "github.com/ssvlabs/ssv/networkconfig" diff --git a/protocol/v2/ssv/validator/committee.go b/protocol/v2/ssv/validator/committee.go index a8e3891f57..3f0c02b2be 100644 --- a/protocol/v2/ssv/validator/committee.go +++ b/protocol/v2/ssv/validator/committee.go @@ -14,6 +14,7 @@ import ( "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/message" "github.com/ssvlabs/ssv/protocol/v2/ssv/queue" diff --git a/protocol/v2/ssv/validator/committee_guard.go b/protocol/v2/ssv/validator/committee_guard.go index b770cd0d0e..cd4823aa83 100644 --- a/protocol/v2/ssv/validator/committee_guard.go +++ b/protocol/v2/ssv/validator/committee_guard.go @@ -5,6 +5,7 @@ import ( "sync" "github.com/attestantio/go-eth2-client/spec/phase0" + spectypes "github.com/ssvlabs/ssv-spec/types" ) diff --git a/protocol/v2/ssv/validator/committee_guard_test.go b/protocol/v2/ssv/validator/committee_guard_test.go index fc85b39152..142e63e309 100644 --- a/protocol/v2/ssv/validator/committee_guard_test.go +++ b/protocol/v2/ssv/validator/committee_guard_test.go @@ -3,8 +3,9 @@ package validator import ( "testing" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" + + spectypes "github.com/ssvlabs/ssv-spec/types" ) func TestCommitteeDutyGuard(t *testing.T) { diff --git a/protocol/v2/ssv/validator/committee_queue.go b/protocol/v2/ssv/validator/committee_queue.go index 7bf6a37e50..9173bbe36d 100644 --- a/protocol/v2/ssv/validator/committee_queue.go +++ b/protocol/v2/ssv/validator/committee_queue.go @@ -5,9 +5,10 @@ import ( "errors" "github.com/attestantio/go-eth2-client/spec/phase0" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/message" diff --git a/protocol/v2/ssv/validator/msgqueue_consumer.go b/protocol/v2/ssv/validator/msgqueue_consumer.go index e05ad419cb..667b744a7a 100644 --- a/protocol/v2/ssv/validator/msgqueue_consumer.go +++ b/protocol/v2/ssv/validator/msgqueue_consumer.go @@ -5,9 +5,10 @@ import ( "fmt" "github.com/pkg/errors" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/message" diff --git a/protocol/v2/ssv/validator/non_committee_validator.go b/protocol/v2/ssv/validator/non_committee_validator.go index 6902e87fd5..2442e855ae 100644 --- a/protocol/v2/ssv/validator/non_committee_validator.go +++ b/protocol/v2/ssv/validator/non_committee_validator.go @@ -10,9 +10,10 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/herumi/bls-eth-go-binary/bls" "github.com/jellydator/ttlcache/v3" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" "github.com/ssvlabs/ssv/ibft/storage" "github.com/ssvlabs/ssv/logging/fields" diff --git a/protocol/v2/ssv/validator/signature_verifier.go b/protocol/v2/ssv/validator/signature_verifier.go index 0fa044b249..4e08099e2c 100644 --- a/protocol/v2/ssv/validator/signature_verifier.go +++ b/protocol/v2/ssv/validator/signature_verifier.go @@ -7,9 +7,8 @@ import ( spectypes "github.com/ssvlabs/ssv-spec/types" - "github.com/ssvlabs/ssv/utils/hashmap" - "github.com/ssvlabs/ssv/operator/keys" + "github.com/ssvlabs/ssv/utils/hashmap" ) type SignatureVerifier struct { diff --git a/protocol/v2/ssv/validator/startup.go b/protocol/v2/ssv/validator/startup.go index 0aa830d9ad..6fcb3104b0 100644 --- a/protocol/v2/ssv/validator/startup.go +++ b/protocol/v2/ssv/validator/startup.go @@ -8,6 +8,7 @@ import ( "github.com/ssvlabs/ssv-spec/p2p" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/logging/fields" ) diff --git a/protocol/v2/ssv/validator/timer.go b/protocol/v2/ssv/validator/timer.go index 49e130744e..97baec612c 100644 --- a/protocol/v2/ssv/validator/timer.go +++ b/protocol/v2/ssv/validator/timer.go @@ -4,11 +4,11 @@ import ( "encoding/json" "github.com/attestantio/go-eth2-client/spec/phase0" - "github.com/pkg/errors" + "go.uber.org/zap" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" - "go.uber.org/zap" "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/protocol/v2/message" diff --git a/protocol/v2/ssv/validator/validator.go b/protocol/v2/ssv/validator/validator.go index cc907eba33..d3ac80fc7f 100644 --- a/protocol/v2/ssv/validator/validator.go +++ b/protocol/v2/ssv/validator/validator.go @@ -11,6 +11,7 @@ import ( specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/message/validation" "github.com/ssvlabs/ssv/networkconfig" diff --git a/protocol/v2/testing/test_utils.go b/protocol/v2/testing/test_utils.go index babc47c9c2..84cd2ce00d 100644 --- a/protocol/v2/testing/test_utils.go +++ b/protocol/v2/testing/test_utils.go @@ -11,11 +11,12 @@ import ( "testing" "github.com/pkg/errors" + "golang.org/x/mod/modfile" + "golang.org/x/mod/module" + specqbft "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/ssvlabs/ssv-spec/types/testingutils" - "golang.org/x/mod/modfile" - "golang.org/x/mod/module" qbftstorage "github.com/ssvlabs/ssv/protocol/v2/qbft/storage" "github.com/ssvlabs/ssv/utils/rsaencryption" diff --git a/protocol/v2/types/operator.go b/protocol/v2/types/operator.go index 649443d09b..748ac2e58d 100644 --- a/protocol/v2/types/operator.go +++ b/protocol/v2/types/operator.go @@ -2,8 +2,10 @@ package types import ( "github.com/pkg/errors" + "github.com/ssvlabs/ssv-spec/qbft" spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/operator/keys" ) diff --git a/protocol/v2/types/ssvshare.go b/protocol/v2/types/ssvshare.go index a2e557b9a2..f6c8aea5de 100644 --- a/protocol/v2/types/ssvshare.go +++ b/protocol/v2/types/ssvshare.go @@ -13,6 +13,7 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" + spectypes "github.com/ssvlabs/ssv-spec/types" ) diff --git a/protocol/v2/types/ssvshare_test.go b/protocol/v2/types/ssvshare_test.go index 2859a6b0ae..aef1c44d7e 100644 --- a/protocol/v2/types/ssvshare_test.go +++ b/protocol/v2/types/ssvshare_test.go @@ -7,8 +7,9 @@ import ( eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/ethereum/go-ethereum/crypto" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" + + spectypes "github.com/ssvlabs/ssv-spec/types" ) func TestSSVShare_BelongsToOperator(t *testing.T) { diff --git a/registry/storage/operators.go b/registry/storage/operators.go index 960f0eed65..767d72d035 100644 --- a/registry/storage/operators.go +++ b/registry/storage/operators.go @@ -8,9 +8,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/pkg/errors" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/storage/basedb" ) diff --git a/registry/storage/operators_test.go b/registry/storage/operators_test.go index d40b091cff..3009354bd6 100644 --- a/registry/storage/operators_test.go +++ b/registry/storage/operators_test.go @@ -5,10 +5,11 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" "go.uber.org/zap" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/registry/storage" "github.com/ssvlabs/ssv/storage/basedb" diff --git a/registry/storage/shares.go b/registry/storage/shares.go index 433046e8cb..458701ee66 100644 --- a/registry/storage/shares.go +++ b/registry/storage/shares.go @@ -9,11 +9,13 @@ import ( eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" + "golang.org/x/exp/maps" + spectypes "github.com/ssvlabs/ssv-spec/types" + beaconprotocol "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" "github.com/ssvlabs/ssv/protocol/v2/types" "github.com/ssvlabs/ssv/storage/basedb" - "golang.org/x/exp/maps" ) //go:generate sszgen -path ./shares.go --objs Share diff --git a/registry/storage/shares_encoding_test.go b/registry/storage/shares_encoding_test.go index 9106a30d80..384622deb5 100644 --- a/registry/storage/shares_encoding_test.go +++ b/registry/storage/shares_encoding_test.go @@ -2,8 +2,9 @@ package storage import ( "encoding/hex" - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func Test_storageShare_encoding_decoding(t *testing.T) { diff --git a/registry/storage/shares_test.go b/registry/storage/shares_test.go index c370e95a03..26f70a75d0 100644 --- a/registry/storage/shares_test.go +++ b/registry/storage/shares_test.go @@ -18,7 +18,12 @@ import ( "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/ethereum/go-ethereum/common" "github.com/herumi/bls-eth-go-binary/bls" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + "golang.org/x/exp/maps" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/logging" "github.com/ssvlabs/ssv/networkconfig" beaconprotocol "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon" @@ -26,9 +31,6 @@ import ( "github.com/ssvlabs/ssv/storage/basedb" "github.com/ssvlabs/ssv/storage/kv" "github.com/ssvlabs/ssv/utils/threshold" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "golang.org/x/exp/maps" ) func init() { diff --git a/registry/storage/validatorstore.go b/registry/storage/validatorstore.go index eb94b2b378..15ef2f875c 100644 --- a/registry/storage/validatorstore.go +++ b/registry/storage/validatorstore.go @@ -7,9 +7,11 @@ import ( "sync" "github.com/attestantio/go-eth2-client/spec/phase0" + "golang.org/x/exp/maps" + spectypes "github.com/ssvlabs/ssv-spec/types" + "github.com/ssvlabs/ssv/protocol/v2/types" - "golang.org/x/exp/maps" ) //go:generate mockgen -package=mocks -destination=./mocks/validatorstore.go -source=./validatorstore.go diff --git a/registry/storage/validatorstore_test.go b/registry/storage/validatorstore_test.go index 41769d8d36..37726b5e4a 100644 --- a/registry/storage/validatorstore_test.go +++ b/registry/storage/validatorstore_test.go @@ -16,10 +16,12 @@ import ( eth2apiv1 "github.com/attestantio/go-eth2-client/api/v1" "github.com/attestantio/go-eth2-client/spec/phase0" "github.com/ethereum/go-ethereum/common" - spectypes "github.com/ssvlabs/ssv-spec/types" - ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" "github.com/stretchr/testify/require" "golang.org/x/exp/maps" + + spectypes "github.com/ssvlabs/ssv-spec/types" + + ssvtypes "github.com/ssvlabs/ssv/protocol/v2/types" ) var share1 = &ssvtypes.SSVShare{ diff --git a/storage/kv/badger.go b/storage/kv/badger.go index 4e9c2d6c84..80725ddae6 100644 --- a/storage/kv/badger.go +++ b/storage/kv/badger.go @@ -6,13 +6,12 @@ import ( "sync" "time" - "github.com/ssvlabs/ssv/logging/fields" - "github.com/dgraph-io/badger/v4" "github.com/pkg/errors" "go.uber.org/zap" "github.com/ssvlabs/ssv/logging" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/storage/basedb" ) diff --git a/utils/format/format_test.go b/utils/format/format_test.go index 208498fd8e..dece7364f7 100644 --- a/utils/format/format_test.go +++ b/utils/format/format_test.go @@ -3,8 +3,9 @@ package format import ( "testing" - spectypes "github.com/ssvlabs/ssv-spec/types" "github.com/stretchr/testify/require" + + spectypes "github.com/ssvlabs/ssv-spec/types" ) func TestDomainTypeFromString(t *testing.T) { diff --git a/utils/keys.go b/utils/keys.go index b513b68725..87e24f9bc7 100644 --- a/utils/keys.go +++ b/utils/keys.go @@ -5,12 +5,12 @@ import ( "crypto/rand" "encoding/hex" - "github.com/ssvlabs/ssv/logging/fields" - "github.com/libp2p/go-libp2p/core/crypto" "github.com/pkg/errors" - "github.com/ssvlabs/ssv/network/commons" "go.uber.org/zap" + + "github.com/ssvlabs/ssv/logging/fields" + "github.com/ssvlabs/ssv/network/commons" ) // ECDSAPrivateKey extracts the ecdsa.PrivateKey from the given string or generate a new key diff --git a/utils/rsaencryption/rsa_encryption.go b/utils/rsaencryption/rsa_encryption.go index 7fda24a1b0..1a77900e8d 100644 --- a/utils/rsaencryption/rsa_encryption.go +++ b/utils/rsaencryption/rsa_encryption.go @@ -13,6 +13,7 @@ import ( "encoding/base64" "encoding/pem" "fmt" + "github.com/pkg/errors" ) diff --git a/utils/rsaencryption/rsa_encryption_test.go b/utils/rsaencryption/rsa_encryption_test.go index a1aefcce00..741aeac6e0 100644 --- a/utils/rsaencryption/rsa_encryption_test.go +++ b/utils/rsaencryption/rsa_encryption_test.go @@ -4,8 +4,9 @@ import ( "encoding/base64" "testing" - testingspace "github.com/ssvlabs/ssv/utils/rsaencryption/testingspace" "github.com/stretchr/testify/require" + + testingspace "github.com/ssvlabs/ssv/utils/rsaencryption/testingspace" ) func TestGenerateKeys(t *testing.T) { diff --git a/utils/tasks/exec_timeout_test.go b/utils/tasks/exec_timeout_test.go index 37b861d725..4263638135 100644 --- a/utils/tasks/exec_timeout_test.go +++ b/utils/tasks/exec_timeout_test.go @@ -7,8 +7,9 @@ import ( "testing" "time" - "github.com/ssvlabs/ssv/logging" "github.com/stretchr/testify/require" + + "github.com/ssvlabs/ssv/logging" ) func TestExecWithTimeout(t *testing.T) { diff --git a/utils/testutils.go b/utils/testutils.go index 47d38ba30a..4c266b0ced 100644 --- a/utils/testutils.go +++ b/utils/testutils.go @@ -6,9 +6,10 @@ import ( "time" "github.com/attestantio/go-eth2-client/spec/phase0" - spectypes "github.com/ssvlabs/ssv-spec/types" "go.uber.org/mock/gomock" + spectypes "github.com/ssvlabs/ssv-spec/types" + mocknetwork "github.com/ssvlabs/ssv/protocol/v2/blockchain/beacon/mocks" ) diff --git a/utils/threshold/reconstruct.go b/utils/threshold/reconstruct.go index ce652ebd2c..33e000048a 100644 --- a/utils/threshold/reconstruct.go +++ b/utils/threshold/reconstruct.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/herumi/bls-eth-go-binary/bls" + spectypes "github.com/ssvlabs/ssv-spec/types" )