privatecompute

package
v0.0.0-...-e3261ea Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ComputeResult is used to combine store key for private compute system contract
	ComputeResult = "private_compute_result"
	// ContractByteHeader is used to combine store key for storing evm contract header
	ContractByteHeader = ":H:"
	// ContractByteCode is used to combine store key for storing evm contract code
	ContractByteCode = ":B:"
	// ContractVersion is used to combine store key for storing evm contract version
	ContractVersion = ":V:"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PrivateComputeContract

type PrivateComputeContract struct {
	// contains filtered or unexported fields
}

func NewPrivateComputeContact

func NewPrivateComputeContact(log protocol.Logger) *PrivateComputeContract

func (*PrivateComputeContract) GetMethod

func (p *PrivateComputeContract) GetMethod(methodName string) common.ContractFunc

type PrivateComputeRuntime

type PrivateComputeRuntime struct {
	// contains filtered or unexported fields
}

func (*PrivateComputeRuntime) CheckCallerCertAuth

func (r *PrivateComputeRuntime) CheckCallerCertAuth(ctx protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) GetContract

func (r *PrivateComputeRuntime) GetContract(context protocol.TxSimContext, params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) GetData

func (r *PrivateComputeRuntime) GetData(context protocol.TxSimContext, params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) GetDir

func (r *PrivateComputeRuntime) GetDir(context protocol.TxSimContext, params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) GetEnclaveCACert

func (r *PrivateComputeRuntime) GetEnclaveCACert(context protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) GetEnclaveChallenge

func (r *PrivateComputeRuntime) GetEnclaveChallenge(context protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) GetEnclaveEncryptPubKey

func (r *PrivateComputeRuntime) GetEnclaveEncryptPubKey(context protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) GetEnclaveProof

func (r *PrivateComputeRuntime) GetEnclaveProof(context protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) GetEnclaveReport

func (r *PrivateComputeRuntime) GetEnclaveReport(context protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) GetEnclaveSignature

func (r *PrivateComputeRuntime) GetEnclaveSignature(context protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) GetEnclaveVerificationPubKey

func (r *PrivateComputeRuntime) GetEnclaveVerificationPubKey(context protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) SaveData

func (r *PrivateComputeRuntime) SaveData(context protocol.TxSimContext, params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) SaveDir

func (r *PrivateComputeRuntime) SaveDir(context protocol.TxSimContext, params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) SaveEnclaveCACert

func (r *PrivateComputeRuntime) SaveEnclaveCACert(context protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) SaveEnclaveReport

func (r *PrivateComputeRuntime) SaveEnclaveReport(context protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) SaveRemoteAttestation

func (r *PrivateComputeRuntime) SaveRemoteAttestation(context protocol.TxSimContext,
	params map[string][]byte) ([]byte, error)

func (*PrivateComputeRuntime) VerifyByEnclaveCert

func (r *PrivateComputeRuntime) VerifyByEnclaveCert(context protocol.TxSimContext, enclaveId []byte,
	data []byte, sign []byte) (bool, error)

type TxContextMock

type TxContextMock struct {
	// contains filtered or unexported fields
}

func (*TxContextMock) CallContract

func (*TxContextMock) CallContract(contract *commonPb.Contract,
	method string,
	byteCode []byte,
	parameter map[string][]byte,
	gasUsed uint64,
	refTxType commonPb.TxType,
) (*commonPb.ContractResult, protocol.ExecOrderTxType, commonPb.TxStatusCode)

func (*TxContextMock) Del

func (mock *TxContextMock) Del(name string, key []byte) error

func (*TxContextMock) Get

func (mock *TxContextMock) Get(name string, key []byte) ([]byte, error)

func (*TxContextMock) GetAccessControl

func (mock *TxContextMock) GetAccessControl() (protocol.AccessControlProvider, error)

func (*TxContextMock) GetBlockHeight

func (mock *TxContextMock) GetBlockHeight() uint64

func (*TxContextMock) GetBlockProposer

func (mock *TxContextMock) GetBlockProposer() *acPb.Member

func (*TxContextMock) GetBlockTimestamp

func (s *TxContextMock) GetBlockTimestamp() int64

func (*TxContextMock) GetBlockVersion

func (mock *TxContextMock) GetBlockVersion() uint32

func (*TxContextMock) GetBlockchainStore

func (mock *TxContextMock) GetBlockchainStore() protocol.BlockchainStore

func (*TxContextMock) GetChainNodesInfoProvider

func (mock *TxContextMock) GetChainNodesInfoProvider() (protocol.ChainNodesInfoProvider, error)

func (*TxContextMock) GetContractByName

func (mock *TxContextMock) GetContractByName(name string) (*commonPb.Contract, error)

func (*TxContextMock) GetContractBytecode

func (mock *TxContextMock) GetContractBytecode(name string) ([]byte, error)

func (*TxContextMock) GetCreator

func (mock *TxContextMock) GetCreator(namespace string) *acPb.Member

func (*TxContextMock) GetCurrentResult

func (*TxContextMock) GetCurrentResult() []byte

func (*TxContextMock) GetDepth

func (mock *TxContextMock) GetDepth() int

func (*TxContextMock) GetHistoryIterForKey

func (s *TxContextMock) GetHistoryIterForKey(contractName string, key []byte) (protocol.KeyHistoryIterator, error)

func (*TxContextMock) GetIterHandle

func (s *TxContextMock) GetIterHandle(index int32) (interface{}, bool)

func (*TxContextMock) GetNoRecord

func (s *TxContextMock) GetNoRecord(contractName string, key []byte) ([]byte, error)

func (*TxContextMock) GetSender

func (mock *TxContextMock) GetSender() *acPb.Member

func (*TxContextMock) GetTx

func (*TxContextMock) GetTxExecSeq

func (mock *TxContextMock) GetTxExecSeq() int

func (*TxContextMock) GetTxRWSet

func (mock *TxContextMock) GetTxRWSet(runVmSuccess bool) *commonPb.TxRWSet

func (*TxContextMock) GetTxResult

func (mock *TxContextMock) GetTxResult() *commonPb.Result

func (*TxContextMock) Put

func (mock *TxContextMock) Put(name string, key []byte, value []byte) error

func (*TxContextMock) PutIntoReadSet

func (mock *TxContextMock) PutIntoReadSet(contractName string, key []byte, value []byte)

func (*TxContextMock) PutRecord

func (mock *TxContextMock) PutRecord(contractName string, value []byte, sqlType protocol.SqlType)

func (*TxContextMock) Select

func (mock *TxContextMock) Select(name string, startKey []byte, limit []byte) (protocol.StateIterator, error)

func (*TxContextMock) SetIterHandle

func (s *TxContextMock) SetIterHandle(index int32, iter interface{})

func (*TxContextMock) SetTxExecSeq

func (mock *TxContextMock) SetTxExecSeq(i int)

func (*TxContextMock) SetTxResult

func (mock *TxContextMock) SetTxResult(txResult *commonPb.Result)

Jump to

Keyboard shortcuts

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