enclave

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: AGPL-3.0 Imports: 46 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 *config.EnclaveConfig,
	genesis *genesis.Genesis,
	mgmtContractLib mgmtcontractlib.MgmtContractLib,
	logger gethlog.Logger,
) common.Enclave

NewEnclave creates a new 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.

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) EnclaveID added in v0.21.0

func (*RPCServer) EstimateGas

func (*RPCServer) GetBalance

func (*RPCServer) GetBatch

func (*RPCServer) GetBatchBySeqNo

func (*RPCServer) GetCode

func (*RPCServer) GetLogs

func (*RPCServer) GetTransaction

func (*RPCServer) HealthCheck

func (*RPCServer) InitEnclave

func (*RPCServer) ObsCall

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) SubmitTx

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