Documentation ¶
Index ¶
- Constants
- func ConfigureL1(rollupNodeCfg *rollupNode.Config, l1Node services.EthInstance, ...)
- func ConfigureL2(rollupNodeCfg *rollupNode.Config, l2Node services.EthInstance, ...)
- func EnvRPCPreference() endpoint.RPCPreference
- type DepositContractConfig
- type StartOption
- type System
- func (sys *System) AdvanceTime(d time.Duration)
- func (sys *System) AllocType() config.AllocType
- func (sys *System) BatcherHelper() *batcher.Helper
- func (sys *System) Close()
- func (sys *System) Config() SystemConfig
- func (sys *System) L1BeaconEndpoint() endpoint.RestHTTP
- func (sys *System) L1BeaconHTTPClient() *sources.BeaconHTTPClient
- func (sys *System) L1Deployments() *genesis.L1Deployments
- func (sys *System) L1Slot(l1Timestamp uint64) uint64
- func (sys *System) L2Genesis() *core.Genesis
- func (sys *System) NewMockNetPeer() (host.Host, error)
- func (sys *System) NodeClient(name string) *ethclient.Client
- func (sys *System) NodeEndpoint(name string) endpoint.RPC
- func (sys *System) RollupCfg() *rollup.Config
- func (sys *System) RollupClient(name string) *sources.RollupClient
- func (sys *System) RollupEndpoint(name string) endpoint.RPC
- func (sys *System) TestAccount(idx int) *ecdsa.PrivateKey
- type SystemConfig
- func CanyonSystemConfig(t *testing.T, canyonTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
- func DefaultSystemConfig(t testing.TB, opts ...SystemConfigOpt) SystemConfig
- func DeltaSystemConfig(t *testing.T, deltaTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
- func EcotoneSystemConfig(t *testing.T, ecotoneTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
- func FjordSystemConfig(t *testing.T, fjordTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
- func GraniteSystemConfig(t *testing.T, graniteTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
- func HoloceneSystemConfig(t *testing.T, holoceneTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
- func RegolithSystemConfig(t *testing.T, regolithTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
- type SystemConfigHook
- type SystemConfigOpt
- type SystemConfigOpts
Constants ¶
View Source
const ( RoleSeq = "sequencer" RoleVerif = "verifier" RoleL1 = "l1" )
Variables ¶
This section is empty.
Functions ¶
func ConfigureL1 ¶
func ConfigureL1(rollupNodeCfg *rollupNode.Config, l1Node services.EthInstance, beaconEndpoint endpoint.RestHTTP)
func ConfigureL2 ¶
func ConfigureL2(rollupNodeCfg *rollupNode.Config, l2Node services.EthInstance, jwtSecret [32]byte)
func EnvRPCPreference ¶
func EnvRPCPreference() endpoint.RPCPreference
EnvRPCPreference reads the type of RPC that should be used. Some E2E tests are forced to run with HTTP, since HTTP does not support subscriptions, which thus could affect functionality. The alternative E2E tests are labeled "ws", but really just any transport here is the same.
Types ¶
type DepositContractConfig ¶
type StartOption ¶ added in v1.9.4
type StartOption struct { Key string Role string Action SystemConfigHook // Batcher CLIConfig modifications to apply before starting the batcher. BatcherMod func(*bss.CLIConfig) }
func WithBatcherCompressionAlgo ¶ added in v1.9.5
func WithBatcherCompressionAlgo(ca derive.CompressionAlgo) StartOption
func WithBatcherThrottling ¶ added in v1.9.5
func WithBatcherThrottling(interval time.Duration, threshold, txSize, blockSize uint64) StartOption
type System ¶
type System struct { Cfg SystemConfig RollupConfig *rollup.Config L2GenesisCfg *core.Genesis // Connections to running nodes EthInstances map[string]services.EthInstance RollupNodes map[string]services.RollupNode L2OutputSubmitter *l2os.ProposerService BatchSubmitter *bss.BatcherService Mocknet mocknet.Mocknet FakeAltDAServer *altda.FakeDAServer L1BeaconAPIAddr endpoint.RestHTTP // TimeTravelClock is nil unless SystemConfig.SupportL1TimeTravel was set to true // It provides access to the clock instance used by the L1 node. Calling TimeTravelClock.AdvanceBy // allows tests to quickly time travel L1 into the future. // Note that this time travel may occur in a single block, creating a very large difference in the Time // on sequential blocks. TimeTravelClock *clock.AdvancingClock // contains filtered or unexported fields }
func (*System) AdvanceTime ¶
AdvanceTime advances the system clock by the given duration. If the [System.TimeTravelClock] is nil, this is a no-op.
func (*System) BatcherHelper ¶
func (*System) Config ¶
func (sys *System) Config() SystemConfig
func (*System) L1BeaconEndpoint ¶
func (*System) L1BeaconHTTPClient ¶
func (sys *System) L1BeaconHTTPClient() *sources.BeaconHTTPClient
func (*System) L1Deployments ¶
func (sys *System) L1Deployments() *genesis.L1Deployments
func (*System) NewMockNetPeer ¶
mocknet doesn't allow us to add a peerstore without fully creating the peer ourselves
func (*System) RollupClient ¶
func (sys *System) RollupClient(name string) *sources.RollupClient
func (*System) TestAccount ¶
func (sys *System) TestAccount(idx int) *ecdsa.PrivateKey
type SystemConfig ¶
type SystemConfig struct { Secrets *e2eutils.Secrets L1InfoPredeployAddress common.Address DeployConfig *genesis.DeployConfig L1Deployments *genesis.L1Deployments JWTFilePath string JWTSecret [32]byte BlobsPath string // L1FinalizedDistance is the distance from the L1 head that L1 blocks will be artificially finalized on. L1FinalizedDistance uint64 Premine map[common.Address]*big.Int Nodes map[string]*rollupNode.Config // Per node config. Don't use populate rollup.Config Loggers map[string]log.Logger GethOptions map[string][]geth.GethOption ProposerLogger log.Logger BatcherLogger log.Logger ExternalL2Shim string // map of outbound connections to other nodes. Node names prefixed with "~" are unconnected but linked. // A nil map disables P2P completely. // Any node name not in the topology will not have p2p enabled. P2PTopology map[string][]string // Enables req-resp sync in the P2P nodes P2PReqRespSync bool // If the proposer can make proposals for L2 blocks derived from L1 blocks which are not finalized on L1 yet. NonFinalizedProposals bool // Explicitly disable proposer, for tests that don't want dispute games automatically created DisableProposer bool // Explicitly disable batcher, for tests that rely on unsafe L2 payloads DisableBatcher bool // Explicitly disable setting `RollupSequencerHTTP` to forward txs from sentry nodes DisableTxForwarder bool // Configure data-availability type that is used by the batcher. DataAvailabilityType batcherFlags.DataAvailabilityType // Max L1 tx size for the batcher transactions BatcherMaxL1TxSizeBytes uint64 // Target number of frames to create per channel. Can be used to create // multi-blob transactions. // Default is 1 if unset. BatcherTargetNumFrames int // whether to actually use BatcherMaxL1TxSizeBytes for blobs, insteaf of max blob size BatcherUseMaxTxSizeForBlobs bool // Singular (0) or span batches (1) BatcherBatchType uint // If >0, limits the number of blocks per span batch BatcherMaxBlocksPerSpanBatch int // BatcherMaxPendingTransactions determines how many transactions the batcher will try to send // concurrently. 0 means unlimited. BatcherMaxPendingTransactions uint64 // BatcherMaxConcurrentDARequest determines how many DAserver requests the batcher is allowed to // make concurrently. 0 means unlimited. BatcherMaxConcurrentDARequest uint64 // SupportL1TimeTravel determines if the L1 node supports quickly skipping forward in time SupportL1TimeTravel bool AllocType config.AllocType }
func CanyonSystemConfig ¶
func CanyonSystemConfig(t *testing.T, canyonTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
func DefaultSystemConfig ¶
func DefaultSystemConfig(t testing.TB, opts ...SystemConfigOpt) SystemConfig
func DeltaSystemConfig ¶
func DeltaSystemConfig(t *testing.T, deltaTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
func EcotoneSystemConfig ¶
func EcotoneSystemConfig(t *testing.T, ecotoneTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
func FjordSystemConfig ¶
func FjordSystemConfig(t *testing.T, fjordTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
func GraniteSystemConfig ¶
func GraniteSystemConfig(t *testing.T, graniteTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
func HoloceneSystemConfig ¶ added in v1.9.5
func HoloceneSystemConfig(t *testing.T, holoceneTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
func RegolithSystemConfig ¶
func RegolithSystemConfig(t *testing.T, regolithTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig
func (SystemConfig) L1ChainIDBig ¶
func (cfg SystemConfig) L1ChainIDBig() *big.Int
func (SystemConfig) L2ChainIDBig ¶
func (cfg SystemConfig) L2ChainIDBig() *big.Int
func (SystemConfig) Start ¶
func (cfg SystemConfig) Start(t *testing.T, startOpts ...StartOption) (*System, error)
type SystemConfigHook ¶
type SystemConfigHook func(sCfg *SystemConfig, s *System)
type SystemConfigOpt ¶ added in v1.9.4
type SystemConfigOpt func(s *SystemConfigOpts)
func WithAllocType ¶ added in v1.9.4
func WithAllocType(allocType config.AllocType) SystemConfigOpt
type SystemConfigOpts ¶ added in v1.9.4
Click to show internal directories.
Click to hide internal directories.