atomicDEX-API
atomicDEX-API copied to clipboard
feat(metrics): implement metric-gathering capabilities for seed nodes
This is a draft - Please do not review (yet).
This PR adds a new node type called a Metrics Node. This will serve as a foundational piece for further development and integration within this framework.
- [x] Introduce a new config parameter,
"i_am_metric": true, to denote its additional metric-gathering capabilities. - [x] Add baseline tests to detect if the seed node has metric gathering capabilities.
- [ ] The Metrics Node should collect data on executed swaps. Specifically, it should prepare hourly candlestick data representing the price graph of a coin in the DeFi Framework, providing data with more detailed granularity, such as every 15 minutes or every 4 hours.
- [ ] The implementation of the Metrics Node itself must be native-target only, similar to
stats_swaps. - [ ] Complete tests for metrics gathering (as per above)
- [x] Implement a new RPC method in the dispatcher to handle requests for the data collected by the Metrics Node.
- [ ] Wire RPC method
- [ ] Ensure that the RPC method that requests data from this Metrics Node should work seamlessly across all nodes, wasm or native.
Important considerations
- Efficiently handle data storage, processing, and caching to quickly allow for data retrieval.