e2e

package
v0.2202.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 70 Imported by: 1

Documentation

Overview

Package e2e implements the Oasis e2e test scenarios.

Index

Constants

View Source
const (
	PreserveValidatorRuntimeStorage uint8 = iota
	PreserveValidatorLocalStorage
	ForceValidatorReset
	PreserveComputeWorkerRuntimeStorage
	PreserveComputeWorkerLocalStorage
	ForceComputeWorkerReset
	PreserveClientRuntimeStorage
	PreserveClientLocalStorage
	ForceClientReset
	PreserveByzantineRuntimeStorage
	PreserveByzantineLocalStorage
	ForceByzantineReset
	PreserveSentryRuntimeStorage
	PreserveSentryLocalStorage
	ForceSentryReset
	PreserveKeymanagerRuntimeStorage
	PreserveKeymanagerLocalStorage
	ForceKeymanagerReset
)

Flag for consensus state reset.

Variables

View Source
var (
	// ByzantineVRFBeaconHonest is the honest byzantine VRF beacon scenario.
	ByzantineVRFBeaconHonest scenario.Scenario = &byzantineVRFBeaconImpl{
		E2E: *NewE2E("byzantine/beacon-vrf-honest"),
		extraArgs: []oasis.Argument{
			{Name: byzantine.CfgVRFBeaconMode, Values: []string{byzantine.ModeVRFBeaconHonest.String()}},
		},
		identitySeed: byzantineBeaconIdentitySeed,
	}

	// ByzantineVRFBeaconEarly is the early-proof byzantine beacon scenario.
	ByzantineVRFBeaconEarly scenario.Scenario = &byzantineVRFBeaconImpl{
		E2E: *NewE2E("byzantine/beacon-vrf-early"),
		extraArgs: []oasis.Argument{
			{Name: byzantine.CfgVRFBeaconMode, Values: []string{byzantine.ModeVRFBeaconEarly.String()}},
		},
		identitySeed: byzantineBeaconIdentitySeed,
	}

	// ByzantineVRFBeaconMissing is the missing-proof byzantine beacon scenario.
	ByzantineVRFBeaconMissing scenario.Scenario = &byzantineVRFBeaconImpl{
		E2E: *NewE2E("byzantine/beacon-vrf-missing"),
		extraArgs: []oasis.Argument{
			{Name: byzantine.CfgVRFBeaconMode, Values: []string{byzantine.ModeVRFBeaconMissing.String()}},
		},
		identitySeed: byzantineBeaconIdentitySeed,
	}
)
View Source
var (
	// EarlyQuery is the early query scenario where we query a validator node before the network
	// has started and there are no committed blocks.
	EarlyQuery scenario.Scenario = &earlyQueryImpl{
		E2E: *NewE2E("early-query"),
	}

	// EarlyQueryInitHeight is the same as EarlyQuery scenario but with an initial height set.
	EarlyQueryInitHeight scenario.Scenario = &earlyQueryImpl{
		E2E:           *NewE2E("early-query/init-height"),
		initialHeight: 42,
	}
)
View Source
var (
	// GasFeesStaking is the staking gas fees scenario.
	GasFeesStaking scenario.Scenario = &gasFeesImpl{
		E2E: *NewE2E("gas-fees/staking"),
	}

	// GasFeesStakingDumpRestore is the staking gas fees scenario with
	// dump-restore.
	GasFeesStakingDumpRestore scenario.Scenario = &gasFeesImpl{
		E2E:         *NewE2E("gas-fees/staking-dump-restore"),
		dumpRestore: true,
	}
)
View Source
var (
	TestEntityAccount    = stakingTests.AddressFromString("oasis1qq7us2p22udg2t24u6ry4m29wzql005pjsske8gt")
	DeterministicEntity1 = stakingTests.AddressFromString("oasis1qqncl383h8458mr9cytatygctzwsx02n4c5f8ed7")
	DeterministicEntity2 = stakingTests.AddressFromString("oasis1qznshq4ttrgh83d9wqvgmsuq3pfsndg3tus7lx98")
	DeterministicEntity3 = stakingTests.AddressFromString("oasis1qrz6kjp9lu6vc6snhlszq3p2nlx76qasaqr2auqk")
	DeterministicEntity4 = stakingTests.AddressFromString("oasis1qqw3ka3eeuy5qaytyhesxtj4fe5pp0xkdy954uwk")

	DeterministicValidator0 = stakingTests.AddressFromString("oasis1qpt202cf6t0s5ugkk34p83yf0c30gpjkny92u7dh")
	DeterministicValidator1 = stakingTests.AddressFromString("oasis1qryg8qf3ydzcphr328l8psz007fms9dxeuy8lgzq")
	DeterministicValidator2 = stakingTests.AddressFromString("oasis1qz74khszg55gfnmpxut3t3gdymn76hfchu9nhtd0")
	DeterministicValidator3 = stakingTests.AddressFromString("oasis1qqkspsglt3quhpkghr837trfwm048srjuv8g92jj")

	DeterministicCompute0 = stakingTests.AddressFromString("oasis1qp6tl30ljsrrqnw2awxxu2mtxk0qxyy2nymtsy90")
	DeterministicCompute1 = stakingTests.AddressFromString("oasis1qr77y0cqdzcqgz2wqkv59yz0j4vfvyryfv8vxllt")
	DeterministicCompute2 = stakingTests.AddressFromString("oasis1qzyw75ds6nw0af98xfmmpl3z8sgf3mdslvtzzcn6")
	DeterministicCompute3 = stakingTests.AddressFromString("oasis1qrp7l53vn6h2z7p242ldtkqtttz2jf9dwsgu05aa")
	DeterministicCompute4 = stakingTests.AddressFromString("oasis1qzpgrrd7435s2vaxr6s7xhqxusu4muq3y5qyph7u")

	DeterministicStorage0 = stakingTests.AddressFromString("oasis1qrhp36j49ncpaac0aufwyuvtk04nfxcj2yq7y4my")
	DeterministicStorage1 = stakingTests.AddressFromString("oasis1qzc2fexm30puzq2cmlm832fvpnyaxrq33cx4zukj")
	DeterministicStorage2 = stakingTests.AddressFromString("oasis1qq2t9c27y6kylqz4n6qmh3vn9zessh8guglsg8qc")
	DeterministicStorage3 = stakingTests.AddressFromString("oasis1qz359ng7waf2lp7j8c6vzd6qw4g4xtelysr0hl6x")

	DeterministicKeyManager0 = stakingTests.AddressFromString("oasis1qpx0k28va6n0r25qd2j4jdh9f42n5vex6s9lp780")
	DeterministicKeyManager1 = stakingTests.AddressFromString("oasis1qz30d8mqzrsrsu7fr0e6nxk0ze7ffdkj8ur7sqp0")
)

