enclave

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: 47 Imported by: 0

README

This package contains code related to the node's enclave component.

The entry point to the enclave component is the main function in enclave/main/.

The enclave component should be run entirely inside a trusted execution environment, e.g. using EGo (https://www.ego.dev/).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEnclave

func NewEnclave(config *enclaveconfig.EnclaveConfig, genesis *genesis.Genesis, mgmtContractLib mgmtcontractlib.MgmtContractLib, logger gethlog.Logger) common.Enclave

NewEnclave creates and initializes all the services of the enclave.

`genesisJSON` is the configuration for the corresponding L1's genesis block. This is used to validate the blocks received from the L1 node if `validateBlocks` is set to true.

func NewEnclaveAdminAPI added in v1.0.0

func NewEnclaveAdminAPI(config *enclaveconfig.EnclaveConfig, storage storage.Storage, logger gethlog.Logger, blockProcessor components.L1BlockProcessor, registry components.BatchRegistry, batchExecutor components.BatchExecutor, gethEncodingService gethencoding.EncodingService, stopControl *stopcontrol.StopControl, subscriptionManager *events.SubscriptionManager, enclaveKeyService *crypto.EnclaveAttestedKeyService, mempool *components.TxPool, chainConfig *params.ChainConfig, mgmtContractLib mgmtcontractlib.MgmtContractLib, attestationProvider components.AttestationProvider, sharedSecretService *crypto.SharedSecretService, daEncryptionService *crypto.DAEncryptionService) common.EnclaveAdmin

func NewEnclaveInitAPI added in v1.0.0

func NewEnclaveInitAPI(config *enclaveconfig.EnclaveConfig, storage storage.Storage, logger gethlog.Logger, l1BlockProcessor components.L1BlockProcessor, enclaveKeyService *crypto.EnclaveAttestedKeyService, attestationProvider components.AttestationProvider, sharedSecretService *crypto.SharedSecretService, daEncryptionService *crypto.DAEncryptionService, rpcKeyService *crypto.RPCKeyService) common.EnclaveInit

func NewEnclaveRPCAPI added in v1.0.0

func NewEnclaveRPCAPI(config *enclaveconfig.EnclaveConfig, storage storage.Storage, logger gethlog.Logger, blockProcessor components.L1BlockProcessor, batchRegistry components.BatchRegistry, gethEncodingService gethencoding.EncodingService, cachingService *storage.CacheService, mempool *components.TxPool, chainConfig *params.ChainConfig, crossChainProcessors *crosschain.Processors, scb system.SystemContractCallbacks, subscriptionManager *events.SubscriptionManager, genesis *genesis.Genesis, gasOracle gas.Oracle, sharedSecretService *crypto.SharedSecretService, rpcKeyService *crypto.RPCKeyService) common.EnclaveClientRPC

Types

type RPCServer

type RPCServer struct {
	generated.UnimplementedEnclaveProtoServer
	// contains filtered or unexported fields
}

RPCServer receives RPC calls to the enclave process and relays them to the enclave.Enclave.

func NewEnclaveRPCServer

func NewEnclaveRPCServer(listenAddress string, enclave common.Enclave, logger gethlog.Logger) *RPCServer

NewEnclaveRPCServer prepares an enclave RPCServer (doesn't start listening until `StartServer` is called

func (*RPCServer) Attestation

func (*RPCServer) CreateBatch

func (*RPCServer) CreateRollup

func (*RPCServer) EnclaveID added in v0.21.0

func (*RPCServer) EncryptedRPC added in v1.0.0

func (*RPCServer) ExportCrossChainData added in v0.24.1

func (*RPCServer) GetBatch

func (*RPCServer) GetBatchBySeqNo

func (*RPCServer) GetCode

func (*RPCServer) GetRollupData added in v0.24.0

func (*RPCServer) HealthCheck

func (*RPCServer) InitEnclave

func (*RPCServer) MakeActive added in v1.0.0

func (*RPCServer) RPCEncryptionKey added in v1.0.0

func (*RPCServer) StartServer

func (s *RPCServer) StartServer() error

StartServer starts a RPCServer on the given port on a separate thread. It creates an enclave.Enclave for the provided nodeID, and uses it to respond to incoming RPC messages from the host.

func (*RPCServer) Status

Status returns the current status of the RPCServer as an enum value (see common.Status for details)

func (*RPCServer) Stop

func (*RPCServer) SubmitBatch

func (*RPCServer) SubmitL1Block

func (*RPCServer) Subscribe

func (*RPCServer) Unsubscribe

Directories

Path Synopsis
Package debugger: This file was copied/adapted from geth - go-ethereum/eth/tracers
Package debugger: This file was copied/adapted from geth - go-ethereum/eth/tracers
evm

Jump to

Keyboard shortcuts

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