flashbots / flashbots/contender

server: generate reports

Open
#533 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
141
Forks
57
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**

I can't generate a report from a spam run via the JSON-RPC API, but I reeeeeallly want to.

**Describe the solution you'd like**

- add an endpoint to the RPC server: `report({session_id, format})` that generates a report spanning every `run_id` in the session's DB
- acceptable `format`: "json" and "html"
- the endpoint should start generating the report, then return immediately with the link to the report (e.g. `"http://localhost:3000/report/321123.json"`)
- reports are saved to a temp directory when completed
- add an endpoint to the REST server (the same one that hosts the SSE streams) to host the reports: `/report/{session_id}.{suffix}`
- delete the temp directory before shutting down the server

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.