mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
Update to V5 (#13622)
* First take at updating everything to v5 * Patch gRPC gateway to use prysm v5 Fix patch * Update go ssz --------- Co-authored-by: Preston Van Loon <pvanloon@offchainlabs.com>
This commit is contained in:
@@ -12,7 +12,7 @@ while IFS= read -d $'\0' -r file; do
|
||||
done < <($findutil -L "$(bazel info bazel-bin)"/proto -type f -regextype sed -regex ".*pb\.\(gw\.\)\?go$" -print0)
|
||||
|
||||
arraylength=${#file_list[@]}
|
||||
searchstring="prysmaticlabs/prysm/v4/"
|
||||
searchstring="prysmaticlabs/prysm/v5/"
|
||||
|
||||
# Copy pb.go files from bazel-bin to original folder where .proto is.
|
||||
for ((i = 0; i < arraylength; i++)); do
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
mock_path="testing/mock"
|
||||
iface_mock_path="testing/validator-mock"
|
||||
|
||||
# github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1
|
||||
# github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1
|
||||
# ------------------------------------------------------
|
||||
proto_mocks_v1alpha1=(
|
||||
"$mock_path/beacon_service_mock.go BeaconChainClient,BeaconChain_StreamChainHeadClient,BeaconChain_StreamAttestationsClient,BeaconChain_StreamBlocksClient,BeaconChain_StreamValidatorsInfoClient,BeaconChain_StreamIndexedAttestationsClient"
|
||||
@@ -21,10 +21,10 @@ for ((i = 0; i < ${#proto_mocks_v1alpha1[@]}; i++)); do
|
||||
interfaces=${proto_mocks_v1alpha1[i]#* };
|
||||
echo "generating $file for interfaces: $interfaces";
|
||||
echo
|
||||
GO11MODULE=on mockgen -package=mock -destination="$file" github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1 "$interfaces"
|
||||
GO11MODULE=on mockgen -package=mock -destination="$file" github.com/prysmaticlabs/prysm/v5/proto/prysm/v1alpha1 "$interfaces"
|
||||
done
|
||||
|
||||
# github.com/prysmaticlabs/prysm/v4/validator/client/iface
|
||||
# github.com/prysmaticlabs/prysm/v5/validator/client/iface
|
||||
# --------------------------------------------------------
|
||||
iface_mocks=(
|
||||
"$iface_mock_path/beacon_chain_client_mock.go BeaconChainClient"
|
||||
@@ -37,13 +37,13 @@ for ((i = 0; i < ${#iface_mocks[@]}; i++)); do
|
||||
file=${iface_mocks[i]% *};
|
||||
interfaces=${iface_mocks[i]#* };
|
||||
echo "generating $file for interfaces: $interfaces";
|
||||
GO11MODULE=on mockgen -package=validator_mock -destination="$file" github.com/prysmaticlabs/prysm/v4/validator/client/iface "$interfaces"
|
||||
GO11MODULE=on mockgen -package=validator_mock -destination="$file" github.com/prysmaticlabs/prysm/v5/validator/client/iface "$interfaces"
|
||||
done
|
||||
|
||||
goimports -w "$mock_path/."
|
||||
gofmt -s -w "$mock_path/."
|
||||
|
||||
# github.com/prysmaticlabs/prysm/v4/validator/client/beacon-api
|
||||
# github.com/prysmaticlabs/prysm/v5/validator/client/beacon-api
|
||||
# -------------------------------------------------------------
|
||||
beacon_api_mock_path="validator/client/beacon-api/mock"
|
||||
beacon_api_mocks=(
|
||||
@@ -64,7 +64,7 @@ done
|
||||
goimports -w "$beacon_api_mock_path/."
|
||||
gofmt -s -w "$beacon_api_mock_path/."
|
||||
|
||||
# github.com/prysmaticlabs/prysm/v4/crypto/bls
|
||||
# github.com/prysmaticlabs/prysm/v5/crypto/bls
|
||||
# --------------------------------------------
|
||||
crypto_bls_common_mock_path="crypto/bls/common/mock"
|
||||
crypto_bls_common_mocks=(
|
||||
|
||||
Reference in New Issue
Block a user