You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: gas manager for loadtest; add plot command (#755)
* loadtest: WIP first version of a gas limiter based on a oscillation curve
* add traces; add gas limiter readme; fix infinte loadtest loop;
* add gas pricer; add flags to gasmanager; rename to gasmanager package
* add tx-gas-chart command; adjusts to gas manager
* refactoring loadtest gas price manager waves and tx-gas-chart;
* refactoring loadtest gas price manager waves and tx-gas-chart;
* gas manager and tx-gas-chart refactoring and docs;
* adds usage documentation for tx-gas-chart
* improves documentation for gasmanager package
* refactoring
* make gen-doc
* small doc formating
* fix: nil pointer dereference in contract-call loadtest mode
Fix panic caused by signing a nil transaction in loadTestContractCall.
The transaction was being built and assigned to `tx`, but the code was
incorrectly trying to sign `rtx` which was declared but never assigned.
This caused a segmentation fault when using the `contract-call` mode:
panic: runtime error: invalid memory address or nil pointer dereference
at cmd/loadtest/loadtest.go:1987
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* loadtest: remove infinite; gas provider wait first new block to provide gas
* make gen-doc
* WIP
* tx-gas-chart: make it compatible with op-stack deposit txs
* chart header fix
* fix merge conflicts
* tx-gas-chart: allow start block to be zero
* fix codeql issues
* add unit tests to TestGetSenderFromTx
* fix: correct variation formula in DynamicGasPriceStrategy
* fix: add context cancellation support to GasVault.SpendOrWaitAvailableBudget
* fix: use passed context instead of creating new root context in runLoadTest
* fix: add validation for empty gas prices in DynamicGasPriceStrategy
* fix: use cmd.Context() instead of context.Background() in txgaschart
* loadtest: revert debug comments for random mode
* loadtest: add comment for better explanation
* loadtest: make lint
* txgaschart: improve usage.md readability
* docs: update README to reflect context cancellation changes and fix markdown formatting
* fix: prevent precision loss and overflow in average block gas calculation
* test: add comprehensive unit tests for GasVault
* test: add comprehensive unit tests for gas pricing strategies
* test: add comprehensive unit tests for OscillatingGasProvider
* docs: add lessons learned to CLAUDE.md for future sessions
* fix: remove impossible int > MaxInt64 check flagged by staticcheck
* make gen-doc
* chore: combine like files
* fix: default block range
* refactor: simplify code and improve Go idioms
- Use cmp.Compare for sorting instead of if/else chains
- Use named type gasPriceCount instead of repeated anonymous struct
- Replace time.Sleep in select with proper time.Ticker pattern
- Embed sync.Mutex directly instead of using pointer
- Return copy from GetGasPrice to prevent mutation of internal state
- Simplify wave computeWave methods by removing redundant casts and constants
- Capitalize log messages for consistency
- Fix parseFlags to check start block after defaulting (fixes startup error)
* rename: tx-gas-chart command to plot
- Rename cmd/txgaschart directory to cmd/plot
- Update package name and command Use field
- Update all imports and documentation references
- Regenerate documentation
* fix: use best practices
* refactor(plot): simplify chart code and improve tooltips
* feat: migrate from gonum/plot to go-echarts
* fix: go.sum
* fix: ci
---------
Co-authored-by: John Hilliard <praetoriansentry@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Minh Vu <mvu@polygon.technology>
Co-authored-by: Minh Vu <minhd_vu@yahoo.com>
pf.Uint64Var(&gasManagerCfg.FixedGasPriceWei, "gas-manager-fixed-gas-price-wei", 300000000, "fixed gas price in wei")
140
+
pf.StringVar(&gasManagerCfg.DynamicGasPricesWei, "gas-manager-dynamic-gas-prices-wei", "0,1000000,0,10000000,0,100000000", "comma-separated gas prices in wei for dynamic strategy")
141
+
pf.Float64Var(&gasManagerCfg.DynamicGasPricesVariation, "gas-manager-dynamic-gas-prices-variation", 0.3, "variation percentage for dynamic strategy")
0 commit comments