Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Disseminate transaction state #89

Closed
xla opened this issue Jan 17, 2020 · 3 comments
Closed

Disseminate transaction state #89

xla opened this issue Jan 17, 2020 · 3 comments
Labels
feature Something that doesn't exist yet

Comments

@xla
Copy link
Contributor

xla commented Jan 17, 2020

For proper feedback to the user about create, updated and lists of current/past transaction we want to have a quick way to let the UI know if the state of a given transaction has changed. Naturally we would turn to GraphQL subscriptions. Unfortunately the juniper crate we rely on to provide the API through the proxy is still not providing that functionality, see #54 which tracks the progress and the implementation in #433 - which in turn is blocked on #497 (a change we personally would welcome as well).

That said we can look to alternatives to satisfy this need. A simple stopgap solution is a to offer a single SSE the UI subscribes to and gets its fix of juicy new transaction upates.

Design

Originally proposed by @rudolfs in #81 (comment):

type Query {
  transactions(walletId: ID!): [Transaction]!
}

The transaction status subscription could look something like this:

type Subscription {
  transactionStateChanged(transactionId: ID!): Transaction
}

Potentially we could also use a subscription for new transactions to show a badge on the wallet icon:

type Subscription {
  newTransaction(walletId: ID!): Transaction
}
@xla xla added this to the Spring cleaning milestone Feb 5, 2020
@xla
Copy link
Contributor Author

xla commented Feb 5, 2020

We need to validate what the current state around transactions lifecycles are with @geigerzaehler and @NunoAlexandre.

@xla xla added feature Something that doesn't exist yet proxy labels Feb 5, 2020
@geigerzaehler
Copy link
Contributor

Currently we have the following transaction states

  • Invalid
  • Accepted by a node and disseminated to the network
  • Included in a block (with Aura this is almost equivalent to being finalized)

I’ve documented this more clearly in radicle-dev/radicle-registry#206

Note that these states don’t tell us if a transaction was “successful” in the ledger, i.e. whether some money was transferred. This is what TransactionApplied::result is for.

@xla xla modified the milestones: Spring Cleaning, House keeping Feb 26, 2020
@xla xla mentioned this issue Mar 16, 2020
7 tasks
@xla
Copy link
Contributor Author

xla commented Mar 16, 2020

Superseeded by #225.

@xla xla closed this as completed Mar 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Something that doesn't exist yet
Projects
None yet
Development

No branches or pull requests

2 participants