Follow-up from "Create Accounting module"
The following discussions from !5071 (merged) should be addressed:
This is to drop the persist interval !5118 (merged)
-
@pjbrone started a discussion: (+4 comments) (nit/Q) any reason for it to be this high?
This is to update on siad handles modules on start up. !5117 (merged)
-
@ChrisSchinnerl started a discussion: (+3 comments) I think we discussed making this conditional? So if any modules are turned on that provide info to the accounting module, we turn on the accounting module?
This is to update the persistence !5118 (merged)
-
@ChrisSchinnerl started a discussion: (+2 comments) I don't think we can leave the persistence like that. This is going to be a compatibility nightmare as soon as we start adding more fields to the persistence.
Since we are using append-only persistence, we shouldn't need a fixed size entry at all. We just start with a version byte followed by the marshaled entry. If the entry is
encoding.Marshal
'd, it will implicitly have any length prefix it needs.In the future we can then add a new struct for every version we introduce and decide how to unmarshal it after reading the version byte.
Adding new fields is still annoying that way but it should be easier. Alternatively we might also want to not use Sia encoding at all and just print a human-readable csv file. That would make it easier for people to export it into other software such as excel.
The rest of the MR looks fine so maybe we can also just merge the half without persistence and talk a bit more about our requirements.