bitshares / bitshares/bitshares-core

given unix time get head and irreversible block number from api

Open
#2,498 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.2k
Forks
660
Avg merge
8h 17m
Merged PRs (30d)
26

Description

**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

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the existing API that maps block numbers to timestamps and the merged pull request #2651. Clarify the timestamp format, whether the result should be the head or irreversible block, and the exact response before implementation. Done means the core API accepts a Unix timestamp and returns the appropriate historical block information without requiring Elasticsearch.

Written by the indexing model from the issue text.

Assessment

Tech stack
blockchain, cpp
Domain
api, blockchain
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.