cronos
cronos copied to clipboard
enable backend DB options in cronos
Closes #706
Adding a new flag maxopenfiles for setting up the backend DB max open files.
The current rocksdb (in tm-db v0.6.7) is using 4096 as the default value, it affects the backend DB in the application and the snapshot folder
Note: for saving the memory usage, we might set this flag to 1000 (the default value in tm-db v0.6.6)
i.e.
./cronosd start --maxopenfiles 1000
./cronosd export --maxopenfiles 1000
PR Checklist:
- [ ] Have you read the CONTRIBUTING.md?
- [ ] Does your PR follow the C4 patch requirements?
- [ ] Have you rebased your work on top of the latest master?
- [ ] Have you checked your code compiles? (
make) - [ ] Have you included tests for any non-trivial functionality?
- [ ] Have you checked your code passes the unit tests? (
make test) - [ ] Have you checked your code formatting is correct? (
go fmt) - [ ] Have you checked your basic code style is fine? (
golangci-lint run) - [ ] If you added any dependencies, have you checked they do not contain any known vulnerabilities? (
go list -json -m all | nancy sleuth) - [ ] If your changes affect the client infrastructure, have you run the integration test?
- [ ] If your changes affect public APIs, does your PR follow the C4 evolution of public contracts?
- [ ] If your code changes public APIs, have you incremented the crate version numbers and documented your changes in the CHANGELOG.md?
- [ ] If you are contributing for the first time, please read the agreement in CONTRIBUTING.md now and add a comment to this pull request stating that your PR is in accordance with the Developer's Certificate of Origin.
Thank you for your code, it's appreciated! :)
missing nix mod update
created PR in the SDK main
https://github.com/cosmos/cosmos-sdk/pull/13406
I think the best way to going forward this is control rocksdb options in different commands, even customizable with cli flags or configs, which is possible now, with recent NewRocksdbWithRawDB api in our forked tm-db.
So I'm closing this, @JayT106