Part of #33.
Problem
The only distribution knob today is the gas picker (config/gas.go, {Name, Min, Max} polymorphic). We need one reusable sampling abstraction for every axis (key, size, later wallet/contract).
Approach
- Generalize the gas-picker pattern into a
Distribution that draws an index into a keyspace [0,N). Phase 1 kinds: uniform, zipfian(θ) only.
- Match the existing
Name discriminator (do not introduce a second kind convention); reject unknown kinds loudly.
- Re-home
GasPicker onto Distribution so existing gas configs deserialize unchanged.
- Seeded PRNG with a pinned
seed → per-distribution/per-worker sub-stream derivation (load-bearing for run replay; today's math/rand/v2 globals are unseeded).
Acceptance criteria
uniform + zipfian(θ) selectable via config; deterministic given seed.
- Existing gas-picker configs and
profiles/*.json behave identically (BC).
Design: https://github.com/sei-protocol/platform/blob/main/docs/designs/sei-load-workload-modeler.md
Part of #33.
Problem
The only distribution knob today is the gas picker (
config/gas.go,{Name, Min, Max}polymorphic). We need one reusable sampling abstraction for every axis (key, size, later wallet/contract).Approach
Distributionthat draws an index into a keyspace[0,N). Phase 1 kinds:uniform,zipfian(θ)only.Namediscriminator (do not introduce a secondkindconvention); reject unknown kinds loudly.GasPickerontoDistributionso existing gas configs deserialize unchanged.seed → per-distribution/per-worker sub-streamderivation (load-bearing for run replay; today'smath/rand/v2globals are unseeded).Acceptance criteria
uniform+zipfian(θ)selectable via config; deterministic given seed.profiles/*.jsonbehave identically (BC).Design: https://github.com/sei-protocol/platform/blob/main/docs/designs/sei-load-workload-modeler.md