General transaction handling #225
Comments
Couple notes:
|
Given the low latency and implementation cost, I would agree with you that
Perhaps we can look at this from the perspective of: "What does the user want to know, when a tx failed?"
Upstream. This is a user parameter, not a protocol parameter.
I wonder what's the best way to think about this. Should this be embedded when you fetch an entity? Eg. |
The returned list can be filtered by state.
This makes me happy.
Known to the local instance/session (implies surviving through app shutdowns) of Upstream.
We talked about embedding the related transaction in the entity reponse.
It's a bit more nuanced in many places, so what we actually want is to have a clearer ways of communicating what is permitted, to iilustrated: User A has two orgs: X and Y. While X is already registered, the transaction for Y is still pending, therefore it should only be allowed to add members for org X but not yet for Y. |
In that case,
The pending part is unimportant, I was wondering more, if you don't have the tx ids, how can you query all pending or unconfirmed txs? This would have to happen on app startup for example. |
This implies that the consumer of these calls can then decide based on that what actions are allowed. Which again might lead to incoherent UX where the action is enabled for the user to perform but is rejected at the proxy or even worse at the Registry level. An alternative thinking is to embed is something more specific like:
I see, I think this is a confusion with the subtetlies of the GraphQL schema syntax. In our example above: |
@MeBrei Updated the schema according to the latest developments:
@cloudhead What is the correct way of tracking confirmation units (blocks) for a transaction? Is it by following the height of the change and delta it against the height of the block it was included in? |
If by "change" you mean chain then yes: It's basically
Aha! Optional by default 🤦♂️
Gotcha, yeah I guess I was thinking for now to disallow all actions on a pending entity, for simplicity. I thought that was what was decided 🤷♂️ |
We did and it's still the case, but there are more complex scenarios. Another example: you can register a project when there is an org or a user registered, so it's not necessarily tied to one single entity. Another one, you might get a fully registered org back, but you can only transfer money to it if you have a user account. For these examples I think a simple state flag on a single entity response is breaking apart. |
I see -- that to me is a different concern than the pending transaction one: this is the general problem of what actions are available/allowed in the UI based on user state. One is related to transaction settlement, the other isn't. |
There are subtleties we can't address at the moment. For example is there no way to get height information form the Registry client (i.e. height of a block and current height of the longest chain). For |
Height related functionality tracked in radicle-dev/radicle-registry#285. |
The |
I don't think that metaphor holds as the receiver of registration transactions won't benefit from the funds transferred in the respective transaction - as in their account balance won't be positive because of the settlement of the tx. It might be I miss-understand, but @cloudhead should be able to clarify on this. IMHO it's a wrong metaphor which might lead to confusion as to the direction and beneficiary of system/network txs. |
It's a bit of a slippery slope -- who's the receiver when unregistering a project? The org or the project? |
Summing up an offline discussion between @MeBrei and @xla:
Anything missing? |
Superseeded #347 |
Transaction handling is core to the interactions and feedbacks when interacting with the Registry. To enable functionality vital for the deliveyor Identities I and Orgs I, we ought to solve transaction handling, presentation and the handling of non-trivial unlocking of dependent actions in the UI. As it is vital for further development we should make it part of the Identities I deliverable.
This issue superseeds #89, #212 and #214
Summarising a meeting of the Application team to come to a common understanding of how to address the need for general transaction infrastructure, we assume that complex flows in the app depend on states of certain dependent transactions to advance. These state changes allow for new/added capabilities or permissions, which control what actions a user can perform.
Requirementes
Constraints
API
A single endpoint is proposed to full-fill all requriements, including realtime update, assuming we go with the most naive version of polling in the beginning, so that we don't require extra infrastructure/complexity (e.g.: GraphQL subscriptions, websockets, SSE).
Open Questions
There are dependent conversations/issues that need to be fleshed out, i.e.: state/storage/data-access and routing/navigation.
UI
The text was updated successfully, but these errors were encountered: