block_explorer's People
block_explorer's Issues
Improvements
Create test and deploy/release Github CI actions
Add README
Add API doc and general project description
Implement genesis endpoints
DoD:
Endpoints:
/genesis
- returns all transactions from the genesis block
Setup custom domain names for dev and exchanges environments
Implement snapshots endpoint
#DoD:
Endpoints:
-
/snapshot/latest
- returns the highest indexed snapshot -
/snapshot/{height}
- returns snapshot by heght (long) -
/snapshot/{hash}
- return snapshot by hash -
/snapshot/{height}/transaction
- returns all transactions from the given snapshot -
/snapshot/{hash}/transaction
- returns all transactions from the given snapshot -
/snapshot/latest/transaction
- returns all transactions from the latest snapshot
Wallet balances endpoint
Would it be possible to implement an endpoint where we can retrieve all wallet balances at a certain snapshot height?
With the new implementation of incremental snapshots, there is no easy way anymore to query this information from the node API, so it would be nice to have that query available in the block explorer.
The result of the API endpoint could looks something like this:
{ "ordinal": 0, "balances": { "DAGXXXX": 1000000000000, "DAGYYYY": 2000000000000, "DAGZZZZ": 3000000000000 } }
Thx!
Implement transactions endpoint
DoD:
Endpoints:
-
/transaction/{hash}
- return transaction by hash -
/address/{dag_address}/transaction
- all sent and received (sorted by timestamp DESC) -
/address/{dag_address}/transaction/sent
- only sent (sorted by ordinal DESC) -
/address/{dag_address}/transaction/received
- only received (sorted by timestamp DESC)
Get document by id instead of search API for "get by hash" requests
Implement balance endpoints
DoD
Endpoints:
-
/address/{dag_address}/balance
- returns balance for given address, from latest snapshot -
/balance/total
- returns sum of all balances
Both endpoints should support ?height=#
query parameter to return balances by the snapshot height. Default: latest
Adding pagination to the search transactions enpoint
DoD:
Endpoint /transactions?sender=$address
, currently return whole list.
Endpoint should have parameters size
, page
and should return the page.
Create elasticsearch connection
AWS Lambda connection to elasticsearch
Return 404 NotFound when get document by hash fails
Ideally, we should map elasticsearch errors to our custom ones.
i.e. below we can see that elasticsearch returned 404 status code. It would be great not to return exact reason to end user.
Consider such a mapping:
Elasticsearch -> Our own
404 Not Found -> 404 Not Found
anything else -> 500 Internal Server Error
Pagination support
DoD:
Implement pagination in all endpoints returning large arrays:
- all transactions' endpoints
- snapshot transactions
- address list endpoint
Consider offset & limit
+ X-Total-Count
header.
Hide explicit errors on production environment
Currently errors on mainnet are visible to the end user. We would like to hide the explicit reason and return only the summary message.
I.e. for a given URL, the error returns the whole elasticsearch response with error message but it should return only a message, for example: "Transaction not found".
Additional things if possible:
- log the error
- hide errors based on the environment (env variables?) so on dev we will see the full log but on prod only the message
Implement address endpoints
DoD
Endpoints:
-
/address/count
- returns count of all addresses -
/address
- returns all addresses sorted DESC by balance
NodeJS refactor
Create initial project with NodeJS and Serverless framework
Splitting up terraform configuration into modules
DoD:
Terraform configuration should be split into separate files/modules.
Moving configuration to s3 bucket
DoD:
The configuration file should be loaded from the private s3 bucket.
Implement checkpoint-blocks endpoint
DoD:
Endpoints:
-
/checkpoint-block/{hash}
- returns checkpoint block by hash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.