Skip to content

Commit

Permalink
Ln/downgrade badger (#1430)
Browse files Browse the repository at this point in the history
* downgrade badger, ristretto, and klauspost/compress dependencies

* go mod tidy
  • Loading branch information
lazynina authored Nov 5, 2024
1 parent 752613b commit a8578b2
Show file tree
Hide file tree
Showing 44 changed files with 99 additions and 56 deletions.
2 changes: 1 addition & 1 deletion cmd/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/davecgh/go-spew/spew"
"github.com/deso-protocol/core/lib"
"github.com/deso-protocol/core/migrate"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/go-pg/pg/v10"
"github.com/golang/glog"
migrations "github.com/robinjoseph08/go-pg-migrations/v3"
Expand Down
10 changes: 6 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/deso-protocol/go-deadlock v1.0.1
github.com/deso-protocol/go-merkle-tree v1.0.0
github.com/deso-protocol/uint256 v1.3.2
github.com/dgraph-io/badger/v4 v4.3.1
github.com/dgraph-io/badger/v3 v3.2103.5
github.com/emirpasic/gods v1.18.1
github.com/ethereum/go-ethereum v1.14.11
github.com/fatih/color v1.17.0
Expand All @@ -37,7 +37,7 @@ require (
github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.19.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.9.0
github.com/tyler-smith/go-bip39 v1.1.0
github.com/unrolled/secure v1.16.0
Expand Down Expand Up @@ -70,11 +70,12 @@ require (
github.com/andygrunwald/go-jira v1.16.0 // indirect
github.com/btcsuite/btclog v0.0.0-20241017175713-3428138b75c7 // indirect
github.com/bwesterb/go-ristretto v1.2.3 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
github.com/decred/dcrd/crypto/blake256 v1.1.0 // indirect
github.com/dgraph-io/ristretto v1.0.0 // indirect
github.com/dgraph-io/ristretto v0.2.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4 // indirect
github.com/ebitengine/purego v0.8.0 // indirect
Expand All @@ -86,6 +87,7 @@ require (
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/flatbuffers v24.3.25+incompatible // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/pprof v0.0.0-20241009165004-a3522334989c // indirect
Expand All @@ -99,7 +101,7 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/compress v1.17.1 // indirect
github.com/kyokomi/emoji/v2 v2.2.13 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand Down
61 changes: 51 additions & 10 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion integration_testing/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/btcsuite/btcd/wire"
"github.com/deso-protocol/core/cmd"
"github.com/deso-protocol/core/lib"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/davecgh/go-spew/spew"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_atomic_txns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_bitcoin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/wire"
merkletree "github.com/deso-protocol/go-merkle-tree"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_creator_coin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"testing"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_dao_coin_limit_order_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/deso-protocol/uint256"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_dao_coin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/btcsuite/btcd/btcec/v2"
"github.com/deso-protocol/uint256"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_derived_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/btcsuite/btcd/btcec/v2"
"github.com/deso-protocol/uint256"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_flush.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_follow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_like_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_lockups.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/btcsuite/btcd/btcec/v2"
"github.com/deso-protocol/uint256"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_lockups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/btcsuite/btcd/btcec/v2"
"github.com/deso-protocol/uint256"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_nft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_post.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/btcsuite/btcd/btcec/v2"
"github.com/davecgh/go-spew/spew"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/gernest/mention"
"github.com/golang/glog"
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_post_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_stake.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sort"

"github.com/deso-protocol/uint256"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"github.com/btcsuite/btcd/btcec/v2"
"github.com/decred/dcrd/container/lru"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
embeddedpostgres "github.com/fergusstrange/embedded-postgres"
"github.com/golang/glog"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion lib/block_view_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"github.com/deso-protocol/core/bls"
"github.com/deso-protocol/uint256"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/btcsuite/btcd/wire"
"github.com/davecgh/go-spew/spew"
merkletree "github.com/deso-protocol/go-merkle-tree"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/blockchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

chainlib "github.com/btcsuite/btcd/blockchain"
"github.com/btcsuite/btcd/btcec/v2"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion lib/db_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"sort"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/db_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

"github.com/btcsuite/btcd/btcec/v2"
"github.com/davecgh/go-spew/spew"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/db_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/btcsuite/btcd/btcec/v2"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/legacy_mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"time"

"github.com/btcsuite/btcd/btcutil"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/gernest/mention"

"github.com/btcsuite/btcd/btcec/v2"
Expand Down
2 changes: 1 addition & 1 deletion lib/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"time"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/gernest/mention"
"github.com/go-pg/pg/v10"

Expand Down
2 changes: 1 addition & 1 deletion lib/pos_blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/deso-protocol/core/collections"
"github.com/deso-protocol/core/consensus"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/pos_epoch.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package lib
import (
"bytes"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/pos_mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/decred/dcrd/container/lru"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/pos_mempool_persister.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"
"time"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/pos_mempool_persister_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion lib/pos_mempool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"testing"
"time"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/pos_random_seed.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/deso-protocol/core/bls"
"github.com/deso-protocol/uint256"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/pos_snapshot_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package lib
import (
"sync"

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/pkg/errors"
)

Expand Down
2 changes: 1 addition & 1 deletion lib/pos_snapshot_entries.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/deso-protocol/core/bls"
"github.com/deso-protocol/core/collections"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/golang/glog"
"github.com/pkg/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion lib/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"strings"

"github.com/deso-protocol/uint256"
"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/badger/v3"
"github.com/go-pg/pg/v10"
"github.com/go-pg/pg/v10/orm"
"github.com/golang/glog"
Expand Down
Loading

0 comments on commit a8578b2

Please sign in to comment.