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

Allow (rate limited) leave requests events to be repeated #98

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

Doy-lee
Copy link
Collaborator

@Doy-lee Doy-lee commented Oct 23, 2024

Further iterates on #95 this adds a rate limit how often the leave request can be initiated because it's spammable. In the optimistic case, the chain will take around ~15mins to confirm so the it should rate-limit the request to at least once per 15 minutes. In this commit I've chosen 1 hour.

jagerman and others added 2 commits October 23, 2024 15:34
If a leave request gets missed (because of an exceptional circumstance
on the Oxen chain) then the Oxen chain never gets the confirmed leave
request, and so the node cannot complete a normal, graceful exit because
the Oxen SN network will never sign a leave request.  While there *is* a
contract fallback for this, it triggers after 30 days, meaning the SN's
obligations get extended by an extra 15 days, which may be undeseriable
(for example, if someone has scheduled cancellation of a hosting plan).

This commit removes the revert for a repeated request so that if such a
situation does occur, the operator or a contributor can submit another
leave request call to attempt to propagate the event through to oxend
again.  Such duplicates can be helpful (as described above), but are
otherwise harmless: oxend simply ignores a leave request for an
already-unlocking node.

Such a subsequent request does *not* affect the leave request timestamp,
but merely reissues a leave request event.
@Doy-lee Doy-lee merged commit ab86fad into oxen-io:master Oct 23, 2024
2 checks passed
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