From eebcd52ee697a529a03fd334021c3ea22786c075 Mon Sep 17 00:00:00 2001 From: Raul Jordan Date: Tue, 21 Sep 2021 13:11:16 -0500 Subject: [PATCH] Miscellaneous Packages from Shared Into Proper Folders (#9638) * slashutil * builds * interop * viz Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> --- beacon-chain/core/BUILD.bazel | 2 +- beacon-chain/core/blocks/BUILD.bazel | 2 +- beacon-chain/core/blocks/attester_slashing.go | 4 ++-- beacon-chain/core/helpers/BUILD.bazel | 2 +- beacon-chain/core/transition/BUILD.bazel | 2 +- beacon-chain/db/BUILD.bazel | 4 ++-- beacon-chain/db/restore.go | 2 +- beacon-chain/db/restore_test.go | 2 +- beacon-chain/interop-cold-start/BUILD.bazel | 2 +- beacon-chain/interop-cold-start/service.go | 2 +- beacon-chain/node/BUILD.bazel | 4 ++-- beacon-chain/node/config.go | 2 +- beacon-chain/node/config_test.go | 2 +- beacon-chain/node/node.go | 2 +- beacon-chain/node/node_test.go | 2 +- beacon-chain/node/registration/BUILD.bazel | 4 ++-- beacon-chain/node/registration/p2p.go | 2 +- beacon-chain/node/registration/p2p_test.go | 2 +- beacon-chain/rpc/prysm/v1alpha1/beacon/BUILD.bazel | 4 ++-- beacon-chain/rpc/prysm/v1alpha1/beacon/assignments.go | 2 +- .../rpc/prysm/v1alpha1/beacon/assignments_test.go | 2 +- beacon-chain/rpc/prysm/v1alpha1/beacon/attestations.go | 2 +- .../rpc/prysm/v1alpha1/beacon/attestations_test.go | 2 +- beacon-chain/rpc/prysm/v1alpha1/beacon/blocks.go | 2 +- beacon-chain/rpc/prysm/v1alpha1/beacon/blocks_test.go | 2 +- beacon-chain/rpc/prysm/v1alpha1/beacon/validators.go | 2 +- beacon-chain/rpc/prysm/v1alpha1/beacon/validators_test.go | 2 +- beacon-chain/state/stateutil/BUILD.bazel | 2 +- beacon-chain/state/stateutil/state_root_test.go | 2 +- beacon-chain/state/v1/BUILD.bazel | 4 ++-- beacon-chain/state/v1/types_test.go | 2 +- {shared/cmd => cmd}/BUILD.bazel | 2 +- cmd/beacon-chain/BUILD.bazel | 2 +- cmd/beacon-chain/db/BUILD.bazel | 2 +- cmd/beacon-chain/db/db.go | 2 +- cmd/beacon-chain/flags/BUILD.bazel | 2 +- cmd/beacon-chain/flags/config.go | 2 +- cmd/beacon-chain/main.go | 2 +- cmd/beacon-chain/usage.go | 2 +- cmd/client-stats/BUILD.bazel | 2 +- cmd/client-stats/main.go | 2 +- cmd/client-stats/usage.go | 2 +- {shared/cmd => cmd}/config.go | 0 {shared/cmd => cmd}/config_test.go | 0 {shared/cmd => cmd}/defaults.go | 0 {shared/cmd => cmd}/flags.go | 0 {shared/cmd => cmd}/flags_test.go | 0 {shared/cmd => cmd}/helpers.go | 0 {shared/cmd => cmd}/helpers_test.go | 0 {shared/cmd => cmd}/password_reader.go | 0 {shared/cmd => cmd}/password_reader_mock.go | 2 +- cmd/validator/BUILD.bazel | 2 +- cmd/validator/accounts/BUILD.bazel | 2 +- cmd/validator/accounts/accounts.go | 2 +- cmd/validator/db/BUILD.bazel | 2 +- cmd/validator/db/db.go | 2 +- cmd/validator/main.go | 2 +- cmd/validator/slashing-protection/BUILD.bazel | 2 +- cmd/validator/slashing-protection/slashing-protection.go | 2 +- cmd/validator/usage.go | 2 +- cmd/validator/wallet/BUILD.bazel | 2 +- cmd/validator/wallet/wallet.go | 2 +- {shared/cmd => cmd}/wrap_flags.go | 0 contracts/deposit-contract/BUILD.bazel | 2 +- contracts/deposit-contract/depositContract_test.go | 2 +- contracts/deposit-contract/deposit_tree_test.go | 2 +- .../prysm/v1alpha1/slashings}/BUILD.bazel | 2 +- .../prysm/v1alpha1/slashings}/double_votes.go | 2 +- .../prysm/v1alpha1/slashings}/double_votes_test.go | 2 +- .../prysm/v1alpha1/slashings}/surround_votes.go | 2 +- .../prysm/v1alpha1/slashings}/surround_votes_test.go | 2 +- {shared => runtime}/interop/BUILD.bazel | 2 +- {shared => runtime}/interop/generate_genesis_state.go | 0 .../interop/generate_genesis_state_test.go | 8 ++++---- {shared => runtime}/interop/generate_keys.go | 0 {shared => runtime}/interop/generate_keys_test.go | 2 +- {shared => runtime}/interop/keygen_test_vector.yaml | 0 runtime/tos/BUILD.bazel | 4 ++-- runtime/tos/tos.go | 2 +- runtime/tos/tos_test.go | 2 +- shared/testutil/BUILD.bazel | 2 +- shared/testutil/deposits.go | 2 +- testing/endtoend/components/BUILD.bazel | 2 +- testing/endtoend/components/beacon_node.go | 2 +- testing/endtoend/components/validator.go | 2 +- tools/benchmark-files-gen/BUILD.bazel | 2 +- tools/benchmark-files-gen/main.go | 2 +- tools/genesis-state-gen/BUILD.bazel | 4 ++-- tools/genesis-state-gen/main.go | 2 +- tools/genesis-state-gen/main_test.go | 2 +- tools/unencrypted-keys-gen/BUILD.bazel | 2 +- tools/unencrypted-keys-gen/main.go | 2 +- validator/accounts/BUILD.bazel | 6 +++--- validator/accounts/accounts_backup.go | 2 +- validator/accounts/accounts_exit.go | 2 +- validator/accounts/accounts_list.go | 2 +- validator/accounts/accounts_list_test.go | 2 +- {shared => validator/accounts}/petnames/BUILD.bazel | 4 ++-- {shared => validator/accounts}/petnames/names.go | 0 validator/client/BUILD.bazel | 2 +- validator/client/attest_protect.go | 4 ++-- validator/db/BUILD.bazel | 4 ++-- validator/db/kv/BUILD.bazel | 2 +- validator/db/kv/attester_protection.go | 8 ++++---- validator/db/migrate.go | 2 +- validator/db/migrate_test.go | 2 +- validator/db/restore.go | 2 +- validator/db/restore_test.go | 2 +- validator/keymanager/imported/BUILD.bazel | 4 ++-- validator/keymanager/imported/keymanager.go | 4 ++-- validator/node/BUILD.bazel | 2 +- validator/node/node.go | 2 +- validator/rpc/BUILD.bazel | 4 ++-- validator/rpc/accounts.go | 4 ++-- validator/slashing-protection/BUILD.bazel | 4 ++-- validator/slashing-protection/cli_export.go | 2 +- validator/slashing-protection/cli_import.go | 2 +- validator/slashing-protection/cli_import_export_test.go | 2 +- .../local/standard-protection-format/BUILD.bazel | 2 +- .../local/standard-protection-format/import.go | 6 +++--- 120 files changed, 133 insertions(+), 133 deletions(-) rename {shared/cmd => cmd}/BUILD.bazel (95%) rename {shared/cmd => cmd}/config.go (100%) rename {shared/cmd => cmd}/config_test.go (100%) rename {shared/cmd => cmd}/defaults.go (100%) rename {shared/cmd => cmd}/flags.go (100%) rename {shared/cmd => cmd}/flags_test.go (100%) rename {shared/cmd => cmd}/helpers.go (100%) rename {shared/cmd => cmd}/helpers_test.go (100%) rename {shared/cmd => cmd}/password_reader.go (100%) rename {shared/cmd => cmd}/password_reader_mock.go (94%) rename {shared/cmd => cmd}/wrap_flags.go (100%) rename {shared/slashutil => proto/prysm/v1alpha1/slashings}/BUILD.bazel (89%) rename {shared/slashutil => proto/prysm/v1alpha1/slashings}/double_votes.go (97%) rename {shared/slashutil => proto/prysm/v1alpha1/slashings}/double_votes_test.go (98%) rename {shared/slashutil => proto/prysm/v1alpha1/slashings}/surround_votes.go (96%) rename {shared/slashutil => proto/prysm/v1alpha1/slashings}/surround_votes_test.go (99%) rename {shared => runtime}/interop/BUILD.bazel (95%) rename {shared => runtime}/interop/generate_genesis_state.go (100%) rename {shared => runtime}/interop/generate_genesis_state_test.go (85%) rename {shared => runtime}/interop/generate_keys.go (100%) rename {shared => runtime}/interop/generate_keys_test.go (95%) rename {shared => runtime}/interop/keygen_test_vector.yaml (100%) rename {shared => validator/accounts}/petnames/BUILD.bazel (63%) rename {shared => validator/accounts}/petnames/names.go (100%) diff --git a/beacon-chain/core/BUILD.bazel b/beacon-chain/core/BUILD.bazel index 83e266ff5..743b8c089 100644 --- a/beacon-chain/core/BUILD.bazel +++ b/beacon-chain/core/BUILD.bazel @@ -9,9 +9,9 @@ go_library( "//fuzz:__pkg__", "//network/forks:__pkg__", "//proto/prysm/v1alpha1/attestation:__pkg__", + "//runtime/interop:__pkg__", "//shared/attestationutil:__pkg__", "//shared/depositutil:__pkg__", - "//shared/interop:__pkg__", "//shared/keystore:__pkg__", "//shared/testutil:__pkg__", "//shared/testutil/altair:__pkg__", diff --git a/beacon-chain/core/blocks/BUILD.bazel b/beacon-chain/core/blocks/BUILD.bazel index da1896a0f..4b75b2e6e 100644 --- a/beacon-chain/core/blocks/BUILD.bazel +++ b/beacon-chain/core/blocks/BUILD.bazel @@ -37,11 +37,11 @@ go_library( "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/attestation:go_default_library", "//proto/prysm/v1alpha1/block:go_default_library", + "//proto/prysm/v1alpha1/slashings:go_default_library", "//runtime/version:go_default_library", "//shared/bytesutil:go_default_library", "//shared/depositutil:go_default_library", "//shared/params:go_default_library", - "//shared/slashutil:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", diff --git a/beacon-chain/core/blocks/attester_slashing.go b/beacon-chain/core/blocks/attester_slashing.go index 25f7b7380..c78a5c329 100644 --- a/beacon-chain/core/blocks/attester_slashing.go +++ b/beacon-chain/core/blocks/attester_slashing.go @@ -12,9 +12,9 @@ import ( "github.com/prysmaticlabs/prysm/container/slice" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/attestation" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/slashings" "github.com/prysmaticlabs/prysm/runtime/version" "github.com/prysmaticlabs/prysm/shared/params" - "github.com/prysmaticlabs/prysm/shared/slashutil" ) // ProcessAttesterSlashings is one of the operations performed @@ -128,7 +128,7 @@ func IsSlashableAttestationData(data1, data2 *ethpb.AttestationData) bool { att1 := ðpb.IndexedAttestation{Data: data1} att2 := ðpb.IndexedAttestation{Data: data2} // Check if att1 is surrounding att2. - isSurroundVote := slashutil.IsSurround(att1, att2) + isSurroundVote := slashings.IsSurround(att1, att2) return isDoubleVote || isSurroundVote } diff --git a/beacon-chain/core/helpers/BUILD.bazel b/beacon-chain/core/helpers/BUILD.bazel index b69b0d2ee..47a575c93 100644 --- a/beacon-chain/core/helpers/BUILD.bazel +++ b/beacon-chain/core/helpers/BUILD.bazel @@ -21,9 +21,9 @@ go_library( "//fuzz:__pkg__", "//network/forks:__pkg__", "//proto/prysm/v1alpha1/attestation:__pkg__", + "//runtime/interop:__pkg__", "//shared/attestationutil:__pkg__", "//shared/depositutil:__pkg__", - "//shared/interop:__pkg__", "//shared/keystore:__pkg__", "//shared/testutil:__pkg__", "//shared/testutil/altair:__pkg__", diff --git a/beacon-chain/core/transition/BUILD.bazel b/beacon-chain/core/transition/BUILD.bazel index 9be18e2a4..e0e3ce083 100644 --- a/beacon-chain/core/transition/BUILD.bazel +++ b/beacon-chain/core/transition/BUILD.bazel @@ -15,7 +15,7 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/beacon-chain/core/transition", visibility = [ "//beacon-chain:__subpackages__", - "//shared/interop:__pkg__", + "//runtime/interop:__pkg__", "//shared/testutil:__pkg__", "//testing/endtoend:__pkg__", "//testing/fuzz:__pkg__", diff --git a/beacon-chain/db/BUILD.bazel b/beacon-chain/db/BUILD.bazel index 8289ef9a7..0a82b77d4 100644 --- a/beacon-chain/db/BUILD.bazel +++ b/beacon-chain/db/BUILD.bazel @@ -18,9 +18,9 @@ go_library( deps = [ "//beacon-chain/db/iface:go_default_library", "//beacon-chain/db/kv:go_default_library", + "//cmd:go_default_library", "//io/file:go_default_library", "//io/prompt:go_default_library", - "//shared/cmd:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", @@ -36,8 +36,8 @@ go_test( embed = [":go_default_library"], deps = [ "//beacon-chain/db/kv:go_default_library", + "//cmd:go_default_library", "//proto/prysm/v1alpha1/wrapper:go_default_library", - "//shared/cmd:go_default_library", "//shared/testutil:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", diff --git a/beacon-chain/db/restore.go b/beacon-chain/db/restore.go index cbd51723c..f2ee7fb04 100644 --- a/beacon-chain/db/restore.go +++ b/beacon-chain/db/restore.go @@ -7,9 +7,9 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/beacon-chain/db/kv" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/io/file" "github.com/prysmaticlabs/prysm/io/prompt" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/urfave/cli/v2" ) diff --git a/beacon-chain/db/restore_test.go b/beacon-chain/db/restore_test.go index c8f5668ec..2707cdf2d 100644 --- a/beacon-chain/db/restore_test.go +++ b/beacon-chain/db/restore_test.go @@ -10,8 +10,8 @@ import ( types "github.com/prysmaticlabs/eth2-types" "github.com/prysmaticlabs/prysm/beacon-chain/db/kv" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" diff --git a/beacon-chain/interop-cold-start/BUILD.bazel b/beacon-chain/interop-cold-start/BUILD.bazel index e86f05cdc..ab854431c 100644 --- a/beacon-chain/interop-cold-start/BUILD.bazel +++ b/beacon-chain/interop-cold-start/BUILD.bazel @@ -16,7 +16,7 @@ go_library( "//beacon-chain/state/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//runtime:go_default_library", - "//shared/interop:go_default_library", + "//runtime/interop:go_default_library", "//time/slots:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", diff --git a/beacon-chain/interop-cold-start/service.go b/beacon-chain/interop-cold-start/service.go index 2acdc5823..435c1cc44 100644 --- a/beacon-chain/interop-cold-start/service.go +++ b/beacon-chain/interop-cold-start/service.go @@ -17,7 +17,7 @@ import ( v1 "github.com/prysmaticlabs/prysm/beacon-chain/state/v1" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/runtime" - "github.com/prysmaticlabs/prysm/shared/interop" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/time/slots" ) diff --git a/beacon-chain/node/BUILD.bazel b/beacon-chain/node/BUILD.bazel index c610b3f59..cda1a1467 100644 --- a/beacon-chain/node/BUILD.bazel +++ b/beacon-chain/node/BUILD.bazel @@ -37,6 +37,7 @@ go_library( "//beacon-chain/state/stategen:go_default_library", "//beacon-chain/sync:go_default_library", "//beacon-chain/sync/initial-sync:go_default_library", + "//cmd:go_default_library", "//cmd/beacon-chain/flags:go_default_library", "//config/features:go_default_library", "//container/slice:go_default_library", @@ -47,7 +48,6 @@ go_library( "//runtime/debug:go_default_library", "//runtime/prereqs:go_default_library", "//runtime/version:go_default_library", - "//shared/cmd:go_default_library", "//shared/params:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_pkg_errors//:go_default_library", @@ -68,8 +68,8 @@ go_test( embed = [":go_default_library"], deps = [ "//beacon-chain/core/feed/state:go_default_library", + "//cmd:go_default_library", "//cmd/beacon-chain/flags:go_default_library", - "//shared/cmd:go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", diff --git a/beacon-chain/node/config.go b/beacon-chain/node/config.go index 355086d96..e8480deee 100644 --- a/beacon-chain/node/config.go +++ b/beacon-chain/node/config.go @@ -2,9 +2,9 @@ package node import ( types "github.com/prysmaticlabs/eth2-types" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags" tracing2 "github.com/prysmaticlabs/prysm/monitoring/tracing" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/urfave/cli/v2" ) diff --git a/beacon-chain/node/config_test.go b/beacon-chain/node/config_test.go index 779621dcd..3db33a504 100644 --- a/beacon-chain/node/config_test.go +++ b/beacon-chain/node/config_test.go @@ -7,8 +7,8 @@ import ( "testing" types "github.com/prysmaticlabs/eth2-types" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" diff --git a/beacon-chain/node/node.go b/beacon-chain/node/node.go index ed33d8a0c..51b7069bc 100644 --- a/beacon-chain/node/node.go +++ b/beacon-chain/node/node.go @@ -39,6 +39,7 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/state/stategen" regularsync "github.com/prysmaticlabs/prysm/beacon-chain/sync" initialsync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags" "github.com/prysmaticlabs/prysm/config/features" "github.com/prysmaticlabs/prysm/container/slice" @@ -48,7 +49,6 @@ import ( "github.com/prysmaticlabs/prysm/runtime/debug" "github.com/prysmaticlabs/prysm/runtime/prereqs" "github.com/prysmaticlabs/prysm/runtime/version" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" diff --git a/beacon-chain/node/node_test.go b/beacon-chain/node/node_test.go index ad86b5eb4..5efa9dbfb 100644 --- a/beacon-chain/node/node_test.go +++ b/beacon-chain/node/node_test.go @@ -8,7 +8,7 @@ import ( "testing" statefeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/state" - "github.com/prysmaticlabs/prysm/shared/cmd" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/shared/testutil/require" logTest "github.com/sirupsen/logrus/hooks/test" "github.com/urfave/cli/v2" diff --git a/beacon-chain/node/registration/BUILD.bazel b/beacon-chain/node/registration/BUILD.bazel index 249bdc96a..2aa7a0c44 100644 --- a/beacon-chain/node/registration/BUILD.bazel +++ b/beacon-chain/node/registration/BUILD.bazel @@ -10,8 +10,8 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/beacon-chain/node/registration", visibility = ["//beacon-chain/node:__subpackages__"], deps = [ + "//cmd:go_default_library", "//cmd/beacon-chain/flags:go_default_library", - "//shared/cmd:go_default_library", "//shared/params:go_default_library", "@com_github_ethereum_go_ethereum//common:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", @@ -28,8 +28,8 @@ go_test( ], embed = [":go_default_library"], deps = [ + "//cmd:go_default_library", "//cmd/beacon-chain/flags:go_default_library", - "//shared/cmd:go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", diff --git a/beacon-chain/node/registration/p2p.go b/beacon-chain/node/registration/p2p.go index 285bc5e55..b56b5845f 100644 --- a/beacon-chain/node/registration/p2p.go +++ b/beacon-chain/node/registration/p2p.go @@ -4,7 +4,7 @@ import ( "io/ioutil" "path/filepath" - "github.com/prysmaticlabs/prysm/shared/cmd" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/urfave/cli/v2" "gopkg.in/yaml.v2" diff --git a/beacon-chain/node/registration/p2p_test.go b/beacon-chain/node/registration/p2p_test.go index 8dadb2ceb..2c246e749 100644 --- a/beacon-chain/node/registration/p2p_test.go +++ b/beacon-chain/node/registration/p2p_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "testing" - "github.com/prysmaticlabs/prysm/shared/cmd" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" diff --git a/beacon-chain/rpc/prysm/v1alpha1/beacon/BUILD.bazel b/beacon-chain/rpc/prysm/v1alpha1/beacon/BUILD.bazel index 17721f88c..ff3e106d3 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/beacon/BUILD.bazel +++ b/beacon-chain/rpc/prysm/v1alpha1/beacon/BUILD.bazel @@ -41,6 +41,7 @@ go_library( "//beacon-chain/state:go_default_library", "//beacon-chain/state/stategen:go_default_library", "//beacon-chain/sync:go_default_library", + "//cmd:go_default_library", "//config/features:go_default_library", "//container/slice:go_default_library", "//proto/prysm/v1alpha1:go_default_library", @@ -49,7 +50,6 @@ go_library( "//proto/prysm/v1alpha1/block:go_default_library", "//runtime/version:go_default_library", "//shared/bytesutil:go_default_library", - "//shared/cmd:go_default_library", "//shared/params:go_default_library", "//time/slots:go_default_library", "@com_github_patrickmn_go_cache//:go_default_library", @@ -97,6 +97,7 @@ go_test( "//beacon-chain/state/stategen:go_default_library", "//beacon-chain/state/v1:go_default_library", "//beacon-chain/sync/initial-sync/testing:go_default_library", + "//cmd:go_default_library", "//cmd/beacon-chain/flags:go_default_library", "//config/features:go_default_library", "//proto/prysm/v1alpha1:go_default_library", @@ -105,7 +106,6 @@ go_test( "//proto/prysm/v1alpha1/block:go_default_library", "//proto/prysm/v1alpha1/wrapper:go_default_library", "//shared/bytesutil:go_default_library", - "//shared/cmd:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "//shared/testutil/assert:go_default_library", diff --git a/beacon-chain/rpc/prysm/v1alpha1/beacon/assignments.go b/beacon-chain/rpc/prysm/v1alpha1/beacon/assignments.go index 496c3ddd5..c0850dc74 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/beacon/assignments.go +++ b/beacon-chain/rpc/prysm/v1alpha1/beacon/assignments.go @@ -8,9 +8,9 @@ import ( "github.com/prysmaticlabs/prysm/api/pagination" "github.com/prysmaticlabs/prysm/beacon-chain/core" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" + "github.com/prysmaticlabs/prysm/cmd" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/cmd" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/beacon-chain/rpc/prysm/v1alpha1/beacon/assignments_test.go b/beacon-chain/rpc/prysm/v1alpha1/beacon/assignments_test.go index 08471ab92..2c1eb12c5 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/beacon/assignments_test.go +++ b/beacon-chain/rpc/prysm/v1alpha1/beacon/assignments_test.go @@ -13,9 +13,9 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" "github.com/prysmaticlabs/prysm/beacon-chain/state/stategen" + "github.com/prysmaticlabs/prysm/cmd" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/prysmaticlabs/prysm/shared/testutil/assert" diff --git a/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations.go b/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations.go index 6debf624b..e641d48f9 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations.go +++ b/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations.go @@ -12,12 +12,12 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/operation" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" + "github.com/prysmaticlabs/prysm/cmd" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/attestation" attaggregation "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/attestation/aggregation/attestations" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/time/slots" "google.golang.org/grpc/codes" diff --git a/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations_test.go b/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations_test.go index a642452ef..d54af8afb 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations_test.go +++ b/beacon-chain/rpc/prysm/v1alpha1/beacon/attestations_test.go @@ -20,13 +20,13 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/operations/attestations" "github.com/prysmaticlabs/prysm/beacon-chain/state/stategen" v1 "github.com/prysmaticlabs/prysm/beacon-chain/state/v1" + "github.com/prysmaticlabs/prysm/cmd" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/attestation" attaggregation "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/attestation/aggregation/attestations" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/prysmaticlabs/prysm/shared/testutil/assert" diff --git a/beacon-chain/rpc/prysm/v1alpha1/beacon/blocks.go b/beacon-chain/rpc/prysm/v1alpha1/beacon/blocks.go index 03b9bbca5..079301fda 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/beacon/blocks.go +++ b/beacon-chain/rpc/prysm/v1alpha1/beacon/blocks.go @@ -13,11 +13,11 @@ import ( statefeed "github.com/prysmaticlabs/prysm/beacon-chain/core/feed/state" "github.com/prysmaticlabs/prysm/beacon-chain/core/helpers" "github.com/prysmaticlabs/prysm/beacon-chain/db/filters" + "github.com/prysmaticlabs/prysm/cmd" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/runtime/version" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/beacon-chain/rpc/prysm/v1alpha1/beacon/blocks_test.go b/beacon-chain/rpc/prysm/v1alpha1/beacon/blocks_test.go index 5f90f45f1..b01218706 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/beacon/blocks_test.go +++ b/beacon-chain/rpc/prysm/v1alpha1/beacon/blocks_test.go @@ -17,11 +17,11 @@ import ( dbTest "github.com/prysmaticlabs/prysm/beacon-chain/db/testing" "github.com/prysmaticlabs/prysm/beacon-chain/state/stategen" v1 "github.com/prysmaticlabs/prysm/beacon-chain/state/v1" + "github.com/prysmaticlabs/prysm/cmd" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/block" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/prysmaticlabs/prysm/shared/testutil/assert" diff --git a/beacon-chain/rpc/prysm/v1alpha1/beacon/validators.go b/beacon-chain/rpc/prysm/v1alpha1/beacon/validators.go index 8aaed7bd4..d7c904c60 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/beacon/validators.go +++ b/beacon-chain/rpc/prysm/v1alpha1/beacon/validators.go @@ -15,10 +15,10 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/core/transition" "github.com/prysmaticlabs/prysm/beacon-chain/core/validators" "github.com/prysmaticlabs/prysm/beacon-chain/state" + "github.com/prysmaticlabs/prysm/cmd" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/runtime/version" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/beacon-chain/rpc/prysm/v1alpha1/beacon/validators_test.go b/beacon-chain/rpc/prysm/v1alpha1/beacon/validators_test.go index 4924e5ca8..f537bcbdc 100644 --- a/beacon-chain/rpc/prysm/v1alpha1/beacon/validators_test.go +++ b/beacon-chain/rpc/prysm/v1alpha1/beacon/validators_test.go @@ -21,10 +21,10 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/state/stategen" v1 "github.com/prysmaticlabs/prysm/beacon-chain/state/v1" mockSync "github.com/prysmaticlabs/prysm/beacon-chain/sync/initial-sync/testing" + "github.com/prysmaticlabs/prysm/cmd" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/prysmaticlabs/prysm/shared/testutil/assert" diff --git a/beacon-chain/state/stateutil/BUILD.bazel b/beacon-chain/state/stateutil/BUILD.bazel index 59ddf9127..62fcf7875 100644 --- a/beacon-chain/state/stateutil/BUILD.bazel +++ b/beacon-chain/state/stateutil/BUILD.bazel @@ -55,8 +55,8 @@ go_test( "//crypto/hash:go_default_library", "//encoding/ssz:go_default_library", "//proto/prysm/v1alpha1:go_default_library", + "//runtime/interop:go_default_library", "//shared/bytesutil:go_default_library", - "//shared/interop:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "//shared/testutil/assert:go_default_library", diff --git a/beacon-chain/state/stateutil/state_root_test.go b/beacon-chain/state/stateutil/state_root_test.go index 801b3fa30..56d206d87 100644 --- a/beacon-chain/state/stateutil/state_root_test.go +++ b/beacon-chain/state/stateutil/state_root_test.go @@ -7,7 +7,7 @@ import ( "testing" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" - "github.com/prysmaticlabs/prysm/shared/interop" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" diff --git a/beacon-chain/state/v1/BUILD.bazel b/beacon-chain/state/v1/BUILD.bazel index ef978f281..09952d0bf 100644 --- a/beacon-chain/state/v1/BUILD.bazel +++ b/beacon-chain/state/v1/BUILD.bazel @@ -31,9 +31,9 @@ go_library( visibility = [ "//beacon-chain:__subpackages__", "//proto/testing:__subpackages__", + "//runtime/interop:__subpackages__", "//shared/aggregation:__subpackages__", "//shared/depositutil:__subpackages__", - "//shared/interop:__subpackages__", "//shared/testutil:__pkg__", "//slasher/rpc:__subpackages__", "//testing/benchmark:__pkg__", @@ -88,8 +88,8 @@ go_test( "//beacon-chain/state/stateutil:go_default_library", "//beacon-chain/state/types:go_default_library", "//proto/prysm/v1alpha1:go_default_library", + "//runtime/interop:go_default_library", "//shared/bytesutil:go_default_library", - "//shared/interop:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "//shared/testutil/assert:go_default_library", diff --git a/beacon-chain/state/v1/types_test.go b/beacon-chain/state/v1/types_test.go index 9ad7fb94b..b9b2362b0 100644 --- a/beacon-chain/state/v1/types_test.go +++ b/beacon-chain/state/v1/types_test.go @@ -8,8 +8,8 @@ import ( v1 "github.com/prysmaticlabs/prysm/beacon-chain/state/v1" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/interop" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" diff --git a/shared/cmd/BUILD.bazel b/cmd/BUILD.bazel similarity index 95% rename from shared/cmd/BUILD.bazel rename to cmd/BUILD.bazel index 7f401c2e6..c7ed70c37 100644 --- a/shared/cmd/BUILD.bazel +++ b/cmd/BUILD.bazel @@ -11,7 +11,7 @@ go_library( "password_reader_mock.go", "wrap_flags.go", ], - importpath = "github.com/prysmaticlabs/prysm/shared/cmd", + importpath = "github.com/prysmaticlabs/prysm/cmd", visibility = ["//visibility:public"], deps = [ "//io/file:go_default_library", diff --git a/cmd/beacon-chain/BUILD.bazel b/cmd/beacon-chain/BUILD.bazel index 59f3cd001..88adf03ed 100644 --- a/cmd/beacon-chain/BUILD.bazel +++ b/cmd/beacon-chain/BUILD.bazel @@ -16,6 +16,7 @@ go_library( visibility = ["//beacon-chain:__subpackages__"], deps = [ "//beacon-chain/node:go_default_library", + "//cmd:go_default_library", "//cmd/beacon-chain/db:go_default_library", "//cmd/beacon-chain/flags:go_default_library", "//config/features:go_default_library", @@ -26,7 +27,6 @@ go_library( "//runtime/maxprocs:go_default_library", "//runtime/tos:go_default_library", "//runtime/version:go_default_library", - "//shared/cmd:go_default_library", "@com_github_ethereum_go_ethereum//log:go_default_library", "@com_github_ipfs_go_log_v2//:go_default_library", "@com_github_joonix_log//:go_default_library", diff --git a/cmd/beacon-chain/db/BUILD.bazel b/cmd/beacon-chain/db/BUILD.bazel index b9b183cfb..9a093b088 100644 --- a/cmd/beacon-chain/db/BUILD.bazel +++ b/cmd/beacon-chain/db/BUILD.bazel @@ -7,8 +7,8 @@ go_library( visibility = ["//visibility:public"], deps = [ "//beacon-chain/db:go_default_library", + "//cmd:go_default_library", "//runtime/tos:go_default_library", - "//shared/cmd:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", ], diff --git a/cmd/beacon-chain/db/db.go b/cmd/beacon-chain/db/db.go index e999fb93a..50348cabf 100644 --- a/cmd/beacon-chain/db/db.go +++ b/cmd/beacon-chain/db/db.go @@ -2,8 +2,8 @@ package db import ( beacondb "github.com/prysmaticlabs/prysm/beacon-chain/db" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/runtime/tos" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" ) diff --git a/cmd/beacon-chain/flags/BUILD.bazel b/cmd/beacon-chain/flags/BUILD.bazel index a1a66dc0b..033e5d8fb 100644 --- a/cmd/beacon-chain/flags/BUILD.bazel +++ b/cmd/beacon-chain/flags/BUILD.bazel @@ -16,7 +16,7 @@ go_library( "//testing/endtoend:__subpackages__", ], deps = [ - "//shared/cmd:go_default_library", + "//cmd:go_default_library", "//shared/params:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", diff --git a/cmd/beacon-chain/flags/config.go b/cmd/beacon-chain/flags/config.go index 1f82b8eca..fd35ab416 100644 --- a/cmd/beacon-chain/flags/config.go +++ b/cmd/beacon-chain/flags/config.go @@ -1,7 +1,7 @@ package flags import ( - "github.com/prysmaticlabs/prysm/shared/cmd" + "github.com/prysmaticlabs/prysm/cmd" "github.com/urfave/cli/v2" ) diff --git a/cmd/beacon-chain/main.go b/cmd/beacon-chain/main.go index 37e93a2f0..010ecab8e 100644 --- a/cmd/beacon-chain/main.go +++ b/cmd/beacon-chain/main.go @@ -12,6 +12,7 @@ import ( golog "github.com/ipfs/go-log/v2" joonix "github.com/joonix/log" "github.com/prysmaticlabs/prysm/beacon-chain/node" + "github.com/prysmaticlabs/prysm/cmd" dbcommands "github.com/prysmaticlabs/prysm/cmd/beacon-chain/db" "github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags" "github.com/prysmaticlabs/prysm/config/features" @@ -22,7 +23,6 @@ import ( _ "github.com/prysmaticlabs/prysm/runtime/maxprocs" "github.com/prysmaticlabs/prysm/runtime/tos" "github.com/prysmaticlabs/prysm/runtime/version" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" prefixed "github.com/x-cray/logrus-prefixed-formatter" diff --git a/cmd/beacon-chain/usage.go b/cmd/beacon-chain/usage.go index a0a51678f..4e67b88b6 100644 --- a/cmd/beacon-chain/usage.go +++ b/cmd/beacon-chain/usage.go @@ -5,10 +5,10 @@ import ( "io" "sort" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags" "github.com/prysmaticlabs/prysm/config/features" "github.com/prysmaticlabs/prysm/runtime/debug" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/urfave/cli/v2" ) diff --git a/cmd/client-stats/BUILD.bazel b/cmd/client-stats/BUILD.bazel index 472e2b57b..98928c59b 100644 --- a/cmd/client-stats/BUILD.bazel +++ b/cmd/client-stats/BUILD.bazel @@ -11,12 +11,12 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/cmd/client-stats", visibility = ["//visibility:private"], deps = [ + "//cmd:go_default_library", "//cmd/client-stats/flags:go_default_library", "//io/logs:go_default_library", "//monitoring/clientstats:go_default_library", "//monitoring/journald:go_default_library", "//runtime/version:go_default_library", - "//shared/cmd:go_default_library", "@com_github_joonix_log//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", diff --git a/cmd/client-stats/main.go b/cmd/client-stats/main.go index a7cd1c908..20cd29cd6 100644 --- a/cmd/client-stats/main.go +++ b/cmd/client-stats/main.go @@ -7,12 +7,12 @@ import ( "time" joonix "github.com/joonix/log" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/client-stats/flags" "github.com/prysmaticlabs/prysm/io/logs" "github.com/prysmaticlabs/prysm/monitoring/clientstats" "github.com/prysmaticlabs/prysm/monitoring/journald" "github.com/prysmaticlabs/prysm/runtime/version" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" prefixed "github.com/x-cray/logrus-prefixed-formatter" diff --git a/cmd/client-stats/usage.go b/cmd/client-stats/usage.go index 521dd8dcf..650f606f4 100644 --- a/cmd/client-stats/usage.go +++ b/cmd/client-stats/usage.go @@ -5,8 +5,8 @@ import ( "io" "sort" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/client-stats/flags" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/urfave/cli/v2" ) diff --git a/shared/cmd/config.go b/cmd/config.go similarity index 100% rename from shared/cmd/config.go rename to cmd/config.go diff --git a/shared/cmd/config_test.go b/cmd/config_test.go similarity index 100% rename from shared/cmd/config_test.go rename to cmd/config_test.go diff --git a/shared/cmd/defaults.go b/cmd/defaults.go similarity index 100% rename from shared/cmd/defaults.go rename to cmd/defaults.go diff --git a/shared/cmd/flags.go b/cmd/flags.go similarity index 100% rename from shared/cmd/flags.go rename to cmd/flags.go diff --git a/shared/cmd/flags_test.go b/cmd/flags_test.go similarity index 100% rename from shared/cmd/flags_test.go rename to cmd/flags_test.go diff --git a/shared/cmd/helpers.go b/cmd/helpers.go similarity index 100% rename from shared/cmd/helpers.go rename to cmd/helpers.go diff --git a/shared/cmd/helpers_test.go b/cmd/helpers_test.go similarity index 100% rename from shared/cmd/helpers_test.go rename to cmd/helpers_test.go diff --git a/shared/cmd/password_reader.go b/cmd/password_reader.go similarity index 100% rename from shared/cmd/password_reader.go rename to cmd/password_reader.go diff --git a/shared/cmd/password_reader_mock.go b/cmd/password_reader_mock.go similarity index 94% rename from shared/cmd/password_reader_mock.go rename to cmd/password_reader_mock.go index 15cb2f933..4c9a9f406 100644 --- a/shared/cmd/password_reader_mock.go +++ b/cmd/password_reader_mock.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/connorwstein/prysm/shared/cmd (interfaces: PasswordReader) +// Source: github.com/connorwstein/prysm/cmd (interfaces: PasswordReader) // Package mock_cmd is a generated GoMock package. package cmd diff --git a/cmd/validator/BUILD.bazel b/cmd/validator/BUILD.bazel index 979b1a733..5a5bdb5f1 100644 --- a/cmd/validator/BUILD.bazel +++ b/cmd/validator/BUILD.bazel @@ -15,6 +15,7 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/cmd/validator", visibility = ["//validator:__subpackages__"], deps = [ + "//cmd:go_default_library", "//cmd/validator/accounts:go_default_library", "//cmd/validator/db:go_default_library", "//cmd/validator/flags:go_default_library", @@ -28,7 +29,6 @@ go_library( "//runtime/maxprocs:go_default_library", "//runtime/tos:go_default_library", "//runtime/version:go_default_library", - "//shared/cmd:go_default_library", "//validator/node:go_default_library", "@com_github_joonix_log//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", diff --git a/cmd/validator/accounts/BUILD.bazel b/cmd/validator/accounts/BUILD.bazel index d22713bfc..206fa09c6 100644 --- a/cmd/validator/accounts/BUILD.bazel +++ b/cmd/validator/accounts/BUILD.bazel @@ -6,10 +6,10 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/cmd/validator/accounts", visibility = ["//visibility:public"], deps = [ + "//cmd:go_default_library", "//cmd/validator/flags:go_default_library", "//config/features:go_default_library", "//runtime/tos:go_default_library", - "//shared/cmd:go_default_library", "//validator/accounts:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", diff --git a/cmd/validator/accounts/accounts.go b/cmd/validator/accounts/accounts.go index 1356ef54d..3323420fe 100644 --- a/cmd/validator/accounts/accounts.go +++ b/cmd/validator/accounts/accounts.go @@ -3,10 +3,10 @@ package accounts import ( "os" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/config/features" "github.com/prysmaticlabs/prysm/runtime/tos" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/validator/accounts" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" diff --git a/cmd/validator/db/BUILD.bazel b/cmd/validator/db/BUILD.bazel index 422df44cc..6076f02d8 100644 --- a/cmd/validator/db/BUILD.bazel +++ b/cmd/validator/db/BUILD.bazel @@ -6,8 +6,8 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/cmd/validator/db", visibility = ["//visibility:public"], deps = [ + "//cmd:go_default_library", "//runtime/tos:go_default_library", - "//shared/cmd:go_default_library", "//validator/db:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", diff --git a/cmd/validator/db/db.go b/cmd/validator/db/db.go index 0de940cb7..7bfad0a51 100644 --- a/cmd/validator/db/db.go +++ b/cmd/validator/db/db.go @@ -1,8 +1,8 @@ package db import ( + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/runtime/tos" - "github.com/prysmaticlabs/prysm/shared/cmd" validatordb "github.com/prysmaticlabs/prysm/validator/db" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" diff --git a/cmd/validator/main.go b/cmd/validator/main.go index 35649fff8..3882d594b 100644 --- a/cmd/validator/main.go +++ b/cmd/validator/main.go @@ -11,6 +11,7 @@ import ( runtimeDebug "runtime/debug" joonix "github.com/joonix/log" + "github.com/prysmaticlabs/prysm/cmd" accountcommands "github.com/prysmaticlabs/prysm/cmd/validator/accounts" dbcommands "github.com/prysmaticlabs/prysm/cmd/validator/db" "github.com/prysmaticlabs/prysm/cmd/validator/flags" @@ -24,7 +25,6 @@ import ( _ "github.com/prysmaticlabs/prysm/runtime/maxprocs" "github.com/prysmaticlabs/prysm/runtime/tos" "github.com/prysmaticlabs/prysm/runtime/version" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/validator/node" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" diff --git a/cmd/validator/slashing-protection/BUILD.bazel b/cmd/validator/slashing-protection/BUILD.bazel index 90567db15..47d9bbd4a 100644 --- a/cmd/validator/slashing-protection/BUILD.bazel +++ b/cmd/validator/slashing-protection/BUILD.bazel @@ -6,10 +6,10 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/cmd/validator/slashing-protection", visibility = ["//visibility:public"], deps = [ + "//cmd:go_default_library", "//cmd/validator/flags:go_default_library", "//config/features:go_default_library", "//runtime/tos:go_default_library", - "//shared/cmd:go_default_library", "//validator/slashing-protection:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", diff --git a/cmd/validator/slashing-protection/slashing-protection.go b/cmd/validator/slashing-protection/slashing-protection.go index d33e2d385..7e5e0a1ec 100644 --- a/cmd/validator/slashing-protection/slashing-protection.go +++ b/cmd/validator/slashing-protection/slashing-protection.go @@ -1,10 +1,10 @@ package slashing_protection import ( + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/config/features" "github.com/prysmaticlabs/prysm/runtime/tos" - "github.com/prysmaticlabs/prysm/shared/cmd" slashingprotection "github.com/prysmaticlabs/prysm/validator/slashing-protection" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" diff --git a/cmd/validator/usage.go b/cmd/validator/usage.go index ddb52cecb..0deefeba2 100644 --- a/cmd/validator/usage.go +++ b/cmd/validator/usage.go @@ -5,10 +5,10 @@ import ( "io" "sort" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/config/features" "github.com/prysmaticlabs/prysm/runtime/debug" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/urfave/cli/v2" ) diff --git a/cmd/validator/wallet/BUILD.bazel b/cmd/validator/wallet/BUILD.bazel index c419645ef..375c17b74 100644 --- a/cmd/validator/wallet/BUILD.bazel +++ b/cmd/validator/wallet/BUILD.bazel @@ -6,10 +6,10 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/cmd/validator/wallet", visibility = ["//visibility:public"], deps = [ + "//cmd:go_default_library", "//cmd/validator/flags:go_default_library", "//config/features:go_default_library", "//runtime/tos:go_default_library", - "//shared/cmd:go_default_library", "//validator/accounts:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", diff --git a/cmd/validator/wallet/wallet.go b/cmd/validator/wallet/wallet.go index 2b1213345..7fdad647f 100644 --- a/cmd/validator/wallet/wallet.go +++ b/cmd/validator/wallet/wallet.go @@ -1,10 +1,10 @@ package wallet import ( + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/config/features" "github.com/prysmaticlabs/prysm/runtime/tos" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/validator/accounts" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" diff --git a/shared/cmd/wrap_flags.go b/cmd/wrap_flags.go similarity index 100% rename from shared/cmd/wrap_flags.go rename to cmd/wrap_flags.go diff --git a/contracts/deposit-contract/BUILD.bazel b/contracts/deposit-contract/BUILD.bazel index c69e8e092..9c3068e9d 100644 --- a/contracts/deposit-contract/BUILD.bazel +++ b/contracts/deposit-contract/BUILD.bazel @@ -33,7 +33,7 @@ go_test( deps = [ ":go_default_library", "//container/trie:go_default_library", - "//shared/interop:go_default_library", + "//runtime/interop:go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", diff --git a/contracts/deposit-contract/depositContract_test.go b/contracts/deposit-contract/depositContract_test.go index 64e022f34..44dc3034d 100644 --- a/contracts/deposit-contract/depositContract_test.go +++ b/contracts/deposit-contract/depositContract_test.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" depositcontract "github.com/prysmaticlabs/prysm/contracts/deposit-contract" - "github.com/prysmaticlabs/prysm/shared/interop" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" ) diff --git a/contracts/deposit-contract/deposit_tree_test.go b/contracts/deposit-contract/deposit_tree_test.go index f1a388577..9ec89cf4b 100644 --- a/contracts/deposit-contract/deposit_tree_test.go +++ b/contracts/deposit-contract/deposit_tree_test.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/prysmaticlabs/prysm/container/trie" depositcontract "github.com/prysmaticlabs/prysm/contracts/deposit-contract" - "github.com/prysmaticlabs/prysm/shared/interop" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" diff --git a/shared/slashutil/BUILD.bazel b/proto/prysm/v1alpha1/slashings/BUILD.bazel similarity index 89% rename from shared/slashutil/BUILD.bazel rename to proto/prysm/v1alpha1/slashings/BUILD.bazel index 6f78d485d..57edb4bc3 100644 --- a/shared/slashutil/BUILD.bazel +++ b/proto/prysm/v1alpha1/slashings/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "double_votes.go", "surround_votes.go", ], - importpath = "github.com/prysmaticlabs/prysm/shared/slashutil", + importpath = "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/slashings", visibility = ["//visibility:public"], deps = [ "//proto/prysm/v1alpha1:go_default_library", diff --git a/shared/slashutil/double_votes.go b/proto/prysm/v1alpha1/slashings/double_votes.go similarity index 97% rename from shared/slashutil/double_votes.go rename to proto/prysm/v1alpha1/slashings/double_votes.go index 209b3f4c7..ce7deb4c9 100644 --- a/shared/slashutil/double_votes.go +++ b/proto/prysm/v1alpha1/slashings/double_votes.go @@ -1,4 +1,4 @@ -package slashutil +package slashings import "github.com/prysmaticlabs/prysm/shared/params" diff --git a/shared/slashutil/double_votes_test.go b/proto/prysm/v1alpha1/slashings/double_votes_test.go similarity index 98% rename from shared/slashutil/double_votes_test.go rename to proto/prysm/v1alpha1/slashings/double_votes_test.go index 03783ef86..6e321b37d 100644 --- a/shared/slashutil/double_votes_test.go +++ b/proto/prysm/v1alpha1/slashings/double_votes_test.go @@ -1,4 +1,4 @@ -package slashutil +package slashings import ( "testing" diff --git a/shared/slashutil/surround_votes.go b/proto/prysm/v1alpha1/slashings/surround_votes.go similarity index 96% rename from shared/slashutil/surround_votes.go rename to proto/prysm/v1alpha1/slashings/surround_votes.go index a33c1c855..f01774b39 100644 --- a/shared/slashutil/surround_votes.go +++ b/proto/prysm/v1alpha1/slashings/surround_votes.go @@ -1,4 +1,4 @@ -package slashutil +package slashings import ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" diff --git a/shared/slashutil/surround_votes_test.go b/proto/prysm/v1alpha1/slashings/surround_votes_test.go similarity index 99% rename from shared/slashutil/surround_votes_test.go rename to proto/prysm/v1alpha1/slashings/surround_votes_test.go index 3128bdeee..d73c62fc0 100644 --- a/shared/slashutil/surround_votes_test.go +++ b/proto/prysm/v1alpha1/slashings/surround_votes_test.go @@ -1,4 +1,4 @@ -package slashutil +package slashings import ( "testing" diff --git a/shared/interop/BUILD.bazel b/runtime/interop/BUILD.bazel similarity index 95% rename from shared/interop/BUILD.bazel rename to runtime/interop/BUILD.bazel index 80cadcbfd..3918548e9 100644 --- a/shared/interop/BUILD.bazel +++ b/runtime/interop/BUILD.bazel @@ -6,7 +6,7 @@ go_library( "generate_genesis_state.go", "generate_keys.go", ], - importpath = "github.com/prysmaticlabs/prysm/shared/interop", + importpath = "github.com/prysmaticlabs/prysm/runtime/interop", visibility = ["//visibility:public"], deps = [ "//async:go_default_library", diff --git a/shared/interop/generate_genesis_state.go b/runtime/interop/generate_genesis_state.go similarity index 100% rename from shared/interop/generate_genesis_state.go rename to runtime/interop/generate_genesis_state.go diff --git a/shared/interop/generate_genesis_state_test.go b/runtime/interop/generate_genesis_state_test.go similarity index 85% rename from shared/interop/generate_genesis_state_test.go rename to runtime/interop/generate_genesis_state_test.go index 6d69ab819..b4e1008df 100644 --- a/shared/interop/generate_genesis_state_test.go +++ b/runtime/interop/generate_genesis_state_test.go @@ -7,7 +7,7 @@ import ( "github.com/prysmaticlabs/prysm/beacon-chain/core/transition" "github.com/prysmaticlabs/prysm/container/trie" eth "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" - "github.com/prysmaticlabs/prysm/shared/interop" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" @@ -19,11 +19,11 @@ func TestGenerateGenesisState(t *testing.T) { require.NoError(t, err) depositDataItems, depositDataRoots, err := interop.DepositDataFromKeys(privKeys, pubKeys) require.NoError(t, err) - trie, err := trie.GenerateTrieFromItems(depositDataRoots, params.BeaconConfig().DepositContractTreeDepth) + tr, err := trie.GenerateTrieFromItems(depositDataRoots, params.BeaconConfig().DepositContractTreeDepth) require.NoError(t, err) - deposits, err := interop.GenerateDepositsFromData(depositDataItems, trie) + deposits, err := interop.GenerateDepositsFromData(depositDataItems, tr) require.NoError(t, err) - root := trie.HashTreeRoot() + root := tr.HashTreeRoot() genesisState, err := transition.GenesisBeaconState(context.Background(), deposits, 0, ð.Eth1Data{ DepositRoot: root[:], DepositCount: uint64(len(deposits)), diff --git a/shared/interop/generate_keys.go b/runtime/interop/generate_keys.go similarity index 100% rename from shared/interop/generate_keys.go rename to runtime/interop/generate_keys.go diff --git a/shared/interop/generate_keys_test.go b/runtime/interop/generate_keys_test.go similarity index 95% rename from shared/interop/generate_keys_test.go rename to runtime/interop/generate_keys_test.go index d453f7e35..40007ec22 100644 --- a/shared/interop/generate_keys_test.go +++ b/runtime/interop/generate_keys_test.go @@ -7,7 +7,7 @@ import ( "github.com/bazelbuild/rules_go/go/tools/bazel" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/go-yaml/yaml" - "github.com/prysmaticlabs/prysm/shared/interop" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" ) diff --git a/shared/interop/keygen_test_vector.yaml b/runtime/interop/keygen_test_vector.yaml similarity index 100% rename from shared/interop/keygen_test_vector.yaml rename to runtime/interop/keygen_test_vector.yaml diff --git a/runtime/tos/BUILD.bazel b/runtime/tos/BUILD.bazel index cb605e835..5854af73c 100644 --- a/runtime/tos/BUILD.bazel +++ b/runtime/tos/BUILD.bazel @@ -6,9 +6,9 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/runtime/tos", visibility = ["//visibility:public"], deps = [ + "//cmd:go_default_library", "//io/file:go_default_library", "//io/prompt:go_default_library", - "//shared/cmd:go_default_library", "@com_github_logrusorgru_aurora//:go_default_library", "@com_github_sirupsen_logrus//:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", @@ -21,7 +21,7 @@ go_test( srcs = ["tos_test.go"], embed = [":go_default_library"], deps = [ - "//shared/cmd:go_default_library", + "//cmd:go_default_library", "//shared/testutil/require:go_default_library", "@com_github_urfave_cli_v2//:go_default_library", ], diff --git a/runtime/tos/tos.go b/runtime/tos/tos.go index ca74d87fd..adcad5d2f 100644 --- a/runtime/tos/tos.go +++ b/runtime/tos/tos.go @@ -6,9 +6,9 @@ import ( "strings" "github.com/logrusorgru/aurora" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/io/file" "github.com/prysmaticlabs/prysm/io/prompt" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/sirupsen/logrus" "github.com/urfave/cli/v2" ) diff --git a/runtime/tos/tos_test.go b/runtime/tos/tos_test.go index 755447ddb..c65aa7614 100644 --- a/runtime/tos/tos_test.go +++ b/runtime/tos/tos_test.go @@ -7,7 +7,7 @@ import ( "path/filepath" "testing" - "github.com/prysmaticlabs/prysm/shared/cmd" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/shared/testutil/require" "github.com/urfave/cli/v2" ) diff --git a/shared/testutil/BUILD.bazel b/shared/testutil/BUILD.bazel index 5b02fa2df..36fffe519 100644 --- a/shared/testutil/BUILD.bazel +++ b/shared/testutil/BUILD.bazel @@ -34,9 +34,9 @@ go_library( "//proto/eth/v1:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/wrapper:go_default_library", + "//runtime/interop:go_default_library", "//runtime/version:go_default_library", "//shared/bytesutil:go_default_library", - "//shared/interop:go_default_library", "//shared/params:go_default_library", "@com_github_ethereum_go_ethereum//common/hexutil:go_default_library", "@com_github_pkg_errors//:go_default_library", diff --git a/shared/testutil/deposits.go b/shared/testutil/deposits.go index ff4311946..bb6efb421 100644 --- a/shared/testutil/deposits.go +++ b/shared/testutil/deposits.go @@ -13,8 +13,8 @@ import ( "github.com/prysmaticlabs/prysm/crypto/bls" "github.com/prysmaticlabs/prysm/crypto/hash" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/interop" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/testing/endtoend/components/BUILD.bazel b/testing/endtoend/components/BUILD.bazel index c8bb567bd..af7588971 100644 --- a/testing/endtoend/components/BUILD.bazel +++ b/testing/endtoend/components/BUILD.bazel @@ -14,12 +14,12 @@ go_library( importpath = "github.com/prysmaticlabs/prysm/testing/endtoend/components", visibility = ["//testing/endtoend:__subpackages__"], deps = [ + "//cmd:go_default_library", "//cmd/beacon-chain/flags:go_default_library", "//cmd/validator/flags:go_default_library", "//config/features:go_default_library", "//contracts/deposit-contract:go_default_library", "//shared/bytesutil:go_default_library", - "//shared/cmd:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "//testing/endtoend/helpers:go_default_library", diff --git a/testing/endtoend/components/beacon_node.go b/testing/endtoend/components/beacon_node.go index 6fee81634..ce3048626 100644 --- a/testing/endtoend/components/beacon_node.go +++ b/testing/endtoend/components/beacon_node.go @@ -12,9 +12,9 @@ import ( "strings" "github.com/bazelbuild/rules_go/go/tools/bazel" + cmdshared "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/beacon-chain/flags" "github.com/prysmaticlabs/prysm/config/features" - cmdshared "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/testing/endtoend/helpers" e2e "github.com/prysmaticlabs/prysm/testing/endtoend/params" diff --git a/testing/endtoend/components/validator.go b/testing/endtoend/components/validator.go index cae222be6..a4284c8c0 100644 --- a/testing/endtoend/components/validator.go +++ b/testing/endtoend/components/validator.go @@ -17,11 +17,11 @@ import ( "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/rpc" "github.com/pkg/errors" + cmdshared "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/config/features" contracts "github.com/prysmaticlabs/prysm/contracts/deposit-contract" "github.com/prysmaticlabs/prysm/shared/bytesutil" - cmdshared "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/prysmaticlabs/prysm/testing/endtoend/helpers" diff --git a/tools/benchmark-files-gen/BUILD.bazel b/tools/benchmark-files-gen/BUILD.bazel index 717f35679..40cae28ef 100644 --- a/tools/benchmark-files-gen/BUILD.bazel +++ b/tools/benchmark-files-gen/BUILD.bazel @@ -16,7 +16,7 @@ go_library( "//io/file:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/wrapper:go_default_library", - "//shared/interop:go_default_library", + "//runtime/interop:go_default_library", "//shared/params:go_default_library", "//shared/testutil:go_default_library", "//testing/benchmark:go_default_library", diff --git a/tools/benchmark-files-gen/main.go b/tools/benchmark-files-gen/main.go index 7357e7b1a..9a5a46a9e 100644 --- a/tools/benchmark-files-gen/main.go +++ b/tools/benchmark-files-gen/main.go @@ -18,7 +18,7 @@ import ( "github.com/prysmaticlabs/prysm/io/file" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/wrapper" - "github.com/prysmaticlabs/prysm/shared/interop" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil" "github.com/prysmaticlabs/prysm/testing/benchmark" diff --git a/tools/genesis-state-gen/BUILD.bazel b/tools/genesis-state-gen/BUILD.bazel index 0b328b80b..d60960072 100644 --- a/tools/genesis-state-gen/BUILD.bazel +++ b/tools/genesis-state-gen/BUILD.bazel @@ -12,7 +12,7 @@ go_library( deps = [ "//io/file:go_default_library", "//proto/prysm/v1alpha1:go_default_library", - "//shared/interop:go_default_library", + "//runtime/interop:go_default_library", "//shared/params:go_default_library", "@com_github_ghodss_yaml//:go_default_library", ], @@ -57,7 +57,7 @@ go_test( embed = [":go_default_library"], deps = [ "//crypto/bls:go_default_library", - "//shared/interop:go_default_library", + "//runtime/interop:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", ], diff --git a/tools/genesis-state-gen/main.go b/tools/genesis-state-gen/main.go index 914a349a0..e4bf054d8 100644 --- a/tools/genesis-state-gen/main.go +++ b/tools/genesis-state-gen/main.go @@ -14,7 +14,7 @@ import ( "github.com/ghodss/yaml" "github.com/prysmaticlabs/prysm/io/file" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" - "github.com/prysmaticlabs/prysm/shared/interop" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/params" ) diff --git a/tools/genesis-state-gen/main_test.go b/tools/genesis-state-gen/main_test.go index 629ad41df..82b93446a 100644 --- a/tools/genesis-state-gen/main_test.go +++ b/tools/genesis-state-gen/main_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/prysmaticlabs/prysm/crypto/bls" - "github.com/prysmaticlabs/prysm/shared/interop" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" ) diff --git a/tools/unencrypted-keys-gen/BUILD.bazel b/tools/unencrypted-keys-gen/BUILD.bazel index 54d99860b..fde943781 100644 --- a/tools/unencrypted-keys-gen/BUILD.bazel +++ b/tools/unencrypted-keys-gen/BUILD.bazel @@ -10,7 +10,7 @@ go_library( ], deps = [ "//crypto/bls:go_default_library", - "//shared/interop:go_default_library", + "//runtime/interop:go_default_library", "//tools/unencrypted-keys-gen/keygen:go_default_library", ], ) diff --git a/tools/unencrypted-keys-gen/main.go b/tools/unencrypted-keys-gen/main.go index 42358bc5b..65c901e8f 100644 --- a/tools/unencrypted-keys-gen/main.go +++ b/tools/unencrypted-keys-gen/main.go @@ -6,7 +6,7 @@ import ( "os" "github.com/prysmaticlabs/prysm/crypto/bls" - "github.com/prysmaticlabs/prysm/shared/interop" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/tools/unencrypted-keys-gen/keygen" ) diff --git a/validator/accounts/BUILD.bazel b/validator/accounts/BUILD.bazel index 1775d039c..89af03994 100644 --- a/validator/accounts/BUILD.bazel +++ b/validator/accounts/BUILD.bazel @@ -25,16 +25,16 @@ go_library( deps = [ "//api/grpc:go_default_library", "//beacon-chain/core/blocks:go_default_library", + "//cmd:go_default_library", "//cmd/validator/flags:go_default_library", "//crypto/bls:go_default_library", "//io/file:go_default_library", "//io/prompt:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", - "//shared/cmd:go_default_library", "//shared/params:go_default_library", - "//shared/petnames:go_default_library", "//validator/accounts/iface:go_default_library", + "//validator/accounts/petnames:go_default_library", "//validator/accounts/userprompt:go_default_library", "//validator/accounts/wallet:go_default_library", "//validator/client:go_default_library", @@ -78,12 +78,12 @@ go_test( "//proto/prysm/v1alpha1/validator-client:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", - "//shared/petnames:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", "//testing/mock:go_default_library", "//time:go_default_library", "//validator/accounts/iface:go_default_library", + "//validator/accounts/petnames:go_default_library", "//validator/accounts/wallet:go_default_library", "//validator/keymanager:go_default_library", "//validator/keymanager/derived:go_default_library", diff --git a/validator/accounts/accounts_backup.go b/validator/accounts/accounts_backup.go index 0a365a687..8c4bee93e 100644 --- a/validator/accounts/accounts_backup.go +++ b/validator/accounts/accounts_backup.go @@ -17,8 +17,8 @@ import ( "github.com/prysmaticlabs/prysm/io/file" "github.com/prysmaticlabs/prysm/io/prompt" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/petnames" "github.com/prysmaticlabs/prysm/validator/accounts/iface" + "github.com/prysmaticlabs/prysm/validator/accounts/petnames" "github.com/prysmaticlabs/prysm/validator/accounts/userprompt" "github.com/prysmaticlabs/prysm/validator/accounts/wallet" "github.com/prysmaticlabs/prysm/validator/keymanager" diff --git a/validator/accounts/accounts_exit.go b/validator/accounts/accounts_exit.go index 3fd062a57..52aaadc39 100644 --- a/validator/accounts/accounts_exit.go +++ b/validator/accounts/accounts_exit.go @@ -11,11 +11,11 @@ import ( "github.com/pkg/errors" grpcutil "github.com/prysmaticlabs/prysm/api/grpc" "github.com/prysmaticlabs/prysm/beacon-chain/core/blocks" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/io/prompt" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/validator/accounts/iface" "github.com/prysmaticlabs/prysm/validator/accounts/userprompt" diff --git a/validator/accounts/accounts_list.go b/validator/accounts/accounts_list.go index 3a429f5a4..e44e3a763 100644 --- a/validator/accounts/accounts_list.go +++ b/validator/accounts/accounts_list.go @@ -11,8 +11,8 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/cmd/validator/flags" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" - "github.com/prysmaticlabs/prysm/shared/petnames" "github.com/prysmaticlabs/prysm/validator/accounts/iface" + "github.com/prysmaticlabs/prysm/validator/accounts/petnames" "github.com/prysmaticlabs/prysm/validator/accounts/wallet" "github.com/prysmaticlabs/prysm/validator/keymanager" "github.com/prysmaticlabs/prysm/validator/keymanager/derived" diff --git a/validator/accounts/accounts_list_test.go b/validator/accounts/accounts_list_test.go index 2e7e5d241..bdbbdd3c0 100644 --- a/validator/accounts/accounts_list_test.go +++ b/validator/accounts/accounts_list_test.go @@ -18,10 +18,10 @@ import ( ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" validatorpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/validator-client" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/petnames" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" "github.com/prysmaticlabs/prysm/testing/mock" + "github.com/prysmaticlabs/prysm/validator/accounts/petnames" "github.com/prysmaticlabs/prysm/validator/accounts/wallet" "github.com/prysmaticlabs/prysm/validator/keymanager" "github.com/prysmaticlabs/prysm/validator/keymanager/derived" diff --git a/shared/petnames/BUILD.bazel b/validator/accounts/petnames/BUILD.bazel similarity index 63% rename from shared/petnames/BUILD.bazel rename to validator/accounts/petnames/BUILD.bazel index 10614ac81..5ee362134 100644 --- a/shared/petnames/BUILD.bazel +++ b/validator/accounts/petnames/BUILD.bazel @@ -3,8 +3,8 @@ load("@prysm//tools/go:def.bzl", "go_library") go_library( name = "go_default_library", srcs = ["names.go"], - importpath = "github.com/prysmaticlabs/prysm/shared/petnames", - visibility = ["//visibility:public"], + importpath = "github.com/prysmaticlabs/prysm/validator/accounts/petnames", + visibility = ["//validator:__subpackages__"], deps = [ "//crypto/hash:go_default_library", "//crypto/rand:go_default_library", diff --git a/shared/petnames/names.go b/validator/accounts/petnames/names.go similarity index 100% rename from shared/petnames/names.go rename to validator/accounts/petnames/names.go diff --git a/validator/client/BUILD.bazel b/validator/client/BUILD.bazel index 9c78f221c..a3fe0668a 100644 --- a/validator/client/BUILD.bazel +++ b/validator/client/BUILD.bazel @@ -36,12 +36,12 @@ go_library( "//monitoring/tracing:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/block:go_default_library", + "//proto/prysm/v1alpha1/slashings:go_default_library", "//proto/prysm/v1alpha1/validator-client:go_default_library", "//proto/prysm/v1alpha1/wrapper:go_default_library", "//runtime/version:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", - "//shared/slashutil:go_default_library", "//time:go_default_library", "//time/slots:go_default_library", "//validator/accounts/iface:go_default_library", diff --git a/validator/client/attest_protect.go b/validator/client/attest_protect.go index 4d982fe37..2bb148571 100644 --- a/validator/client/attest_protect.go +++ b/validator/client/attest_protect.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/config/features" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" - "github.com/prysmaticlabs/prysm/shared/slashutil" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/slashings" "github.com/prysmaticlabs/prysm/validator/db/kv" "go.opencensus.io/trace" ) @@ -45,7 +45,7 @@ func (v *validator) slashableAttestationCheck( if err != nil { return err } - signingRootsDiffer := slashutil.SigningRootsDiffer(existingSigningRoot, signingRoot) + signingRootsDiffer := slashings.SigningRootsDiffer(existingSigningRoot, signingRoot) // Based on EIP3076, validator should refuse to sign any attestation with target epoch less // than or equal to the minimum target epoch present in that signer’s attestations. diff --git a/validator/db/BUILD.bazel b/validator/db/BUILD.bazel index 87b5a04b1..b7778e8d3 100644 --- a/validator/db/BUILD.bazel +++ b/validator/db/BUILD.bazel @@ -14,9 +14,9 @@ go_library( "//validator:__subpackages__", ], deps = [ + "//cmd:go_default_library", "//io/file:go_default_library", "//io/prompt:go_default_library", - "//shared/cmd:go_default_library", "//validator/db/iface:go_default_library", "//validator/db/kv:go_default_library", "@com_github_pkg_errors//:go_default_library", @@ -33,7 +33,7 @@ go_test( ], embed = [":go_default_library"], deps = [ - "//shared/cmd:go_default_library", + "//cmd:go_default_library", "//shared/params:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", diff --git a/validator/db/kv/BUILD.bazel b/validator/db/kv/BUILD.bazel index 4ee5765e8..a31e5542f 100644 --- a/validator/db/kv/BUILD.bazel +++ b/validator/db/kv/BUILD.bazel @@ -29,9 +29,9 @@ go_library( "//monitoring/progress:go_default_library", "//monitoring/tracing:go_default_library", "//proto/prysm/v1alpha1:go_default_library", + "//proto/prysm/v1alpha1/slashings:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", - "//shared/slashutil:go_default_library", "@com_github_pkg_errors//:go_default_library", "@com_github_prometheus_client_golang//prometheus:go_default_library", "@com_github_prysmaticlabs_eth2_types//:go_default_library", diff --git a/validator/db/kv/attester_protection.go b/validator/db/kv/attester_protection.go index 478f2c143..b9ace41ca 100644 --- a/validator/db/kv/attester_protection.go +++ b/validator/db/kv/attester_protection.go @@ -10,8 +10,8 @@ import ( types "github.com/prysmaticlabs/eth2-types" "github.com/prysmaticlabs/prysm/monitoring/tracing" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/slashings" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/slashutil" bolt "go.etcd.io/bbolt" "go.opencensus.io/trace" ) @@ -156,7 +156,7 @@ func (s *Store) CheckSlashableAttestation( if existingSigningRoot != nil { var existing [32]byte copy(existing[:], existingSigningRoot) - if slashutil.SigningRootsDiffer(existing, signingRoot) { + if slashings.SigningRootsDiffer(existing, signingRoot) { slashKind = DoubleVote return fmt.Errorf(doubleVoteMessage, att.Data.Target.Epoch, existingSigningRoot) } @@ -216,7 +216,7 @@ func (s *Store) checkSurroundedVote( Target: ðpb.Checkpoint{Epoch: existingTargetEpoch}, }, } - surrounded := slashutil.IsSurround(existingAtt, att) + surrounded := slashings.IsSurround(existingAtt, att) if surrounded { return SurroundedVote, fmt.Errorf( surroundedVoteMessage, @@ -256,7 +256,7 @@ func (s *Store) checkSurroundingVote( Target: ðpb.Checkpoint{Epoch: existingTargetEpoch}, }, } - surrounding := slashutil.IsSurround(att, existingAtt) + surrounding := slashings.IsSurround(att, existingAtt) if surrounding { return SurroundingVote, fmt.Errorf( surroundingVoteMessage, diff --git a/validator/db/migrate.go b/validator/db/migrate.go index ee29de65f..aabcc0e2d 100644 --- a/validator/db/migrate.go +++ b/validator/db/migrate.go @@ -5,8 +5,8 @@ import ( "path" "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/io/file" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/validator/db/kv" "github.com/urfave/cli/v2" ) diff --git a/validator/db/migrate_test.go b/validator/db/migrate_test.go index 6484a1f98..4e9171fda 100644 --- a/validator/db/migrate_test.go +++ b/validator/db/migrate_test.go @@ -4,7 +4,7 @@ import ( "flag" "testing" - "github.com/prysmaticlabs/prysm/shared/cmd" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" dbtest "github.com/prysmaticlabs/prysm/validator/db/testing" diff --git a/validator/db/restore.go b/validator/db/restore.go index f300f23da..f3f083313 100644 --- a/validator/db/restore.go +++ b/validator/db/restore.go @@ -6,9 +6,9 @@ import ( "strings" "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/io/file" "github.com/prysmaticlabs/prysm/io/prompt" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/validator/db/kv" "github.com/urfave/cli/v2" ) diff --git a/validator/db/restore_test.go b/validator/db/restore_test.go index cf6e65b18..3716fca5a 100644 --- a/validator/db/restore_test.go +++ b/validator/db/restore_test.go @@ -8,7 +8,7 @@ import ( "path" "testing" - "github.com/prysmaticlabs/prysm/shared/cmd" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/shared/params" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" diff --git a/validator/keymanager/imported/BUILD.bazel b/validator/keymanager/imported/BUILD.bazel index 4c0caccc8..28e8645d5 100644 --- a/validator/keymanager/imported/BUILD.bazel +++ b/validator/keymanager/imported/BUILD.bazel @@ -24,10 +24,10 @@ go_library( "//io/file:go_default_library", "//io/prompt:go_default_library", "//proto/prysm/v1alpha1/validator-client:go_default_library", + "//runtime/interop:go_default_library", "//shared/bytesutil:go_default_library", - "//shared/interop:go_default_library", - "//shared/petnames:go_default_library", "//validator/accounts/iface:go_default_library", + "//validator/accounts/petnames:go_default_library", "//validator/keymanager:go_default_library", "@com_github_fsnotify_fsnotify//:go_default_library", "@com_github_google_uuid//:go_default_library", diff --git a/validator/keymanager/imported/keymanager.go b/validator/keymanager/imported/keymanager.go index 5764a6596..fa3b74aca 100644 --- a/validator/keymanager/imported/keymanager.go +++ b/validator/keymanager/imported/keymanager.go @@ -13,10 +13,10 @@ import ( "github.com/prysmaticlabs/prysm/async/event" "github.com/prysmaticlabs/prysm/crypto/bls" validatorpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/validator-client" + "github.com/prysmaticlabs/prysm/runtime/interop" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/interop" - "github.com/prysmaticlabs/prysm/shared/petnames" "github.com/prysmaticlabs/prysm/validator/accounts/iface" + "github.com/prysmaticlabs/prysm/validator/accounts/petnames" "github.com/sirupsen/logrus" keystorev4 "github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4" "go.opencensus.io/trace" diff --git a/validator/node/BUILD.bazel b/validator/node/BUILD.bazel index aa280bb64..92c90295d 100644 --- a/validator/node/BUILD.bazel +++ b/validator/node/BUILD.bazel @@ -30,6 +30,7 @@ go_library( deps = [ "//api/gateway:go_default_library", "//async/event:go_default_library", + "//cmd:go_default_library", "//cmd/validator/flags:go_default_library", "//config/features:go_default_library", "//io/file:go_default_library", @@ -42,7 +43,6 @@ go_library( "//runtime/debug:go_default_library", "//runtime/prereqs:go_default_library", "//runtime/version:go_default_library", - "//shared/cmd:go_default_library", "//shared/params:go_default_library", "//validator/accounts/iface:go_default_library", "//validator/accounts/wallet:go_default_library", diff --git a/validator/node/node.go b/validator/node/node.go index d37e2161c..89587b0f1 100644 --- a/validator/node/node.go +++ b/validator/node/node.go @@ -18,6 +18,7 @@ import ( "github.com/pkg/errors" "github.com/prysmaticlabs/prysm/api/gateway" "github.com/prysmaticlabs/prysm/async/event" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/config/features" "github.com/prysmaticlabs/prysm/io/file" @@ -30,7 +31,6 @@ import ( "github.com/prysmaticlabs/prysm/runtime/debug" "github.com/prysmaticlabs/prysm/runtime/prereqs" "github.com/prysmaticlabs/prysm/runtime/version" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/params" accountsiface "github.com/prysmaticlabs/prysm/validator/accounts/iface" "github.com/prysmaticlabs/prysm/validator/accounts/wallet" diff --git a/validator/rpc/BUILD.bazel b/validator/rpc/BUILD.bazel index 985514dd7..cb87e6956 100644 --- a/validator/rpc/BUILD.bazel +++ b/validator/rpc/BUILD.bazel @@ -19,6 +19,7 @@ go_library( "//api/grpc:go_default_library", "//api/pagination:go_default_library", "//async/event:go_default_library", + "//cmd:go_default_library", "//config/features:go_default_library", "//crypto/bls:go_default_library", "//crypto/rand:go_default_library", @@ -29,11 +30,10 @@ go_library( "//proto/prysm/v1alpha1:go_default_library", "//proto/prysm/v1alpha1/validator-client:go_default_library", "//runtime/version:go_default_library", - "//shared/cmd:go_default_library", - "//shared/petnames:go_default_library", "//time:go_default_library", "//validator/accounts:go_default_library", "//validator/accounts/iface:go_default_library", + "//validator/accounts/petnames:go_default_library", "//validator/accounts/wallet:go_default_library", "//validator/client:go_default_library", "//validator/db:go_default_library", diff --git a/validator/rpc/accounts.go b/validator/rpc/accounts.go index debe0b135..13bfcd653 100644 --- a/validator/rpc/accounts.go +++ b/validator/rpc/accounts.go @@ -8,11 +8,11 @@ import ( "fmt" "github.com/prysmaticlabs/prysm/api/pagination" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/crypto/bls" pb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/validator-client" - "github.com/prysmaticlabs/prysm/shared/cmd" - "github.com/prysmaticlabs/prysm/shared/petnames" "github.com/prysmaticlabs/prysm/validator/accounts" + "github.com/prysmaticlabs/prysm/validator/accounts/petnames" "github.com/prysmaticlabs/prysm/validator/keymanager" "github.com/prysmaticlabs/prysm/validator/keymanager/derived" "github.com/prysmaticlabs/prysm/validator/keymanager/imported" diff --git a/validator/slashing-protection/BUILD.bazel b/validator/slashing-protection/BUILD.bazel index a1a5e201c..a47e64419 100644 --- a/validator/slashing-protection/BUILD.bazel +++ b/validator/slashing-protection/BUILD.bazel @@ -16,10 +16,10 @@ go_library( ], deps = [ "//api/grpc:go_default_library", + "//cmd:go_default_library", "//cmd/validator/flags:go_default_library", "//io/file:go_default_library", "//proto/prysm/v1alpha1:go_default_library", - "//shared/cmd:go_default_library", "//validator/accounts/userprompt:go_default_library", "//validator/db/kv:go_default_library", "//validator/slashing-protection/local/standard-protection-format:go_default_library", @@ -46,11 +46,11 @@ go_test( ], embed = [":go_default_library"], deps = [ + "//cmd:go_default_library", "//cmd/validator/flags:go_default_library", "//io/file:go_default_library", "//proto/prysm/v1alpha1:go_default_library", "//shared/bytesutil:go_default_library", - "//shared/cmd:go_default_library", "//shared/testutil/assert:go_default_library", "//shared/testutil/require:go_default_library", "//validator/db/kv:go_default_library", diff --git a/validator/slashing-protection/cli_export.go b/validator/slashing-protection/cli_export.go index 430a7ff16..b5ee39967 100644 --- a/validator/slashing-protection/cli_export.go +++ b/validator/slashing-protection/cli_export.go @@ -6,9 +6,9 @@ import ( "path/filepath" "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/io/file" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/validator/accounts/userprompt" "github.com/prysmaticlabs/prysm/validator/db/kv" export "github.com/prysmaticlabs/prysm/validator/slashing-protection/local/standard-protection-format" diff --git a/validator/slashing-protection/cli_import.go b/validator/slashing-protection/cli_import.go index 48bc1b908..824ac21e1 100644 --- a/validator/slashing-protection/cli_import.go +++ b/validator/slashing-protection/cli_import.go @@ -5,9 +5,9 @@ import ( "fmt" "github.com/pkg/errors" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/io/file" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/validator/accounts/userprompt" "github.com/prysmaticlabs/prysm/validator/db/kv" slashingProtectionFormat "github.com/prysmaticlabs/prysm/validator/slashing-protection/local/standard-protection-format" diff --git a/validator/slashing-protection/cli_import_export_test.go b/validator/slashing-protection/cli_import_export_test.go index 85bb630f8..c4afec099 100644 --- a/validator/slashing-protection/cli_import_export_test.go +++ b/validator/slashing-protection/cli_import_export_test.go @@ -7,9 +7,9 @@ import ( "path/filepath" "testing" + "github.com/prysmaticlabs/prysm/cmd" "github.com/prysmaticlabs/prysm/cmd/validator/flags" "github.com/prysmaticlabs/prysm/io/file" - "github.com/prysmaticlabs/prysm/shared/cmd" "github.com/prysmaticlabs/prysm/shared/testutil/assert" "github.com/prysmaticlabs/prysm/shared/testutil/require" "github.com/prysmaticlabs/prysm/validator/db/kv" diff --git a/validator/slashing-protection/local/standard-protection-format/BUILD.bazel b/validator/slashing-protection/local/standard-protection-format/BUILD.bazel index 5df274068..feeac8829 100644 --- a/validator/slashing-protection/local/standard-protection-format/BUILD.bazel +++ b/validator/slashing-protection/local/standard-protection-format/BUILD.bazel @@ -13,9 +13,9 @@ go_library( deps = [ "//monitoring/progress:go_default_library", "//proto/prysm/v1alpha1:go_default_library", + "//proto/prysm/v1alpha1/slashings:go_default_library", "//shared/bytesutil:go_default_library", "//shared/params:go_default_library", - "//shared/slashutil:go_default_library", "//validator/db:go_default_library", "//validator/db/kv:go_default_library", "//validator/slashing-protection/local/standard-protection-format/format:go_default_library", diff --git a/validator/slashing-protection/local/standard-protection-format/import.go b/validator/slashing-protection/local/standard-protection-format/import.go index 0a71f62b2..3e7369753 100644 --- a/validator/slashing-protection/local/standard-protection-format/import.go +++ b/validator/slashing-protection/local/standard-protection-format/import.go @@ -11,8 +11,8 @@ import ( "github.com/pkg/errors" types "github.com/prysmaticlabs/eth2-types" ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1" + "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1/slashings" "github.com/prysmaticlabs/prysm/shared/bytesutil" - "github.com/prysmaticlabs/prysm/shared/slashutil" "github.com/prysmaticlabs/prysm/validator/db" "github.com/prysmaticlabs/prysm/validator/db/kv" "github.com/prysmaticlabs/prysm/validator/slashing-protection/local/standard-protection-format/format" @@ -273,7 +273,7 @@ func filterSlashablePubKeysFromAttestations( for _, att := range signedAtts { // Check for double votes. if sr, ok := signingRootsByTarget[att.Target]; ok { - if slashutil.SigningRootsDiffer(sr, att.SigningRoot) { + if slashings.SigningRootsDiffer(sr, att.SigningRoot) { slashablePubKeys = append(slashablePubKeys, pubKey) break Loop } @@ -283,7 +283,7 @@ func filterSlashablePubKeysFromAttestations( for _, target := range targets { a := createAttestation(source, target) b := createAttestation(att.Source, att.Target) - if slashutil.IsSurround(a, b) || slashutil.IsSurround(b, a) { + if slashings.IsSurround(a, b) || slashings.IsSurround(b, a) { slashablePubKeys = append(slashablePubKeys, pubKey) break Loop }