-
Notifications
You must be signed in to change notification settings - Fork 19
Implement evictions #196
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
Merged
Merged
Implement evictions #196
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit 367fa3d.
…witching to an eviction workflow.
This was referenced Apr 16, 2024
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solves #98. Second try at evictions after #52.
"Normally" UTXOs are consumed in a process called "redemption" where the transacting user supplies some kind of signature or other proof that satisfies the UTXO's
Verifier
. An eviction is a (new alternative) way to forcefully consume input data without satisfying the verifier. In some usecases this is desirable. For example incentivizing cleaning up old state. Or to make governance decisions enforceable.Implementation
The changes revolve around this new enum:
This does not mean that any transaction can evict arbitrary storage. The ConstraintChecker will be informed about which inputs were evicted and it will enforce that evictions are only allowed in specific contexts (such as removing old votes after an election has been tallied).
Relationship with Peeks
Currently (both before and after this PR) all peeks are evictions. Peeks are evictions in the sense that anyone can peek at any data without needing to satisfy its verifier.
Now that I am focusing on evictions, it is clear that there are cases where it would be nice to require a redemption to peek at a UTXO. For example, this would make #186 much more parallelizable. I'll make a followup issue for this, but I don't see it as priority for now.
Must my Chain Allow Evictions?
No. In some chains, especially those serving communities strongly value property rights, evictions may never be desirable, and that is totally fine. It is straightforward to build a Tuxedo chain that has no eviction paths. But as a framework Tuxedo also supports chains that want to support evictions