mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Add V3 Suffix to All Prysm Packages (#11083)
* v3 import renamings * tidy * fmt * rev * Update beacon-chain/core/epoch/precompute/reward_penalty_test.go * Update beacon-chain/core/helpers/validators_test.go * Update beacon-chain/db/alias.go * Update beacon-chain/db/alias.go * Update beacon-chain/db/alias.go * Update beacon-chain/db/iface/BUILD.bazel * Update beacon-chain/db/kv/kv.go * Update beacon-chain/db/kv/state.go * Update beacon-chain/rpc/prysm/v1alpha1/validator/attester_test.go * Update beacon-chain/rpc/prysm/v1alpha1/validator/attester_test.go * Update beacon-chain/sync/initial-sync/service.go * fix deps * fix bad replacements * fix bad replacements * change back * gohashtree version * fix deps Co-authored-by: Nishant Das <nishdas93@gmail.com> Co-authored-by: Potuz <potuz@prysmaticlabs.com>
This commit is contained in:
@@ -9,7 +9,7 @@ go_library(
|
||||
"interface.go",
|
||||
"signature_batch.go",
|
||||
],
|
||||
importpath = "github.com/prysmaticlabs/prysm/crypto/bls",
|
||||
importpath = "github.com/prysmaticlabs/prysm/v3/crypto/bls",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//crypto/bls/blst:go_default_library",
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
package bls
|
||||
|
||||
import (
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/blst"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/herumi"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/blst"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/herumi"
|
||||
)
|
||||
|
||||
// Initialize herumi temporarily while we transition to blst for ethdo.
|
||||
|
||||
@@ -3,8 +3,8 @@ package bls
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/testing/require"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/require"
|
||||
)
|
||||
|
||||
func TestDisallowZeroSecretKeys(t *testing.T) {
|
||||
|
||||
@@ -14,7 +14,7 @@ go_library(
|
||||
"signature.go",
|
||||
"stub.go", # keep
|
||||
],
|
||||
importpath = "github.com/prysmaticlabs/prysm/crypto/bls/blst",
|
||||
importpath = "github.com/prysmaticlabs/prysm/v3/crypto/bls/blst",
|
||||
visibility = [
|
||||
"//crypto/bls:__pkg__",
|
||||
],
|
||||
|
||||
@@ -5,9 +5,9 @@ package blst_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/blst"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/testing/require"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/blst"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/require"
|
||||
)
|
||||
|
||||
func BenchmarkSignature_Verify(b *testing.B) {
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
lruwrpr "github.com/prysmaticlabs/prysm/cache/lru"
|
||||
"github.com/prysmaticlabs/prysm/config/features"
|
||||
fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
|
||||
"github.com/prysmaticlabs/prysm/config/params"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
lruwrpr "github.com/prysmaticlabs/prysm/v3/cache/lru"
|
||||
"github.com/prysmaticlabs/prysm/v3/config/features"
|
||||
fieldparams "github.com/prysmaticlabs/prysm/v3/config/fieldparams"
|
||||
"github.com/prysmaticlabs/prysm/v3/config/params"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
)
|
||||
|
||||
var maxKeys = 1000000
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/blst"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/testing/require"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/blst"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/require"
|
||||
)
|
||||
|
||||
func TestPublicKeyFromBytes(t *testing.T) {
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"crypto/subtle"
|
||||
"fmt"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/config/features"
|
||||
"github.com/prysmaticlabs/prysm/config/params"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/crypto/rand"
|
||||
"github.com/prysmaticlabs/prysm/v3/config/features"
|
||||
"github.com/prysmaticlabs/prysm/v3/config/params"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/rand"
|
||||
blst "github.com/supranational/blst/bindings/go"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/blst"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/encoding/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/testing/require"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/blst"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/v3/encoding/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/require"
|
||||
)
|
||||
|
||||
func TestMarshalUnmarshal(t *testing.T) {
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prysmaticlabs/prysm/config/features"
|
||||
fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/crypto/rand"
|
||||
"github.com/prysmaticlabs/prysm/v3/config/features"
|
||||
fieldparams "github.com/prysmaticlabs/prysm/v3/config/fieldparams"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/rand"
|
||||
blst "github.com/supranational/blst/bindings/go"
|
||||
)
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/testing/require"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/require"
|
||||
)
|
||||
|
||||
func TestSignVerify(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
package blst
|
||||
|
||||
import (
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
)
|
||||
|
||||
// This stub file exists until build issues can be resolved for libfuzz.
|
||||
|
||||
@@ -7,7 +7,7 @@ go_library(
|
||||
"error.go",
|
||||
"interface.go",
|
||||
],
|
||||
importpath = "github.com/prysmaticlabs/prysm/crypto/bls/common",
|
||||
importpath = "github.com/prysmaticlabs/prysm/v3/crypto/bls/common",
|
||||
visibility = [
|
||||
"//crypto/bls:__subpackages__",
|
||||
"//testing:__subpackages__",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package common
|
||||
|
||||
import fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
|
||||
import fieldparams "github.com/prysmaticlabs/prysm/v3/config/fieldparams"
|
||||
|
||||
// ZeroSecretKey represents a zero secret key.
|
||||
var ZeroSecretKey = [32]byte{}
|
||||
|
||||
@@ -5,7 +5,7 @@ load("@prysm//tools/go:def.bzl", "go_library")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["init.go"],
|
||||
importpath = "github.com/prysmaticlabs/prysm/crypto/bls/herumi",
|
||||
importpath = "github.com/prysmaticlabs/prysm/v3/crypto/bls/herumi",
|
||||
visibility = [
|
||||
"//crypto/bls:__pkg__",
|
||||
],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package bls
|
||||
|
||||
import (
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls/common"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls/common"
|
||||
)
|
||||
|
||||
// PublicKey represents a BLS public key.
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/assert"
|
||||
)
|
||||
|
||||
func TestCopySignatureSet(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library", "go_test")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["utils.go"],
|
||||
importpath = "github.com/prysmaticlabs/prysm/crypto/ecdsa",
|
||||
importpath = "github.com/prysmaticlabs/prysm/v3/crypto/ecdsa",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"@com_github_btcsuite_btcd_btcec_v2//:go_default_library",
|
||||
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
gcrypto "github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/libp2p/go-libp2p-core/crypto"
|
||||
"github.com/prysmaticlabs/prysm/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/testing/require"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/require"
|
||||
)
|
||||
|
||||
func TestConvertToInterfacePubkey(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library", "go_test")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["hash.go"],
|
||||
importpath = "github.com/prysmaticlabs/prysm/crypto/hash",
|
||||
importpath = "github.com/prysmaticlabs/prysm/v3/crypto/hash",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//encoding/bytesutil:go_default_library",
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/minio/highwayhash"
|
||||
"github.com/minio/sha256-simd"
|
||||
fastssz "github.com/prysmaticlabs/fastssz"
|
||||
"github.com/prysmaticlabs/prysm/encoding/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/v3/encoding/bytesutil"
|
||||
"golang.org/x/crypto/sha3"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
@@ -5,13 +5,13 @@ import (
|
||||
"testing"
|
||||
|
||||
fuzz "github.com/google/gofuzz"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls"
|
||||
"github.com/prysmaticlabs/prysm/crypto/hash"
|
||||
"github.com/prysmaticlabs/prysm/encoding/bytesutil"
|
||||
ethpb "github.com/prysmaticlabs/prysm/proto/prysm/v1alpha1"
|
||||
pb "github.com/prysmaticlabs/prysm/proto/testing"
|
||||
"github.com/prysmaticlabs/prysm/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/testing/require"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/hash"
|
||||
"github.com/prysmaticlabs/prysm/v3/encoding/bytesutil"
|
||||
ethpb "github.com/prysmaticlabs/prysm/v3/proto/prysm/v1alpha1"
|
||||
pb "github.com/prysmaticlabs/prysm/v3/proto/testing"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/require"
|
||||
)
|
||||
|
||||
func TestHash(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["hashtree.go"],
|
||||
importpath = "github.com/prysmaticlabs/prysm/crypto/hash/htr",
|
||||
importpath = "github.com/prysmaticlabs/prysm/v3/crypto/hash/htr",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["@com_github_prysmaticlabs_gohashtree//:go_default_library"],
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@ go_library(
|
||||
"keystore.go",
|
||||
"utils.go",
|
||||
],
|
||||
importpath = "github.com/prysmaticlabs/prysm/crypto/keystore",
|
||||
importpath = "github.com/prysmaticlabs/prysm/v3/crypto/keystore",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//crypto/bls:go_default_library",
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/pborman/uuid"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls"
|
||||
"github.com/prysmaticlabs/prysm/io/file"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls"
|
||||
"github.com/prysmaticlabs/prysm/v3/io/file"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/pborman/uuid"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls"
|
||||
"github.com/prysmaticlabs/prysm/encoding/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/testing/require"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls"
|
||||
"github.com/prysmaticlabs/prysm/v3/encoding/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/require"
|
||||
)
|
||||
|
||||
func TestMarshalAndUnmarshal(t *testing.T) {
|
||||
|
||||
@@ -34,7 +34,7 @@ import (
|
||||
|
||||
"github.com/minio/sha256-simd"
|
||||
"github.com/pborman/uuid"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
"golang.org/x/crypto/scrypt"
|
||||
|
||||
@@ -7,10 +7,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/pborman/uuid"
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls"
|
||||
"github.com/prysmaticlabs/prysm/encoding/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/testing/require"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls"
|
||||
"github.com/prysmaticlabs/prysm/v3/encoding/bytesutil"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/assert"
|
||||
"github.com/prysmaticlabs/prysm/v3/testing/require"
|
||||
)
|
||||
|
||||
func TestStoreAndGetKey(t *testing.T) {
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/crypto/bls"
|
||||
prysmTime "github.com/prysmaticlabs/prysm/time"
|
||||
"github.com/prysmaticlabs/prysm/v3/crypto/bls"
|
||||
prysmTime "github.com/prysmaticlabs/prysm/v3/time"
|
||||
)
|
||||
|
||||
func aesCTRXOR(key, inText, iv []byte) ([]byte, error) {
|
||||
|
||||
@@ -3,7 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library", "go_test")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["rand.go"],
|
||||
importpath = "github.com/prysmaticlabs/prysm/crypto/rand",
|
||||
importpath = "github.com/prysmaticlabs/prysm/v3/crypto/rand",
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ This limits the scope of code that needs to be hardened.
|
||||
There are two modes, one for deterministic and another non-deterministic randomness:
|
||||
1. If deterministic pseudo-random generator is enough, use:
|
||||
|
||||
import "github.com/prysmaticlabs/prysm/crypto/rand"
|
||||
import "github.com/prysmaticlabs/prysm/v3/crypto/rand"
|
||||
randGen := rand.NewDeterministicGenerator()
|
||||
randGen.Intn(32) // or any other func defined in math.rand API
|
||||
|
||||
@@ -20,7 +20,7 @@ There are two modes, one for deterministic and another non-deterministic randomn
|
||||
|
||||
2. For cryptographically secure non-deterministic mode (CSPRNG), use:
|
||||
|
||||
import "github.com/prysmaticlabs/prysm/crypto/rand"
|
||||
import "github.com/prysmaticlabs/prysm/v3/crypto/rand"
|
||||
randGen := rand.NewGenerator()
|
||||
randGen.Intn(32) // or any other func defined in math.rand API
|
||||
|
||||
|
||||
Reference in New Issue
Block a user