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
Copy file name to clipboardExpand all lines: cmd/loadtest/app.go
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ import (
18
18
"golang.org/x/time/rate"
19
19
)
20
20
21
+
21
22
type (
22
23
blockSummarystruct {
23
24
Block*rpctypes.RawBlockResponse
@@ -83,7 +84,7 @@ type (
83
84
StartNonce*uint64
84
85
GasPriceMultiplier*float64
85
86
SendingAddressCount*uint64
86
-
AddressFundingAmount*uint64
87
+
AddressFundingAmount*big.Int
87
88
PreFundSendingAddresses*bool
88
89
KeepFundedAmount*bool
89
90
SendingAddressesFile*string
@@ -164,6 +165,7 @@ var (
164
165
}
165
166
166
167
randSrc*rand.Rand
168
+
defaultFunding=new(big.Int).SetUint64(1000000000000000000) // 1 ETH
167
169
)
168
170
169
171
// LoadtestCmd represents the loadtest command
@@ -245,7 +247,8 @@ func initFlags() {
245
247
ltp.SendOnly=LoadtestCmd.PersistentFlags().Bool("send-only", false, "Send transactions and load without waiting for it to be mined.")
246
248
ltp.BlobFeeCap=LoadtestCmd.Flags().Uint64("blob-fee-cap", 100000, "The blob fee cap, or the maximum blob fee per chunk, in Gwei.")
247
249
ltp.SendingAddressCount=LoadtestCmd.Flags().Uint64("sending-address-count", 1, "The number of sending addresses to use. This is useful for avoiding pool account queue.")
248
-
ltp.AddressFundingAmount=LoadtestCmd.Flags().Uint64("address-funding-amount", 1000000000000000000, "The amount in wei to fund the sending addresses with.")
250
+
ltp.AddressFundingAmount=defaultFunding
251
+
LoadtestCmd.Flags().Var(&flag_loader.BigIntValue{Val: ltp.AddressFundingAmount},"address-funding-amount", "The amount in wei to fund the sending addresses with.")
249
252
ltp.PreFundSendingAddresses=LoadtestCmd.Flags().Bool("pre-fund-sending-addresses", false, "If set to true, the sending addresses will be funded at the start of the execution, otherwise all addresses will be funded when used for the first time.")
250
253
ltp.KeepFundedAmount=LoadtestCmd.Flags().Bool("keep-funded-amount", false, "If set to true, the funded amount will be kept in the sending addresses. Otherwise, the funded amount will be refunded back to the account used to fund the account.")
251
254
ltp.SendingAddressesFile=LoadtestCmd.Flags().String("sending-addresses-file", "", "The file containing the sending addresses private keys, one per line. This is useful for avoiding pool account queue but also to keep the same sending addresses for different execution cycles.")
Copy file name to clipboardExpand all lines: doc/polycli_loadtest.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,7 +104,7 @@ The codebase has a contract that used for load testing. It's written in Solidity
104
104
--adaptive-cycle-duration-seconds uint When using adaptive rate limiting, this flag controls how often we check the queue size and adjust the rates (default 10)
105
105
--adaptive-rate-limit Enable AIMD-style congestion control to automatically adjust request rate
106
106
--adaptive-rate-limit-increment uint When using adaptive rate limiting, this flag controls the size of the additive increases. (default 50)
107
-
--address-funding-amount uint The amount in wei to fund the sending addresses with. (default 1000000000000000000)
107
+
--address-funding-amount big.Int The amount in wei to fund the sending addresses with. (default 1000000000000000000)
108
108
--batch-size uint Number of batches to perform at a timefor receipt fetching. Default is 999 requests at a time. (default 999)
109
109
--blob-fee-cap uint The blob fee cap, or the maximum blob fee per chunk, in Gwei. (default 100000)
110
110
-b, --byte-count uint If we're in store mode, this controls how many bytes we'll try to store in our contract (default 1024)
0 commit comments