mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-02-01 08:35:24 -05:00
Compare commits
4 Commits
e2e-debugg
...
use_hashtr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4336a3e3ec | ||
|
|
aa104e7cbd | ||
|
|
4f10c2ee67 | ||
|
|
7869937d88 |
2
changelog/potuz_use_hashtree.md
Normal file
2
changelog/potuz_use_hashtree.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
### Added
|
||||||
|
- Add feature flag to use hashtree instead of gohashtre.
|
||||||
@@ -73,6 +73,7 @@ type Flags struct {
|
|||||||
DisableStakinContractCheck bool // Disables check for deposit contract when proposing blocks
|
DisableStakinContractCheck bool // Disables check for deposit contract when proposing blocks
|
||||||
IgnoreUnviableAttestations bool // Ignore attestations whose target state is not viable (avoids lagging-node DoS).
|
IgnoreUnviableAttestations bool // Ignore attestations whose target state is not viable (avoids lagging-node DoS).
|
||||||
|
|
||||||
|
EnableHashtree bool // Enables usage of the hashtree library for hashing
|
||||||
EnableVerboseSigVerification bool // EnableVerboseSigVerification specifies whether to verify individual signature if batch verification fails
|
EnableVerboseSigVerification bool // EnableVerboseSigVerification specifies whether to verify individual signature if batch verification fails
|
||||||
|
|
||||||
PrepareAllPayloads bool // PrepareAllPayloads informs the engine to prepare a block on every slot.
|
PrepareAllPayloads bool // PrepareAllPayloads informs the engine to prepare a block on every slot.
|
||||||
@@ -239,6 +240,10 @@ func ConfigureBeaconChain(ctx *cli.Context) error {
|
|||||||
logEnabled(enableFullSSZDataLogging)
|
logEnabled(enableFullSSZDataLogging)
|
||||||
cfg.EnableFullSSZDataLogging = true
|
cfg.EnableFullSSZDataLogging = true
|
||||||
}
|
}
|
||||||
|
if ctx.IsSet(enableHashtree.Name) {
|
||||||
|
logEnabled(enableHashtree)
|
||||||
|
cfg.EnableHashtree = true
|
||||||
|
}
|
||||||
cfg.EnableVerboseSigVerification = true
|
cfg.EnableVerboseSigVerification = true
|
||||||
if ctx.IsSet(disableVerboseSigVerification.Name) {
|
if ctx.IsSet(disableVerboseSigVerification.Name) {
|
||||||
logEnabled(disableVerboseSigVerification)
|
logEnabled(disableVerboseSigVerification)
|
||||||
|
|||||||
@@ -133,6 +133,10 @@ var (
|
|||||||
Name: "enable-beacon-rest-api",
|
Name: "enable-beacon-rest-api",
|
||||||
Usage: "(Experimental): Enables of the beacon REST API when querying a beacon node.",
|
Usage: "(Experimental): Enables of the beacon REST API when querying a beacon node.",
|
||||||
}
|
}
|
||||||
|
enableHashtree = &cli.BoolFlag{
|
||||||
|
Name: "enable-hashtree",
|
||||||
|
Usage: "(Experimental): Enables the hashthree hashing library.",
|
||||||
|
}
|
||||||
disableVerboseSigVerification = &cli.BoolFlag{
|
disableVerboseSigVerification = &cli.BoolFlag{
|
||||||
Name: "disable-verbose-sig-verification",
|
Name: "disable-verbose-sig-verification",
|
||||||
Usage: "Disables identifying invalid signatures if batch verification fails when processing block.",
|
Usage: "Disables identifying invalid signatures if batch verification fails when processing block.",
|
||||||
@@ -272,6 +276,7 @@ var BeaconChainFlags = combinedFlags([]cli.Flag{
|
|||||||
enableExperimentalAttestationPool,
|
enableExperimentalAttestationPool,
|
||||||
forceHeadFlag,
|
forceHeadFlag,
|
||||||
blacklistRoots,
|
blacklistRoots,
|
||||||
|
enableHashtree,
|
||||||
}, deprecatedBeaconFlags, deprecatedFlags, upcomingDeprecation)
|
}, deprecatedBeaconFlags, deprecatedFlags, upcomingDeprecation)
|
||||||
|
|
||||||
func combinedFlags(flags ...[]cli.Flag) []cli.Flag {
|
func combinedFlags(flags ...[]cli.Flag) []cli.Flag {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ go_library(
|
|||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
"//beacon-chain/state/stateutil:go_default_library",
|
"//beacon-chain/state/stateutil:go_default_library",
|
||||||
|
"//config/features:go_default_library",
|
||||||
"//config/fieldparams:go_default_library",
|
"//config/fieldparams:go_default_library",
|
||||||
"//config/params:go_default_library",
|
"//config/params:go_default_library",
|
||||||
"//consensus-types:go_default_library",
|
"//consensus-types:go_default_library",
|
||||||
@@ -34,9 +35,11 @@ go_library(
|
|||||||
"//proto/prysm/v1alpha1:go_default_library",
|
"//proto/prysm/v1alpha1:go_default_library",
|
||||||
"//proto/prysm/v1alpha1/validator-client:go_default_library",
|
"//proto/prysm/v1alpha1/validator-client:go_default_library",
|
||||||
"//runtime/version:go_default_library",
|
"//runtime/version:go_default_library",
|
||||||
|
"@com_github_offchainlabs_hashtree//:go_default_library",
|
||||||
"@com_github_pkg_errors//:go_default_library",
|
"@com_github_pkg_errors//:go_default_library",
|
||||||
"@com_github_prysmaticlabs_fastssz//:go_default_library",
|
"@com_github_prysmaticlabs_fastssz//:go_default_library",
|
||||||
"@com_github_prysmaticlabs_gohashtree//:go_default_library",
|
"@com_github_prysmaticlabs_gohashtree//:go_default_library",
|
||||||
|
"@com_github_sirupsen_logrus//:go_default_library",
|
||||||
"@org_golang_google_protobuf//proto:go_default_library",
|
"@org_golang_google_protobuf//proto:go_default_library",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package blocks
|
package blocks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/OffchainLabs/hashtree"
|
||||||
|
"github.com/OffchainLabs/prysm/v7/config/features"
|
||||||
field_params "github.com/OffchainLabs/prysm/v7/config/fieldparams"
|
field_params "github.com/OffchainLabs/prysm/v7/config/fieldparams"
|
||||||
"github.com/OffchainLabs/prysm/v7/config/params"
|
"github.com/OffchainLabs/prysm/v7/config/params"
|
||||||
"github.com/OffchainLabs/prysm/v7/consensus-types/interfaces"
|
"github.com/OffchainLabs/prysm/v7/consensus-types/interfaces"
|
||||||
@@ -9,6 +11,7 @@ import (
|
|||||||
"github.com/OffchainLabs/prysm/v7/runtime/version"
|
"github.com/OffchainLabs/prysm/v7/runtime/version"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/prysmaticlabs/gohashtree"
|
"github.com/prysmaticlabs/gohashtree"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -45,7 +48,14 @@ func VerifyKZGInclusionProof(blob ROBlob) error {
|
|||||||
return errInvalidBodyRoot
|
return errInvalidBodyRoot
|
||||||
}
|
}
|
||||||
chunks := makeChunk(blob.KzgCommitment)
|
chunks := makeChunk(blob.KzgCommitment)
|
||||||
gohashtree.HashChunks(chunks, chunks)
|
if features.Get().EnableHashtree {
|
||||||
|
err := hashtree.Hash(chunks, chunks)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
gohashtree.HashChunks(chunks, chunks)
|
||||||
|
}
|
||||||
verified := trie.VerifyMerkleProof(root, chunks[0][:], blob.Index+KZGOffset, blob.CommitmentInclusionProof)
|
verified := trie.VerifyMerkleProof(root, chunks[0][:], blob.Index+KZGOffset, blob.CommitmentInclusionProof)
|
||||||
if !verified {
|
if !verified {
|
||||||
return errInvalidInclusionProof
|
return errInvalidInclusionProof
|
||||||
@@ -182,7 +192,14 @@ func LeavesFromCommitments(commitments [][]byte) [][]byte {
|
|||||||
leaves := make([][]byte, len(commitments))
|
leaves := make([][]byte, len(commitments))
|
||||||
for i, kzg := range commitments {
|
for i, kzg := range commitments {
|
||||||
chunk := makeChunk(kzg)
|
chunk := makeChunk(kzg)
|
||||||
gohashtree.HashChunks(chunk, chunk)
|
if features.Get().EnableHashtree {
|
||||||
|
err := hashtree.Hash(chunk, chunk)
|
||||||
|
if err != nil {
|
||||||
|
logrus.WithError(err).Error("Could not hash KZG commitment chunk")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
gohashtree.HashChunks(chunk, chunk)
|
||||||
|
}
|
||||||
leaves[i] = chunk[0][:]
|
leaves[i] = chunk[0][:]
|
||||||
}
|
}
|
||||||
return leaves
|
return leaves
|
||||||
|
|||||||
@@ -5,7 +5,11 @@ go_library(
|
|||||||
srcs = ["hashtree.go"],
|
srcs = ["hashtree.go"],
|
||||||
importpath = "github.com/OffchainLabs/prysm/v7/crypto/hash/htr",
|
importpath = "github.com/OffchainLabs/prysm/v7/crypto/hash/htr",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = ["@com_github_prysmaticlabs_gohashtree//:go_default_library"],
|
deps = [
|
||||||
|
"//config/features:go_default_library",
|
||||||
|
"@com_github_offchainlabs_hashtree//:go_default_library",
|
||||||
|
"@com_github_prysmaticlabs_gohashtree//:go_default_library",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
go_test(
|
go_test(
|
||||||
@@ -13,5 +17,8 @@ go_test(
|
|||||||
size = "small",
|
size = "small",
|
||||||
srcs = ["hashtree_test.go"],
|
srcs = ["hashtree_test.go"],
|
||||||
embed = [":go_default_library"],
|
embed = [":go_default_library"],
|
||||||
deps = ["//testing/require:go_default_library"],
|
deps = [
|
||||||
|
"//config/features:go_default_library",
|
||||||
|
"//testing/require:go_default_library",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import (
|
|||||||
"runtime"
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/OffchainLabs/hashtree"
|
||||||
|
"github.com/OffchainLabs/prysm/v7/config/features"
|
||||||
"github.com/prysmaticlabs/gohashtree"
|
"github.com/prysmaticlabs/gohashtree"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -11,7 +13,12 @@ const minSliceSizeToParallelize = 5000
|
|||||||
|
|
||||||
func hashParallel(inputList [][32]byte, outputList [][32]byte, wg *sync.WaitGroup) {
|
func hashParallel(inputList [][32]byte, outputList [][32]byte, wg *sync.WaitGroup) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
err := gohashtree.Hash(outputList, inputList)
|
var err error
|
||||||
|
if features.Get().EnableHashtree {
|
||||||
|
err = hashtree.Hash(outputList, inputList)
|
||||||
|
} else {
|
||||||
|
err = gohashtree.Hash(outputList, inputList)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err) // lint:nopanic -- This should never panic.
|
panic(err) // lint:nopanic -- This should never panic.
|
||||||
}
|
}
|
||||||
@@ -25,9 +32,16 @@ func hashParallel(inputList [][32]byte, outputList [][32]byte, wg *sync.WaitGrou
|
|||||||
func VectorizedSha256(inputList [][32]byte) [][32]byte {
|
func VectorizedSha256(inputList [][32]byte) [][32]byte {
|
||||||
outputList := make([][32]byte, len(inputList)/2)
|
outputList := make([][32]byte, len(inputList)/2)
|
||||||
if len(inputList) < minSliceSizeToParallelize {
|
if len(inputList) < minSliceSizeToParallelize {
|
||||||
err := gohashtree.Hash(outputList, inputList)
|
if features.Get().EnableHashtree {
|
||||||
if err != nil {
|
err := hashtree.Hash(outputList, inputList)
|
||||||
panic(err) // lint:nopanic -- This should never panic.
|
if err != nil {
|
||||||
|
panic(err) // lint:nopanic -- This should never panic.
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
err := gohashtree.Hash(outputList, inputList)
|
||||||
|
if err != nil {
|
||||||
|
panic(err) // lint:nopanic -- This should never panic.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return outputList
|
return outputList
|
||||||
}
|
}
|
||||||
@@ -38,7 +52,12 @@ func VectorizedSha256(inputList [][32]byte) [][32]byte {
|
|||||||
for j := range n {
|
for j := range n {
|
||||||
go hashParallel(inputList[j*2*groupSize:(j+1)*2*groupSize], outputList[j*groupSize:], &wg)
|
go hashParallel(inputList[j*2*groupSize:(j+1)*2*groupSize], outputList[j*groupSize:], &wg)
|
||||||
}
|
}
|
||||||
err := gohashtree.Hash(outputList[n*groupSize:], inputList[n*2*groupSize:])
|
var err error
|
||||||
|
if features.Get().EnableHashtree {
|
||||||
|
err = hashtree.Hash(outputList[n*groupSize:], inputList[n*2*groupSize:])
|
||||||
|
} else {
|
||||||
|
err = gohashtree.Hash(outputList[n*groupSize:], inputList[n*2*groupSize:])
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err) // lint:nopanic -- This should never panic.
|
panic(err) // lint:nopanic -- This should never panic.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/OffchainLabs/prysm/v7/config/features"
|
||||||
"github.com/OffchainLabs/prysm/v7/testing/require"
|
"github.com/OffchainLabs/prysm/v7/testing/require"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -23,3 +24,25 @@ func Test_VectorizedSha256(t *testing.T) {
|
|||||||
require.Equal(t, r, hash2[i])
|
require.Equal(t, r, hash2[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Test_VectorizedSha256_hashtree_enabled(t *testing.T) {
|
||||||
|
resetCfg := features.InitWithReset(&features.Flags{
|
||||||
|
EnableHashtree: true,
|
||||||
|
})
|
||||||
|
defer resetCfg()
|
||||||
|
|
||||||
|
largeSlice := make([][32]byte, 32*minSliceSizeToParallelize)
|
||||||
|
secondLargeSlice := make([][32]byte, 32*minSliceSizeToParallelize)
|
||||||
|
hash1 := make([][32]byte, 16*minSliceSizeToParallelize)
|
||||||
|
wg := sync.WaitGroup{}
|
||||||
|
wg.Go(func() {
|
||||||
|
tempHash := VectorizedSha256(largeSlice)
|
||||||
|
copy(hash1, tempHash)
|
||||||
|
})
|
||||||
|
wg.Wait()
|
||||||
|
hash2 := VectorizedSha256(secondLargeSlice)
|
||||||
|
require.Equal(t, len(hash1), len(hash2))
|
||||||
|
for i, r := range hash1 {
|
||||||
|
require.Equal(t, r, hash2[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
9
deps.bzl
9
deps.bzl
@@ -2449,6 +2449,15 @@ def prysm_deps():
|
|||||||
sum = "h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=",
|
sum = "h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=",
|
||||||
version = "v1.4.11",
|
version = "v1.4.11",
|
||||||
)
|
)
|
||||||
|
go_repository(
|
||||||
|
name = "com_github_offchainlabs_hashtree",
|
||||||
|
build_file_generation = "off",
|
||||||
|
importpath = "github.com/OffchainLabs/hashtree",
|
||||||
|
patch_args = ["-p1"],
|
||||||
|
patches = ["//third_party:com_github_offchainlabs_hashtree.patch"],
|
||||||
|
sum = "h1:Ws38dQSEtTbRihiAnqoV5HHubSC/zaxE4Yq3j2Z8S7Y=",
|
||||||
|
version = "v0.2.1",
|
||||||
|
)
|
||||||
go_repository(
|
go_repository(
|
||||||
name = "com_github_oklog_oklog",
|
name = "com_github_oklog_oklog",
|
||||||
importpath = "github.com/oklog/oklog",
|
importpath = "github.com/oklog/oklog",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ go_library(
|
|||||||
importpath = "github.com/OffchainLabs/prysm/v7/encoding/ssz",
|
importpath = "github.com/OffchainLabs/prysm/v7/encoding/ssz",
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = [
|
deps = [
|
||||||
|
"//config/features:go_default_library",
|
||||||
"//config/fieldparams:go_default_library",
|
"//config/fieldparams:go_default_library",
|
||||||
"//container/trie:go_default_library",
|
"//container/trie:go_default_library",
|
||||||
"//crypto/hash/htr:go_default_library",
|
"//crypto/hash/htr:go_default_library",
|
||||||
@@ -19,6 +20,7 @@ go_library(
|
|||||||
"//proto/engine/v1:go_default_library",
|
"//proto/engine/v1:go_default_library",
|
||||||
"//proto/prysm/v1alpha1:go_default_library",
|
"//proto/prysm/v1alpha1:go_default_library",
|
||||||
"@com_github_minio_sha256_simd//:go_default_library",
|
"@com_github_minio_sha256_simd//:go_default_library",
|
||||||
|
"@com_github_offchainlabs_hashtree//:go_default_library",
|
||||||
"@com_github_pkg_errors//:go_default_library",
|
"@com_github_pkg_errors//:go_default_library",
|
||||||
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
|
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
|
||||||
"@com_github_prysmaticlabs_gohashtree//:go_default_library",
|
"@com_github_prysmaticlabs_gohashtree//:go_default_library",
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ package ssz
|
|||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
|
||||||
|
"github.com/OffchainLabs/hashtree"
|
||||||
|
"github.com/OffchainLabs/prysm/v7/config/features"
|
||||||
"github.com/OffchainLabs/prysm/v7/container/trie"
|
"github.com/OffchainLabs/prysm/v7/container/trie"
|
||||||
"github.com/OffchainLabs/prysm/v7/crypto/hash/htr"
|
"github.com/OffchainLabs/prysm/v7/crypto/hash/htr"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
@@ -182,7 +184,12 @@ func MerkleizeListSSZ[T Hashable](elements []T, limit uint64) ([32]byte, error)
|
|||||||
chunks := make([][32]byte, 2)
|
chunks := make([][32]byte, 2)
|
||||||
chunks[0] = body
|
chunks[0] = body
|
||||||
binary.LittleEndian.PutUint64(chunks[1][:], uint64(len(elements)))
|
binary.LittleEndian.PutUint64(chunks[1][:], uint64(len(elements)))
|
||||||
if err := gohashtree.Hash(chunks, chunks); err != nil {
|
if features.Get().EnableHashtree {
|
||||||
|
err = hashtree.Hash(chunks, chunks)
|
||||||
|
} else {
|
||||||
|
err = gohashtree.Hash(chunks, chunks)
|
||||||
|
}
|
||||||
|
if err != nil {
|
||||||
return [32]byte{}, err
|
return [32]byte{}, err
|
||||||
}
|
}
|
||||||
return chunks[0], err
|
return chunks[0], err
|
||||||
|
|||||||
1
go.mod
1
go.mod
@@ -6,6 +6,7 @@ require (
|
|||||||
github.com/MariusVanDerWijden/FuzzyVM v0.0.0-20240516070431-7828990cad7d
|
github.com/MariusVanDerWijden/FuzzyVM v0.0.0-20240516070431-7828990cad7d
|
||||||
github.com/MariusVanDerWijden/tx-fuzz v1.4.0
|
github.com/MariusVanDerWijden/tx-fuzz v1.4.0
|
||||||
github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506
|
github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506
|
||||||
|
github.com/OffchainLabs/hashtree v0.2.1
|
||||||
github.com/aristanetworks/goarista v0.0.0-20200805130819-fd197cf57d96
|
github.com/aristanetworks/goarista v0.0.0-20200805130819-fd197cf57d96
|
||||||
github.com/bazelbuild/rules_go v0.23.2
|
github.com/bazelbuild/rules_go v0.23.2
|
||||||
github.com/btcsuite/btcd/btcec/v2 v2.3.4
|
github.com/btcsuite/btcd/btcec/v2 v2.3.4
|
||||||
|
|||||||
2
go.sum
2
go.sum
@@ -59,6 +59,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo
|
|||||||
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
|
||||||
github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506 h1:d/SJkN8/9Ca+1YmuDiUJxAiV4w/a9S8NcsG7GMQSrVI=
|
github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506 h1:d/SJkN8/9Ca+1YmuDiUJxAiV4w/a9S8NcsG7GMQSrVI=
|
||||||
github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506/go.mod h1:6TZI4FU6zT8x6ZfWa1J8YQ2NgW0wLV/W3fHRca8ISBo=
|
github.com/OffchainLabs/go-bitfield v0.0.0-20251031151322-f427d04d8506/go.mod h1:6TZI4FU6zT8x6ZfWa1J8YQ2NgW0wLV/W3fHRca8ISBo=
|
||||||
|
github.com/OffchainLabs/hashtree v0.2.1 h1:Ws38dQSEtTbRihiAnqoV5HHubSC/zaxE4Yq3j2Z8S7Y=
|
||||||
|
github.com/OffchainLabs/hashtree v0.2.1/go.mod h1:b07+cRZs+eAR8TR57CB9TQlt5Gnl/06Xs76xt/1wq0M=
|
||||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
|
||||||
github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU=
|
github.com/Shopify/sarama v1.26.1/go.mod h1:NbSGBSSndYaIhRcBtY9V0U7AyH+x71bG668AuWys/yU=
|
||||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
|
||||||
|
|||||||
43
third_party/com_github_offchainlabs_hashtree.patch
vendored
Normal file
43
third_party/com_github_offchainlabs_hashtree.patch
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
diff -urN a/BUILD.bazel b/BUILD.bazel
|
||||||
|
--- a/BUILD.bazel 1969-12-31 18:00:00.000000000 -0600
|
||||||
|
+++ b/BUILD.bazel 2025-01-05 12:00:00.000000000 -0600
|
||||||
|
@@ -0,0 +1,39 @@
|
||||||
|
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
||||||
|
+
|
||||||
|
+go_library(
|
||||||
|
+ name = "go_default_library",
|
||||||
|
+ srcs = [
|
||||||
|
+ "bindings.go",
|
||||||
|
+ "sha256_1_generic.go",
|
||||||
|
+ ] + select({
|
||||||
|
+ "@io_bazel_rules_go//go/platform:linux_amd64": [
|
||||||
|
+ "bindings_amd64.go",
|
||||||
|
+ "wrapper_linux_amd64.s",
|
||||||
|
+ "hashtree_amd64.syso",
|
||||||
|
+ ],
|
||||||
|
+ "@io_bazel_rules_go//go/platform:darwin_amd64": [
|
||||||
|
+ "bindings_amd64.go",
|
||||||
|
+ "wrapper_linux_amd64.s",
|
||||||
|
+ "hashtree_amd64.syso",
|
||||||
|
+ ],
|
||||||
|
+ "@io_bazel_rules_go//go/platform:windows_amd64": [
|
||||||
|
+ "bindings_amd64.go",
|
||||||
|
+ "wrapper_windows_amd64.s",
|
||||||
|
+ "hashtree_windows_amd64.syso",
|
||||||
|
+ ],
|
||||||
|
+ "@io_bazel_rules_go//go/platform:linux_arm64": [
|
||||||
|
+ "bindings_arm64.go",
|
||||||
|
+ "wrapper_arm64.s",
|
||||||
|
+ "hashtree_linux_arm64.syso",
|
||||||
|
+ ],
|
||||||
|
+ "@io_bazel_rules_go//go/platform:darwin_arm64": [
|
||||||
|
+ "bindings_arm64.go",
|
||||||
|
+ "wrapper_arm64.s",
|
||||||
|
+ "hashtree_darwin_arm64.syso",
|
||||||
|
+ ],
|
||||||
|
+ "//conditions:default": [],
|
||||||
|
+ }),
|
||||||
|
+ importpath = "github.com/OffchainLabs/hashtree",
|
||||||
|
+ visibility = ["//visibility:public"],
|
||||||
|
+ deps = ["@com_github_klauspost_cpuid_v2//:go_default_library"],
|
||||||
|
+)
|
||||||
Reference in New Issue
Block a user