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

Refactor SLP endpoint to remove address and utxo collections #547

Open
christroutner opened this issue Jan 12, 2020 · 4 comments
Open

Refactor SLP endpoint to remove address and utxo collections #547

christroutner opened this issue Jan 12, 2020 · 4 comments
Labels
discussion Community discussion
Projects

Comments

@christroutner
Copy link

James Cramer informed us that new versions of SLPDB will have the address and utxo collections removed. James looked at our SLP route library and he determined that 4 endpoints rely on the address collection and none rely on the utxo collection.

The scope of this issue is to refactor the SLP route library to use alternative SLPDB queries.

Here is an example query that can retrieve an address balance by parsing all the utxos. This query will comply with the new changes.

@christroutner christroutner added the discussion Community discussion label Jan 12, 2020
@christroutner
Copy link
Author

Added the discussion label to this Issue as it should be broken up into multiple small issues, one for each endpoint that needs to be updated.

@christroutner christroutner added this to In progress in Rest v2 Jan 13, 2020
@christroutner
Copy link
Author

Testing notes from 1/15/2020:

  • Git commit: 6de9d0efac3b89c95bccc8aa7cb48eee799819c7 from db-updates branch.
  • Synced in: ~ 12.5 hrs on a Droplet with 8GB of memory and 32GB of swap
  • Reached 95% memory usage during sync, but did not crash.
  • Crashed after sync, but restarted and got back to the running state in less than 10 minutes

@SpendBCH
Copy link

SpendBCH commented Feb 5, 2020

Updated endpoints here: fc058b3

Based on query for balances by address and query for balances by tokenId

@jcramer
Copy link

jcramer commented Feb 6, 2020

By default, the response limit is 100. Depending on how you're using queries these in production consider adding "q.limit" to be something higher than 100 or do something for pagination of very large results lists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Community discussion
Projects
Rest v2
  
In progress
Development

No branches or pull requests

3 participants