config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnclaveConfig

type EnclaveConfig struct {
	// **Consensus configs - must be the same for all nodes. Included in the signed image.
	// Whether to produce a verified attestation report
	WillAttest bool

	// The ID of the L1 chain
	L1ChainID int64
	// The ID of the Obscuro chain
	TenChainID int64

	// These L1 contracts must be already deployed before the TEN network is created
	// The management contract address on the L1 network
	ManagementContractAddress gethcommon.Address
	// MessageBus L1 Address
	MessageBusAddress gethcommon.Address
	// SystemContractOwner is the address that owns the system contracts
	SystemContractOwner gethcommon.Address

	// Maximum bytes a batch can be uncompressed.
	MaxBatchSize uint64
	// MaxRollupSize - configured to be close to what the ethereum clients
	// have configured as the maximum size a transaction can have. Note that this isn't
	// a protocol limit, but a miner imposed limit and it might be hard to find someone
	// to include a transaction if it goes above it
	MaxRollupSize uint64
	// MinGasPrice is the minimum gas price for mining a transaction
	MinGasPrice *big.Int
	// A json string that specifies the prefunded addresses at the genesis of the TEN network
	TenGenesis             string
	GasPaymentAddress      gethcommon.Address
	BaseFee                *big.Int
	GasBatchExecutionLimit uint64

	// **Db configs
	// Whether the enclave should use in-memory or persistent storage
	UseInMemoryDB bool
	// host address for the edgeless DB instance (can be empty if using InMemory DB or if attestation is disabled)
	EdgelessDBHost string
	// filepath for the sqlite DB persistence file (can be empty if a throwaway file in /tmp/ is acceptable or
	//	if using InMemory DB or if attestation is enabled)
	SqliteDBPath string

	// **Networking cfgs
	// The address on which to serve requests
	RPCAddress string
	// RPCTimeout - calls that are longer than this will be cancelled, to prevent resource starvation
	// normally, the context is propagated from the host, but in some cases ( like the evm, we have to create a context)
	RPCTimeout time.Duration

	// **Running config
	// Arbitrary identification of the Node. Usually derived from the L1 wallet address. Useful for logging.
	NodeID string
	// LogLevel determines the verbosity of output logs
	LogLevel int
	// The path that the enclave's logs are written to
	LogPath string
	// StoreExecutedTransactions is a flag that instructs the current enclave to store data required to answer RPC queries.
	StoreExecutedTransactions bool
	// ProfilerEnabled starts a profiler instance
	ProfilerEnabled          bool
	DebugNamespaceEnabled    bool
	GasLocalExecutionCapFlag uint64

	// The public peer-to-peer IP address of the host the enclave service is tied to
	// This is required to advertise for node discovery, and we include it in the attestation
	// todo - should we really bind the physical address to the attestation.
	HostAddress string
}

EnclaveConfig contains the full configuration for an TEN enclave service.

func EnclaveConfigFromTenConfig

func EnclaveConfigFromTenConfig(tenCfg *config.TenConfig) *EnclaveConfig

Jump to

Keyboard shortcuts

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