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

given unix time get head and irreversible block number from api #2498

Open
6 tasks
litepresence opened this issue Aug 7, 2021 · 5 comments
Open
6 tasks

Comments

@litepresence
Copy link
Contributor

litepresence commented Aug 7, 2021

User Story
currently user can approach api with block number and get time stamp
but not the other way around.

user made a bitshares transaction at some time in the past.
they know the time it occurred from their records, but not the block number or transaction hash.
user would like to audit that transaction; and obtain a full receipt of the event.

user wishes to approach api and give a unix timestamp.
api should return head block at that time in the past; perhaps the actual unix blocktime for the block

this makes auditing transactions easier from user perspective.

the current alternative is to approximate the block number in the past;
but this can be off due to missed blocks, chain halts, etc.
so user must then search multiple blocks near where he thinks it might be,
to find the block containing the pertinent transaction.

alternative to unix stamp could be ISO8601 time format,
but this user always prefers to think in unix epoch terms

this functionality may be available through elastic search
but elastic search is not always available, is not a distributed application,
its also not nearly as easy to query for a lay user as a core rpc
audit on the other hand is always necessary for business records and regulatory compliance
user prefers to deal with core

Impacts

  • [ X ] API (the application programming interface)
  • [ X ] Performance (user efficiency)
  • [ X ] UX (the User Experience)

CORE TEAM TASK LIST

  • Evaluate / Prioritize Feature Request
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation
@litepresence litepresence changed the title given unix time get irreversible block from api given unix time get head and irreversible block from api Aug 7, 2021
@litepresence litepresence changed the title given unix time get head and irreversible block from api given unix time get head and irreversible block number from api Aug 7, 2021
@abitmore
Copy link
Member

abitmore commented Aug 7, 2021

Firstly, we do not index block time in memory, so a node API querying for a block with a timestamp is not practicable.

Secondly, it's possible to expand the account history plugin and store the timestamp of every operation and index it, so that we could query the history by time via new APIs.

Thirdly, the job is already done in the ES plugin. In ES we have timestamps stored and it's easy to query by time.

So this feature request is likely "won't fix".

@abitmore abitmore added this to New -Awaiting Core Team Evaluation in Project Backlog via automation Aug 7, 2021
@abitmore abitmore added this to the Future Feature Release milestone Aug 7, 2021
@abitmore
Copy link
Member

abitmore commented Aug 7, 2021

By the way, providing audit service or software can be a profitable business. Anyone who has interest is encouraged to explore in this field.

@abitmore abitmore added this to To do in Feature Release (6.1.0) via automation Oct 4, 2022
@abitmore abitmore removed this from New -Awaiting Core Team Evaluation in Project Backlog Oct 4, 2022
@abitmore

This comment was marked as outdated.

@abitmore
Copy link
Member

abitmore commented Oct 4, 2022

user made a bitshares transaction at some time in the past.
they know the time it occurred from their records, but not the block number or transaction hash.
...
the current alternative is to approximate the block number in the past;

This seems to be a UI issue. In the past, UI could only get the timestamp after getting the block number via the get_account_history API or alike.

@abitmore
Copy link
Member

abitmore commented Oct 5, 2022

Part of the requested feature is covered by #2650 and #2651.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants