-
Notifications
You must be signed in to change notification settings - Fork 217
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
Lien on Staked BLD #3277
Comments
Design:
Notes:
|
Notes for @JimLarson: Two possible directions for Golang: a. create a separate I think we prefer b, and eventually c. |
Goals
The tracking of the encumbrance is done at the Javascript level, while the dynamics of staking, slashing, and unbonding is done in the Cosmos We should provide an intuitive user experience for the situation of blocked unbonding, ideally without needing modification to current clients of staking state. Design
A blocked unbonding will be seen as perpetually in the "unbonding" state to observers, which is an adequate user experience.
There is an existing facility for adding
The SDK does have precedent for passing a callback function to iterator methods for keepers. While this is a different use case, it seems closer and more appropriate. So we'll add the following to the staking keeper:
The
This module accepts a staking keeper in its constructor and registers an unbonding reserver with it. The reserver will simply send the call parameters over the bridge and receive a reply indicating the amount to reserve. If liens are generally resolved before delegations are unbonded, then this results in a single JS call per unbonding. However, once an unbonding is blocked, even partially, and left on the UnbondingDelegations queue, it will be processed at every EndBlock until the lien is resolved. Each blocked unbonding will result in a separate JS call. If this leads to unacceptable overheads, we could change the The
(Implementation option: could also implement New Bridge Messages
Alternative: Upon any change to a delegator's state with a given validator, simply give the new amounts, e.g.
Question: should we give the denom everywhere to be explicit, or just assume that it's common knowledge? |
Requesting input on the above from @katelynsills and @Chris-Hibbert |
As discussed previously, I think the javascript side wants to know when validators drop out (unbonding, slashing) as well as when they're added. Several of the methods proposed in that doc are for tracking the rewards, so they're unnecessary here. (endBlock, slashing, unjail). Do you need entries for bonding? (i.e. a validator has existed for a while, and its delegation share grew enough that it's now in the active set, or someone else was slashed, and it was the next biggest, so it has now been added to the top-N list.) I like staking update.
Yes.
I went back and forth about whether the recipient should be assumed to have an independent authority on the time. I ended up decided the timestamp (and block height) didn't have to be included in nearly every call.
Whatever |
The Golang<->JS bridge is synchronous from the perspective of Golang and returns a string value to Go. JS can do any amount of async work before resolving the return result, and that is JSON-encoded and returned to Golang. So, no need to match replies at the application layer, that's already done for you. |
Please always include denom, and as per our lesson learned in #3435, be sure to sort the updates. |
I asked @JimLarson to clarify a discussion in the neighborhood of this issue, and he came up with a story that helps me at least some:
@dtribble asked @rowgraus to capture it. @JimLarson @rowgraus if that story matches the scope of this issue pretty well, let's move it up to the description. If that story is only part of the scope of this issue, it's probably still putting it there. |
Clarity on the need for attestation extension: a delegator needs to be able to vote on multiple issues with overlapping voting periods, hence overlapping attestations. Extensions make it explicit that we're reusing an existing lien rather than creating a new one. |
Notes from a discussion today with @rowgraus @Chris-Hibbert and @dtribble. ExtensionsTo extend an attestation, we'd like to ensure that there are still enough bonded tokens to cover the attestation. The current plan is to assume attestations can be extended unless notified otherwise. Once an attestation is created, the number of bonded tokens can decrease through voluntary unbonding, involuntary unbonding, and slashing. Previous plan for lien Another difficulty is that the list of all addresses affected by a slashing event could result in a message that's prohibitively large. It would be better to have a more incremental overhead to avoid this sort of spike, even if the average overhead is higher. Note that we have no plans to send a notification for voluntary or involuntary unbonding. Note also that there might be enough bonded tokens left in an account after unbonding or slashing to cover for existing liens. What we'd really like to know is if the currently bonded tokens are "under water" with respect to the existing liens. The overhead of making a ProxyingOn the assumptions that our validators will be more attuned to current events on the blockchain than the average delegator, we want validators to be able to vote the delegated tokens by default, but also allow delegators to explicitly vote if they desire. The simplest way to handle the bookkeeping is to know the current delegations of a delegator when an attestation is created or extended. Any vote using that attestation deducts from the strength of the votes of the delegated validator. In the meeting we discussed having a new call to return the amount and start time of all delegations, which would be called at extension time. The attestation contract would record a recent history of slashing events (validator and timestamp), so the delegation information could also be used to know which accounts might be affected by slashing. However, given the considerations of the first section, it seems better to include the delegation information in the return from |
I asked @JimLarson to catch me up on why anyone would want / need to extend an attestation. He provided the following story: Suppose proposal A is up for vote can't transfer tokens out to prevent mechanism: attestation; something is "observed to be the case." includes a duration (as well as account address, amount). only given provided there's a (cosmos-level) lien. prop B comes up for vote |
I'd phrase this slightly differently. We have attestations that represent a right to vote that can be presented to a vote counter. The attestations have a good-until date that reflects the duration of the lock-up period they're subject to. Since the attestations expire, voters need to be able to get replacements with a longer duration when the expiration time approaches. The vote counters need to be able to recognize the new attestation as representing the same right to vote as the old one. So the basic mechanism in the attestation contract is that you present your right to vote, and either present evidence of a longer lock-up, or ask the contract to confirm it for you with a call down to the Cosmos level. We currently represent the attestation with a re-usable ERTP payment, but it could as easily be a single use payment that you replace when you need a new one by talking to the attestation contract. In either case, the attestation contract can issue new payments that reflects a voters current lock-up. |
@JimLarson notes this overlaps with #3991 ; perhaps overtaken. |
@JimLarson Can this be closed? If not, is it for MN-1? |
Prefer to keep open until we've done end-to-end use. But since I have no known work items left to do, we can close if you'd prefer. |
dup of #3788 |
No description provided.
The text was updated successfully, but these errors were encountered: