Update to V4 🚀 (#12134)

* Update V3 from V4

* Fix build v3 -> v4

* Update ssz

* Update beacon_chain.pb.go

* Fix formatter import

* Update update-mockgen.sh comment to v4

* Fix conflicts. Pass build and tests

* Fix test
This commit is contained in:
terencechain
2023-03-17 11:52:56 -07:00
committed by GitHub
parent 7d82a0510f
commit d17996f8b0
2182 changed files with 11206 additions and 11241 deletions

View File

@@ -3,6 +3,6 @@ load("@prysm//tools/go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["utils.go"],
importpath = "github.com/prysmaticlabs/prysm/v3/time",
importpath = "github.com/prysmaticlabs/prysm/v4/time",
visibility = ["//visibility:public"],
)

View File

@@ -3,7 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["mclock.go"],
importpath = "github.com/prysmaticlabs/prysm/v3/time/mclock",
importpath = "github.com/prysmaticlabs/prysm/v4/time/mclock",
visibility = ["//visibility:public"],
deps = ["@com_github_aristanetworks_goarista//monotime:go_default_library"],
)

View File

@@ -7,7 +7,7 @@ go_library(
"slotticker.go",
"slottime.go",
],
importpath = "github.com/prysmaticlabs/prysm/v3/time/slots",
importpath = "github.com/prysmaticlabs/prysm/v4/time/slots",
visibility = ["//visibility:public"],
deps = [
"//config/params:go_default_library",

View File

@@ -5,8 +5,8 @@ import (
"fmt"
"time"
"github.com/prysmaticlabs/prysm/v3/config/params"
prysmTime "github.com/prysmaticlabs/prysm/v3/time"
"github.com/prysmaticlabs/prysm/v4/config/params"
prysmTime "github.com/prysmaticlabs/prysm/v4/time"
"github.com/sirupsen/logrus"
)

View File

@@ -5,9 +5,9 @@ import (
"testing"
"time"
"github.com/prysmaticlabs/prysm/v3/config/params"
"github.com/prysmaticlabs/prysm/v3/testing/require"
prysmTime "github.com/prysmaticlabs/prysm/v3/time"
"github.com/prysmaticlabs/prysm/v4/config/params"
"github.com/prysmaticlabs/prysm/v4/testing/require"
prysmTime "github.com/prysmaticlabs/prysm/v4/time"
"github.com/sirupsen/logrus"
logTest "github.com/sirupsen/logrus/hooks/test"
)

View File

@@ -4,8 +4,8 @@ package slots
import (
"time"
"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
prysmTime "github.com/prysmaticlabs/prysm/v3/time"
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
prysmTime "github.com/prysmaticlabs/prysm/v4/time"
)
// The Ticker interface defines a type which can expose a

View File

@@ -4,7 +4,7 @@ import (
"testing"
"time"
"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
)
var _ Ticker = (*SlotTicker)(nil)

View File

@@ -6,10 +6,10 @@ import (
"time"
"github.com/pkg/errors"
"github.com/prysmaticlabs/prysm/v3/config/params"
"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
mathutil "github.com/prysmaticlabs/prysm/v3/math"
prysmTime "github.com/prysmaticlabs/prysm/v3/time"
"github.com/prysmaticlabs/prysm/v4/config/params"
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
mathutil "github.com/prysmaticlabs/prysm/v4/math"
prysmTime "github.com/prysmaticlabs/prysm/v4/time"
)
// MaxSlotBuffer specifies the max buffer given to slots from

View File

@@ -5,11 +5,11 @@ import (
"testing"
"time"
"github.com/prysmaticlabs/prysm/v3/config/params"
"github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
"github.com/prysmaticlabs/prysm/v3/testing/assert"
"github.com/prysmaticlabs/prysm/v3/testing/require"
prysmTime "github.com/prysmaticlabs/prysm/v3/time"
"github.com/prysmaticlabs/prysm/v4/config/params"
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
"github.com/prysmaticlabs/prysm/v4/testing/assert"
"github.com/prysmaticlabs/prysm/v4/testing/require"
prysmTime "github.com/prysmaticlabs/prysm/v4/time"
)
func TestSlotsSinceGenesis(t *testing.T) {

View File

@@ -3,7 +3,7 @@ load("@prysm//tools/go:def.bzl", "go_library", "go_test")
go_library(
name = "go_default_library",
srcs = ["mock.go"],
importpath = "github.com/prysmaticlabs/prysm/v3/time/slots/testing",
importpath = "github.com/prysmaticlabs/prysm/v4/time/slots/testing",
visibility = ["//visibility:public"],
deps = ["//consensus-types/primitives:go_default_library"],
)

View File

@@ -1,7 +1,7 @@
// Package testing includes useful mocks for slot tickers in unit tests.
package testing
import "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
import "github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
// MockTicker defines a useful struct for mocking the Ticker interface
// from the slotutil package.

View File

@@ -1,7 +1,7 @@
package testing
import (
"github.com/prysmaticlabs/prysm/v3/time/slots"
"github.com/prysmaticlabs/prysm/v4/time/slots"
)
var _ slots.Ticker = (*MockTicker)(nil)