server: export DB from session
@zeroXbrock đang làm issue này rồi.
Từ ngày 28/4/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Is your feature request related to a problem? Please describe.
Each session in the RPC server has its own DB (in-memory SQLite). When sessions are terminated/removed, we have no way of reading the metrics we collected.
Possible solutions:
Not sure of the ideal solution yet, may have to try a few ideas. This is a working PR, input welcome.
idea 1: serve the session DB as structured JSON
Add an RPC method getDb(session_id) that serializes the contents of the DB into JSON.
It may be possible to avoid strict typing (which would make it very cumbersome to update the DB schema) by directly serializing the DB to JSON. Not 100% sure about this, though. If it's not possible to serialize directly, this isn't worth the effort.
idea 2: host an endpoint that serves a .db file download
This is pretty straightforward, but not a very good UX.
Note: Our JSON-RPC server struct holds the sessions, which prevents other servers (e.g. a REST server to serve files) from getting session data. To do this, we'd need to decouple sessions from the RPC server; make a new struct for sessions with a simplified API, then call that from the RPC server. Then other servers could get access to the data as well.
idea 3: host an API to query the DB
We could implement the same kind of things that report does (calculate metrics, format data for human/UI consumption) but we'd need to implement another API for the report functions we want. These are currently implemented directly in the report function.
Another idea is to use something like datasette. This would host an API that allows you to read the DB tables directly, over a web interface, with the option to export data in multiple formats.
It may be worthwhile to use both approaches; datasette for specific DB inquiries, and extra RPC endpoints for simple metrics collection.
- Ngôn ngữ chính
- Rust
- Star
- 144
- Fork
- 58
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của flashbots/contender
-
engine_newPayload filesĐang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
-
server: generate reportsĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 62/100
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của flashbots/contender
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
open-telemetry/weaver#1917 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug host P3 web
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jphacks/kz_2613#589 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation pkg:sdk project
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
priority middle
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
KATO-Hiro/AtCoderClans#13029 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
RustCrypto/formats#2544 ·
Maintainer thường phản hồi trong vòng 1 ngày