assign agent balances in TestConfig

オープン
#305 コメント 4 件 リアクション 0 件 担当者 1 名 GitHub で見る

@Parizval がすでに取り組んでいます。

2025年12月19日 から。

評価

この issue はまだ評価されていません。

説明

enhancement good first issue

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

--min-balance forces us to choose one balance for every pool, but different pools may have different needs. That's why they are differentiated in the first place.
Sometimes the contract deployer needs to have a lot of eth to set up the contracts, sometimes the spammers need lots of ETH so they can spam for days straight, etc...

Describe the solution you'd like

Modify PlanConfig and add a directive to TestConfig that lets you specify starting balance per agent, designated by from_pool names. Call it fund.

Example (TOML):

[fund]
admin = "1 eth"
spammers = "10 eth"

[[spam]]
[spam.tx]
from_pool = "spammers" # the account sending this will start with 10 eth
...

👉 Then repurpose --min-balance from the CLI. Instead of using it to fund accounts at the start, use it as a trigger to know when the accounts should be refilled. After every batch of txs is sent, check the balance of a single spammer account (any account, say #0), and if its balance is below min_balance, fund all spammer accounts with the amount specified by their allocation in fund.

In the case that a from_pool is not given an explicit designation in fund (or fund is not specified), assume 0.01 ETH to be its fund amount.

主要言語
Rust
スター
144
フォーク
58
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

flashbots/contender のほかの issue

flashbots/contender の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。