assign agent balances in TestConfig

Aperta
#305 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@Parizval ci sta già lavorando.

Dal 19/12/2025.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
Rust
Stelle
144
Fork
58
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di flashbots/contender

Tutte le issue di flashbots/contender

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.