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

SDK Requirements #35

Closed
faboweb opened this issue Nov 7, 2017 · 11 comments
Closed

SDK Requirements #35

faboweb opened this issue Nov 7, 2017 · 11 comments

Comments

@faboweb
Copy link
Collaborator

faboweb commented Nov 7, 2017

  • historical transactions
  • send/receive in one transactions
  • filter by
    • block-height (start and end)
    • limit (default 50)
    • cap by some maximum
  • output in JSON
  • stream new transactions
    • MVP: refresh button
    • desired: via Websockets
  • delegation
    • all candidates
@jbibla
Copy link
Collaborator

jbibla commented Nov 7, 2017

i think ideally this would link to ticket #'s in the SDK repo... 🌮

@rigelrozanski
Copy link

Awesome I will keep this is mind

@faboweb
Copy link
Collaborator Author

faboweb commented Nov 30, 2017

Ethan and me aligned on following requirements for the LCD:

The LCD provides following endpoints:
// for wallet transactions
GET /tx/coins/{address of sender or receiver}

// for staking transactions
GET /tx/bondings/delegator/{address of delegator bonding / unbonding}
GET /tx/bondings/validator/{address of validator delegators bond to or unbond from}

// for fee withdrawal transactions
GET /tx/cashout/delegator/{address of delegator}
GET /tx/cashout/validator/{address of validator}

// for proposal transactions
GET /tx/votes/{proposal}

All of those queries take following optional arguments:
minheight, maxheight

Coin-transactions look like this:

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

Tags to index those are:
coin.sender, coin.receiver, tx.height

Bonding-transactions look like this:

[{
  tx: {
    type: "bond" | "unbond",
    validator: String,
    address: String, // of delegator
    shares: Number
  },
  time: DateTime,
  height: Number
}]

Tags to index those are:
bond.delegator, bond.validator, tx.height

Cashout-transactions look like this:

[{
  tx: {
    address: String, // of validator
    receiver: String,
    outputs [{
      address: String,
      coins: [{
        amount: Number,
        denom: String
      }]
    }]
  },
  time: DateTime,
  height: Number
}]

Tags to index those are:
cashout.delegator, cashout.validator, tx.height

We probably need as well:

// for proposals
GET /proposals?status='active'|'closed'

// TO BE DEFINED

// for candidates
GET /candidates

Candidate-records look like this: (extracted from Spec)

[{
  address: String,
  owner: String, // address
  shares: Number,
  votingPower: Number,
  since: DateTime,
  description: {
    name: String,
    website: String,
    details: String
  },
  commissionRate: Number,
  commissionMax: Number,
  status: 'active' | 'bonding' | 'unbonding',
  slashRatio: Number,
  reDelegatingShares: Number
}]

Let me know what you guys think. @mappum @nylira @jolesbi @ethanfrey @rigelrozanski @melekes

@melekes
Copy link

melekes commented Nov 30, 2017

Tags to index those are:
coin.sender, coin.receiver, height

should not it be tx.height?

@rigelrozanski
Copy link

@faboweb there is no commission min (min no commission!)

@mappum
Copy link
Contributor

mappum commented Nov 30, 2017

Was there any discussion around a websocket API to subscribe to new transactions for the types of filters we listed?

@faboweb
Copy link
Collaborator Author

faboweb commented Dec 1, 2017

@mappum bucky said we get it. So I think we can annoy people until it is there.
@rigelrozanski I removed min commission, thx for the hint
@melekes I updated all the height labels to tx.height

@ebuchman
Copy link
Contributor

ebuchman commented Dec 5, 2017

You can subscribe to the filters via Tendermint websockets. What's the best way to proxy that through the LCD to the UI ?

@mappum
Copy link
Contributor

mappum commented Dec 5, 2017

You can subscribe to the filters via Tendermint websockets. What's the best way to proxy that through the LCD to the UI ?

Would be cool to have a LCD websocket proxy that verifies proofs for every tx emitted from the upstream Tendermint full node. But until then, the UI could get the txs from Tendermint WS, and just use a LCD REST endpoint to verify the tx is in a block.

@jbibla
Copy link
Collaborator

jbibla commented Dec 11, 2017

@faboweb @mappum i think it would be good to close this "issue" and make actionable tickets for the outcome of the conversations here...

@faboweb
Copy link
Collaborator Author

faboweb commented Dec 12, 2017

Linked this in the open issues regarding the topics.

@faboweb faboweb closed this as completed Dec 12, 2017
@jbibla jbibla added this to the Launch v1 milestone Jan 22, 2018
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

7 participants