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

Add API to get the next object ID #2649

Closed
1 of 17 tasks
abitmore opened this issue Oct 2, 2022 · 1 comment · Fixed by #2653
Closed
1 of 17 tasks

Add API to get the next object ID #2649

abitmore opened this issue Oct 2, 2022 · 1 comment · Fixed by #2653

Comments

@abitmore
Copy link
Member

abitmore commented Oct 2, 2022

User Story

As a client application developer I want an API to get the next instance ID that will be assigned to an object space.

Things to consider:

  • pending transactions - results may be different with or without pending transactions
  • chain reorganization - results can jump up and down, but not always up

Additional Context (optional)

Mentioned by @christophersanborn in the BitShares Development Telegram group:

How does one get the next instance ID in an object space? Like, if I wanted to predict what the account ID of the next account to be created will be, how could one get that information? Wondering about this generally, for any object space. (So in other words, not just wondering how to find out how many accounts are registered — it could be any object type where I want to find out in advance which one is "next".) Is there an API call that will return this? Or an object I could query that holds the object counter for various spaces?

... it's a generic question as it's come up a few time w.r.t different object types, but basically what I'm trying to do is to list the "most recent" objects of some such type to be created. So if I can get the "next" object ID, then I can request, say, the ten preceding objects to get the "ten most recent".

Impacts
Describe which portion(s) of BitShares Core may be impacted by your request. Please tick at least one box.

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

CORE TEAM TASK LIST

  • Evaluate / Prioritize Feature Request
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@abitmore
Copy link
Member Author

abitmore commented Oct 9, 2022

Done via #2653.

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

Successfully merging a pull request may close this issue.

1 participant