Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

solana-cli does not allow a conversion from wallclock date to epoch #8842

Closed
danpaul000 opened this issue Mar 13, 2020 · 6 comments
Closed
Assignees
Labels
locked issue stale [bot only] Added to stale content; results in auto-close after a week.
Milestone

Comments

@danpaul000
Copy link
Contributor

Problem

solana stake-set-lockup does not provide a way on the CLI to convert a target lockup date into a number of epochs, but we have this method available in code, to set a number of years (ex: 0.75) and have the account reflect 9 months worth of epochs in lock.

@danpaul000 danpaul000 added this to the v1.1.0 milestone Mar 13, 2020
@danpaul000
Copy link
Contributor Author

cc: @garious

@garious
Copy link
Contributor

garious commented Mar 13, 2020

Here's where it's done in code:
https://github.com/solana-labs/solana/blob/master/genesis/src/stakes.rs#L29

And the resulting epoch is from genesis.

We want to be able to things like adding 6 months of lockup, so would need to ask "how many epochs is 0.5 years"? And then use that to call solana stake-set-lockup --lockup-epoch <EPOCH> with a higher epoch.

Note: we don't need to make this infinitely flexible, since the custodian will be the only user of this functionality, and with any luck, only needs to use it a few times this next year and then never again.

@mvines mvines modified the milestones: v1.1.0, v1.2.0 Mar 30, 2020
@mvines mvines modified the milestones: v1.2.0, The Future! Apr 21, 2020
@garious
Copy link
Contributor

garious commented Apr 27, 2020

@danpaul000, I think we can ignore this issue for the foreseeable future if we switch all stake accounts from setting --lockup-epoch to --lockup-date.

@stale
Copy link

stale bot commented Jun 2, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Jun 2, 2021
@stale
Copy link

stale bot commented Jun 16, 2021

This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Jun 16, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2022

This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked issue stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

No branches or pull requests

4 participants