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

Make opendb API more generic #4

Merged
merged 8 commits into from
Jul 3, 2024
Merged

Conversation

evgeniy-scherbina
Copy link
Contributor

@evgeniy-scherbina evgeniy-scherbina commented Jun 26, 2024

Dependency changes:

  • Downgrade cosmossdk.io/api: v0.7.5 -> v0.3.1
  • Downgrade cometbft version declaration: v0.38.7 -> v0.37.4
    • NOTE: we're using the fork anyway: github.com/cometbft/cometbft => github.com/kava-labs/cometbft v0.37.4-kava.1
    • this change was needed only to make sure that ethermint won't upgrade it's own cometbft dependency following MVS (Minimal Version Selection) algorithm
  • Downgrade golang.org/x/exp: v0.0.0-20240404231335-c0f41cb1a7a0 -> v0.0.0-20230711153332-06a737ee72cb

NOTE: we downgraded to versions which are used in kava and ethermint

Source code changes:

  • allow to configure db name instead of hardcoding application.db
  • allow to configure data directory name instead of hardcoding data
  • use db name as a label in prometheus metrics

Related PR: Kava-Labs/ethermint#63

@evgeniy-scherbina evgeniy-scherbina force-pushed the yevhenii/ethermint branch 2 times, most recently from de3f081 to a2f9efe Compare June 28, 2024 13:04
@@ -423,77 +428,77 @@ func registerMetrics() {
}

// report reports metrics to prometheus based on rocksdb props and stats
func (m *Metrics) report(props *properties, stats *stats) {
func (m *Metrics) report(dbName string, props *properties, stats *stats) {
Copy link
Member

Choose a reason for hiding this comment

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

Is there a list/documentation of which metrics are reported? Can we link to it in Confluence?

Copy link
Contributor Author

@evgeniy-scherbina evgeniy-scherbina Jul 2, 2024

Choose a reason for hiding this comment

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

Best sources of information:

  • grafana dashboard
  • source code
  • rocksdb wiki

but I'll add a README

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@karzak
Copy link
Member

karzak commented Jul 2, 2024

Can you also add a README for this repo @evgeniy-scherbina - can be a separate PR

Copy link
Member

@karzak karzak left a comment

Choose a reason for hiding this comment

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

Changes look fine/safe. I would like to tidy this repo up with a readme that states what its purpose is, as well as document all the rocks db metrics we are collecting and from which databases.

@evgeniy-scherbina evgeniy-scherbina merged commit 8197d03 into main Jul 3, 2024
1 check passed
@evgeniy-scherbina evgeniy-scherbina deleted the yevhenii/ethermint branch July 3, 2024 15:28
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.

2 participants