Skip to content

Conversation

@facundominguez
Copy link
Collaborator

Addresses part of #723

Comment on lines 57 to 72
POSIXTime = ℕ
POSIXTimeRange = Maybe POSIXTime × Maybe POSIXTime
ValidityInterval = Maybe Slot × Maybe Slot
slotToPOSIXTime : EpochInfo → SystemStart → Slot → Maybe POSIXTime
slotToPOSIXTime ei sysS vs = do
t ← epochInfoSlotToUTCTime ei sysS vs
just (utcTimeToPOSIXSeconds t * 1000)
transVITime
: EpochInfo
→ SystemStart
→ ValidityInterval
→ POSIXTimeRange
transVITime ei sysS (vi , vf) =
((vi >>= slotToPOSIXTime ei sysS) , (vf >>= slotToPOSIXTime ei sysS))
Copy link
Collaborator Author

@facundominguez facundominguez Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are POSIXTime and POSIXTimeRange supposed to be in the ledger spec? Should I implement them as in the Haskell implementation?

The Alonzo spec doesn't say anything about them.

Comment on lines 34 to 46
field UTCTime : Type
EpochInfo : Type
SystemStart : Type
EI : EpochInfo
SysSt : SystemStart
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is making these abstract the way it should be done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants