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

fix: enable rocksdb for frontier backend #1622

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

wischli
Copy link
Contributor

@wischli wischli commented Nov 23, 2023

Description

Right now, our Substrate client supports rocksdb, paritydb, auto as database types. The frontier backend inherits the database type from that CLI. When Frontier upgraded to Polkadot v0.9.42, the rocksdb feature was added to the fc-db crate. Since we did not opt into that feature, our client is throwing when attempting to use rocksdb as db.

  • Adds rocksdb feature to sc-cli, sc-service, fc-db and frame-benchmarking-cli crates
  • Fixes issue of unsupported rocksdb for frontier backend
Error: Service(Other("Supported db sources: `auto` | `rocksdb` | `paritydb`"))

How to test

cargo run -r \
  --chain="development" \
  --tmp \
  --parachain-id="2000" \
  --wasm-execution=compiled \
  --execution=wasm \
  --rpc-external \
  --rpc-cors all \
  --rpc-methods=Unsafe \
  --port=30366 \
  --rpc-port=9947 \
  --database=rocksdb \
  -- \
  --wasm-execution=compiled \
  --execution=wasm \
  --chain="./res/rococo-local.json"

Checklist:

  • I have added Rust doc comments to structs, enums, traits and functions
  • I have made corresponding changes to the documentation
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works

@wischli wischli added I2-bug The code fails to follow expected behaviour. P9-drop-everything Everyone should address this issue now. labels Nov 23, 2023
@wischli wischli self-assigned this Nov 23, 2023
@@ -283,15 +283,15 @@ url = "2.2.2"
grandpa = { package = "sc-consensus-grandpa", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", features = ["rocksdb"] }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Enabling this feature is not really necessary as it is the default one. Happy to drop this here but I vote for rather being explicit.

sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-service = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", features = ["rocksdb"] }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Enabling this feature is not really necessary as it is the default one. Happy to drop this here but I vote for rather being explicit.

@@ -313,7 +313,7 @@ sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }

# Cli specific
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", features = ["rocksdb"]}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Enabling this feature is not really necessary as it is the default one. Happy to drop this here but I vote for rather being explicit.

@mustermeiszer mustermeiszer merged commit 8b9c8f0 into main Nov 23, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The code fails to follow expected behaviour. P9-drop-everything Everyone should address this issue now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants