Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
cc6c67b
Support object store (#206)
Mar 25, 2024
17043e4
cleanup
mmsqe Mar 27, 2025
78e3a48
Merge remote-tracking branch 'origin/release/v0.53.x' into release/v0…
mmsqe Mar 28, 2025
f44f06b
fix test
mmsqe Mar 28, 2025
e1ee61f
lint
mmsqe Mar 28, 2025
b75bb98
Merge remote-tracking branch 'origin/main' into release/v0.53.x_obj_s…
mmsqe Apr 9, 2025
e64ccc0
resolve
mmsqe Apr 9, 2025
d2c1c3b
fix test
mmsqe Apr 9, 2025
8892029
fix test
mmsqe Apr 9, 2025
83f4859
Problem: store key type assertion is incorrect (#244)
mmsqe Apr 9, 2025
d97d3d1
Merge remote-tracking branch 'origin/main' into release/v0.53.x_obj_s…
mmsqe Apr 11, 2025
3c03b87
Merge remote-tracking branch 'origin/main' into release/v0.53.x_obj_s…
mmsqe Apr 25, 2025
a06944f
Merge remote-tracking branch 'origin/main' into release/v0.53.x_obj_s…
mmsqe Sep 2, 2025
f2fcf30
fix clientv2
mmsqe Sep 2, 2025
e328edf
init
technicallyty Sep 12, 2025
58b6c43
Merge remote-tracking branch 'origin' into technicallyty/object-stores
Eric-Warehime Oct 14, 2025
a8655d6
Fix gofumpt
Eric-Warehime Oct 14, 2025
78e339e
Add codecov
Eric-Warehime Oct 14, 2025
6dd547c
Remove flags from codecov upload
Eric-Warehime Oct 14, 2025
c19b17b
Fix e2e, integration paths
Eric-Warehime Oct 15, 2025
47eac84
Merge remote-tracking branch 'origin' into technicallyty/object-stores
Eric-Warehime Oct 15, 2025
6e24572
Tidy client v2
Eric-Warehime Oct 15, 2025
d285145
Add validity test
Eric-Warehime Oct 15, 2025
12a2cc8
Add length validity test
Eric-Warehime Oct 15, 2025
613a3fa
Add baseapp stores test
Eric-Warehime Oct 15, 2025
ba1607b
Update codecov to ignore mock dirs
Eric-Warehime Oct 15, 2025
9baec7f
Add rootmulti obj store getter test
Eric-Warehime Oct 16, 2025
1a3f99e
Add prefix objstore test
Eric-Warehime Oct 16, 2025
3cfcbab
Add domain to prefix iter test
Eric-Warehime Oct 16, 2025
a1f2db1
Add general prefix obj store tests
Eric-Warehime Oct 16, 2025
f90ccd5
Merge remote-tracking branch 'origin' into technicallyty/object-stores
Eric-Warehime Oct 16, 2025
98df6d1
Fix test
Eric-Warehime Oct 16, 2025
269226d
Fix hashing
Eric-Warehime Oct 16, 2025
e955c32
Upload all test coverage data
Eric-Warehime Oct 16, 2025
2850c8f
Extend baseapp testing
Eric-Warehime Oct 16, 2025
52a92b1
Add context test
Eric-Warehime Oct 16, 2025
f1969b5
Fix lint
Eric-Warehime Oct 16, 2025
b37ab1f
Test store types
Eric-Warehime Oct 16, 2025
3859325
Update changelog entry
Eric-Warehime Oct 16, 2025
96dff47
Use var for zeroValue
Eric-Warehime Oct 21, 2025
bdb5e3d
Cleanup
Eric-Warehime Oct 21, 2025
f39718f
Merge branch 'main' into technicallyty/object-stores
Eric-Warehime Oct 21, 2025
905e1e4
Go mod tidy
Eric-Warehime Oct 21, 2025
a4c8d30
Add constructor changes
Eric-Warehime Oct 21, 2025
fad7177
Add comments for type assertion in trace store branching
Eric-Warehime Oct 23, 2025
604402a
Merge branch 'main' into technicallyty/object-stores
Eric-Warehime Oct 23, 2025
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
134 changes: 132 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:

repo-analysis:
runs-on: depot-ubuntu-22.04-4
needs: [tests, test-integration, test-e2e]
needs: [tests, test-integration, test-e2e, test-clientv2, test-core, test-depinject, test-errors, test-math, test-schema, test-collections, test-cosmovisor, test-confix, test-store, test-log, test-x-tx, test-tools-benchmark]
steps:
- uses: actions/checkout@v5
- uses: technote-space/[email protected]
Expand Down Expand Up @@ -184,11 +184,76 @@ jobs:
with:
name: "${{ github.sha }}-e2e-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-clientv2-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-core-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-depinject-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-errors-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-math-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-schema-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-collections-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-cosmovisor-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-confix-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-store-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-log-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-x-tx-coverage"
continue-on-error: true
- uses: actions/download-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-tools-benchmark-coverage"
continue-on-error: true
- name: Upload coverage to Codecov
if: env.GIT_DIFF
uses: codecov/codecov-action@v5
with:
files: ./00profile.out,./01profile.out,./02profile.out,./03profile.out,./tests/integration-profile.out,./tests/e2e-profile.out
files: ./00profile.out,./01profile.out,./02profile.out,./03profile.out,./integration-profile.out,./e2e-profile.out,./client/v2/coverage.out,./core/coverage.out,./depinject/coverage.out,./errors/coverage.out,./math/coverage.out,./schema/coverage.out,./collections/coverage.out,./tools/cosmovisor/coverage.out,./tools/confix/coverage.out,./store/coverage.out,./log/coverage.out,./x/tx/coverage.out,./tools/benchmark/coverage.out
fail_ci_if_error: false
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -248,6 +313,11 @@ jobs:
run: |
cd client/v2
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-clientv2-coverage"
path: ./client/v2/coverage.out

test-core:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -271,6 +341,11 @@ jobs:
run: |
cd core
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-core-coverage"
path: ./core/coverage.out

test-depinject:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -294,6 +369,11 @@ jobs:
run: |
cd depinject
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-depinject-coverage"
path: ./depinject/coverage.out

test-errors:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -317,6 +397,11 @@ jobs:
run: |
cd errors
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-errors-coverage"
path: ./errors/coverage.out

test-math:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -340,6 +425,11 @@ jobs:
run: |
cd math
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-math-coverage"
path: ./math/coverage.out

test-schema:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -362,6 +452,11 @@ jobs:
run: |
cd schema
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-schema-coverage"
path: ./schema/coverage.out

test-collections:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -385,6 +480,11 @@ jobs:
run: |
cd collections
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-collections-coverage"
path: ./collections/coverage.out

test-cosmovisor:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -408,6 +508,11 @@ jobs:
run: |
cd tools/cosmovisor
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-cosmovisor-coverage"
path: ./tools/cosmovisor/coverage.out

test-confix:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -431,6 +536,11 @@ jobs:
run: |
cd tools/confix
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-confix-coverage"
path: ./tools/confix/coverage.out

test-store:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -455,6 +565,11 @@ jobs:
cd store
(cd streaming/abci/examples/file && go build .)
go test -ldflags "-r /usr/local/lib" -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-store-coverage"
path: ./store/coverage.out

test-log:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -478,6 +593,11 @@ jobs:
run: |
cd log
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-log-coverage"
path: ./log/coverage.out

#############################
### Cosmos SDK x/{module} ###
Expand Down Expand Up @@ -508,6 +628,11 @@ jobs:
run: |
cd x/tx
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-x-tx-coverage"
path: ./x/tx/coverage.out

test-tools-benchmark:
runs-on: depot-ubuntu-22.04-4
Expand All @@ -531,3 +656,8 @@ jobs:
run: |
cd tools/benchmark
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace' ./...
- uses: actions/upload-artifact@v4
if: env.GIT_DIFF
with:
name: "${{ github.sha }}-tools-benchmark-coverage"
path: ./tools/benchmark/coverage.out
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Breaking Changes

* [#25090](https://github.com/cosmos/cosmos-sdk/pull/25090) Moved deprecated modules to `./contrib`. These modules are still available but will no longer be actively maintained or supported in the Cosmos SDK Bug Bounty program.
* `x/group`
* `x/nft`
* `x/circuit`
* `x/crisis`
* `x/group`
* `x/nft`
* `x/circuit`
* `x/crisis`
* (crypto) [#24414](https://github.com/cosmos/cosmos-sdk/pull/24414) Remove sr25519 support, since it was removed in CometBFT v1.x (see: CometBFT [#3646](https://github.com/cometbft/cometbft/pull/3646)).

### Features
Expand Down Expand Up @@ -111,6 +111,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/mint) [#24436](https://github.com/cosmos/cosmos-sdk/pull/24436) Allow users to set a custom minting function used in the `x/mint` begin blocker.
* The `InflationCalculationFn` argument to `mint.NewAppModule()` is now ignored and must be nil. To set a custom `InflationCalculationFn` on the default minter, use `mintkeeper.WithMintFn(mintkeeper.DefaultMintFn(customInflationFn))`.
* (api) [#24428](https://github.com/cosmos/cosmos-sdk/pull/24428) Add block height to response headers
* (baseapp) [#25470](https://github.com/cosmos/cosmos-sdk/pull/25470) Support mount object store in baseapp, add `ObjectStore` api in context.

### Improvements

Expand Down
13 changes: 13 additions & 0 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ func (app *BaseApp) MountStores(keys ...storetypes.StoreKey) {
case *storetypes.MemoryStoreKey:
app.MountStore(key, storetypes.StoreTypeMemory)

case *storetypes.ObjectStoreKey:
app.MountStore(key, storetypes.StoreTypeObject)

default:
panic(fmt.Sprintf("Unrecognized store key type :%T", key))
}
Expand Down Expand Up @@ -321,6 +324,16 @@ func (app *BaseApp) MountMemoryStores(keys map[string]*storetypes.MemoryStoreKey
}
}

// MountObjectStores mounts all transient object stores with the BaseApp's internal
// commit multi-store.
func (app *BaseApp) MountObjectStores(keys map[string]*storetypes.ObjectStoreKey) {
skeys := slices.Sorted(maps.Keys(keys))
for _, key := range skeys {
memKey := keys[key]
app.MountStore(memKey, storetypes.StoreTypeObject)
}
}

// MountStore mounts a store to the provided key in the BaseApp multistore,
// using the default DB.
func (app *BaseApp) MountStore(key storetypes.StoreKey, typ storetypes.StoreType) {
Expand Down
19 changes: 19 additions & 0 deletions baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,25 @@ func TestGetEmptyConsensusParams(t *testing.T) {
require.Equal(t, uint64(0), suite.baseApp.GetMaximumBlockGas(ctx))
}

func TestMountStores(t *testing.T) {
logger := log.NewNopLogger()
db := dbm.NewMemDB()
name := t.Name()
app := baseapp.NewBaseApp(name, logger, db, nil)
kvKey := storetypes.NewKVStoreKey("kv")
transKey := storetypes.NewTransientStoreKey("trans")
memKey := storetypes.NewMemoryStoreKey("mem")
objKey := storetypes.NewObjectStoreKey("obj")
app.MountStores(kvKey, transKey, memKey, objKey)
objKey2 := storetypes.NewObjectStoreKey("obj2")
app.MountObjectStores(map[string]*storetypes.ObjectStoreKey{"obj2": objKey2})
require.NoError(t, app.LoadLatestVersion())
for _, keyName := range []storetypes.StoreKey{kvKey, transKey, memKey, objKey} {
require.NotNil(t, app.CommitMultiStore().GetStore(keyName))
}
require.NotNil(t, app.CommitMultiStore().GetStore(objKey2))
}

func TestLoadVersionPruning(t *testing.T) {
logger := log.NewNopLogger()
pruningOptions := pruningtypes.NewCustomPruningOptions(10, 15)
Expand Down
2 changes: 1 addition & 1 deletion client/v2/autocli/testdata/help-echo-msg.golden
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Flags:
--fees string Fees to pay along with transaction; eg: 10uatom
--from string Name or address of private key with which to sign
--gas string gas limit to set per-transaction; set to "auto" to calculate sufficient gas automatically. Note: "auto" option doesn't always report accurate results. Set a valid coin value to adjust the result. Can be used instead of "fees". (default 200000)
--gas-adjustment float adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored (default 1)
--gas-adjustment float adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored (default 1)
--gas-prices string Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)
--generate-only Build an unsigned transaction and write it to STDOUT (when enabled, the local Keybase only accessed when providing a key name)
-h, --help help for send
Expand Down
19 changes: 13 additions & 6 deletions client/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ require (
github.com/99designs/keyring v1.2.1 // indirect
github.com/DataDog/datadog-go v3.2.0+incompatible // indirect
github.com/DataDog/zstd v1.5.7 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.2.0 // indirect
github.com/bytedance/sonic v1.14.0 // indirect
Expand All @@ -46,7 +45,7 @@ require (
github.com/cockroachdb/pebble v1.1.5 // indirect
github.com/cockroachdb/redact v1.1.6 // indirect
github.com/cockroachdb/tokenbucket v0.0.0-20250429170803-42689b6311bb // indirect
github.com/cometbft/cometbft v0.38.19 // indirect
github.com/cometbft/cometbft v0.39.0-beta.2 // indirect
github.com/cometbft/cometbft-db v0.14.1 // indirect
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/cosmos-db v1.1.3 // indirect
Expand Down Expand Up @@ -107,7 +106,7 @@ require (
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/linxGnu/grocksdb v1.9.8 // indirect
github.com/linxGnu/grocksdb v1.10.1 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
Expand All @@ -116,7 +115,6 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect
github.com/oklog/run v1.1.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/petermattis/goid v0.0.0-20250813065127-a731cc31b4fe // indirect
github.com/pkg/errors v0.9.1 // indirect
Expand All @@ -136,9 +134,10 @@ require (
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/viper v1.21.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/supranational/blst v0.3.16 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tidwall/btree v1.7.0 // indirect
github.com/tidwall/btree v1.8.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/zondax/golem v0.27.0 // indirect
github.com/zondax/hid v0.9.2 // indirect
Expand All @@ -162,9 +161,17 @@ require (
golang.org/x/term v0.36.0 // indirect
golang.org/x/text v0.30.0 // indirect
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
nhooyr.io/websocket v1.8.17 // indirect
pgregory.net/rapid v1.2.0 // indirect
)

// replace (
// <temporary replace>
// )
replace (
cosmossdk.io/store => ../../store
github.com/cosmos/cosmos-sdk => ../../.
)
Loading
Loading