-
Notifications
You must be signed in to change notification settings - Fork 5
chore: improve topos-tce-storage documentation #353
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #353 +/- ##
==========================================
+ Coverage 61.35% 62.64% +1.29%
==========================================
Files 219 218 -1
Lines 12109 11874 -235
==========================================
+ Hits 7429 7438 +9
+ Misses 4680 4436 -244 ☔ View full report in Codecov by Sentry. |
ab38c77
to
4685219
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments:
- Discussing different options as a database layer is I think not needed here. It's not a discussion but a "matter of fact". Mentioning RocksDB is good, but comparing it doesn't make sense here.
- "Each store represents a different kind of capabilities": I think it's clear that they serve different purposes, or they wouldn't exist. I would still give a high level overview which store is responsbile for what exactly, and why we split them in these different types of stores.
- No reason to mention how a new store is instantiated. It's not a library. And the reader will probably never instantiate a new store. If they do, it's easy to point that out in the store documentation itself.
- Never mention "fairly simple" in a documentation :)
- I am also not so sure that we have to mention
Arc
andasync-trait
.
What I would like to see is something along these lines:
"The topos-tce-storage
is serves as the storage
layer solely for the tce
, and is split into:
- ValidatorStore
- FullNodeStore
- ValidatorPerEpochStore
- EpochValidatorsStore
- IndexStore
The relationship between them is as follows (adding the diagram here).
The responsibilties for this storage layer are:
- Storing and retrieving certificates
- Managing pending certificates
- Managing the certificate status
- Metadata around the protocol and the state of the TCE
The certificates are managed in a pool (explaining here how exactly we think about this and what a pool is, when a certificate is pending and why, the different possible states of a certificate).
Also mentioning here: What is the metadata for us, and why do we store it?
After this is cleared, give a brief overview of each store and what is does exactly, its responsibilities.
Some point are interesting but the part on what specific store are doing will be directly defined on the |
Sure, not in detail, but a high level overview. If we mention something, we should explain it. Like in 2-3 sentences what it does. I also don't think we document a library here but more a inner workings of the application. |
The point is to define that this storage implementation doesn't aim to be used in every place. It also offers suggestion and explain why and how it is built like that.
|
d1e7303
to
0367f17
Compare
0367f17
to
a8c4688
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a HUGE improvement, thank you @Freyskeyd ! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think we should not mention other possible solutions or going too much into detail into other technology advantages. This can just lead to opinionated comments or outdated arguments.
Otherwise I think it's a great first step which we can iterate and improve on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Signed-off-by: Simon Paitrault <[email protected]>
Signed-off-by: Simon Paitrault <[email protected]>
Signed-off-by: Simon Paitrault <[email protected]>
Signed-off-by: Simon Paitrault <[email protected]>
3b532f0
to
27a675b
Compare
Description
This PR is adding documentation (crate level) for
topos-tce-storage
.More to come soon.
Preview of the doc on README.md
PR Checklist: