Neptune-Crypto / neptune-core

anonymous peer-to-peer cash
Apache License 2.0
25 stars 7 forks source link

harmonize timestamp types #117

Closed aszepieniec closed 5 months ago

aszepieniec commented 7 months ago

Various types are used throughout the code base to capture dates (with time). By convention we count the number of milliseconds since the Unix epoch, but even for this number the types Duration, u64, and BFieldElement are used rather interchangeably. Note that BFieldElement is used for consensus-critical data structures such as Block and Transaction.

elielnfinic commented 6 months ago

Is there anybody working on this? If not, I can work on it.

dan-da commented 6 months ago

@elielnfinic no one is working on it that I know of. A PR would be welcome.

edit: it looks like this is addressed by 9e55a5b62afec6922155b008588480cdd0d235cd actually.

@aszepieniec may be waiting on #120 before merging to master.

elielnfinic commented 6 months ago

Good that a custom Timestamp model was created.

dan-da commented 6 months ago

@aszepieniec With #124 merged, maybe now is a good time to get 9e55a5b into master? I'm guessing there might be some conflicts to resolve.

aszepieniec commented 6 months ago

@aszepieniec With https://github.com/Neptune-Crypto/neptune-core/pull/124 merged, maybe now is a good time to get https://github.com/Neptune-Crypto/neptune-core/commit/9e55a5b62afec6922155b008588480cdd0d235cd into master? I'm guessing there might be some conflicts to resolve.

Yes it is. No time like the present.