-
Notifications
You must be signed in to change notification settings - Fork 13
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
added delay #136
added delay #136
Conversation
emitter/src/contract.rs
Outdated
@@ -57,6 +57,8 @@ impl Emitter for EmitterContract { | |||
|
|||
storage::set_backstop(&e, &backstop); | |||
storage::set_blend_id(&e, &blnd_token_id); | |||
storage::set_last_fork(&e, e.ledger().sequence() - 777600); // We set the block 45 days in the past to allow for an immediate initial drop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we set the last fork to 0 here? This requires the chain to be at least 45 days old, making the protocol very hard to deploy and use on anything but mainnet.
Further, I think it's much clearer that the initial deployment isn't a "fork", since it doesn't set the last fork time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Un-resolving this as I believe it was missed
emitter/src/storage.rs
Outdated
e.storage().persistent().bump( | ||
&EmitterDataKey::DropStatus, | ||
LEDGER_THRESHOLD_SHARED, | ||
LEDGER_BUMP_SHARED, | ||
); | ||
e.storage() | ||
.persistent() | ||
.get(&EmitterDataKey::LastFork) | ||
.unwrap_optimized() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably store this in the instance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's going to basically always be expired if it's persistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Also made drop_status an instance as it will also almost always be expired
emitter/src/contract.rs
Outdated
@@ -57,6 +57,8 @@ impl Emitter for EmitterContract { | |||
|
|||
storage::set_backstop(&e, &backstop); | |||
storage::set_blend_id(&e, &blnd_token_id); | |||
storage::set_last_fork(&e, e.ledger().sequence() - 777600); // We set the block 45 days in the past to allow for an immediate initial drop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Un-resolving this as I believe it was missed
emitter/src/contract.rs
Outdated
// TODO: Determine if setting the last distro time here is appropriate, since it means tokens immediately start being distributed | ||
storage::set_last_distro_time(&e, &(e.ledger().timestamp() - 7 * 24 * 60 * 60)); | ||
storage::set_last_distro_time(&e, &0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this a mistake?
We probably do want an issue to track when we want distribution to begin, as this has been a placeholder for awhile.
9a88779
to
7bb7fe6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG2M
Added a 45 day delay post emission fork until drop can be called
Resolves this issue:
#134