mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
upgrade v6 to v7 (#15989)
* upgrade v6 to v7 * changelog * update-go-ssz
This commit is contained in:
@@ -9,7 +9,7 @@ go_library(
|
||||
"interface.go",
|
||||
"signature_batch.go",
|
||||
],
|
||||
importpath = "github.com/OffchainLabs/prysm/v6/crypto/bls",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/bls",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//crypto/bls/blst:go_default_library",
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
package bls
|
||||
|
||||
import (
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/blst"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/herumi"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/blst"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/herumi"
|
||||
)
|
||||
|
||||
// Initialize herumi temporarily while we transition to blst for ethdo.
|
||||
|
||||
@@ -3,8 +3,8 @@ package bls
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
)
|
||||
|
||||
func TestDisallowZeroSecretKeys(t *testing.T) {
|
||||
|
||||
@@ -14,7 +14,7 @@ go_library(
|
||||
"signature.go",
|
||||
"stub.go", # keep
|
||||
],
|
||||
importpath = "github.com/OffchainLabs/prysm/v6/crypto/bls/blst",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/bls/blst",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = select({
|
||||
"@io_bazel_rules_go//go/platform:android_amd64": [
|
||||
|
||||
@@ -5,9 +5,9 @@ package blst_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/blst"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/blst"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
)
|
||||
|
||||
func BenchmarkSignature_Verify(b *testing.B) {
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/cache/nonblocking"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/cache/nonblocking"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
blst "github.com/supranational/blst/bindings/go"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ package blst
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/cache/nonblocking"
|
||||
fieldparams "github.com/OffchainLabs/prysm/v6/config/fieldparams"
|
||||
"github.com/OffchainLabs/prysm/v6/config/params"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/cache/nonblocking"
|
||||
fieldparams "github.com/OffchainLabs/prysm/v7/config/fieldparams"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/blst"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/blst"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
)
|
||||
|
||||
func TestPublicKeyFromBytes(t *testing.T) {
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"crypto/subtle"
|
||||
"fmt"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/config/params"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/rand"
|
||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/rand"
|
||||
blst "github.com/supranational/blst/bindings/go"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/blst"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v6/encoding/bytesutil"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/blst"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/encoding/bytesutil"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
)
|
||||
|
||||
func TestMarshalUnmarshal(t *testing.T) {
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
fieldparams "github.com/OffchainLabs/prysm/v6/config/fieldparams"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/rand"
|
||||
fieldparams "github.com/OffchainLabs/prysm/v7/config/fieldparams"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/rand"
|
||||
"github.com/pkg/errors"
|
||||
blst "github.com/supranational/blst/bindings/go"
|
||||
)
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
)
|
||||
|
||||
func TestSignVerify(t *testing.T) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
package blst
|
||||
|
||||
import (
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/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/OffchainLabs/prysm/v6/crypto/bls/common",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/bls/common",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//config/fieldparams:go_default_library"],
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package common
|
||||
|
||||
import fieldparams "github.com/OffchainLabs/prysm/v6/config/fieldparams"
|
||||
import fieldparams "github.com/OffchainLabs/prysm/v7/config/fieldparams"
|
||||
|
||||
// ZeroSecretKey represents a zero secret key.
|
||||
var ZeroSecretKey = [32]byte{}
|
||||
|
||||
@@ -3,7 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["interface_mock.go"],
|
||||
importpath = "github.com/OffchainLabs/prysm/v6/crypto/bls/common/mock",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/bls/common/mock",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//crypto/bls/common:go_default_library",
|
||||
|
||||
2
crypto/bls/common/mock/interface_mock.go
generated
2
crypto/bls/common/mock/interface_mock.go
generated
@@ -12,7 +12,7 @@ package mock
|
||||
import (
|
||||
reflect "reflect"
|
||||
|
||||
common "github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
common "github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
gomock "go.uber.org/mock/gomock"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ load("@prysm//tools/go:def.bzl", "go_library")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["init.go"],
|
||||
importpath = "github.com/OffchainLabs/prysm/v6/crypto/bls/herumi",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/bls/herumi",
|
||||
visibility = [
|
||||
"//crypto/bls:__pkg__",
|
||||
],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package bls
|
||||
|
||||
import (
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
)
|
||||
|
||||
// PublicKey represents a BLS public key.
|
||||
|
||||
@@ -7,9 +7,9 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls/common"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
)
|
||||
|
||||
const TestSignature = "test signature"
|
||||
|
||||
@@ -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/OffchainLabs/prysm/v6/crypto/ecdsa",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/ecdsa",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"@com_github_btcsuite_btcd_btcec_v2//:go_default_library",
|
||||
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"math/big"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
gcrypto "github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/libp2p/go-libp2p/core/crypto"
|
||||
|
||||
@@ -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/OffchainLabs/prysm/v6/crypto/hash",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/hash",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//encoding/bytesutil:go_default_library",
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"reflect"
|
||||
"sync"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/encoding/bytesutil"
|
||||
"github.com/OffchainLabs/prysm/v7/encoding/bytesutil"
|
||||
"github.com/minio/highwayhash"
|
||||
"github.com/minio/sha256-simd"
|
||||
fastssz "github.com/prysmaticlabs/fastssz"
|
||||
|
||||
@@ -4,13 +4,13 @@ import (
|
||||
"encoding/hex"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls"
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/hash"
|
||||
"github.com/OffchainLabs/prysm/v6/encoding/bytesutil"
|
||||
ethpb "github.com/OffchainLabs/prysm/v6/proto/prysm/v1alpha1"
|
||||
pb "github.com/OffchainLabs/prysm/v6/proto/testing"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/hash"
|
||||
"github.com/OffchainLabs/prysm/v7/encoding/bytesutil"
|
||||
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
||||
pb "github.com/OffchainLabs/prysm/v7/proto/testing"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
fuzz "github.com/google/gofuzz"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library", "go_test")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["hashtree.go"],
|
||||
importpath = "github.com/OffchainLabs/prysm/v6/crypto/hash/htr",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/hash/htr",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["@com_github_prysmaticlabs_gohashtree//:go_default_library"],
|
||||
)
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
)
|
||||
|
||||
func Test_VectorizedSha256(t *testing.T) {
|
||||
|
||||
@@ -8,7 +8,7 @@ go_library(
|
||||
"keystore.go",
|
||||
"utils.go",
|
||||
],
|
||||
importpath = "github.com/OffchainLabs/prysm/v6/crypto/keystore",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/keystore",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//crypto/bls:go_default_library",
|
||||
|
||||
@@ -24,8 +24,8 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls"
|
||||
"github.com/OffchainLabs/prysm/v6/io/file"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls"
|
||||
"github.com/OffchainLabs/prysm/v7/io/file"
|
||||
"github.com/pborman/uuid"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls"
|
||||
"github.com/OffchainLabs/prysm/v6/encoding/bytesutil"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls"
|
||||
"github.com/OffchainLabs/prysm/v7/encoding/bytesutil"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
"github.com/pborman/uuid"
|
||||
)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls"
|
||||
"github.com/minio/sha256-simd"
|
||||
"github.com/pborman/uuid"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"path"
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls"
|
||||
"github.com/OffchainLabs/prysm/v6/encoding/bytesutil"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls"
|
||||
"github.com/OffchainLabs/prysm/v7/encoding/bytesutil"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
"github.com/pborman/uuid"
|
||||
)
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/crypto/bls"
|
||||
prysmTime "github.com/OffchainLabs/prysm/v6/time"
|
||||
"github.com/OffchainLabs/prysm/v7/crypto/bls"
|
||||
prysmTime "github.com/OffchainLabs/prysm/v7/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/OffchainLabs/prysm/v6/crypto/rand",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/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/OffchainLabs/prysm/v6/crypto/rand"
|
||||
import "github.com/OffchainLabs/prysm/v7/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/OffchainLabs/prysm/v6/crypto/rand"
|
||||
import "github.com/OffchainLabs/prysm/v7/crypto/rand"
|
||||
randGen := rand.NewGenerator()
|
||||
randGen.Intn(32) // or any other func defined in math.rand API
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library", "go_test")
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["random.go"],
|
||||
importpath = "github.com/OffchainLabs/prysm/v6/crypto/random",
|
||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/random",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"@com_github_consensys_gnark_crypto//ecc/bls12-381/fr:go_default_library",
|
||||
|
||||
@@ -3,8 +3,8 @@ package random
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/OffchainLabs/prysm/v6/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v6/testing/require"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/assert"
|
||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||
GoKZG "github.com/crate-crypto/go-kzg-4844"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user