support retries in [[create]] & [[setup]] steps

Đang mở
#71 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

@anuragchvn-blip đang làm issue này rồi.

Từ ngày 20/12/2025.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust, sql
Lĩnh vực
cli, databases

Hướng nghiên cứu

Bắt đầu từ phần triển khai contender setup và việc xử lý cơ sở dữ liệu cho named_txs và rpc_urls. Theo dõi cách các giao dịch create và setup được ghi lại, sau đó xác định cách state scenario_setup được đề xuất có thể nhận diện scenario khớp mới nhất và chỉ tiếp tục phần công việc chưa được gửi. Hoàn thành nghĩa là một deployment thất bại có thể được chạy lại mà không quên các giao dịch đã gửi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

If a contract deployment or setup step fails, the whole scenario deployment has to be scrapped; when you run it again and it works, the previously-deployed contracts will be effectively forgotten (though they're still in the DB).

High-level goal: When running contender setup, check the DB to see if all create/setup transactions were sent, and if not, resume the previous deployment and save to DB accordingly.

Technical details:

For [[create]] steps, you can look up the required entries by name in the named_txs table. This makes it simple to find the contract deployments that haven't been executed: just count the number of entries in named_txs for each name in the TestScenario's create steps. The steps that haven't deployed will have one less entry in the DB than the ones that have been deployed.

Achieving the "resume" effect for setup txs will be slightly more involved. [[setup]] steps don't require names, so we'll have to save new info to the DB. A new table may be in order:

scenario_setup

key type
id SERIAL INT PRIMARY KEY
scenario_name VARCHAR
rpc_id INT FOREIGN KEY
successful_txs INT

rpc_id links to the rpc_urls table in the DB.
Because a scenario might be deployed on a chain multiple times (for no reason), the client must order SELECT queries by descending id, then identify the target scenario_setup by finding the first match of scenario_name && rpc_id

For each successful setup tx sent, increment successful_txs in the DB by 1. Then, to find where to resume after a failed run, compare successful_txs for this scenario to the number of [[setup]] directives in the scenario.

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của flashbots/contender

Tất cả issue của flashbots/contender

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.