Deterministic Test Accounts.

View Source
var (
	// NodeUpgradeDummy is the node upgrade dummy scenario.
	NodeUpgradeDummy scenario.Scenario = newNodeUpgradeImpl(migrations.DummyUpgradeHandler, &dummyUpgradeChecker{})
	// NodeUpgradeMaxAllowances is the node upgrade max allowances scenario.
	NodeUpgradeMaxAllowances scenario.Scenario = newNodeUpgradeImpl(migrations.ConsensusMaxAllowances16Handler, &noOpUpgradeChecker{})
	// NodeUpgradeV62 is the node consensus V61 migration scenario.
	NodeUpgradeV62 scenario.Scenario = newNodeUpgradeImpl(migrations.ConsensusV62, &upgradeV62Checker{})
	// NodeUpgradeEmpty is the empty node upgrade scenario.
	NodeUpgradeEmpty scenario.Scenario = newNodeUpgradeImpl(migrations.EmptyHandler, &noOpUpgradeChecker{})
)
View Source
var ConsensusStateSync scenario.Scenario = &consensusStateSyncImpl{
	E2E: *NewE2E("consensus-state-sync"),
}

ConsensusStateSync is the consensus state sync scenario.

View Source
var Debond scenario.Scenario = &debondImpl{
	E2E: *NewE2E("debond"),
}

Debond tests debonding records created in the genesis document.

View Source
var E2eParamsDummy = NewE2E("")

E2eParamsDummy is a dummy instance of E2E used to register global e2e flags.

View Source
var GenesisFile scenario.Scenario = &genesisFileImpl{
	E2E: *NewE2E("genesis-file"),
}

GenesisFile is the scenario for testing the correctness of marshalled genesis documents.

View Source
var IdentityCLI scenario.Scenario = &identityCLIImpl{
	E2E: *NewE2E("identity-cli"),
}

IdentityCLI is the identity CLI scenario.

View Source
var (
	MinTransactBalance scenario.Scenario = &minTransactBalanceImpl{
		E2E: *NewE2E("min-transact-balance"),
	}
)
View Source
var MultipleSeeds scenario.Scenario = &multipleSeeds{
	E2E: *NewE2E("multiple-seeds"),
}

MultipleSeeds is the scenario where multiple seed nodes are used.

View Source
var NodeUpgradeCancel scenario.Scenario = newNodeUpgradeCancelImpl()

NodeUpgradeCancel is the node upgrade scenario.

View Source
var RegistryCLI scenario.Scenario = &registryCLIImpl{
	E2E: *NewE2E("registry-cli"),
}

RegistryCLI is the registry CLI test scenario.

View Source
var SeedAPI scenario.Scenario = &seedAPI{
	E2E: *NewE2E("seed-api"),
}

SeedAPI is the scenario where seed node control and consensus APIs are tested.

View Source
var (

	// StakeCLI is the staking scenario.
	StakeCLI scenario.Scenario = &stakeCLIImpl{
		E2E: *NewE2E("stake-cli"),
	}
)
View Source
var ValidatorEquivocation scenario.Scenario = &validatorEquivocationImpl{
	E2E: *NewE2E("validator-equivocation"),
}

ValidatorEquivocation is the validator equivocation scenario.

Functions

func RegisterScenarios

func RegisterScenarios() error

RegisterScenarios registers all end-to-end scenarios.

Types

type E2E

type E2E struct {
	Net    *oasis.Network
	Flags  *env.ParameterFlagSet
	Logger *logging.Logger
	// contains filtered or unexported fields
}

E2E is a base scenario for oasis-node end-to-end tests.

func NewE2E

func NewE2E(name string) *E2E

NewE2E creates a new base scenario for oasis-node end-to-end tests.

func (*E2E) Clone

func (sc *E2E) Clone() E2E

Clone implements scenario.Scenario.

func (*E2E) DumpRestoreNetwork

func (sc *E2E) DumpRestoreNetwork(
	childEnv *env.Env,
	fixture *oasis.NetworkFixture,
	doDbDump bool,
	genesisMapFn func(*genesis.Document),
	resetFlags map[uint8]bool,
) error

DumpRestoreNetwork first dumps the current network state and then attempts to restore it.

func (*E2E) Fixture

func (sc *E2E) Fixture() (*oasis.NetworkFixture, error)

Fixture implements scenario.Scenario.

func (*E2E) GetExportedGenesisFiles added in v0.2100.0

func (sc *E2E) GetExportedGenesisFiles(skipCompute bool) ([]string, error)

GetExportedGenesisFiles gathers exported genesis files and ensures all exported genesis files match.

func (*E2E) Init

func (sc *E2E) Init(childEnv *env.Env, net *oasis.Network) error

Init implements scenario.Scenario.

func (*E2E) Name

func (sc *E2E) Name() string

Name implements scenario.Scenario.

func (*E2E) Parameters

func (sc *E2E) Parameters() *env.ParameterFlagSet

Parameters implements scenario.Scenario.

func (*E2E) PreInit

func (sc *E2E) PreInit(childEnv *env.Env) error

PreInit implements scenario.Scenario.

func (*E2E) ResetConsensusState

func (sc *E2E) ResetConsensusState(childEnv *env.Env, flags map[uint8]bool) error

ResetConsensusState removes all consensus state, preserving runtime storage and node-local storage databases unless specified with flags otherwise.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL