Documentation ¶
Index ¶
- func NewEnclave(config *config.EnclaveConfig, genesis *genesis.Genesis, ...) common.Enclave
- type RPCServer
- func (s *RPCServer) Attestation(context.Context, *generated.AttestationRequest) (*generated.AttestationResponse, error)
- func (s *RPCServer) CreateBatch(_ context.Context, r *generated.CreateBatchRequest) (*generated.CreateBatchResponse, error)
- func (s *RPCServer) CreateRollup(_ context.Context, req *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) EnclaveID(_ context.Context, _ *generated.EnclaveIDRequest) (*generated.EnclaveIDResponse, error)
- func (s *RPCServer) EnclavePublicConfig(_ context.Context, _ *generated.EnclavePublicConfigRequest) (*generated.EnclavePublicConfigResponse, 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) GetBatch(_ context.Context, request *generated.GetBatchRequest) (*generated.GetBatchResponse, error)
- func (s *RPCServer) GetBatchBySeqNo(_ context.Context, request *generated.GetBatchBySeqNoRequest) (*generated.GetBatchResponse, 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) GetPublicTransactionData(_ context.Context, req *generated.GetPublicTransactionDataRequest) (*generated.GetPublicTransactionDataResponse, error)
- func (s *RPCServer) GetReceiptsByAddress(_ context.Context, req *generated.GetReceiptsByAddressRequest) (*generated.GetReceiptsByAddressResponse, error)
- func (s *RPCServer) GetTotalContractCount(_ context.Context, _ *generated.GetTotalContractCountRequest) (*generated.GetTotalContractCountResponse, 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) StreamL2Updates(_ *generated.StreamL2UpdatesRequest, ...) 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.
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 (s *RPCServer) Attestation(context.Context, *generated.AttestationRequest) (*generated.AttestationResponse, error)
func (*RPCServer) CreateBatch ¶
func (s *RPCServer) CreateBatch(_ context.Context, r *generated.CreateBatchRequest) (*generated.CreateBatchResponse, error)
func (*RPCServer) CreateRollup ¶
func (s *RPCServer) CreateRollup(_ context.Context, req *generated.CreateRollupRequest) (*generated.CreateRollupResponse, error)
func (*RPCServer) DebugEventLogRelevancy ¶
func (s *RPCServer) DebugEventLogRelevancy(_ context.Context, req *generated.DebugEventLogRelevancyRequest) (*generated.DebugEventLogRelevancyResponse, error)
func (*RPCServer) DebugTraceTransaction ¶
func (s *RPCServer) DebugTraceTransaction(_ context.Context, req *generated.DebugTraceTransactionRequest) (*generated.DebugTraceTransactionResponse, error)
func (*RPCServer) EnclaveID ¶ added in v0.21.0
func (s *RPCServer) EnclaveID(_ context.Context, _ *generated.EnclaveIDRequest) (*generated.EnclaveIDResponse, error)
func (*RPCServer) EnclavePublicConfig ¶
func (s *RPCServer) EnclavePublicConfig(_ context.Context, _ *generated.EnclavePublicConfigRequest) (*generated.EnclavePublicConfigResponse, error)
func (*RPCServer) EstimateGas ¶
func (s *RPCServer) EstimateGas(_ context.Context, req *generated.EstimateGasRequest) (*generated.EstimateGasResponse, error)
func (*RPCServer) GenerateSecret ¶
func (s *RPCServer) GenerateSecret(context.Context, *generated.GenerateSecretRequest) (*generated.GenerateSecretResponse, error)
func (*RPCServer) GetBalance ¶
func (s *RPCServer) GetBalance(_ context.Context, request *generated.GetBalanceRequest) (*generated.GetBalanceResponse, error)
func (*RPCServer) GetBatch ¶
func (s *RPCServer) GetBatch(_ context.Context, request *generated.GetBatchRequest) (*generated.GetBatchResponse, error)
func (*RPCServer) GetBatchBySeqNo ¶
func (s *RPCServer) GetBatchBySeqNo(_ context.Context, request *generated.GetBatchBySeqNoRequest) (*generated.GetBatchResponse, error)
func (*RPCServer) GetCode ¶
func (s *RPCServer) GetCode(_ context.Context, request *generated.GetCodeRequest) (*generated.GetCodeResponse, error)
func (*RPCServer) GetLogs ¶
func (s *RPCServer) GetLogs(_ context.Context, req *generated.GetLogsRequest) (*generated.GetLogsResponse, error)
func (*RPCServer) GetPublicTransactionData ¶
func (s *RPCServer) GetPublicTransactionData(_ context.Context, req *generated.GetPublicTransactionDataRequest) (*generated.GetPublicTransactionDataResponse, error)
func (*RPCServer) GetReceiptsByAddress ¶
func (s *RPCServer) GetReceiptsByAddress(_ context.Context, req *generated.GetReceiptsByAddressRequest) (*generated.GetReceiptsByAddressResponse, error)
func (*RPCServer) GetTotalContractCount ¶
func (s *RPCServer) GetTotalContractCount(_ context.Context, _ *generated.GetTotalContractCountRequest) (*generated.GetTotalContractCountResponse, error)
func (*RPCServer) GetTransaction ¶
func (s *RPCServer) GetTransaction(_ context.Context, request *generated.GetTransactionRequest) (*generated.GetTransactionResponse, error)
func (*RPCServer) GetTransactionCount ¶
func (s *RPCServer) GetTransactionCount(_ context.Context, request *generated.GetTransactionCountRequest) (*generated.GetTransactionCountResponse, error)
func (*RPCServer) GetTransactionReceipt ¶
func (s *RPCServer) GetTransactionReceipt(_ context.Context, request *generated.GetTransactionReceiptRequest) (*generated.GetTransactionReceiptResponse, error)
func (*RPCServer) HealthCheck ¶
func (*RPCServer) InitEnclave ¶
func (s *RPCServer) InitEnclave(_ context.Context, request *generated.InitEnclaveRequest) (*generated.InitEnclaveResponse, error)
func (*RPCServer) ObsCall ¶
func (s *RPCServer) ObsCall(_ context.Context, request *generated.ObsCallRequest) (*generated.ObsCallResponse, error)
func (*RPCServer) StartServer ¶
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 ¶
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 ¶
func (s *RPCServer) Stop(context.Context, *generated.StopRequest) (*generated.StopResponse, error)
func (*RPCServer) StreamL2Updates ¶
func (s *RPCServer) StreamL2Updates(_ *generated.StreamL2UpdatesRequest, stream generated.EnclaveProto_StreamL2UpdatesServer) error
func (*RPCServer) SubmitBatch ¶
func (s *RPCServer) SubmitBatch(_ context.Context, request *generated.SubmitBatchRequest) (*generated.SubmitBatchResponse, error)
func (*RPCServer) SubmitL1Block ¶
func (s *RPCServer) SubmitL1Block(_ context.Context, request *generated.SubmitBlockRequest) (*generated.SubmitBlockResponse, error)
func (*RPCServer) SubmitTx ¶
func (s *RPCServer) SubmitTx(_ context.Context, request *generated.SubmitTxRequest) (*generated.SubmitTxResponse, error)
func (*RPCServer) Subscribe ¶
func (s *RPCServer) Subscribe(_ context.Context, req *generated.SubscribeRequest) (*generated.SubscribeResponse, error)
func (*RPCServer) Unsubscribe ¶
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 |