Skip to content

Commit

Permalink
Move rlp to erigon-lib/rlp (#12919)
Browse files Browse the repository at this point in the history
Follow-up to : #12915

---------

Co-authored-by: antonis19 <[email protected]>
  • Loading branch information
antonis19 and antonis19 authored Nov 29, 2024
1 parent 2f32cd2 commit 05bfe7b
Show file tree
Hide file tree
Showing 143 changed files with 133 additions and 128 deletions.
2 changes: 1 addition & 1 deletion accounts/abi/bind/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/hexutil"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/accounts/abi"
"github.com/erigontech/erigon/accounts/abi/bind"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/rlp"
)

type mockCaller struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (

libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/downloader/snaptype"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/eth/ethconfig"
"github.com/erigontech/erigon/polygon/bridge"
"github.com/erigontech/erigon/polygon/heimdall"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/turbo/snapshotsync/freezeblocks"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/devnet/services/polygon/proofgenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ import (
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/hexutility"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/accounts/abi/bind"
"github.com/erigontech/erigon/cl/merkle_tree"
"github.com/erigontech/erigon/cmd/devnet/devnet"
"github.com/erigontech/erigon/cmd/devnet/requests"
"github.com/erigontech/erigon/core/types"
bortypes "github.com/erigontech/erigon/polygon/bor/types"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/rpc"
"github.com/erigontech/erigon/turbo/jsonrpc"
"github.com/erigontech/erigon/turbo/trie"
Expand Down
2 changes: 1 addition & 1 deletion cmd/devnet/services/polygon/proofgenerator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import (
"github.com/erigontech/erigon-lib/kv/memdb"
"github.com/erigontech/erigon-lib/kv/rawdbv3"
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/accounts/abi/bind"
"github.com/erigontech/erigon/cmd/devnet/blocks"
"github.com/erigontech/erigon/cmd/devnet/requests"
Expand All @@ -49,7 +50,6 @@ import (
"github.com/erigontech/erigon/core/vm"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/polygon/bor"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/rpc"
"github.com/erigontech/erigon/turbo/jsonrpc"
"github.com/erigontech/erigon/turbo/services"
Expand Down
2 changes: 1 addition & 1 deletion cmd/evm/internal/t8ntool/transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import (
"github.com/erigontech/erigon-lib/kv/rawdbv3"
"github.com/erigontech/erigon-lib/kv/temporal/temporaltest"
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon-lib/rlp"
libstate "github.com/erigontech/erigon-lib/state"
"github.com/erigontech/erigon/consensus/ethash"
"github.com/erigontech/erigon/consensus/merge"
Expand All @@ -53,7 +54,6 @@ import (
"github.com/erigontech/erigon/core/vm"
"github.com/erigontech/erigon/eth/consensuschain"
trace_logger "github.com/erigontech/erigon/eth/tracers/logger"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/tests"
"github.com/erigontech/erigon/turbo/jsonrpc"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/hack/hack.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import (
"github.com/erigontech/erigon-lib/recsplit/eliasfano32"
"github.com/erigontech/erigon-lib/seg"

"github.com/erigontech/erigon-lib/rlp"
hackdb "github.com/erigontech/erigon/cmd/hack/db"
"github.com/erigontech/erigon/cmd/hack/flow"
"github.com/erigontech/erigon/cmd/hack/tool"
Expand All @@ -56,7 +57,6 @@ import (
"github.com/erigontech/erigon/eth/ethconfig"
"github.com/erigontech/erigon/eth/stagedsync/stages"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/turbo/debug"
"github.com/erigontech/erigon/turbo/logging"
"github.com/erigontech/erigon/turbo/services"
Expand Down
2 changes: 1 addition & 1 deletion cmd/observer/observer/handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ import (
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/direct"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/common"
"github.com/erigontech/erigon/core/forkid"
"github.com/erigontech/erigon/eth/protocols/eth"
"github.com/erigontech/erigon/p2p"
"github.com/erigontech/erigon/p2p/rlpx"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/rlp"
)

// https://github.com/ethereum/devp2p/blob/master/rlpx.md#p2p-capability
Expand Down
2 changes: 1 addition & 1 deletion cmd/rlpdump/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"os"
"strings"

"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon-lib/rlp"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmd/rpcdaemon/rpcservices/eth_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ import (
"github.com/erigontech/erigon-lib/gointerfaces"
remote "github.com/erigontech/erigon-lib/gointerfaces/remoteproto"
"github.com/erigontech/erigon-lib/kv"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/core/rawdb"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/eth/ethconfig"
"github.com/erigontech/erigon/ethdb/privateapi"
"github.com/erigontech/erigon/p2p"
"github.com/erigontech/erigon/polygon/heimdall"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/turbo/services"
"github.com/erigontech/erigon/turbo/snapshotsync"
)
Expand Down
2 changes: 1 addition & 1 deletion consensus/aura/aura.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ import (
"github.com/erigontech/erigon-lib/kv"
"github.com/erigontech/erigon-lib/log/v3"

"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/consensus"
"github.com/erigontech/erigon/consensus/clique"
"github.com/erigontech/erigon/consensus/ethash"
"github.com/erigontech/erigon/core/state"
"github.com/erigontech/erigon/core/tracing"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/core/vm/evmtypes"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/rpc"
)

Expand Down
2 changes: 1 addition & 1 deletion consensus/aura/empty_step.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon-lib/rlp"
)

// A message broadcast by authorities when it's their turn to seal a block but there are no
Expand Down
2 changes: 1 addition & 1 deletion consensus/aura/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ import (
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/accounts/abi"
"github.com/erigontech/erigon/accounts/abi/bind"
"github.com/erigontech/erigon/common"
"github.com/erigontech/erigon/consensus"
"github.com/erigontech/erigon/consensus/aura/auraabi"
"github.com/erigontech/erigon/consensus/aura/aurainterfaces"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/rlp"
)

// nolint
Expand Down
2 changes: 1 addition & 1 deletion consensus/clique/clique.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import (
"github.com/erigontech/erigon-lib/kv"
"github.com/erigontech/erigon-lib/kv/dbutils"
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/common/debug"
"github.com/erigontech/erigon/consensus"
"github.com/erigontech/erigon/core/state"
Expand All @@ -50,7 +51,6 @@ import (
"github.com/erigontech/erigon/core/types/accounts"
"github.com/erigontech/erigon/core/vm/evmtypes"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/rpc"
"github.com/erigontech/erigon/turbo/services"
)
Expand Down
2 changes: 1 addition & 1 deletion consensus/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/log/v3"

"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/core/state"
"github.com/erigontech/erigon/core/tracing"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/core/vm/evmtypes"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/rpc"
)

Expand Down
2 changes: 1 addition & 1 deletion consensus/ethash/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"github.com/erigontech/erigon-lib/common/math"
"github.com/erigontech/erigon-lib/log/v3"

"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/common/u256"
"github.com/erigontech/erigon/consensus"
"github.com/erigontech/erigon/consensus/ethash/ethashcfg"
Expand All @@ -44,7 +45,6 @@ import (
"github.com/erigontech/erigon/core/tracing"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/rlp"
)

// Ethash proof-of-work protocol constants.
Expand Down
2 changes: 1 addition & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon-lib/metrics"

"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/common/u256"
"github.com/erigontech/erigon/consensus"
"github.com/erigontech/erigon/core/state"
Expand All @@ -45,7 +46,6 @@ import (
"github.com/erigontech/erigon/core/vm/evmtypes"
"github.com/erigontech/erigon/eth/ethutils"
bortypes "github.com/erigontech/erigon/polygon/bor/types"
"github.com/erigontech/erigon/rlp"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion core/chain_makers.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/length"
"github.com/erigontech/erigon-lib/kv"
"github.com/erigontech/erigon-lib/rlp"
libstate "github.com/erigontech/erigon-lib/state"
"github.com/erigontech/erigon/consensus"
"github.com/erigontech/erigon/consensus/merge"
Expand All @@ -43,7 +44,6 @@ import (
"github.com/erigontech/erigon/core/vm"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/polygon/heimdall"
"github.com/erigontech/erigon/rlp"
)

// BlockGen creates blocks for testing.
Expand Down
2 changes: 1 addition & 1 deletion core/forkid/forkid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"github.com/erigontech/erigon-lib/chain"
libcommon "github.com/erigontech/erigon-lib/common"

"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/rlp"
)

// TestCreation tests that different genesis and fork rule combinations result in
Expand Down
2 changes: 1 addition & 1 deletion core/mkalloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import (
"sort"
"strconv"

"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/rlp"
)

type allocItem struct{ Addr, Balance *big.Int }
Expand Down
2 changes: 1 addition & 1 deletion core/rawdb/accessors_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ import (
"github.com/erigontech/erigon-lib/kv/dbutils"
"github.com/erigontech/erigon-lib/kv/rawdbv3"

"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/ethdb/cbor"
"github.com/erigontech/erigon/rlp"
)

// ReadCanonicalHash retrieves the hash assigned to a canonical block number.
Expand Down
2 changes: 1 addition & 1 deletion core/rawdb/accessors_chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ import (
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/kv/memdb"
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/common/u256"
"github.com/erigontech/erigon/core/rawdb"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/turbo/stages/mock"
)

Expand Down
2 changes: 1 addition & 1 deletion core/rlp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ import (
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/common/u256"
"github.com/erigontech/erigon/consensus/ethash"
"github.com/erigontech/erigon/core"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/turbo/stages/mock"
)

Expand Down
2 changes: 1 addition & 1 deletion core/snaptype/block_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ import (
"github.com/erigontech/erigon-lib/downloader/snaptype"
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon-lib/recsplit"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon-lib/seg"
"github.com/erigontech/erigon/core/types"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/txnprovider/txpool"
)

Expand Down
2 changes: 1 addition & 1 deletion core/state/state_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ import (

libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/core/tracing"
"github.com/erigontech/erigon/core/types/accounts"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon/turbo/trie"
)

Expand Down
2 changes: 1 addition & 1 deletion core/types/access_list_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import (

"github.com/erigontech/erigon-lib/chain"
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/rlp"
rlp2 "github.com/erigontech/erigon-lib/rlp2"
"github.com/erigontech/erigon/rlp"
)

// AccessTuple is the element type of an access list.
Expand Down
2 changes: 1 addition & 1 deletion core/types/accounts/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (

libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/rlp"
rlp2 "github.com/erigontech/erigon-lib/rlp2"
"github.com/erigontech/erigon/rlp"
)

// Account is the Ethereum consensus representation of accounts.
Expand Down
2 changes: 1 addition & 1 deletion core/types/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/length"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/rlp"
rlp2 "github.com/erigontech/erigon-lib/rlp2"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/rlp"
)

type Authorization struct {
Expand Down
2 changes: 1 addition & 1 deletion core/types/blob_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"github.com/erigontech/erigon-lib/chain"
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/fixedgas"
"github.com/erigontech/erigon-lib/rlp"
rlp2 "github.com/erigontech/erigon-lib/rlp2"
"github.com/erigontech/erigon/rlp"
)

type BlobTx struct {
Expand Down
2 changes: 1 addition & 1 deletion core/types/blob_tx_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/fixedgas"
libkzg "github.com/erigontech/erigon-lib/crypto/kzg"
"github.com/erigontech/erigon/rlp"
"github.com/erigontech/erigon-lib/rlp"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion core/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ import (
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/hexutil"
"github.com/erigontech/erigon-lib/common/hexutility"
"github.com/erigontech/erigon-lib/rlp"
rlp2 "github.com/erigontech/erigon-lib/rlp2"
"github.com/erigontech/erigon/common"
"github.com/erigontech/erigon/rlp"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion core/types/block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ import (
"github.com/erigontech/erigon-lib/common/math"
"github.com/erigontech/erigon-lib/crypto"
"github.com/erigontech/erigon-lib/log/v3"
"github.com/erigontech/erigon-lib/rlp"
"github.com/erigontech/erigon/common"
"github.com/erigontech/erigon/common/u256"
"github.com/erigontech/erigon/params"
"github.com/erigontech/erigon/rlp"
)

// the following 2 functions are replica for the test
Expand Down
Loading

0 comments on commit 05bfe7b

Please sign in to comment.