Skip to content
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

Transaction History #22

Closed
2 tasks
faboweb opened this issue Oct 30, 2017 · 11 comments
Closed
2 tasks

Transaction History #22

faboweb opened this issue Oct 30, 2017 · 11 comments
Assignees

Comments

@faboweb
Copy link
Collaborator

faboweb commented Oct 30, 2017

As a user
I want to have access to my transaction history
So I am able to review past transactions for malicious transactions and to be able to tie transactions to a certain time and user/account.

AC:

  • User is able to see outgoing and incoming transactions for a selected account
  • User is able to see time, quantity, token type and accounts of every transaction

Note:

  • Should users be able to see block height of every transaction?
  • Should the transactions be filterable?
  • Should the user be able to get detailed information on transaction partners?
  • Should the user be able to see bonded atoms as well?
@faboweb
Copy link
Collaborator Author

faboweb commented Nov 14, 2017

First proposal for transactions-format (extracted from CardTransaction.vue and extended):
(Please revise critical, as I am a noob on the topic)

[{
  tx: {
    inputs: [{
      sender: String,
      coins: [{
        amount: Number,
        denom: String
      }]
    }]
    receiver: String
  },
  time: DateTime,
  height: Number
}]

@mappum
Copy link
Contributor

mappum commented Nov 14, 2017

We'll probably want a height field in there somewhere, possibly in the outer object

@faboweb
Copy link
Collaborator Author

faboweb commented Nov 14, 2017

That would be the block height of the transaction?
I revised the format.

@faboweb
Copy link
Collaborator Author

faboweb commented Nov 14, 2017

What about transaction-id and fees?

@ethanfrey
Copy link

ethanfrey commented Nov 15, 2017

First look seems okay. Question about multi-input/outputs. Either we support them fully or not at all. The simple form is:

[{
  tx: {
    coins: [{
      amount: Number,
      denom: String
    }],
    sender: String,
    receiver: String
  },
  time: DateTime,
  height: Number
}]

which is perfect for one sender and receiver (turned array of inputs into one item).

If we want to support multiple senders/receivers (which is allowed in the app, but not exposed in the ui at all):

[{
  tx: {
    inputs: [{
      sender: String,
      coins: [{
        amount: Number,
        denom: String
      }]
    }],
    outputs [{
      receiver: String,
      coins: [{
        amount: Number,
        denom: String
      }]
    }]
  },
  time: DateTime,
  height: Number
}]

then we show every transaction that includes this account as any input or any output.

Note: I discussed the indexing with anton, and it seems the indexer doesn't support indexing multiple sender and receivers on one transaction. It might be simple to enforce only one sender and receiver, in the ui and the api. The app supports this since forever, but it is never used afaik. But enforcing only one in the UI would require approval from someone (probably @jaekwon )

@ethanfrey
Copy link

I also think we should allow attaching short notes to each tx (data field to be processed by receiver eg. ref number for paying an invoice), but that is not supported in the backend

@faboweb
Copy link
Collaborator Author

faboweb commented Nov 15, 2017

I vote for the complex format you posted. If it is possible to have multiple in- and outputs (using the cli) this needs to be reflected in the UI somehow or users will miss crucial information.
@melekes is it possible, that the indexer supports multiple senders/receivers in the future or will this never be possible?

@faboweb
Copy link
Collaborator Author

faboweb commented Nov 17, 2017

Summing up a discussion with Frey:

  • There will be no default availability of transaction history
    • Only selected nodes will provide a full history you can query
    • You can setup you own full-node that provides you with the history
      • This appears to be desired so people setup full-nodes...
      • We then strongly need to have a manual selection of the full-node
  • You can subscribe to transactions based on sender/receiver
    • You will only get those transactions you are currently subscribed on (no historical ones)
  • Identifying use cases
    • Get transactions by sender X
    • Get transactions by receiver X

@faboweb
Copy link
Collaborator Author

faboweb commented Nov 22, 2017

@nylira here we discussed the transaction format

@faboweb faboweb self-assigned this Nov 29, 2017
@melekes
Copy link

melekes commented Nov 29, 2017

that the indexer supports multiple senders/receivers in the future or will this never be possible?

so multiple keys can be indexed

  "sender": "Adam",
  "sender": "John"
}

but there is no way right now to query for both
ideally, we need OR

sender = 'Adam' OR sender = 'John'

or IN

sender IN ('Adam', 'John')

In the future, it will be totally possible to provide complex queries. I am going to push for implementing https://github.com/postgrespro/jsquery format (or a subset), which allows for building complex queries.

@faboweb
Copy link
Collaborator Author

faboweb commented Dec 12, 2017

All single parts are tested. Waiting for the release of gaia-2-dev network with activated indexing.

@jbibla jbibla closed this as completed Dec 14, 2017
@jbibla jbibla added this to the Launch v1 milestone Jan 22, 2018
faboweb pushed a commit that referenced this issue Jun 2, 2020
faboweb pushed a commit that referenced this issue Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants