kilt-node
kilt-node copied to clipboard
feat: add custom db weights
fixes KILTProtocol/ticket#2066
Default rocksdb weights are:
read: 25_000 * constants::WEIGHT_PER_NANOS,
write: 100_000 * constants::WEIGHT_PER_NANOS,
polkadot weights (at block 9643856, by parity) are:
read: 20_499 * constants::WEIGHT_PER_NANOS,
write: 83_471 * constants::WEIGHT_PER_NANOS,
polkadot weights (at block 10966052, by our infrastructure) are:
read: 26_527 * constants::WEIGHT_PER_NANOS,
write: 99_766 * constants::WEIGHT_PER_NANOS,
- Weights where only added to spiritnet. Not sure if we need them for peregrine too.
- multiplied with 1.1 since polkadot does the same
- when the DB grows the weight also gets heavier.
- 1.1 should cover the weight increase until the next release
TODO
- [ ] ⚠️ reads got twice as expensive
- [x] run benchmark on benchmark server
Checklist:
- [ ] I have verified that the code works
- [ ] No panics! (checked arithmetic ops, no indexing
array[3]useget(3), ...)
- [ ] No panics! (checked arithmetic ops, no indexing
- [ ] I have verified that the code is easy to understand
- [ ] If not, I have left a well-balanced amount of inline comments
- [ ] I have left the code in a better state
- [ ] I have documented the changes (where applicable)