Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] bitmap v2 #13161

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/hack/hack.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"slices"
"strings"

"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
"github.com/holiman/uint256"

"github.com/erigontech/erigon-lib/log/v3"
Expand Down
2 changes: 1 addition & 1 deletion core/state/recon_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"encoding/binary"
"sync"

"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
"github.com/google/btree"

btree2 "github.com/tidwall/btree"
Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/downloader/mdbx_piece_completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"encoding/binary"
"sync"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
"github.com/anacrolix/torrent/metainfo"
"github.com/anacrolix/torrent/storage"
"github.com/anacrolix/torrent/types/infohash"
Expand Down
3 changes: 2 additions & 1 deletion erigon-lib/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ require (
)

require (
github.com/RoaringBitmap/roaring v1.9.4
github.com/RoaringBitmap/roaring/v2 v2.4.2
github.com/anacrolix/dht/v2 v2.21.1
github.com/anacrolix/go-libutp v1.3.1
github.com/anacrolix/log v0.15.2
Expand Down Expand Up @@ -60,6 +60,7 @@ require (
)

require (
github.com/RoaringBitmap/roaring v1.9.4 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/ianlancetaylor/cgosymbolizer v0.0.0-20240503222823-736c933a666d // indirect
Expand Down
3 changes: 3 additions & 0 deletions erigon-lib/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ github.com/RoaringBitmap/roaring v0.4.17/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrX
github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo=
github.com/RoaringBitmap/roaring v1.9.4 h1:yhEIoH4YezLYT04s1nHehNO64EKFTop/wBhxv2QzDdQ=
github.com/RoaringBitmap/roaring v1.9.4/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90=
github.com/RoaringBitmap/roaring/v2 v2.4.2 h1:ew/INI7HLRyYK+dCbF6FcUwoe2Q0q5HCV7WafY9ljBk=
github.com/RoaringBitmap/roaring/v2 v2.4.2/go.mod h1:FiJcsfkGje/nZBZgCu0ZxCPOKD/hVXDS2dXi7/eUFE0=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 h1:byYvvbfSo3+9efR4IeReh77gVs4PnNDR3AMOE9NJ7a0=
Expand Down Expand Up @@ -693,6 +695,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
4 changes: 2 additions & 2 deletions erigon-lib/kv/bitmapdb/bitmapdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"sort"
"sync"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2"
"github.com/RoaringBitmap/roaring/v2/roaring64"
"github.com/c2h5oh/datasize"

"github.com/erigontech/erigon-lib/common"
Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/kv/bitmapdb/bitmapdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package bitmapdb_test
import (
"testing"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
"github.com/erigontech/erigon-lib/kv/bitmapdb"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/kv/bitmapdb/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package bitmapdb

import (
"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
)

type BitmapStream struct {
Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/state/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"sync/atomic"
"time"

"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
"github.com/c2h5oh/datasize"
"github.com/tidwall/btree"
rand2 "golang.org/x/exp/rand"
Expand Down
2 changes: 1 addition & 1 deletion erigon-lib/state/inverted_index_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"container/heap"
"encoding/binary"

"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"

"github.com/erigontech/erigon-lib/kv"
"github.com/erigontech/erigon-lib/kv/bitmapdb"
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/99designs/gqlgen v0.17.56
github.com/Giulio2002/bls v0.0.0-20241116091023-2ddcc8954ec0
github.com/Masterminds/sprig/v3 v3.2.3
github.com/RoaringBitmap/roaring v1.9.4
github.com/RoaringBitmap/roaring/v2 v2.4.2
github.com/alecthomas/kong v0.8.1
github.com/anacrolix/sync v0.5.1
github.com/anacrolix/torrent v1.52.6-0.20231201115409-7ea994b6bbd8
Expand Down Expand Up @@ -109,6 +109,7 @@ require (
)

require (
github.com/RoaringBitmap/roaring v1.9.4 // indirect
github.com/alecthomas/atomic v0.1.0-alpha2 // indirect
github.com/benesch/cgosymbolizer v0.0.0-20190515212042-bec6fe6e597b // indirect
github.com/crate-crypto/go-ipa v0.0.0-20221111143132-9aa5d42120bc // indirect
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ github.com/RoaringBitmap/roaring v0.4.17/go.mod h1:D3qVegWTmfCaX4Bl5CrBE9hfrSrrX
github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo=
github.com/RoaringBitmap/roaring v1.9.4 h1:yhEIoH4YezLYT04s1nHehNO64EKFTop/wBhxv2QzDdQ=
github.com/RoaringBitmap/roaring v1.9.4/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90=
github.com/RoaringBitmap/roaring/v2 v2.4.2 h1:ew/INI7HLRyYK+dCbF6FcUwoe2Q0q5HCV7WafY9ljBk=
github.com/RoaringBitmap/roaring/v2 v2.4.2/go.mod h1:FiJcsfkGje/nZBZgCu0ZxCPOKD/hVXDS2dXi7/eUFE0=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
Expand Down Expand Up @@ -1384,6 +1386,7 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
Expand Down
2 changes: 1 addition & 1 deletion turbo/jsonrpc/erigon_receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"fmt"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"

"github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/kv/order"
Expand Down
2 changes: 1 addition & 1 deletion turbo/jsonrpc/eth_receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"errors"
"fmt"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/v2"
"github.com/erigontech/erigon-lib/chain"
"github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/kv"
Expand Down
2 changes: 1 addition & 1 deletion turbo/jsonrpc/otterscan_search_backward.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package jsonrpc
import (
"bytes"

"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
"github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/kv"
)
Expand Down
2 changes: 1 addition & 1 deletion turbo/jsonrpc/otterscan_search_backward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/erigontech/erigon-lib/common/hexutil"

"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon/cmd/rpcdaemon/rpcdaemontest"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion turbo/jsonrpc/otterscan_search_forward.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package jsonrpc
import (
"bytes"

"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
"github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/kv"
)
Expand Down
2 changes: 1 addition & 1 deletion turbo/jsonrpc/otterscan_search_forward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"bytes"
"testing"

"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
libcommon "github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/hexutil"
"github.com/erigontech/erigon/cmd/rpcdaemon/rpcdaemontest"
Expand Down
2 changes: 1 addition & 1 deletion turbo/jsonrpc/otterscan_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package jsonrpc
import (
"testing"

"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
)

func createBitmap(t *testing.T, blocks []uint64) []byte {
Expand Down
4 changes: 2 additions & 2 deletions turbo/jsonrpc/overlay_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"sync"
"time"

"github.com/RoaringBitmap/roaring"
"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2"
"github.com/RoaringBitmap/roaring/v2/roaring64"

"github.com/erigontech/erigon-lib/chain"
"github.com/erigontech/erigon-lib/common"
Expand Down
2 changes: 1 addition & 1 deletion turbo/stages/bodydownload/body_data_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package bodydownload

import (
"github.com/RoaringBitmap/roaring/roaring64"
"github.com/RoaringBitmap/roaring/v2/roaring64"
"github.com/google/btree"

libcommon "github.com/erigontech/erigon-lib/common"
Expand Down
Loading