You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With #168 we've introduced user relationships as a simple sdk.AccAddress -> []sdk.AccAddress map. This was done in order to allow applications to handle their relationship however they wanted on their level.
With the current system the following is possible:
A relationship between Alice and Bob is created on Mooncake.
Another application comes in place and uses the same relationship.
Mooncake decides to delete the relationship.
The relationship is deleted from the other application as well.
The blockchain should represent the data storage. Since Desmos is a protocol, applications should not see the data they use changed if they don't want to.
Solution
To fix this error, I think that we should revisit the relationship definition in order to include the subspace of the application for which the relationship is being created as well:
I guess we could open an opportunity for users to decide whether they would like to add the same relationship when they open another dapp. This could be done on the dapp level. For a more dapp-scope environment, CosmWASM provides a contract scope state. We may consider adapting it.
I guess we could open an opportunity for users to decide whether they would like to add the same relationship when they open another dapp
This can be done even better by tracking the subspace of the other relationships. The user could decide to add all of its relationships coming from Facebook but not from Twitter.
For a more dapp-scope environment, CosmWASM provides a contract scope state. We may consider adapting it.
I don't see in which cases this might be useful to us, could you please elaborate on how smart contracts might be interesting for this feature?
I originally suggested to add a subspace field here so I'm totally fine in doing so. I will adapt this after I've finished the user blocking feature.
I'm also curious on how we can handle scope with WASM.
AFAIK, CosmWASM provide a contract-scope state. For example, if the relationship of Mooncake is controlled by the Mooncake contract, then there is a state which can only be accessible by the contract itself. In this particular case, it's just the same as storing subspace as we only need to differentiate the relationship for a particular dapp. I think smart contract will be more interesting when the are some dapp specific features which can be done on-chain but not provided in protocol level.
Context
With #168 we've introduced user relationships as a simple
sdk.AccAddress -> []sdk.AccAddress
map. This was done in order to allow applications to handle their relationship however they wanted on their level.With the current system the following is possible:
The blockchain should represent the data storage. Since Desmos is a protocol, applications should not see the data they use changed if they don't want to.
Solution
To fix this error, I think that we should revisit the relationship definition in order to include the subspace of the application for which the relationship is being created as well:
Then, the storage can be a simple
sdk.AccAddress -> []Relationship
.The text was updated successfully, but these errors were encountered: