Documentation ¶
Index ¶
- Variables
- func IsKonaConfigured() bool
- func NewBatcherCfg(params ...BatcherCfgParam) *helpers.BatcherCfg
- func NewDeployParams(t helpers.Testing, tp *e2eutils.TestParams, params ...DeployParam) *e2eutils.DeployParams
- func NewOpProgramCfg(t helpers.Testing, env *L2FaultProofEnv, fi *FixtureInputs, ...) *config.Config
- func NewTestParams(params ...TestParam) *e2eutils.TestParams
- func RunKonaNative(t helpers.Testing, workDir string, env *L2FaultProofEnv, l1Rpc string, ...) error
- type BatcherCfgParam
- type CheckResult
- type DeployParam
- type FixtureInputParam
- type FixtureInputs
- type ForkMatrix
- type Hardfork
- type L2FaultProofEnv
- type OpProgramCfgParam
- type RunTest
- type TestCase
- type TestCfg
- type TestFixture
- type TestMatrix
- type TestParam
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Regolith = &Hardfork{Name: "Regolith", Precedence: 1} Canyon = &Hardfork{Name: "Canyon", Precedence: 2} Delta = &Hardfork{Name: "Delta", Precedence: 3} Ecotone = &Hardfork{Name: "Ecotone", Precedence: 4} Fjord = &Hardfork{Name: "Fjord", Precedence: 5} Granite = &Hardfork{Name: "Granite", Precedence: 6} Holocene = &Hardfork{Name: "Holocene", Precedence: 7} )
Hardfork definitions
View Source
var ( Hardforks = ForkMatrix{Regolith, Canyon, Delta, Ecotone, Fjord, Granite, Holocene} LatestFork = Hardforks[len(Hardforks)-1] LatestForkOnly = ForkMatrix{LatestFork} )
Functions ¶
func IsKonaConfigured ¶
func IsKonaConfigured() bool
func NewBatcherCfg ¶
func NewBatcherCfg(params ...BatcherCfgParam) *helpers.BatcherCfg
func NewDeployParams ¶
func NewDeployParams(t helpers.Testing, tp *e2eutils.TestParams, params ...DeployParam) *e2eutils.DeployParams
func NewOpProgramCfg ¶
func NewOpProgramCfg( t helpers.Testing, env *L2FaultProofEnv, fi *FixtureInputs, params ...OpProgramCfgParam, ) *config.Config
func NewTestParams ¶
func NewTestParams(params ...TestParam) *e2eutils.TestParams
func RunKonaNative ¶
func RunKonaNative( t helpers.Testing, workDir string, env *L2FaultProofEnv, l1Rpc string, l1BeaconRpc string, l2Rpc string, fixtureInputs FixtureInputs, ) error
Types ¶
type BatcherCfgParam ¶
type BatcherCfgParam func(c *helpers.BatcherCfg)
type CheckResult ¶
func ExpectError ¶
func ExpectError(expectedErr error) CheckResult
func ExpectNoError ¶
func ExpectNoError() CheckResult
type DeployParam ¶
type DeployParam func(p *e2eutils.DeployParams)
type FixtureInputParam ¶
type FixtureInputParam func(f *FixtureInputs)
func WithL2BlockNumber ¶ added in v1.9.5
func WithL2BlockNumber(num uint64) FixtureInputParam
func WithL2Claim ¶
func WithL2Claim(claim common.Hash) FixtureInputParam
type FixtureInputs ¶
type ForkMatrix ¶
type ForkMatrix = []*Hardfork
func NewForkMatrix ¶
func NewForkMatrix(forks ...*Hardfork) ForkMatrix
type L2FaultProofEnv ¶
type L2FaultProofEnv struct { Logs *testlog.CapturingHandler Batcher *helpers.L2Batcher Sequencer *helpers.L2Sequencer Engine *helpers.L2Engine Sd *e2eutils.SetupData Dp *e2eutils.DeployParams Miner *helpers.L1Miner Alice *helpers.CrossLayerUser Bob *helpers.CrossLayerUser // contains filtered or unexported fields }
L2FaultProofEnv is a test harness for a fault provable L2 chain.
func NewL2FaultProofEnv ¶
func NewL2FaultProofEnv[c any](t helpers.Testing, testCfg *TestCfg[c], tp *e2eutils.TestParams, batcherCfg *helpers.BatcherCfg, deployConfigOverrides ...deployConfigOverride) *L2FaultProofEnv
func (*L2FaultProofEnv) RunFaultProofProgram ¶
func (env *L2FaultProofEnv) RunFaultProofProgram(t helpers.Testing, l2ClaimBlockNum uint64, checkResult CheckResult, fixtureInputParams ...FixtureInputParam)
type OpProgramCfgParam ¶
type TestCase ¶
type TestCase[cfg any] struct { Name string Cfg cfg ForkMatrix ForkMatrix RunTest RunTest[cfg] InputParams []FixtureInputParam CheckResult CheckResult }
type TestCfg ¶
type TestCfg[cfg any] struct { Hardfork *Hardfork CheckResult CheckResult InputParams []FixtureInputParam Custom cfg }
type TestFixture ¶
type TestFixture struct { Name string `toml:"name"` ExpectedStatus uint8 `toml:"expected-status"` Inputs FixtureInputs `toml:"inputs"` }
type TestMatrix ¶
type TestMatrix[cfg any] struct { CommonInputParams []FixtureInputParam TestCases []TestCase[cfg] }
func NewMatrix ¶
func NewMatrix[cfg any]() *TestMatrix[cfg]
func (*TestMatrix[cfg]) AddTestCase ¶
func (ts *TestMatrix[cfg]) AddTestCase( name string, testCfg cfg, forkMatrix ForkMatrix, runTest RunTest[cfg], checkResult CheckResult, inputParams ...FixtureInputParam, ) *TestMatrix[cfg]
func (*TestMatrix[cfg]) Run ¶
func (suite *TestMatrix[cfg]) Run(t *testing.T)
func (*TestMatrix[cfg]) WithCommonInputParams ¶
func (ts *TestMatrix[cfg]) WithCommonInputParams(params ...FixtureInputParam) *TestMatrix[cfg]
type TestParam ¶
type TestParam func(p *e2eutils.TestParams)
Click to show internal directories.
Click to hide internal directories.