Code Monkey home page Code Monkey logo

Comments (11)

faboweb avatar faboweb commented on June 3, 2024 1

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

from lunie.

faboweb avatar faboweb commented on June 3, 2024

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
}]

from lunie.

mappum avatar mappum commented on June 3, 2024

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

from lunie.

faboweb avatar faboweb commented on June 3, 2024

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

from lunie.

faboweb avatar faboweb commented on June 3, 2024

What about transaction-id and fees?

from lunie.

ethanfrey avatar ethanfrey commented on June 3, 2024

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 )

from lunie.

ethanfrey avatar ethanfrey commented on June 3, 2024

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

from lunie.

faboweb avatar faboweb commented on June 3, 2024

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?

from lunie.

faboweb avatar faboweb commented on June 3, 2024

@nylira here we discussed the transaction format

from lunie.

melekes avatar melekes commented on June 3, 2024

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.

from lunie.

faboweb avatar faboweb commented on June 3, 2024

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

from lunie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.