Documentation
¶
Index ¶
- Variables
- func EtherToWei(val *uint256.Int) *uint256.Int
- func GetBuildVersion() string
- func ReadFileLinesTrimmed(fname string) ([]string, error)
- func RecoverPanic(logger *logrus.Entry, routineName string) bool
- func RunTransactionScenario(ctx context.Context, options TransactionScenarioOptions) error
- func WeiToEther(val *uint256.Int) *uint256.Int
- type FlexibleJsonUInt64
- type TransactionScenarioOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var BlobsPerBlock uint64 = 6
View Source
var BuildRelease string
View Source
var BuildTime string
View Source
var BuildVersion string
View Source
var SecondsPerSlot uint64 = 12
View Source
var WeiPerGwei uint64 = 1000000000
Functions ¶
func GetBuildVersion ¶
func GetBuildVersion() string
func ReadFileLinesTrimmed ¶
func RecoverPanic ¶ added in v1.1.3
func RunTransactionScenario ¶ added in v1.1.3
func RunTransactionScenario(ctx context.Context, options TransactionScenarioOptions) error
RunTransactionScenario executes a controlled transaction scenario with rate limiting and concurrency management. It processes transactions according to the specified options until either context cancellation or reaching TotalCount (if > 0).
Features: - Rate-limited execution based on Throughput - Optional dynamic throughput increases - Concurrency control via MaxPending - Sequential logging via transaction chaining
Returns an error only if the scenario cannot be started. Transaction failures should be handled within ProcessNextTxFn.
Types ¶
type FlexibleJsonUInt64 ¶ added in v1.1.2
type FlexibleJsonUInt64 uint64
func (*FlexibleJsonUInt64) UnmarshalJSON ¶ added in v1.1.2
func (f *FlexibleJsonUInt64) UnmarshalJSON(b []byte) error
func (*FlexibleJsonUInt64) UnmarshalYAML ¶ added in v1.1.2
func (f *FlexibleJsonUInt64) UnmarshalYAML(unmarshal func(interface{}) error) error
type TransactionScenarioOptions ¶ added in v1.1.3
type TransactionScenarioOptions struct {
TotalCount uint64
Throughput uint64
MaxPending uint64
ThroughputIncrementInterval uint64
// Logger for scenario execution information
Logger *logrus.Entry
// ProcessNextTxFn handles transaction execution with the given index
// It should return:
// - A callback function to log transaction results (can be nil)
// - An error if transaction creation failed
// - The onComplete callback must be called when transaction processing is complete
ProcessNextTxFn func(ctx context.Context, txIdx uint64, onComplete func()) (func(), error)
}
TransactionScenarioOptions configures how the transaction scenario is executed.
Click to show internal directories.
Click to hide internal directories.