From 2db72340f843ad55ef2009afc55b10b8d1434f06 Mon Sep 17 00:00:00 2001 From: antonis19 Date: Mon, 2 Dec 2024 16:52:39 +0100 Subject: [PATCH] move turbo/rlphacks to erigon-lib/rlphacks (#12956) Co-authored-by: antonis19 --- core/types/hashing.go | 2 +- {turbo => erigon-lib}/rlphacks/bytes.go | 0 {turbo => erigon-lib}/rlphacks/bytes_test.go | 0 {turbo => erigon-lib}/rlphacks/serializable.go | 0 {turbo => erigon-lib}/rlphacks/struct.go | 0 {turbo => erigon-lib}/rlphacks/utils_bytes.go | 0 turbo/trie/gen_struct_step.go | 2 +- turbo/trie/hashbuilder.go | 2 +- turbo/trie/hasher.go | 2 +- turbo/trie/stream.go | 2 +- turbo/trie/structural_test.go | 2 +- turbo/trie/trie_root.go | 3 +-- 12 files changed, 7 insertions(+), 8 deletions(-) rename {turbo => erigon-lib}/rlphacks/bytes.go (100%) rename {turbo => erigon-lib}/rlphacks/bytes_test.go (100%) rename {turbo => erigon-lib}/rlphacks/serializable.go (100%) rename {turbo => erigon-lib}/rlphacks/struct.go (100%) rename {turbo => erigon-lib}/rlphacks/utils_bytes.go (100%) diff --git a/core/types/hashing.go b/core/types/hashing.go index 3ad4261e8af..08e3d921cce 100644 --- a/core/types/hashing.go +++ b/core/types/hashing.go @@ -30,7 +30,7 @@ import ( "github.com/erigontech/erigon-lib/crypto" "github.com/erigontech/erigon-lib/crypto/cryptopool" "github.com/erigontech/erigon-lib/rlp" - "github.com/erigontech/erigon/turbo/rlphacks" + "github.com/erigontech/erigon-lib/rlphacks" "github.com/erigontech/erigon/turbo/trie" ) diff --git a/turbo/rlphacks/bytes.go b/erigon-lib/rlphacks/bytes.go similarity index 100% rename from turbo/rlphacks/bytes.go rename to erigon-lib/rlphacks/bytes.go diff --git a/turbo/rlphacks/bytes_test.go b/erigon-lib/rlphacks/bytes_test.go similarity index 100% rename from turbo/rlphacks/bytes_test.go rename to erigon-lib/rlphacks/bytes_test.go diff --git a/turbo/rlphacks/serializable.go b/erigon-lib/rlphacks/serializable.go similarity index 100% rename from turbo/rlphacks/serializable.go rename to erigon-lib/rlphacks/serializable.go diff --git a/turbo/rlphacks/struct.go b/erigon-lib/rlphacks/struct.go similarity index 100% rename from turbo/rlphacks/struct.go rename to erigon-lib/rlphacks/struct.go diff --git a/turbo/rlphacks/utils_bytes.go b/erigon-lib/rlphacks/utils_bytes.go similarity index 100% rename from turbo/rlphacks/utils_bytes.go rename to erigon-lib/rlphacks/utils_bytes.go diff --git a/turbo/trie/gen_struct_step.go b/turbo/trie/gen_struct_step.go index 6a751c84b9c..93eda075aaf 100644 --- a/turbo/trie/gen_struct_step.go +++ b/turbo/trie/gen_struct_step.go @@ -26,7 +26,7 @@ import ( libcommon "github.com/erigontech/erigon-lib/common" - "github.com/erigontech/erigon/turbo/rlphacks" + "github.com/erigontech/erigon-lib/rlphacks" ) // Experimental code for separating data and structural information diff --git a/turbo/trie/hashbuilder.go b/turbo/trie/hashbuilder.go index 2ee2d9266d4..353d2c401b1 100644 --- a/turbo/trie/hashbuilder.go +++ b/turbo/trie/hashbuilder.go @@ -31,8 +31,8 @@ import ( "github.com/erigontech/erigon-lib/crypto" "github.com/erigontech/erigon-lib/rlp" + "github.com/erigontech/erigon-lib/rlphacks" "github.com/erigontech/erigon-lib/types/accounts" - "github.com/erigontech/erigon/turbo/rlphacks" ) const hashStackStride = length2.Hash + 1 // + 1 byte for RLP encoding diff --git a/turbo/trie/hasher.go b/turbo/trie/hasher.go index 27e41816c24..e191ca32044 100644 --- a/turbo/trie/hasher.go +++ b/turbo/trie/hasher.go @@ -31,7 +31,7 @@ import ( "github.com/erigontech/erigon-lib/crypto" "github.com/erigontech/erigon-lib/rlp" - "github.com/erigontech/erigon/turbo/rlphacks" + "github.com/erigontech/erigon-lib/rlphacks" ) type hasher struct { diff --git a/turbo/trie/stream.go b/turbo/trie/stream.go index 7d53c84abab..9d106f62c78 100644 --- a/turbo/trie/stream.go +++ b/turbo/trie/stream.go @@ -29,8 +29,8 @@ import ( "github.com/erigontech/erigon-lib/common/length" "github.com/erigontech/erigon-lib/common" + "github.com/erigontech/erigon-lib/rlphacks" "github.com/erigontech/erigon-lib/types/accounts" - "github.com/erigontech/erigon/turbo/rlphacks" ) // StreamItem is an enum type for values that help distinguish different diff --git a/turbo/trie/structural_test.go b/turbo/trie/structural_test.go index 83219343804..883dccda148 100644 --- a/turbo/trie/structural_test.go +++ b/turbo/trie/structural_test.go @@ -36,7 +36,7 @@ import ( "github.com/erigontech/erigon-lib/crypto" "github.com/erigontech/erigon-lib/common" - "github.com/erigontech/erigon/turbo/rlphacks" + "github.com/erigontech/erigon-lib/rlphacks" ) func TestV2HashBuilding(t *testing.T) { diff --git a/turbo/trie/trie_root.go b/turbo/trie/trie_root.go index 67e3ae3105d..b060a95cce8 100644 --- a/turbo/trie/trie_root.go +++ b/turbo/trie/trie_root.go @@ -31,9 +31,8 @@ import ( length2 "github.com/erigontech/erigon-lib/common/length" "github.com/erigontech/erigon-lib/kv" dbutils2 "github.com/erigontech/erigon-lib/kv/dbutils" - + "github.com/erigontech/erigon-lib/rlphacks" "github.com/erigontech/erigon-lib/types/accounts" - "github.com/erigontech/erigon/turbo/rlphacks" ) /*