prysm-pulse/validator/rpc/BUILD.bazel

117 lines
5.3 KiB
Python
Raw Normal View History

load("@io_bazel_rules_go//go:def.bzl", "go_test")
load("@prysm//tools/go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"accounts.go",
"auth.go",
"beacon.go",
"health.go",
"intercepter.go",
"log.go",
"server.go",
Slashing Protection RPC Endpoints for Web Backend (#8723) * added the removed RPC delete account to accounts.go and the rpc in proto * reverted the 3 unit tests namely the failed derived delete, no pub keys provided and the successful imported account with provided public keys; also brought back the createImportedWalletWithAccounts back in wallet_test.go * strong password defined elsewhere- removed * Update validator/rpc/accounts_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * added PublicKeys Nil test case * changed ss to s. ss was a bad name inthe first place * goimports -w root * fixed the goimports before running the proto scripts, also changed the deleterequest variable to PublicKeysToDelete * removed unneeded comment * added test case for derived, changed delete account to be for both imported and derived * gofmt * unrelated files * unrelated files * unrelatedfiles restored * revert unrelated files * changed the last ss * adding slashign endpoints * adding the rpc export and import funcs, still need more testing and add unit tests * added import slashing unit test * clean up * remove less * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * camelCase Proto * update slashing_protection_json * update proto * register in validator/rpc/gateway * removed the server db creation, the validator cannot begin with a null db * round trip test * gofmt * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-04-09 19:13:59 +00:00
"slashing.go",
"wallet.go",
],
importpath = "github.com/prysmaticlabs/prysm/validator/rpc",
visibility = ["//validator:__subpackages__"],
deps = [
"//proto/beacon/rpc/v1:go_default_library",
"//proto/validator/accounts/v2:go_default_library",
"//shared/bls:go_default_library",
"//shared/cmd:go_default_library",
"//shared/event:go_default_library",
"//shared/featureconfig:go_default_library",
"//shared/fileutil:go_default_library",
"//shared/grpcutils:go_default_library",
"//shared/logutil:go_default_library",
"//shared/pagination:go_default_library",
"//shared/petnames:go_default_library",
"//shared/promptutil:go_default_library",
"//shared/rand:go_default_library",
"//shared/timeutils:go_default_library",
"//shared/traceutil:go_default_library",
"//shared/version:go_default_library",
"//validator/accounts:go_default_library",
"//validator/accounts/iface:go_default_library",
"//validator/accounts/wallet:go_default_library",
"//validator/client:go_default_library",
"//validator/db:go_default_library",
"//validator/keymanager:go_default_library",
"//validator/keymanager/derived:go_default_library",
"//validator/keymanager/imported:go_default_library",
Slashing Protection RPC Endpoints for Web Backend (#8723) * added the removed RPC delete account to accounts.go and the rpc in proto * reverted the 3 unit tests namely the failed derived delete, no pub keys provided and the successful imported account with provided public keys; also brought back the createImportedWalletWithAccounts back in wallet_test.go * strong password defined elsewhere- removed * Update validator/rpc/accounts_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * added PublicKeys Nil test case * changed ss to s. ss was a bad name inthe first place * goimports -w root * fixed the goimports before running the proto scripts, also changed the deleterequest variable to PublicKeysToDelete * removed unneeded comment * added test case for derived, changed delete account to be for both imported and derived * gofmt * unrelated files * unrelated files * unrelatedfiles restored * revert unrelated files * changed the last ss * adding slashign endpoints * adding the rpc export and import funcs, still need more testing and add unit tests * added import slashing unit test * clean up * remove less * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * camelCase Proto * update slashing_protection_json * update proto * register in validator/rpc/gateway * removed the server db creation, the validator cannot begin with a null db * round trip test * gofmt * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-04-09 19:13:59 +00:00
"//validator/slashing-protection/local/standard-protection-format:go_default_library",
"@com_github_dgrijalva_jwt_go//:go_default_library",
"@com_github_grpc_ecosystem_go_grpc_middleware//:go_default_library",
"@com_github_grpc_ecosystem_go_grpc_middleware//recovery:go_default_library",
"@com_github_grpc_ecosystem_go_grpc_middleware//retry:go_default_library",
"@com_github_grpc_ecosystem_go_grpc_middleware//tracing/opentracing:go_default_library",
"@com_github_grpc_ecosystem_go_grpc_prometheus//:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library",
"@com_github_sirupsen_logrus//:go_default_library",
"@com_github_tyler_smith_go_bip39//:go_default_library",
Web Backend Recover Wallet (#8679) * recover wallet rpc support - first attempt * removed redundant check * separate createwallet into imported and derived. Recover is derived * added unit test for recover. Recover is the createWallet for derived * so proto does CamelCase! * fixed issues related to unit testing * expose ValidateMnemonic from accounts to be used by the rpc module * added Mnemonic25Support and test to ensure it is not et is not empty * added skipMnemonic25thword support and unit test * Update proto/validator/accounts/v2/web_api.proto Proper naming convention Co-authored-by: terence tsao <terence@prysmaticlabs.com> * ran goimports,changed variable to SkipMnemonic_25ThWord * Update validator/rpc/wallet.go Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update validator/rpc/wallet.go Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update validator/rpc/wallet.go Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update validator/rpc/wallet.go Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update validator/rpc/wallet.go Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update validator/rpc/wallet.go Co-authored-by: terence tsao <terence@prysmaticlabs.com> * Update validator/rpc/wallet.go Co-authored-by: terence tsao <terence@prysmaticlabs.com> * fixed variable and text msgs naming convention as per the review * added unit test for strong password on recover * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Nishant Das <nish1993@hotmail.com> * Update validator/rpc/wallet.go Co-authored-by: Nishant Das <nish1993@hotmail.com> * goimports -w on root proto * added comments after exposing ValidateMnemonic to by used by rpc.RecoverWallet * language should be case insensitive * need to goimports before update protobuf scripts * Update validator/rpc/wallet.go Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update validator/rpc/wallet.go comments need to be consistant Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update validator/rpc/wallet_test.go consistent comments Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * fix comments * remove the skipMnemonic from rpc, just check if passphrase is empyt * defer call to set the writePassword flag on web boarding * gofmt * fixed the password write test after recovering a wallet. Needed to have two defers. One to set to true then one back to false * restore powchain.pb.go and finalized_block_root_container.pb.go * revert beacon messages.pb.go * revert unrelated files * revert unrelated files * revert unrelated files * unlreated files * restored the imports * Update validator/rpc/wallet_test.go Co-authored-by: terence tsao <terence@prysmaticlabs.com> Co-authored-by: Nishant Das <nish1993@hotmail.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-04-05 20:42:03 +00:00
"@com_github_tyler_smith_go_bip39//wordlists:go_default_library",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
"@io_opencensus_go//plugin/ocgrpc:go_default_library",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//codes:go_default_library",
"@org_golang_google_grpc//credentials:go_default_library",
"@org_golang_google_grpc//metadata:go_default_library",
"@org_golang_google_grpc//reflection:go_default_library",
"@org_golang_google_grpc//status:go_default_library",
Slashing Protection RPC Endpoints for Web Backend (#8723) * added the removed RPC delete account to accounts.go and the rpc in proto * reverted the 3 unit tests namely the failed derived delete, no pub keys provided and the successful imported account with provided public keys; also brought back the createImportedWalletWithAccounts back in wallet_test.go * strong password defined elsewhere- removed * Update validator/rpc/accounts_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * added PublicKeys Nil test case * changed ss to s. ss was a bad name inthe first place * goimports -w root * fixed the goimports before running the proto scripts, also changed the deleterequest variable to PublicKeysToDelete * removed unneeded comment * added test case for derived, changed delete account to be for both imported and derived * gofmt * unrelated files * unrelated files * unrelatedfiles restored * revert unrelated files * changed the last ss * adding slashign endpoints * adding the rpc export and import funcs, still need more testing and add unit tests * added import slashing unit test * clean up * remove less * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * camelCase Proto * update slashing_protection_json * update proto * register in validator/rpc/gateway * removed the server db creation, the validator cannot begin with a null db * round trip test * gofmt * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-04-09 19:13:59 +00:00
"@org_golang_google_protobuf//types/known/emptypb:go_default_library",
"@org_golang_x_crypto//bcrypt:go_default_library",
],
)
go_test(
name = "go_default_test",
srcs = [
"accounts_test.go",
"auth_test.go",
"beacon_test.go",
"health_test.go",
"intercepter_test.go",
"server_test.go",
Slashing Protection RPC Endpoints for Web Backend (#8723) * added the removed RPC delete account to accounts.go and the rpc in proto * reverted the 3 unit tests namely the failed derived delete, no pub keys provided and the successful imported account with provided public keys; also brought back the createImportedWalletWithAccounts back in wallet_test.go * strong password defined elsewhere- removed * Update validator/rpc/accounts_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * added PublicKeys Nil test case * changed ss to s. ss was a bad name inthe first place * goimports -w root * fixed the goimports before running the proto scripts, also changed the deleterequest variable to PublicKeysToDelete * removed unneeded comment * added test case for derived, changed delete account to be for both imported and derived * gofmt * unrelated files * unrelated files * unrelatedfiles restored * revert unrelated files * changed the last ss * adding slashign endpoints * adding the rpc export and import funcs, still need more testing and add unit tests * added import slashing unit test * clean up * remove less * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * camelCase Proto * update slashing_protection_json * update proto * register in validator/rpc/gateway * removed the server db creation, the validator cannot begin with a null db * round trip test * gofmt * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-04-09 19:13:59 +00:00
"slashing_test.go",
"wallet_test.go",
],
embed = [":go_default_library"],
deps = [
"//cmd/validator/flags:go_default_library",
"//proto/validator/accounts/v2:go_default_library",
"//shared/bls:go_default_library",
"//shared/bytesutil:go_default_library",
"//shared/event:go_default_library",
"//shared/featureconfig:go_default_library",
"//shared/fileutil:go_default_library",
"//shared/mock:go_default_library",
"//shared/testutil/assert:go_default_library",
"//shared/testutil/require:go_default_library",
"//shared/timeutils:go_default_library",
"//validator/accounts:go_default_library",
"//validator/accounts/iface:go_default_library",
"//validator/accounts/wallet:go_default_library",
"//validator/client:go_default_library",
Slashing Protection RPC Endpoints for Web Backend (#8723) * added the removed RPC delete account to accounts.go and the rpc in proto * reverted the 3 unit tests namely the failed derived delete, no pub keys provided and the successful imported account with provided public keys; also brought back the createImportedWalletWithAccounts back in wallet_test.go * strong password defined elsewhere- removed * Update validator/rpc/accounts_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * added PublicKeys Nil test case * changed ss to s. ss was a bad name inthe first place * goimports -w root * fixed the goimports before running the proto scripts, also changed the deleterequest variable to PublicKeysToDelete * removed unneeded comment * added test case for derived, changed delete account to be for both imported and derived * gofmt * unrelated files * unrelated files * unrelatedfiles restored * revert unrelated files * changed the last ss * adding slashign endpoints * adding the rpc export and import funcs, still need more testing and add unit tests * added import slashing unit test * clean up * remove less * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * camelCase Proto * update slashing_protection_json * update proto * register in validator/rpc/gateway * removed the server db creation, the validator cannot begin with a null db * round trip test * gofmt * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-04-09 19:13:59 +00:00
"//validator/db/kv:go_default_library",
"//validator/db/testing:go_default_library",
"//validator/keymanager:go_default_library",
"//validator/keymanager/derived:go_default_library",
"//validator/keymanager/imported:go_default_library",
Slashing Protection RPC Endpoints for Web Backend (#8723) * added the removed RPC delete account to accounts.go and the rpc in proto * reverted the 3 unit tests namely the failed derived delete, no pub keys provided and the successful imported account with provided public keys; also brought back the createImportedWalletWithAccounts back in wallet_test.go * strong password defined elsewhere- removed * Update validator/rpc/accounts_test.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> * added PublicKeys Nil test case * changed ss to s. ss was a bad name inthe first place * goimports -w root * fixed the goimports before running the proto scripts, also changed the deleterequest variable to PublicKeysToDelete * removed unneeded comment * added test case for derived, changed delete account to be for both imported and derived * gofmt * unrelated files * unrelated files * unrelatedfiles restored * revert unrelated files * changed the last ss * adding slashign endpoints * adding the rpc export and import funcs, still need more testing and add unit tests * added import slashing unit test * clean up * remove less * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * Update proto/validator/accounts/v2/web_api.proto Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> * camelCase Proto * update slashing_protection_json * update proto * register in validator/rpc/gateway * removed the server db creation, the validator cannot begin with a null db * round trip test * gofmt * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go * Update validator/rpc/slashing.go Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-04-09 19:13:59 +00:00
"//validator/slashing-protection/local/standard-protection-format/format:go_default_library",
"//validator/testing:go_default_library",
"@com_github_dgrijalva_jwt_go//:go_default_library",
"@com_github_golang_mock//gomock:go_default_library",
"@com_github_google_uuid//:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library",
"@com_github_wealdtech_go_eth2_wallet_encryptor_keystorev4//:go_default_library",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_google_grpc//metadata:go_default_library",
Change gogoproto compiler to protoc-gen-go-cast (#8697) * Remove gogoproto compiler * Remove more gogoproto * Improvements * Fix gengo * More scripts * Gazelle, fix deps * Fix version and errors * Fix gocast for arrays * Fix ethapis * Fixes * Fix compile errors * fix go.mod * //proto/... builds * Update for protov2 * temp fix compilation to move on * Change everything to emptypb.empty * Add grpc to proto/slashings * Fix almost all build failures * Oher build problems * FIX THIS FUCKING THING * gaz literally every .bazel * Final touches * Final final touches * Fix proto * Begin moving proto.Marshal to native * Fix site_data * Fixes * Fix duplicate gateway * Fix gateway target * Fix ethapis * Fixes from review * Update * Fix * Fix status test * Fix fuzz * Add isprotoslice to fun * Change DeepEqual to DeepSSZEqual for proto arrays * Fix build * Fix gaz * Update go * Fixes * Fixes * Add case for nil validators after copy * Fix cast * Fix test * Fix imports * Go mod * Only use extension where needed * Fixes * Split gateway from gengo * gaz * go mod * Add back hydrated state * fix hydrate * Fix proto.clone * Fies * Revert "Split gateway from gengo" This reverts commit 7298bb2054d446e427d9af97e13b8fabe8695085. * Revert "gaz" This reverts commit ca952565701a88727e22302d6c8d60ac48d97255. * Merge all gateway into one target * go mod * Gaz * Add generate v1_gateway files * run pb again * goimports * gaz * Fix comments * Fix protos * Fix PR * Fix protos * Update grpc-gateway and ethapis * Update ethapis and gen-go-cast * Go tidy * Reorder * Fix ethapis * fix spec tests * Fix script * Remove unused import * Fix fuzz * Fix gomod * Update version * Error if the cloned result is nil * Handle optional slots * ADd more empty checks to clone * Undo fuzz changes * Fix build.bazel * Gaz * Redo fuzz changes * Undo some eth1data changes * Update go.mod Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> * Undo clone beacon state * Remove gogo proto more and unused v1_gateway * Add manual fix for nil vals * Fix gaz * tidy * Tidy again * Add detailed error * Revert "Add detailed error" This reverts commit 59bc053dcd59569a54c95b07739d5a379665ec5d. * Undo varint changes * Fix nil validators in deposit test * Commit * Undo Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> Co-authored-by: Radosław Kapka <rkapka@wp.pl> Co-authored-by: Nishant Das <nishdas93@gmail.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-05-17 18:32:04 +00:00
"@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
],
)