Skip to content

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
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-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.


# 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
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.

3 participants