Skip to content

Manually vendor parts of cosmossdk/store, and fix the test#25

Open
qezz wants to merge 2 commits into
mainfrom
sdkmap
Open

Manually vendor parts of cosmossdk/store, and fix the test#25
qezz wants to merge 2 commits into
mainfrom
sdkmap

Conversation

@qezz

@qezz qezz commented Jul 3, 2025

Copy link
Copy Markdown

The original maps are in an internal package, so I'm curious how this test worked in the past.

There might be a better solution to this, lmk.

@qezz

qezz commented Jul 3, 2025

Copy link
Copy Markdown
Author

tests

cosmprund (sdkmap) $ go test -race -v ./...
?   	github.com/binaryholdings/cosmos-pruner	[no test files]
?   	github.com/binaryholdings/cosmos-pruner/cmd	[no test files]
?   	github.com/binaryholdings/cosmos-pruner/cmd/celestia	[no test files]
?   	github.com/binaryholdings/cosmos-pruner/cosmossdk/store/kv	[no test files]
=== RUN   TestEmptyKeyMerkleMap
--- PASS: TestEmptyKeyMerkleMap (0.00s)
=== RUN   TestMerkleMap
--- PASS: TestMerkleMap (0.00s)
=== RUN   TestEmptyKeySimpleMap
--- PASS: TestEmptyKeySimpleMap (0.00s)
=== RUN   TestSimpleMap
--- PASS: TestSimpleMap (0.00s)
PASS
ok  	github.com/binaryholdings/cosmos-pruner/cosmossdk/store/maps	(cached)
?   	github.com/binaryholdings/cosmos-pruner/cosmossdk/store/tree	[no test files]
2025/07/03 12:56:45 proto: duplicate proto type registered: cosmos.store.internal.kv.v1beta1.Pairs
2025/07/03 12:56:45 proto: duplicate proto type registered: cosmos.store.internal.kv.v1beta1.Pair
=== RUN   TestVerifyIAVLStoreQueryProof
--- PASS: TestVerifyIAVLStoreQueryProof (0.00s)
=== RUN   TestVerifyMultiStoreQueryProof
--- PASS: TestVerifyMultiStoreQueryProof (0.00s)
=== RUN   TestVerifyMultiStoreQueryProofAbsence
--- PASS: TestVerifyMultiStoreQueryProofAbsence (0.00s)
=== RUN   TestStoreType
--- PASS: TestStoreType (0.00s)
=== RUN   TestGetCommitKVStore
--- PASS: TestGetCommitKVStore (0.00s)
=== RUN   TestStoreMount
--- PASS: TestStoreMount (0.00s)
=== RUN   TestCacheMultiStore
--- PASS: TestCacheMultiStore (0.00s)
=== RUN   TestCacheMultiStoreWithVersion
--- PASS: TestCacheMultiStoreWithVersion (0.00s)
=== RUN   TestHashStableWithEmptyCommit
--- PASS: TestHashStableWithEmptyCommit (0.00s)
=== RUN   TestMultistoreCommitLoad
--- PASS: TestMultistoreCommitLoad (0.00s)
=== RUN   TestMultistoreLoadWithUpgrade
--- PASS: TestMultistoreLoadWithUpgrade (0.00s)
=== RUN   TestParsePath
--- PASS: TestParsePath (0.00s)
=== RUN   TestMultiStoreRestart
--- PASS: TestMultiStoreRestart (0.00s)
=== RUN   TestMultiStoreQuery
--- PASS: TestMultiStoreQuery (0.00s)
=== RUN   TestMultiStore_Pruning
=== RUN   TestMultiStore_Pruning/prune_nothing
=== RUN   TestMultiStore_Pruning/prune_everything
=== RUN   TestMultiStore_Pruning/prune_some;_no_batch
=== RUN   TestMultiStore_Pruning/prune_some;_small_batch
=== RUN   TestMultiStore_Pruning/prune_some;_large_batch
--- PASS: TestMultiStore_Pruning (0.01s)
    --- PASS: TestMultiStore_Pruning/prune_nothing (0.00s)
    --- PASS: TestMultiStore_Pruning/prune_everything (0.00s)
    --- PASS: TestMultiStore_Pruning/prune_some;_no_batch (0.00s)
    --- PASS: TestMultiStore_Pruning/prune_some;_small_batch (0.00s)
    --- PASS: TestMultiStore_Pruning/prune_some;_large_batch (0.00s)
=== RUN   TestMultiStore_Pruning_SameHeightsTwice
--- PASS: TestMultiStore_Pruning_SameHeightsTwice (0.00s)
=== RUN   TestMultiStore_PruningRestart
--- PASS: TestMultiStore_PruningRestart (0.00s)
=== RUN   TestUnevenStoresHeightCheck
--- PASS: TestUnevenStoresHeightCheck (0.00s)
=== RUN   TestSetInitialVersion
--- PASS: TestSetInitialVersion (0.00s)
=== RUN   TestAddListenersAndListeningEnabled
--- PASS: TestAddListenersAndListeningEnabled (0.00s)
=== RUN   TestCacheWraps
--- PASS: TestCacheWraps (0.00s)
=== RUN   TestTraceConcurrency
--- PASS: TestTraceConcurrency (3.00s)
=== RUN   TestCommitOrdered
--- PASS: TestCommitOrdered (0.00s)
=== RUN   TestStateListeners
--- PASS: TestStateListeners (0.00s)
=== RUN   TestCommitStores
=== RUN   TestCommitStores/when_upgrade_not_get_interrupted
=== RUN   TestCommitStores/when_upgrade_get_interrupted_once
=== RUN   TestCommitStores/when_upgrade_get_interrupted_twice
--- PASS: TestCommitStores (0.00s)
    --- PASS: TestCommitStores/when_upgrade_not_get_interrupted (0.00s)
    --- PASS: TestCommitStores/when_upgrade_get_interrupted_once (0.00s)
    --- PASS: TestCommitStores/when_upgrade_get_interrupted_twice (0.00s)
=== RUN   TestMultistoreSnapshot_Checksum
=== RUN   TestMultistoreSnapshot_Checksum/Format_1
--- PASS: TestMultistoreSnapshot_Checksum (26.99s)
    --- PASS: TestMultistoreSnapshot_Checksum/Format_1 (24.15s)
=== RUN   TestMultistoreSnapshot_Errors
=== RUN   TestMultistoreSnapshot_Errors/0_height
=== RUN   TestMultistoreSnapshot_Errors/unknown_height
--- PASS: TestMultistoreSnapshot_Errors (0.00s)
    --- PASS: TestMultistoreSnapshot_Errors/0_height (0.00s)
    --- PASS: TestMultistoreSnapshot_Errors/unknown_height (0.00s)
=== RUN   TestMultistoreSnapshotRestore
--- PASS: TestMultistoreSnapshotRestore (0.00s)
PASS
ok  	github.com/binaryholdings/cosmos-pruner/internal/rootmulti	31.114s

@qezz qezz requested review from DavidVentura and pyoxa July 3, 2025 11:00
@DavidVentura

Copy link
Copy Markdown

the whole of internal/rootmulti was vendored directly, including the tests

@qezz

qezz commented Jul 3, 2025

Copy link
Copy Markdown
Author

Right. I guess the tests we never run for it in this case.

@pyoxa pyoxa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one alternative would be to drop those tests entirely :trollface: , but maybe we'll get there someday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants