Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3164 +/- ##
==========================================
+ Coverage 58.55% 58.63% +0.07%
==========================================
Files 2099 2105 +6
Lines 173847 174179 +332
==========================================
+ Hits 101803 102135 +332
Misses 62873 62873
Partials 9171 9171
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| accountVersionStart = 0 | ||
| accountBlockHeightStart = 1 | ||
| accountBalanceStart = 9 |
There was a problem hiding this comment.
IMO, this VersionStartPos, MetadataStartPos, MetadataLength can be a global const shared by all DB instead of redefine in each DB
| accountNonceStart = 41 | ||
| accountCodeHashStart = 49 | ||
| accountCompactLength = accountCodeHashStart // 49 | ||
| accountDataLength = 81 |
There was a problem hiding this comment.
Length can be hardcoded, but Position should be derived from some math calculation
| |---------|--------------|--------------| | ||
| | 1 byte | 8 bytes | variable | |
There was a problem hiding this comment.
I think for legacyDB, we probably don't want this extra 8 bytes to start with, because we could in the future store all cosmos module state to this legacyDB
Describe your changes and provide context
For each DB in FlatKV (other than metadata), we need to add 9 extra bytes of metadata. This PR introduces structs for each DB that facilitate this metadata addtion.
Testing performed to validate your change
Unit tests, ran full tests in branch where this code is integrated.