Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] - Tooling for slot - unixtime conversion #4928

Closed
nielstron opened this issue Mar 2, 2023 · 7 comments
Closed

[FR] - Tooling for slot - unixtime conversion #4928

nielstron opened this issue Mar 2, 2023 · 7 comments
Assignees
Labels
type: enhancement An improvement on the existing functionality

Comments

@nielstron
Copy link
Contributor

nielstron commented Mar 2, 2023

Internal/External
External

Area
Plutus

Describe the feature you'd like
There is currently only external tooling for converting between unixtime and slot time. This is a nuisance because

  • Plutus works with Unix timestamps
  • building a transaction with the CLI expects invalid-hereafter and invalid-before in slots
  • native scripts work with slots

A simple command to convert between the two, given the network, would help a lot.

Describe alternatives you've considered
An alternative is adding a invalid-hereafter-unixtimestamp-ish flag to transaction build, but it is not nearly as widely applicable
(for example tools may want to check what unix time a specific slot returned by the CLI corresponds to)

Additional context / screenshots
This would also be useful to be able to convert between native scripts and plutus scripts, see this comment: cardano-foundation/CIPs#392 (comment)

@nielstron nielstron added the type: enhancement An improvement on the existing functionality label Mar 2, 2023
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

@github-actions github-actions bot added the Stale label Apr 13, 2023
@nielstron
Copy link
Contributor Author

This is still relevant to me

@newhoggy
Copy link
Contributor

Is there a need to query past the horizon on the understanding that such queries may return incorrect results past a hard fork?

carbolymer added a commit that referenced this issue Apr 24, 2023
carbolymer added a commit that referenced this issue Apr 24, 2023
@nielstron
Copy link
Contributor Author

I don't think it is necessary. If its a major implementation hurdle, it may well just raise an Error in my case.

carbolymer added a commit that referenced this issue Apr 25, 2023
carbolymer added a commit that referenced this issue Apr 26, 2023
carbolymer added a commit that referenced this issue Apr 26, 2023
carbolymer added a commit that referenced this issue Apr 27, 2023
@carbolymer
Copy link
Contributor

Closing because #5149 got merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement An improvement on the existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants