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

replace tm-db with cosmos-db #12925

Closed
tac0turtle opened this issue Aug 15, 2022 · 9 comments
Closed

replace tm-db with cosmos-db #12925

tac0turtle opened this issue Aug 15, 2022 · 9 comments
Labels
C:Store T: Dev UX UX for SDK developers (i.e. how to call our code)

Comments

@tac0turtle
Copy link
Member

Summary

Cosmos-sdk has a different set of needs for databases than tendermint, this led to forking of tm-db, https://github.com/cosmos/cosmos-db.

Proposal

Replace the usage of config.toml database preference to influence databases in the sdk. Import and use cosmos-db and set the db preference in app.toml

@faddat
Copy link
Contributor

faddat commented Aug 16, 2022

sure, but we should probably take the fork relationship off of the repository so that pull requests and ci and searching the code work correctly.

@faddat
Copy link
Contributor

faddat commented Aug 24, 2022

Ok, so:

to complete this, we'd need to get these merged:

And these are nice to haves:

Right now, the main blockers are the iavl PR's. After that I could work on the SDK items and app.toml config integration.

@alexanderbez
Copy link
Contributor

I've reviewed and approved the latter two nice-to-haves

@tac0turtle
Copy link
Member Author

The biggest pain point here will be changing dbs if a user is already using badger or boltdb. Should we have a migration?

@tac0turtle tac0turtle added C:Store T: Dev UX UX for SDK developers (i.e. how to call our code) labels Aug 27, 2022
@faddat
Copy link
Contributor

faddat commented Aug 31, 2022

So, we've done a number of user surveys, and basically there is no evidence that anyone is using either badger or bolt.

Badger could not even keep up with the tip of most chains

Bolt often simply did not work.

How about this as a solution:

I ask in the cosmos-sdk discord (✅ )

I tweet the question (✅ )

https://twitter.com/gadikian/status/1564934559212244992

SDK account / others on the team retweet the question

I don't know of another good way to survey users, but there was also an issue on cosmos-db and on tm-db -- thus far we've discovered zero users.

@marbar3778 -- if I were using one of those other DB's I'd just state sync my node with a new one. I guess for archive state, that could be another matter?

@faddat faddat mentioned this issue Aug 31, 2022
19 tasks
@robert-zaremba
Copy link
Collaborator

We really need more benchmarks. Thanks for diving into that @faddat

@yihuang
Copy link
Collaborator

yihuang commented Sep 16, 2022

So we only support LSM tree DB now, any interest to support a btree DB, like lmdb/mdbx.

@tac0turtle
Copy link
Member Author

Id be very open, but changing dbs won't give us much more performance without fixing iavl key format and how we write to disk .

@tac0turtle
Copy link
Member Author

thanks @faddat for completing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Store T: Dev UX UX for SDK developers (i.e. how to call our code)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants