From 2f091e2dbc4864a862e02dd503efae434dcc06db Mon Sep 17 00:00:00 2001 From: itsdevbear Date: Thu, 4 Jul 2024 12:05:41 -0400 Subject: [PATCH 1/4] bet --- mod/primitives/pkg/bytes/b.go | 9 ++---- mod/primitives/pkg/bytes/b20.go | 2 +- mod/primitives/pkg/bytes/b32.go | 2 +- mod/primitives/pkg/bytes/b4.go | 2 +- mod/primitives/pkg/bytes/b48.go | 2 +- mod/primitives/pkg/bytes/b8.go | 2 +- mod/primitives/pkg/bytes/b96.go | 2 +- mod/primitives/pkg/bytes/utils.go | 12 +++---- mod/primitives/pkg/eip4844/blob.go | 4 +-- mod/primitives/pkg/eip4844/kzg_commitment.go | 3 -- .../pkg/{ => encoding}/hex/bytes.go | 18 ++++------- .../pkg/{ => encoding}/hex/bytes_test.go | 2 +- .../pkg/{ => encoding}/hex/const.go | 0 .../pkg/{ => encoding}/hex/errors.go | 31 ++++++------------- .../pkg/{ => encoding}/hex/format.go | 0 .../pkg/{ => encoding}/hex/hex_test.go | 2 +- mod/primitives/pkg/{ => encoding}/hex/json.go | 6 ++-- .../pkg/{ => encoding}/hex/nibble.go | 0 .../pkg/{ => encoding}/hex/string.go | 0 mod/primitives/pkg/{ => encoding}/hex/u64.go | 0 .../pkg/{ => encoding}/hex/u64_test.go | 2 +- mod/primitives/pkg/math/u256.go | 2 +- mod/primitives/pkg/math/u64.go | 8 ++--- mod/primitives/pkg/math/u64_test.go | 2 +- mod/primitives/pkg/net/jwt/jwt.go | 2 +- mod/primitives/pkg/net/jwt/jwt_test.go | 2 +- mod/storage/pkg/filedb/range_db.go | 2 +- 27 files changed, 41 insertions(+), 78 deletions(-) rename mod/primitives/pkg/{ => encoding}/hex/bytes.go (85%) rename mod/primitives/pkg/{ => encoding}/hex/bytes_test.go (98%) rename mod/primitives/pkg/{ => encoding}/hex/const.go (100%) rename mod/primitives/pkg/{ => encoding}/hex/errors.go (58%) rename mod/primitives/pkg/{ => encoding}/hex/format.go (100%) rename mod/primitives/pkg/{ => encoding}/hex/hex_test.go (99%) rename mod/primitives/pkg/{ => encoding}/hex/json.go (91%) rename mod/primitives/pkg/{ => encoding}/hex/nibble.go (100%) rename mod/primitives/pkg/{ => encoding}/hex/string.go (100%) rename mod/primitives/pkg/{ => encoding}/hex/u64.go (100%) rename mod/primitives/pkg/{ => encoding}/hex/u64_test.go (97%) diff --git a/mod/primitives/pkg/bytes/b.go b/mod/primitives/pkg/bytes/b.go index 2ce3f8aad7..457c5e307d 100644 --- a/mod/primitives/pkg/bytes/b.go +++ b/mod/primitives/pkg/bytes/b.go @@ -22,14 +22,9 @@ package bytes import ( - "reflect" - - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" ) -//nolint:gochecknoglobals // reflect.Type of Bytes set at runtime -var bytesT = reflect.TypeOf(Bytes(nil)) - // Bytes marshals/unmarshals as a JSON string with 0x prefix. // The empty slice marshals as "0x". type Bytes []byte @@ -41,7 +36,7 @@ func (b Bytes) MarshalText() ([]byte, error) { // UnmarshalJSON implements json.Unmarshaler. func (b *Bytes) UnmarshalJSON(input []byte) error { - return hex.UnmarshalJSONText(input, b, bytesT) + return hex.UnmarshalJSONText(input, b) } // UnmarshalText implements encoding.TextUnmarshaler. diff --git a/mod/primitives/pkg/bytes/b20.go b/mod/primitives/pkg/bytes/b20.go index bc752b2ea1..ab679f2499 100644 --- a/mod/primitives/pkg/bytes/b20.go +++ b/mod/primitives/pkg/bytes/b20.go @@ -22,7 +22,7 @@ package bytes import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/berachain/beacon-kit/mod/primitives/pkg/ssz/types" ) diff --git a/mod/primitives/pkg/bytes/b32.go b/mod/primitives/pkg/bytes/b32.go index e21ce9db2d..1a9fbd033b 100644 --- a/mod/primitives/pkg/bytes/b32.go +++ b/mod/primitives/pkg/bytes/b32.go @@ -22,7 +22,7 @@ package bytes import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/berachain/beacon-kit/mod/primitives/pkg/ssz/types" ) diff --git a/mod/primitives/pkg/bytes/b4.go b/mod/primitives/pkg/bytes/b4.go index aa070349ff..d92331f71f 100644 --- a/mod/primitives/pkg/bytes/b4.go +++ b/mod/primitives/pkg/bytes/b4.go @@ -22,7 +22,7 @@ package bytes import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/berachain/beacon-kit/mod/primitives/pkg/ssz/types" ) diff --git a/mod/primitives/pkg/bytes/b48.go b/mod/primitives/pkg/bytes/b48.go index 25b5000107..93683f2989 100644 --- a/mod/primitives/pkg/bytes/b48.go +++ b/mod/primitives/pkg/bytes/b48.go @@ -22,7 +22,7 @@ package bytes import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/berachain/beacon-kit/mod/primitives/pkg/ssz/types" "github.com/prysmaticlabs/gohashtree" ) diff --git a/mod/primitives/pkg/bytes/b8.go b/mod/primitives/pkg/bytes/b8.go index 18c5adbfd9..caa6bd4d7a 100644 --- a/mod/primitives/pkg/bytes/b8.go +++ b/mod/primitives/pkg/bytes/b8.go @@ -22,7 +22,7 @@ package bytes import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/berachain/beacon-kit/mod/primitives/pkg/ssz/types" ) diff --git a/mod/primitives/pkg/bytes/b96.go b/mod/primitives/pkg/bytes/b96.go index af5289e2ee..22f835448d 100644 --- a/mod/primitives/pkg/bytes/b96.go +++ b/mod/primitives/pkg/bytes/b96.go @@ -22,7 +22,7 @@ package bytes import ( - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/berachain/beacon-kit/mod/primitives/pkg/ssz/types" "github.com/prysmaticlabs/gohashtree" ) diff --git a/mod/primitives/pkg/bytes/utils.go b/mod/primitives/pkg/bytes/utils.go index 76bcd96ea0..ff71bfdce7 100644 --- a/mod/primitives/pkg/bytes/utils.go +++ b/mod/primitives/pkg/bytes/utils.go @@ -21,10 +21,8 @@ package bytes import ( - "reflect" - "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" ) // ------------------------------ Helpers ------------------------------ @@ -108,13 +106,13 @@ func ExtendToSize(slice []byte, length int) []byte { // UnmarshalFixedJSON decodes the input as a string with 0x prefix. The length // of out determines the required input length. This function is commonly used // to implement the UnmarshalJSON method for fixed-size types. -func UnmarshalFixedJSON(typ reflect.Type, input, out []byte) error { - return hex.DecodeFixedJSON(typ, bytesT, input, out) +func UnmarshalFixedJSON(input, out []byte) error { + return hex.DecodeFixedJSON(input, out) } // UnmarshalFixedText decodes the input as a string with 0x prefix. The length // of out determines the required input length. This function is commonly used // to implement the UnmarshalText method for fixed-size types. -func UnmarshalFixedText(typename string, input, out []byte) error { - return hex.DecodeFixedText(typename, input, out) +func UnmarshalFixedText(input, out []byte) error { + return hex.DecodeFixedText(input, out) } diff --git a/mod/primitives/pkg/eip4844/blob.go b/mod/primitives/pkg/eip4844/blob.go index 4e779db9b2..6e4ab7f3e1 100644 --- a/mod/primitives/pkg/eip4844/blob.go +++ b/mod/primitives/pkg/eip4844/blob.go @@ -21,8 +21,6 @@ package eip4844 import ( - "reflect" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" ) @@ -31,7 +29,7 @@ type Blob [131072]byte // UnmarshalJSON parses a blob in hex syntax. func (b *Blob) UnmarshalJSON(input []byte) error { - return bytes.UnmarshalFixedJSON(reflect.TypeOf(Blob{}), input, b[:]) + return bytes.UnmarshalFixedJSON(input, b[:]) } // MarshalText returns the hex representation of b. diff --git a/mod/primitives/pkg/eip4844/kzg_commitment.go b/mod/primitives/pkg/eip4844/kzg_commitment.go index 05da6d187a..4b3d93c4cc 100644 --- a/mod/primitives/pkg/eip4844/kzg_commitment.go +++ b/mod/primitives/pkg/eip4844/kzg_commitment.go @@ -21,8 +21,6 @@ package eip4844 import ( - "reflect" - "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" "github.com/berachain/beacon-kit/mod/primitives/pkg/constants" "github.com/berachain/beacon-kit/mod/primitives/pkg/crypto/sha256" @@ -63,7 +61,6 @@ func (c KZGCommitment) HashTreeRoot() ([32]byte, error) { // UnmarshalJSON parses a commitment in hex syntax. func (c *KZGCommitment) UnmarshalJSON(input []byte) error { return bytes.UnmarshalFixedJSON( - reflect.TypeOf(KZGCommitment{}), input, c[:], ) diff --git a/mod/primitives/pkg/hex/bytes.go b/mod/primitives/pkg/encoding/hex/bytes.go similarity index 85% rename from mod/primitives/pkg/hex/bytes.go rename to mod/primitives/pkg/encoding/hex/bytes.go index 676a18470a..4f70dc6cca 100644 --- a/mod/primitives/pkg/hex/bytes.go +++ b/mod/primitives/pkg/encoding/hex/bytes.go @@ -22,7 +22,6 @@ package hex import ( "encoding/hex" - "reflect" "github.com/berachain/beacon-kit/mod/errors" ) @@ -49,29 +48,24 @@ func UnmarshalByteText(input []byte) ([]byte, error) { // DecodeFixedJSON decodes the input as a string with 0x prefix. The length // of out determines the required input length. This function is commonly used // to implement the UnmarshalJSON method for fixed-size types. -func DecodeFixedJSON(typ reflect.Type, - bytesT reflect.Type, - input, - out []byte) error { +func DecodeFixedJSON(input, out []byte) error { if !isQuotedString(input) { - return WrapUnmarshalError(ErrNonQuotedString, bytesT) + return ErrNonQuotedString } - return WrapUnmarshalError( - DecodeFixedText(typ.String(), input[1:len(input)-1], out), typ, - ) + return DecodeFixedText(input[1:len(input)-1], out) } // DecodeFixedText decodes the input as a string with 0x prefix. The length // of out determines the required input length. -func DecodeFixedText(typename string, input, out []byte) error { +func DecodeFixedText(input, out []byte) error { raw, err := formatAndValidateText(input) if err != nil { return err } if len(raw)/encDecRatio != len(out) { return errors.Newf( - "hex string has length %d, want %d for %s", - len(raw), len(out)*encDecRatio, typename, + "hex string has length %d, want %d", + len(raw), len(out)*encDecRatio, ) } // Pre-verify syntax and decode in a single pass diff --git a/mod/primitives/pkg/hex/bytes_test.go b/mod/primitives/pkg/encoding/hex/bytes_test.go similarity index 98% rename from mod/primitives/pkg/hex/bytes_test.go rename to mod/primitives/pkg/encoding/hex/bytes_test.go index 5541474044..5839040f33 100644 --- a/mod/primitives/pkg/hex/bytes_test.go +++ b/mod/primitives/pkg/encoding/hex/bytes_test.go @@ -26,7 +26,7 @@ import ( "strconv" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/hex/const.go b/mod/primitives/pkg/encoding/hex/const.go similarity index 100% rename from mod/primitives/pkg/hex/const.go rename to mod/primitives/pkg/encoding/hex/const.go diff --git a/mod/primitives/pkg/hex/errors.go b/mod/primitives/pkg/encoding/hex/errors.go similarity index 58% rename from mod/primitives/pkg/hex/errors.go rename to mod/primitives/pkg/encoding/hex/errors.go index ffaea4c3e9..e64e4516a6 100644 --- a/mod/primitives/pkg/hex/errors.go +++ b/mod/primitives/pkg/encoding/hex/errors.go @@ -21,31 +21,18 @@ package hex import ( - "encoding/json" "errors" - "reflect" ) var ( - ErrEmptyString = errors.New("empty hex string") - ErrMissingPrefix = errors.New("hex string without 0x prefix") - ErrOddLength = errors.New("hex string of odd length") - ErrNonQuotedString = errors.New("non-quoted hex string") - ErrInvalidString = errors.New("invalid hex string") - - ErrLeadingZero = errors.New("hex number with leading zero digits") - ErrEmptyNumber = errors.New("hex string \"0x\"") - ErrUint64Range = errors.New("hex number > 64 bits") - ErrBig256Range = errors.New("hex number > 256 bits") - + ErrEmptyString = errors.New("empty hex string") + ErrMissingPrefix = errors.New("hex string without 0x prefix") + ErrOddLength = errors.New("hex string of odd length") + ErrNonQuotedString = errors.New("non-quoted hex string") + ErrInvalidString = errors.New("invalid hex string") + ErrLeadingZero = errors.New("hex number with leading zero digits") + ErrEmptyNumber = errors.New("hex string \"0x\"") + ErrUint64Range = errors.New("hex number > 64 bits") + ErrBig256Range = errors.New("hex number > 256 bits") ErrInvalidBigWordSize = errors.New("weird big.Word size") ) - -// WrapUnmarshalError wraps an error occurring during JSON unmarshaling. -func WrapUnmarshalError(err error, t reflect.Type) error { - if err != nil { - err = &json.UnmarshalTypeError{Value: err.Error(), Type: t} - } - - return err -} diff --git a/mod/primitives/pkg/hex/format.go b/mod/primitives/pkg/encoding/hex/format.go similarity index 100% rename from mod/primitives/pkg/hex/format.go rename to mod/primitives/pkg/encoding/hex/format.go diff --git a/mod/primitives/pkg/hex/hex_test.go b/mod/primitives/pkg/encoding/hex/hex_test.go similarity index 99% rename from mod/primitives/pkg/hex/hex_test.go rename to mod/primitives/pkg/encoding/hex/hex_test.go index 4cfb154486..3eafea8c2a 100644 --- a/mod/primitives/pkg/hex/hex_test.go +++ b/mod/primitives/pkg/encoding/hex/hex_test.go @@ -29,7 +29,7 @@ import ( "strconv" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/hex/json.go b/mod/primitives/pkg/encoding/hex/json.go similarity index 91% rename from mod/primitives/pkg/hex/json.go rename to mod/primitives/pkg/encoding/hex/json.go index b30444f30e..9e62350aed 100644 --- a/mod/primitives/pkg/hex/json.go +++ b/mod/primitives/pkg/encoding/hex/json.go @@ -22,7 +22,6 @@ package hex import ( "encoding" - "reflect" ) // UnmarshalJSONText unmarshals a JSON string with a 0x prefix into a given @@ -30,10 +29,9 @@ import ( // quotes before passing the inner content to the UnmarshalText method. func UnmarshalJSONText(input []byte, u encoding.TextUnmarshaler, - t reflect.Type, ) error { if err := ValidateUnmarshalInput(input); err != nil { - return WrapUnmarshalError(err, t) + return err } - return WrapUnmarshalError(u.UnmarshalText(input[1:len(input)-1]), t) + return u.UnmarshalText(input[1 : len(input)-1]) } diff --git a/mod/primitives/pkg/hex/nibble.go b/mod/primitives/pkg/encoding/hex/nibble.go similarity index 100% rename from mod/primitives/pkg/hex/nibble.go rename to mod/primitives/pkg/encoding/hex/nibble.go diff --git a/mod/primitives/pkg/hex/string.go b/mod/primitives/pkg/encoding/hex/string.go similarity index 100% rename from mod/primitives/pkg/hex/string.go rename to mod/primitives/pkg/encoding/hex/string.go diff --git a/mod/primitives/pkg/hex/u64.go b/mod/primitives/pkg/encoding/hex/u64.go similarity index 100% rename from mod/primitives/pkg/hex/u64.go rename to mod/primitives/pkg/encoding/hex/u64.go diff --git a/mod/primitives/pkg/hex/u64_test.go b/mod/primitives/pkg/encoding/hex/u64_test.go similarity index 97% rename from mod/primitives/pkg/hex/u64_test.go rename to mod/primitives/pkg/encoding/hex/u64_test.go index 1244ee1a6c..ebaf86880d 100644 --- a/mod/primitives/pkg/hex/u64_test.go +++ b/mod/primitives/pkg/encoding/hex/u64_test.go @@ -23,7 +23,7 @@ package hex_test import ( "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/math/u256.go b/mod/primitives/pkg/math/u256.go index 5a275425a1..f27f450616 100644 --- a/mod/primitives/pkg/math/u256.go +++ b/mod/primitives/pkg/math/u256.go @@ -24,7 +24,7 @@ import ( "math/big" byteslib "github.com/berachain/beacon-kit/mod/primitives/pkg/bytes" - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/holiman/uint256" ) diff --git a/mod/primitives/pkg/math/u64.go b/mod/primitives/pkg/math/u64.go index f51157d0aa..1e6b61979e 100644 --- a/mod/primitives/pkg/math/u64.go +++ b/mod/primitives/pkg/math/u64.go @@ -24,16 +24,12 @@ import ( "encoding/binary" "math/big" "math/bits" - "reflect" "strconv" - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/berachain/beacon-kit/mod/primitives/pkg/ssz/constants" ) -//nolint:gochecknoglobals // stores the reflect type of U64. -var uint64T = reflect.TypeOf(U64(0)) - //nolint:lll type ( // U64 represents a 64-bit unsigned integer that is both SSZ and JSON @@ -116,7 +112,7 @@ func (u U64) MarshalText() ([]byte, error) { // UnmarshalJSON implements json.Unmarshaler. func (u *U64) UnmarshalJSON(input []byte) error { - return hex.UnmarshalJSONText(input, u, uint64T) + return hex.UnmarshalJSONText(input, u) } // ---------------------------------- Hex ---------------------------------- diff --git a/mod/primitives/pkg/math/u64_test.go b/mod/primitives/pkg/math/u64_test.go index 754ae8a6ff..c52c22c4ff 100644 --- a/mod/primitives/pkg/math/u64_test.go +++ b/mod/primitives/pkg/math/u64_test.go @@ -25,7 +25,7 @@ import ( "reflect" "testing" - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/berachain/beacon-kit/mod/primitives/pkg/math" "github.com/stretchr/testify/require" ) diff --git a/mod/primitives/pkg/net/jwt/jwt.go b/mod/primitives/pkg/net/jwt/jwt.go index cf8fd1d1ab..bff33122bc 100644 --- a/mod/primitives/pkg/net/jwt/jwt.go +++ b/mod/primitives/pkg/net/jwt/jwt.go @@ -26,7 +26,7 @@ import ( "strings" gethprimitives "github.com/berachain/beacon-kit/mod/geth-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" ) // HexRegexp is a regular expression to match hexadecimal characters. diff --git a/mod/primitives/pkg/net/jwt/jwt_test.go b/mod/primitives/pkg/net/jwt/jwt_test.go index 14fa157bc1..588c08a2fb 100644 --- a/mod/primitives/pkg/net/jwt/jwt_test.go +++ b/mod/primitives/pkg/net/jwt/jwt_test.go @@ -26,7 +26,7 @@ import ( "testing" gethprimitives "github.com/berachain/beacon-kit/mod/geth-primitives" - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" "github.com/berachain/beacon-kit/mod/primitives/pkg/net/jwt" "github.com/stretchr/testify/require" ) diff --git a/mod/storage/pkg/filedb/range_db.go b/mod/storage/pkg/filedb/range_db.go index 1b104624d4..c32ebc4e92 100644 --- a/mod/storage/pkg/filedb/range_db.go +++ b/mod/storage/pkg/filedb/range_db.go @@ -26,7 +26,7 @@ import ( "strconv" "github.com/berachain/beacon-kit/mod/errors" - "github.com/berachain/beacon-kit/mod/primitives/pkg/hex" + "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" db "github.com/berachain/beacon-kit/mod/storage/pkg/interfaces" "github.com/berachain/beacon-kit/mod/storage/pkg/pruner" ) From d82e1712505e3987ae5a59c35f35a37c07679bd5 Mon Sep 17 00:00:00 2001 From: itsdevbear Date: Thu, 4 Jul 2024 12:09:43 -0400 Subject: [PATCH 2/4] bet --- .github/workflows/pipeline.yml | 1 + build/scripts/testing.mk | 8 ++++++++ mod/primitives/pkg/bytes/b96_test.go | 7 ++++++- mod/primitives/pkg/bytes/b_test.go | 4 ++-- mod/primitives/pkg/encoding/hex/bytes_test.go | 10 +++------- mod/primitives/pkg/encoding/hex/hex_test.go | 2 -- mod/primitives/pkg/math/u64_test.go | 7 ++----- 7 files changed, 22 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index ea4964ff6d..42b84ea6c6 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -69,6 +69,7 @@ jobs: - "generate-check" - "tidy-sync-check" - "test-unit-cover" + - "test-unit-bench" - "test-unit-fuzz" - "test-forge-cover" - "test-forge-fuzz" diff --git a/build/scripts/testing.mk b/build/scripts/testing.mk index 2e192d2e2c..65d97b7600 100644 --- a/build/scripts/testing.mk +++ b/build/scripts/testing.mk @@ -197,6 +197,10 @@ test-unit-cover: ## run golang unit tests with coverage @go list -f '{{.Dir}}/...' -m | xargs \ go test -race -coverprofile=test-unit-cover.txt +test-unit-bench: ## run golang unit benchmarks + @echo "Running unit tests with benchmarks..." + @go list -f '{{.Dir}}/...' -m | xargs \ + go test -bench=. -run=^$ -benchmem # On MacOS, if there is a linking issue on the fuzz tests, # use the old linker with flags -ldflags=-extldflags=-Wl,-ld_classic @@ -207,6 +211,10 @@ test-unit-fuzz: ## run fuzz tests go test ./mod/payload/pkg/cache/... -fuzz=FuzzPayloadIDCacheConcurrency -fuzztime=${SHORT_FUZZ_TIME} go test -fuzz=FuzzHashTreeRoot ./mod/primitives/pkg/merkle -fuzztime=${MEDIUM_FUZZ_TIME} + + + + test-e2e: ## run e2e tests @$(MAKE) build-docker VERSION=kurtosis-local test-e2e-no-build diff --git a/mod/primitives/pkg/bytes/b96_test.go b/mod/primitives/pkg/bytes/b96_test.go index 620e5019e8..eaba9aea8e 100644 --- a/mod/primitives/pkg/bytes/b96_test.go +++ b/mod/primitives/pkg/bytes/b96_test.go @@ -186,7 +186,12 @@ func TestB96HashTreeRoot(t *testing.T) { merkleizer := merkleizer.New[[32]byte, bytes.B32]() root2, err := merkleizer.MerkleizeByteSlice(tt.input[:]) require.NoError(t, err) - require.Equal(t, root1, root2, "HashTreeRoot and HashTreeRoot2 should produce the same result") + require.Equal( + t, + root1, + root2, + "HashTreeRoot and HashTreeRoot2 should produce the same result", + ) }) } } diff --git a/mod/primitives/pkg/bytes/b_test.go b/mod/primitives/pkg/bytes/b_test.go index 703acce598..55577ce60b 100644 --- a/mod/primitives/pkg/bytes/b_test.go +++ b/mod/primitives/pkg/bytes/b_test.go @@ -1337,7 +1337,7 @@ func TestUnmarshalFixedJSON(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - err := bytes.UnmarshalFixedJSON(tt.typ, tt.input, tt.out) + err := bytes.UnmarshalFixedJSON(tt.input, tt.out) if tt.wantErr { require.Error(t, err, "Test case: %s", tt.name) } else { @@ -1385,7 +1385,7 @@ func TestUnmarshalFixedText(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - err := bytes.UnmarshalFixedText(tt.typename, tt.input, tt.out) + err := bytes.UnmarshalFixedText(tt.input, tt.out) if tt.wantErr { require.Error(t, err, "Test case: %s", tt.name) } else { diff --git a/mod/primitives/pkg/encoding/hex/bytes_test.go b/mod/primitives/pkg/encoding/hex/bytes_test.go index 5839040f33..60e47227e0 100644 --- a/mod/primitives/pkg/encoding/hex/bytes_test.go +++ b/mod/primitives/pkg/encoding/hex/bytes_test.go @@ -13,7 +13,7 @@ // LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). // // TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +// AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, // EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND // TITLE. @@ -22,7 +22,6 @@ package hex_test import ( - "reflect" "strconv" "testing" @@ -149,7 +148,7 @@ func TestDecodeFixedText(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { out := make([]byte, len(tt.expected)) - err := hex.DecodeFixedText(tt.typename, tt.input, out) + err := hex.DecodeFixedText(tt.input, out) if tt.expectErr { require.Error(t, err, "Test case : %s", tt.name) } else { @@ -201,8 +200,6 @@ func TestDecodeFixedJSON(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { err := hex.DecodeFixedJSON( - reflect.TypeOf(tt.typename), - reflect.TypeOf(tt.input), tt.input, tt.out, ) @@ -217,7 +214,6 @@ func TestDecodeFixedJSON(t *testing.T) { } func BenchmarkDecodeFixedText(b *testing.B) { - typename := "exampleType" sizes := []int{100, 1000, 10000} // Different input sizes for _, size := range sizes { @@ -240,7 +236,7 @@ func BenchmarkDecodeFixedText(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - err := hex.DecodeFixedText(typename, input, out) + err := hex.DecodeFixedText(input, out) if err != nil { b.Fatalf("DecodeFixedText failed: %v", err) } diff --git a/mod/primitives/pkg/encoding/hex/hex_test.go b/mod/primitives/pkg/encoding/hex/hex_test.go index 3eafea8c2a..0300f7ea45 100644 --- a/mod/primitives/pkg/encoding/hex/hex_test.go +++ b/mod/primitives/pkg/encoding/hex/hex_test.go @@ -25,7 +25,6 @@ import ( "bytes" "encoding" "math/big" - "reflect" "strconv" "testing" @@ -334,7 +333,6 @@ func TestUnmarshalJSONText(t *testing.T) { err := hex.UnmarshalJSONText( tt.input, tt.unmarshaler, - reflect.TypeOf(tt.unmarshaler), ) if tt.expectErr { require.Error(t, err, "Test case: %s", tt.name) diff --git a/mod/primitives/pkg/math/u64_test.go b/mod/primitives/pkg/math/u64_test.go index c52c22c4ff..44cdbb586c 100644 --- a/mod/primitives/pkg/math/u64_test.go +++ b/mod/primitives/pkg/math/u64_test.go @@ -22,7 +22,6 @@ package math_test import ( "math/big" - "reflect" "testing" "github.com/berachain/beacon-kit/mod/primitives/pkg/encoding/hex" @@ -186,10 +185,8 @@ func TestU64_UnmarshalJSON(t *testing.T) { {"Zero value", "\"0x0\"", 0, nil}, {"Max uint64 value", "\"0xffffffffffffffff\"", ^uint64(0), nil}, {"Invalid hex string", "\"0xxyz\"", 0, - hex.WrapUnmarshalError( - hex.ErrInvalidString, - reflect.TypeOf(math.U64(0)), - )}, + hex.ErrInvalidString, + }, } for _, tt := range tests { From 37618659342dc9b65763b14def7fdaaa373da816 Mon Sep 17 00:00:00 2001 From: itsdevbear Date: Thu, 4 Jul 2024 12:20:59 -0400 Subject: [PATCH 3/4] fix --- mod/primitives/pkg/merkle/tree_test.go | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/mod/primitives/pkg/merkle/tree_test.go b/mod/primitives/pkg/merkle/tree_test.go index 12714d9f8a..e2eee0dd43 100644 --- a/mod/primitives/pkg/merkle/tree_test.go +++ b/mod/primitives/pkg/merkle/tree_test.go @@ -29,11 +29,8 @@ import ( "github.com/stretchr/testify/require" ) -const ( - treeDepth uint8 = 32 -) - func TestNewTreeFromLeavesWithDepth_NoItemsProvided(t *testing.T) { + treeDepth := uint8(32) _, err := merkle.NewTreeFromLeavesWithDepth[[32]byte]( nil, treeDepth, @@ -69,6 +66,7 @@ func TestNewTreeFromLeavesWithDepth_DepthSupport(t *testing.T) { } func TestMerkleTree_IsValidMerkleBranch(t *testing.T) { + treeDepth := uint8(32) items := [][32]byte{ byteslib.ToBytes32([]byte("A")), byteslib.ToBytes32([]byte("B")), @@ -123,6 +121,7 @@ func TestMerkleTree_IsValidMerkleBranch(t *testing.T) { } func TestMerkleTree_VerifyProof(t *testing.T) { + treeDepth := uint8(32) items := [][32]byte{ byteslib.ToBytes32([]byte("A")), byteslib.ToBytes32([]byte("B")), @@ -166,6 +165,7 @@ func TestMerkleTree_VerifyProof(t *testing.T) { } func TestMerkleTree_NegativeIndexes(t *testing.T) { + treeDepth := uint8(32) items := [][32]byte{ byteslib.ToBytes32([]byte("A")), byteslib.ToBytes32([]byte("B")), @@ -186,6 +186,7 @@ func TestMerkleTree_NegativeIndexes(t *testing.T) { } func TestMerkleTree_VerifyProof_TrieUpdated(t *testing.T) { + treeDepth := uint8(32) items := [][32]byte{ {1}, {2}, @@ -229,6 +230,7 @@ func TestMerkleTree_VerifyProof_TrieUpdated(t *testing.T) { } func BenchmarkNewTreeFromLeavesWithDepth(b *testing.B) { + treeDepth := uint8(32) items := [][32]byte{ byteslib.ToBytes32([]byte("A")), byteslib.ToBytes32([]byte("BB")), @@ -248,6 +250,7 @@ func BenchmarkNewTreeFromLeavesWithDepth(b *testing.B) { } func BenchmarkInsertTrie_Optimized(b *testing.B) { + treeDepth := uint8(32) b.StopTimer() numDeposits := 16000 items := make([][32]byte, numDeposits) @@ -268,6 +271,7 @@ func BenchmarkInsertTrie_Optimized(b *testing.B) { } func BenchmarkGenerateProof(b *testing.B) { + treeDepth := uint8(32) b.StopTimer() items := [][32]byte{ byteslib.ToBytes32([]byte("A")), @@ -292,6 +296,7 @@ func BenchmarkGenerateProof(b *testing.B) { } func BenchmarkIsValidMerkleBranch(b *testing.B) { + treeDepth := uint8(4) b.StopTimer() items := [][32]byte{ byteslib.ToBytes32([]byte("A")), @@ -306,6 +311,7 @@ func BenchmarkIsValidMerkleBranch(b *testing.B) { items, treeDepth, ) + require.NoError(b, err) proof, err := m.MerkleProofWithMixin(2) require.NoError(b, err) @@ -314,10 +320,9 @@ func BenchmarkIsValidMerkleBranch(b *testing.B) { require.NoError(b, err) b.StartTimer() for i := 0; i < b.N; i++ { - if ok := merkle.IsValidMerkleBranch( - items[2], proof, treeDepth, 2, root, - ); !ok { - b.Error("Merkle proof did not verify") - } + ok := merkle.IsValidMerkleBranch( + items[2], proof, treeDepth+1, 2, root, + ) + require.True(b, ok, "Merkle proof did not verify") } } From efe06311f49411294778ff5850a8940c2112149b Mon Sep 17 00:00:00 2001 From: itsdevbear Date: Thu, 4 Jul 2024 12:25:29 -0400 Subject: [PATCH 4/4] bet --- beacond/go.sum | 1 - mod/cli/go.sum | 1 - mod/config/go.sum | 1 - mod/consensus-types/go.sum | 1 - mod/consensus/go.sum | 1 - mod/node-core/go.sum | 1 - mod/runtime/go.sum | 1 - mod/storage/go.sum | 1 - testing/go.mod | 2 +- testing/go.sum | 4 ++-- 10 files changed, 3 insertions(+), 11 deletions(-) diff --git a/beacond/go.sum b/beacond/go.sum index e7b9079c00..0653d377cb 100644 --- a/beacond/go.sum +++ b/beacond/go.sum @@ -177,7 +177,6 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0 h1:vO9K86uuk2ZBuiOjAGM/yFrGEWdNPEv/wmPxFRzuFRo= -github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0/go.mod h1:64cB2wvltmK5plHlJFLYOZYGsaTKNW2EZgcHBisHP7o= github.com/cometbft/cometbft-db v0.12.0 h1:v77/z0VyfSU7k682IzZeZPFZrQAKiQwkqGN0QzAjMi0= github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0 h1:X6qp8ZhLKhk1Vw4JHqWVZKt21xomVWykr6ltY4yXIno= diff --git a/mod/cli/go.sum b/mod/cli/go.sum index bbc99a43d9..44414706d3 100644 --- a/mod/cli/go.sum +++ b/mod/cli/go.sum @@ -177,7 +177,6 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0 h1:vO9K86uuk2ZBuiOjAGM/yFrGEWdNPEv/wmPxFRzuFRo= -github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0/go.mod h1:64cB2wvltmK5plHlJFLYOZYGsaTKNW2EZgcHBisHP7o= github.com/cometbft/cometbft-db v0.12.0 h1:v77/z0VyfSU7k682IzZeZPFZrQAKiQwkqGN0QzAjMi0= github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0 h1:X6qp8ZhLKhk1Vw4JHqWVZKt21xomVWykr6ltY4yXIno= diff --git a/mod/config/go.sum b/mod/config/go.sum index 4e9459885a..0f65cca195 100644 --- a/mod/config/go.sum +++ b/mod/config/go.sum @@ -61,7 +61,6 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0 h1:vO9K86uuk2ZBuiOjAGM/yFrGEWdNPEv/wmPxFRzuFRo= -github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0/go.mod h1:64cB2wvltmK5plHlJFLYOZYGsaTKNW2EZgcHBisHP7o= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0 h1:X6qp8ZhLKhk1Vw4JHqWVZKt21xomVWykr6ltY4yXIno= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0/go.mod h1:NDFKiBBD8HJC6QQLAoUI99YhsiRZtg2+FJWfk6A6m6o= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= diff --git a/mod/consensus-types/go.sum b/mod/consensus-types/go.sum index 78c4238cec..b71cc3781f 100644 --- a/mod/consensus-types/go.sum +++ b/mod/consensus-types/go.sum @@ -47,7 +47,6 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0 h1:vO9K86uuk2ZBuiOjAGM/yFrGEWdNPEv/wmPxFRzuFRo= -github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0/go.mod h1:64cB2wvltmK5plHlJFLYOZYGsaTKNW2EZgcHBisHP7o= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0 h1:X6qp8ZhLKhk1Vw4JHqWVZKt21xomVWykr6ltY4yXIno= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0/go.mod h1:NDFKiBBD8HJC6QQLAoUI99YhsiRZtg2+FJWfk6A6m6o= github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= diff --git a/mod/consensus/go.sum b/mod/consensus/go.sum index 3e8d99f9af..0615c19b08 100644 --- a/mod/consensus/go.sum +++ b/mod/consensus/go.sum @@ -91,7 +91,6 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0 h1:vO9K86uuk2ZBuiOjAGM/yFrGEWdNPEv/wmPxFRzuFRo= -github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0/go.mod h1:64cB2wvltmK5plHlJFLYOZYGsaTKNW2EZgcHBisHP7o= github.com/cometbft/cometbft-db v0.12.0 h1:v77/z0VyfSU7k682IzZeZPFZrQAKiQwkqGN0QzAjMi0= github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0 h1:X6qp8ZhLKhk1Vw4JHqWVZKt21xomVWykr6ltY4yXIno= diff --git a/mod/node-core/go.sum b/mod/node-core/go.sum index 9488b60b82..62a093d7dc 100644 --- a/mod/node-core/go.sum +++ b/mod/node-core/go.sum @@ -159,7 +159,6 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0 h1:vO9K86uuk2ZBuiOjAGM/yFrGEWdNPEv/wmPxFRzuFRo= -github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0/go.mod h1:64cB2wvltmK5plHlJFLYOZYGsaTKNW2EZgcHBisHP7o= github.com/cometbft/cometbft-db v0.12.0 h1:v77/z0VyfSU7k682IzZeZPFZrQAKiQwkqGN0QzAjMi0= github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0 h1:X6qp8ZhLKhk1Vw4JHqWVZKt21xomVWykr6ltY4yXIno= diff --git a/mod/runtime/go.sum b/mod/runtime/go.sum index e339d72576..7daa3f604b 100644 --- a/mod/runtime/go.sum +++ b/mod/runtime/go.sum @@ -21,7 +21,6 @@ github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9D github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0 h1:vO9K86uuk2ZBuiOjAGM/yFrGEWdNPEv/wmPxFRzuFRo= -github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0/go.mod h1:64cB2wvltmK5plHlJFLYOZYGsaTKNW2EZgcHBisHP7o= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0 h1:X6qp8ZhLKhk1Vw4JHqWVZKt21xomVWykr6ltY4yXIno= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0/go.mod h1:NDFKiBBD8HJC6QQLAoUI99YhsiRZtg2+FJWfk6A6m6o= github.com/cosmos/crypto v0.0.0-20240312084433-de8f9c76030d h1:jvmjxQ1je5eI4/pBuw0hIh7cRQHypQFltn6tcMhwiUc= diff --git a/mod/storage/go.sum b/mod/storage/go.sum index 52516d1c02..f3a2c6463e 100644 --- a/mod/storage/go.sum +++ b/mod/storage/go.sum @@ -95,7 +95,6 @@ github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0 h1:vO9K86uuk2ZBuiOjAGM/yFrGEWdNPEv/wmPxFRzuFRo= -github.com/cometbft/cometbft v1.0.0-rc1.0.20240702102754-c4fa9a6225b0/go.mod h1:64cB2wvltmK5plHlJFLYOZYGsaTKNW2EZgcHBisHP7o= github.com/cometbft/cometbft-db v0.12.0 h1:v77/z0VyfSU7k682IzZeZPFZrQAKiQwkqGN0QzAjMi0= github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= github.com/cometbft/cometbft/api v1.0.0-rc.1.0.20240702102754-c4fa9a6225b0 h1:X6qp8ZhLKhk1Vw4JHqWVZKt21xomVWykr6ltY4yXIno= diff --git a/testing/go.mod b/testing/go.mod index dd32e49218..f4f035abc1 100644 --- a/testing/go.mod +++ b/testing/go.mod @@ -11,7 +11,7 @@ replace ( require ( cosmossdk.io/log v1.3.2-0.20240530141513-465410c75bce - github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240704044702-dcccc69b1d26 + github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240704053302-2b03b6131fab github.com/berachain/beacon-kit/mod/errors v0.0.0-20240624204855-d8809d5c8588 github.com/berachain/beacon-kit/mod/geth-primitives v0.0.0-20240630232851-507966e7b554 github.com/berachain/beacon-kit/mod/log v0.0.0-20240619234034-fe96d94eafef diff --git a/testing/go.sum b/testing/go.sum index f06a96404b..146f669e99 100644 --- a/testing/go.sum +++ b/testing/go.sum @@ -76,8 +76,8 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240704044702-dcccc69b1d26 h1:C6/b8a+cVE9RM8PMDJmQBsb9olymC8Rd6Cq/SpC/d3w= -github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240704044702-dcccc69b1d26/go.mod h1:0dFNxa2FhP1fpgb+yQMngF1mYfphl3SQQulpPuWZrX4= +github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240704053302-2b03b6131fab h1:fQzi0S2znCe9O3oZR3NOvvLw+YuAy1f2TWRRSEL7OLM= +github.com/berachain/beacon-kit/mod/consensus-types v0.0.0-20240704053302-2b03b6131fab/go.mod h1:0dFNxa2FhP1fpgb+yQMngF1mYfphl3SQQulpPuWZrX4= github.com/berachain/beacon-kit/mod/engine-primitives v0.0.0-20240624204855-d8809d5c8588 h1:xzUcoddAOV96URK/FQAxdJTfkcE0mK0Fq4CdHJA5wuI= github.com/berachain/beacon-kit/mod/engine-primitives v0.0.0-20240624204855-d8809d5c8588/go.mod h1:vBKE/+MvPSRztNcZMzVCYSMRo08zcqxgMcl4q1XepK4= github.com/berachain/beacon-kit/mod/errors v0.0.0-20240624204855-d8809d5c8588 h1:ttz1uBLuOA4BTpIi1rra+CSRiQaFxkgWcvIcGPmLyVw=