Comments (11)
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.
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.
We'll probably want a height
field in there somewhere, possibly in the outer object
from lunie.
That would be the block height of the transaction?
I revised the format.
from lunie.
What about transaction-id and fees?
from lunie.
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.
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.
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.
@nylira here we discussed the transaction format
from lunie.
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.
All single parts are tested. Waiting for the release of gaia-2-dev network with activated indexing.
from lunie.
Related Issues (20)
- CVE-2021-27515 (Medium) detected in url-parse-1.4.7.tgz HOT 1
- CVE-2018-19797 (Medium) detected in node-sass-4.14.1.tgz HOT 1
- CVE-2019-6284 (Medium) detected in node-sass-4.14.1.tgz HOT 1
- CVE-2019-6286 (Medium) detected in node-sass-4.14.1.tgz HOT 1
- CVE-2018-20821 (Medium) detected in node-sass-4.14.1.tgz HOT 1
- CVE-2019-6283 (Medium) detected in node-sass-4.14.1.tgz HOT 1
- CVE-2021-28092 (High) detected in is-svg-3.0.0.tgz HOT 1
- CVE-2021-29060 (High) detected in color-string-1.5.3.tgz HOT 1
- WS-2020-0091 (High) detected in http-proxy-1.17.0.tgz HOT 1
- CVE-2020-7608 (Medium) detected in yargs-parser-11.1.1.tgz HOT 1
- CVE-2018-20190 (Medium) detected in node-sass-4.14.1.tgz HOT 1
- CVE-2020-15168 (Medium) detected in node-fetch-2.6.0.tgz HOT 1
- CVE-2020-15366 (Medium) detected in ajv-4.11.8.tgz, ajv-6.10.2.tgz HOT 1
- WS-2019-0427 (Medium) detected in elliptic-6.5.0.tgz HOT 1
- CVE-2020-36049 (High) detected in socket.io-parser-3.3.0.tgz HOT 1
- WS-2019-0424 (Medium) detected in elliptic-6.5.0.tgz HOT 1
- CVE-2021-23362 (Medium) detected in hosted-git-info-2.8.4.tgz HOT 1
- CVE-2021-23364 (Medium) detected in browserslist-4.6.6.tgz, browserslist-4.16.3.tgz HOT 1
- CVE-2021-23368 (Medium) detected in multiple libraries HOT 1
- No binaries
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lunie.