Documentation ¶
Index ¶
- func NewEnclave(config config.EnclaveConfig, genesis *genesis.Genesis, ...) common.Enclave
- func VerifyIdentity(data []byte, att *common.AttestationReport) error
- type AttestationProvider
- type DummyAttestationProvider
- type EgoAttestationProvider
- type IDData
- type RPCServer
- func (s *RPCServer) AddViewingKey(_ context.Context, request *generated.AddViewingKeyRequest) (*generated.AddViewingKeyResponse, error)
- func (s *RPCServer) Attestation(context.Context, *generated.AttestationRequest) (*generated.AttestationResponse, error)
- func (s *RPCServer) CreateRollup(_ context.Context, _ *generated.CreateRollupRequest) (*generated.CreateRollupResponse, error)
- func (s *RPCServer) DebugEventLogRelevancy(_ context.Context, req *generated.DebugEventLogRelevancyRequest) (*generated.DebugEventLogRelevancyResponse, error)
- func (s *RPCServer) DebugTraceTransaction(_ context.Context, req *generated.DebugTraceTransactionRequest) (*generated.DebugTraceTransactionResponse, error)
- func (s *RPCServer) EstimateGas(_ context.Context, req *generated.EstimateGasRequest) (*generated.EstimateGasResponse, error)
- func (s *RPCServer) GenerateSecret(context.Context, *generated.GenerateSecretRequest) (*generated.GenerateSecretResponse, error)
- func (s *RPCServer) GetBalance(_ context.Context, request *generated.GetBalanceRequest) (*generated.GetBalanceResponse, error)
- func (s *RPCServer) GetCode(_ context.Context, request *generated.GetCodeRequest) (*generated.GetCodeResponse, error)
- func (s *RPCServer) GetLogs(_ context.Context, req *generated.GetLogsRequest) (*generated.GetLogsResponse, error)
- func (s *RPCServer) GetTransaction(_ context.Context, request *generated.GetTransactionRequest) (*generated.GetTransactionResponse, error)
- func (s *RPCServer) GetTransactionCount(_ context.Context, request *generated.GetTransactionCountRequest) (*generated.GetTransactionCountResponse, error)
- func (s *RPCServer) GetTransactionReceipt(_ context.Context, request *generated.GetTransactionReceiptRequest) (*generated.GetTransactionReceiptResponse, error)
- func (s *RPCServer) HealthCheck(_ context.Context, _ *generated.EmptyArgs) (*generated.HealthCheckResponse, error)
- func (s *RPCServer) InitEnclave(_ context.Context, request *generated.InitEnclaveRequest) (*generated.InitEnclaveResponse, error)
- func (s *RPCServer) ObsCall(_ context.Context, request *generated.ObsCallRequest) (*generated.ObsCallResponse, error)
- func (s *RPCServer) StartServer() error
- func (s *RPCServer) Status(context.Context, *generated.StatusRequest) (*generated.StatusResponse, error)
- func (s *RPCServer) Stop(context.Context, *generated.StopRequest) (*generated.StopResponse, error)
- func (s *RPCServer) SubmitBatch(_ context.Context, request *generated.SubmitBatchRequest) (*generated.SubmitBatchResponse, error)
- func (s *RPCServer) SubmitL1Block(_ context.Context, request *generated.SubmitBlockRequest) (*generated.SubmitBlockResponse, error)
- func (s *RPCServer) SubmitTx(_ context.Context, request *generated.SubmitTxRequest) (*generated.SubmitTxResponse, error)
- func (s *RPCServer) Subscribe(_ context.Context, req *generated.SubscribeRequest) (*generated.SubscribeResponse, error)
- func (s *RPCServer) Unsubscribe(_ context.Context, req *generated.UnsubscribeRequest) (*generated.UnsubscribeResponse, error)
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.
func VerifyIdentity ¶
func VerifyIdentity(data []byte, att *common.AttestationReport) error
Types ¶
type AttestationProvider ¶
type AttestationProvider interface { // GetReport returns the verifiable attestation report GetReport(pubKey []byte, owner gethcommon.Address, hostAddress string) (*common.AttestationReport, error) // VerifyReport returns the embedded report data VerifyReport(att *common.AttestationReport) ([]byte, error) }
type DummyAttestationProvider ¶
type DummyAttestationProvider struct{}
func (*DummyAttestationProvider) GetReport ¶
func (e *DummyAttestationProvider) GetReport(pubKey []byte, owner gethcommon.Address, hostAddress string) (*common.AttestationReport, error)
func (*DummyAttestationProvider) VerifyReport ¶
func (e *DummyAttestationProvider) VerifyReport(att *common.AttestationReport) ([]byte, error)
type EgoAttestationProvider ¶
type EgoAttestationProvider struct{}
func (*EgoAttestationProvider) GetReport ¶
func (e *EgoAttestationProvider) GetReport(pubKey []byte, owner gethcommon.Address, hostAddress string) (*common.AttestationReport, error)
func (*EgoAttestationProvider) VerifyReport ¶
func (e *EgoAttestationProvider) VerifyReport(att *common.AttestationReport) ([]byte, error)
todo (#1059) - we need to verify the hash is a recognized enclave - figure out how we solve for upgradability
type RPCServer ¶ added in v0.8.0
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 ¶ added in v0.8.0
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) AddViewingKey ¶ added in v0.8.0
func (s *RPCServer) AddViewingKey(_ context.Context, request *generated.AddViewingKeyRequest) (*generated.AddViewingKeyResponse, error)
func (*RPCServer) Attestation ¶ added in v0.8.0
func (s *RPCServer) Attestation(context.Context, *generated.AttestationRequest) (*generated.AttestationResponse, error)
func (*RPCServer) CreateRollup ¶ added in v0.11.0
func (s *RPCServer) CreateRollup(_ context.Context, _ *generated.CreateRollupRequest) (*generated.CreateRollupResponse, error)
func (*RPCServer) DebugEventLogRelevancy ¶ added in v0.13.0
func (s *RPCServer) DebugEventLogRelevancy(_ context.Context, req *generated.DebugEventLogRelevancyRequest) (*generated.DebugEventLogRelevancyResponse, error)
func (*RPCServer) DebugTraceTransaction ¶ added in v0.12.0
func (s *RPCServer) DebugTraceTransaction(_ context.Context, req *generated.DebugTraceTransactionRequest) (*generated.DebugTraceTransactionResponse, error)
func (*RPCServer) EstimateGas ¶ added in v0.8.0
func (s *RPCServer) EstimateGas(_ context.Context, req *generated.EstimateGasRequest) (*generated.EstimateGasResponse, error)
func (*RPCServer) GenerateSecret ¶ added in v0.8.0
func (s *RPCServer) GenerateSecret(context.Context, *generated.GenerateSecretRequest) (*generated.GenerateSecretResponse, error)
func (*RPCServer) GetBalance ¶ added in v0.8.0
func (s *RPCServer) GetBalance(_ context.Context, request *generated.GetBalanceRequest) (*generated.GetBalanceResponse, error)
func (*RPCServer) GetCode ¶ added in v0.8.0
func (s *RPCServer) GetCode(_ context.Context, request *generated.GetCodeRequest) (*generated.GetCodeResponse, error)
func (*RPCServer) GetLogs ¶ added in v0.8.0
func (s *RPCServer) GetLogs(_ context.Context, req *generated.GetLogsRequest) (*generated.GetLogsResponse, error)
func (*RPCServer) GetTransaction ¶ added in v0.8.0
func (s *RPCServer) GetTransaction(_ context.Context, request *generated.GetTransactionRequest) (*generated.GetTransactionResponse, error)
func (*RPCServer) GetTransactionCount ¶ added in v0.8.0
func (s *RPCServer) GetTransactionCount(_ context.Context, request *generated.GetTransactionCountRequest) (*generated.GetTransactionCountResponse, error)
func (*RPCServer) GetTransactionReceipt ¶ added in v0.8.0
func (s *RPCServer) GetTransactionReceipt(_ context.Context, request *generated.GetTransactionReceiptRequest) (*generated.GetTransactionReceiptResponse, error)
func (*RPCServer) HealthCheck ¶ added in v0.8.0
func (*RPCServer) InitEnclave ¶ added in v0.8.0
func (s *RPCServer) InitEnclave(_ context.Context, request *generated.InitEnclaveRequest) (*generated.InitEnclaveResponse, error)
func (*RPCServer) ObsCall ¶ added in v0.12.0
func (s *RPCServer) ObsCall(_ context.Context, request *generated.ObsCallRequest) (*generated.ObsCallResponse, error)
func (*RPCServer) StartServer ¶ added in v0.8.0
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 ¶ added in v0.8.0
func (s *RPCServer) Status(context.Context, *generated.StatusRequest) (*generated.StatusResponse, error)
Status returns the current status of the RPCServer as an enum value (see common.Status for details)
func (*RPCServer) Stop ¶ added in v0.8.0
func (s *RPCServer) Stop(context.Context, *generated.StopRequest) (*generated.StopResponse, error)
func (*RPCServer) SubmitBatch ¶ added in v0.8.0
func (s *RPCServer) SubmitBatch(_ context.Context, request *generated.SubmitBatchRequest) (*generated.SubmitBatchResponse, error)
func (*RPCServer) SubmitL1Block ¶ added in v0.8.0
func (s *RPCServer) SubmitL1Block(_ context.Context, request *generated.SubmitBlockRequest) (*generated.SubmitBlockResponse, error)
func (*RPCServer) SubmitTx ¶ added in v0.8.0
func (s *RPCServer) SubmitTx(_ context.Context, request *generated.SubmitTxRequest) (*generated.SubmitTxResponse, error)
func (*RPCServer) Subscribe ¶ added in v0.8.0
func (s *RPCServer) Subscribe(_ context.Context, req *generated.SubscribeRequest) (*generated.SubscribeResponse, error)
func (*RPCServer) Unsubscribe ¶ added in v0.8.0
func (s *RPCServer) Unsubscribe(_ context.Context, req *generated.UnsubscribeRequest) (*generated.UnsubscribeResponse, error)
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 |