common

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: AGPL-3.0 Imports: 19 Imported by: 0

README

This package defines the interface between the node host and the node enclave. Any code required for communication between the host and the enclave (e.g. RPC, encoding/decoding, the enclave API) should be placed here.

Documentation

Index

Constants

View Source
const (
	L2GenesisHeight = uint64(0)
	L1GenesisHeight = uint64(0)
	L2GenesisSeqNo  = uint64(1)
	// HeightCommittedBlocks is the number of blocks deep a transaction must be to be considered safe from reorganisations.
	HeightCommittedBlocks = 15
)

Variables

View Source
var (
	Wei   = big.NewInt(1)
	GWei  = big.NewInt(1e9)
	Token = big.NewInt(1e18)
)

These are the multipliers for ERC20 and native ETH value denominations Example: To get the wei value of an amount in whole tokens, use

new(big.Int).Mul(value, big.NewInt(common.Token))

Functions

func ExtractPotentialAddress added in v0.12.0

func ExtractPotentialAddress(hash gethcommon.Hash) *gethcommon.Address

ExtractPotentialAddress - given a 32 byte hash , it checks whether it can be an address and extracts that

func MaxInt

func MaxInt(x, y uint32) uint32

func RandomStr added in v0.14.0

func RandomStr(n int) string

Generates a random string n characters long.

func ShortAddress

func ShortAddress(address gethcommon.Address) uint64

ShortAddress converts the address to a shorter uint64 for printing.

func ShortHash

func ShortHash(hash gethcommon.Hash) uint64

ShortHash converts the hash to a shorter uint64 for printing.

func ShortNonce

func ShortNonce(nonce types.BlockNonce) uint64

ShortNonce converts the nonce to a shorter uint64 for printing.

func ValueInWei added in v0.3.0

func ValueInWei(tokenAmount *big.Int) *big.Int

ValueInWei converts a quantity of tokens (e.g. 20.5 HOC) to the integer value in wei (e.g. 2.05 x 10^19 HOC-wei)

Types

type AttestationReport

type AttestationReport struct {
	Report      []byte         // the signed bytes of the report which includes some encrypted identifying data
	PubKey      []byte         // a public key that can be used to send encrypted data back to the TEE securely (should only be used once Report has been verified)
	Owner       common.Address // address identifying the owner of the TEE which signed this report, can also be verified from the encrypted Report data
	HostAddress string         // the IP address on which the host can be contacted by other Obscuro hosts for peer-to-peer communication
}

AttestationReport represents a signed attestation report from a TEE and some metadata about the source of it to verify it

func DecodeAttestation

func DecodeAttestation(encoded EncodedAttestationReport) (*AttestationReport, error)

type BatchHeader added in v0.8.0

type BatchHeader struct {
	ParentHash       L2BatchHash    `json:"parentHash"`
	Root             StateRoot      `json:"stateRoot"`
	TxHash           common.Hash    `json:"transactionsRoot"`
	ReceiptHash      common.Hash    `json:"receiptsRoot"`
	Number           *big.Int       `json:"number"`           // height of the batch
	SequencerOrderNo *big.Int       `json:"sequencerOrderNo"` // multiple batches can be created with the same height in case of L1 reorgs. The sequencer is responsible for including all of them in the rollups.
	GasLimit         uint64         `json:"gasLimit"`
	GasUsed          uint64         `json:"gasUsed"`
	Time             uint64         `json:"timestamp"`
	Extra            []byte         `json:"extraData"`
	BaseFee          *big.Int       `json:"baseFee"`
	Coinbase         common.Address `json:"coinbase"`

	// The custom Obscuro fields.
	L1Proof                       L1BlockHash                           `json:"l1Proof"` // the L1 block used by the enclave to generate the current batch
	R, S                          *big.Int                              // signature values
	CrossChainMessages            []MessageBus.StructsCrossChainMessage `json:"crossChainMessages"`
	LatestInboundCrossChainHash   common.Hash                           `json:"inboundCrossChainHash"`   // The block hash of the latest block that has been scanned for cross chain messages.
	LatestInboundCrossChainHeight *big.Int                              `json:"inboundCrossChainHeight"` // The block height of the latest block that has been scanned for cross chain messages.
	TransfersTree                 common.Hash                           `json:"transfersTree"`           // This is a merkle tree of all of the outbound value transfers for the MainNet
}

BatchHeader is a public / plaintext struct that holds common properties of batches. Making changes to this struct will require GRPC + GRPC Converters regen

func (*BatchHeader) Hash added in v0.8.0

func (b *BatchHeader) Hash() L2BatchHash

Hash returns the block hash of the header, which is simply the keccak256 hash of its RLP encoding excluding the signature.

func (*BatchHeader) MarshalJSON added in v0.14.0

func (b *BatchHeader) MarshalJSON() ([]byte, error)

MarshalJSON custom marshals the BatchHeader into a json

type BatchListingResponse added in v0.15.0

type BatchListingResponse struct {
	BatchesData []PublicBatch
	Total       uint64
}

type BatchRequest added in v0.8.0

type BatchRequest struct {
	Requester string   // The address of the requester, used to direct the response
	FromSeqNo *big.Int // The requester's view of the current head seq no, or nil if they haven't stored any batches.
}

BatchRequest is used when requesting a range of batches from a peer.

type BlockAndReceipts added in v0.11.0

type BlockAndReceipts struct {
	Block       *types.Block
	ReceiptsMap map[int]*types.Receipt // sparse map with obscuro-relevant receipts in it
	Receipts    *types.Receipts
	// contains filtered or unexported fields
}

BlockAndReceipts - a structure that contains a fuller view of a block. It allows iterating over the successful transactions, using the receipts. The receipts are bundled in the host node and thus verification is performed over their correctness. To work properly, all of the receipts are required, due to rlp encoding pruning some of the information. The receipts must also be in the correct order.

func ParseBlockAndReceipts added in v0.11.0

func ParseBlockAndReceipts(block *L1Block, receipts *L1Receipts) (*BlockAndReceipts, error)

ParseBlockAndReceipts - will create a container struct that has preprocessed the receipts and verified if they indeed match the receipt root hash in the block.

func (*BlockAndReceipts) SuccessfulTransactions added in v0.11.0

func (br *BlockAndReceipts) SuccessfulTransactions() *types.Transactions

SuccessfulTransactions - returns slice containing only the transactions that have receipts with successful status.

type BlockListingResponse added in v0.15.0

type BlockListingResponse struct {
	BlocksData []PublicBlock
	Total      uint64
}

type BlockSubmissionResponse

type BlockSubmissionResponse struct {
	ProducedSecretResponses []*ProducedSecretResponse // The responses to any secret requests in the ingested L1 block.
	RejectError             *errutil.BlockRejectError // If block was rejected, contains information about what block to submit next.
}

BlockSubmissionResponse is the response sent from the enclave back to the node after ingesting a block

type CalldataRollupHeader added in v0.17.0

type CalldataRollupHeader struct {
	FirstBatchSequence    *big.Int
	FirstCanonBatchHeight *big.Int
	FirstCanonParentHash  L2BatchHash

	Coinbase common.Address
	BaseFee  *big.Int
	GasLimit uint64

	StartTime       uint64
	BatchTimeDeltas [][]byte // todo - minimize assuming a default of 1 sec and then store only exceptions

	L1HeightDeltas [][]byte // delta of the block height. Stored as a byte array because rlp can't encode negative numbers

	ReOrgs [][]byte `rlp:"optional"` // sparse list of reorged headers - non null only for reorgs.
}

CalldataRollupHeader contains all information necessary to reconstruct the batches included in the rollup. This data structure is serialised, compressed, and encrypted, before being serialised again in the rollup.

type ChainFork added in v0.14.0

type ChainFork struct {
	NewCanonical *types.Block
	OldCanonical *types.Block

	CommonAncestor   *types.Block
	CanonicalPath    []L1BlockHash
	NonCanonicalPath []L1BlockHash
}

ChainFork - represents the result of walking the chain when processing a fork

func (*ChainFork) IsFork added in v0.14.0

func (cf *ChainFork) IsFork() bool

func (*ChainFork) String added in v0.14.0

func (cf *ChainFork) String() string

type CrossChainMessage added in v0.8.0

type CrossChainMessage = MessageBus.StructsCrossChainMessage

type CrossChainMessages added in v0.8.0

type CrossChainMessages = []CrossChainMessage

type Enclave

type Enclave interface {
	EnclaveScan

	// Status checks whether the enclave is ready to process requests - only implemented by the RPC layer
	Status() (Status, SystemError)

	// Attestation - Produces an attestation report which will be used to request the shared secret from another enclave.
	Attestation() (*AttestationReport, SystemError)

	// GenerateSecret - the genesis enclave is responsible with generating the secret entropy
	GenerateSecret() (EncryptedSharedEnclaveSecret, SystemError)

	// InitEnclave - initialise an enclave with a seed received by another enclave
	InitEnclave(secret EncryptedSharedEnclaveSecret) SystemError

	// SubmitL1Block - Used for the host to submit L1 blocks to the enclave, these may be:
	//  a. historic block - if the enclave is behind and in the process of catching up with the L1 state
	//  b. the latest block published by the L1, to which the enclave should respond with a rollup
	// It is the responsibility of the host to gossip the returned rollup
	// For good functioning the caller should always submit blocks ordered by height
	// submitting a block before receiving ancestors of it, will result in it being ignored
	SubmitL1Block(block L1Block, receipts L1Receipts, isLatest bool) (*BlockSubmissionResponse, SystemError)

	// SubmitTx - user transactions
	SubmitTx(tx EncryptedTx) (*responses.RawTx, SystemError)

	// SubmitBatch submits a batch received from the sequencer for processing.
	SubmitBatch(batch *ExtBatch) SystemError

	// ObsCall - Execute a smart contract to retrieve data. The equivalent of "Eth_call"
	// Todo - return the result with a block delay. To prevent frontrunning.
	ObsCall(encryptedParams EncryptedParamsCall) (*responses.Call, SystemError)

	// GetTransactionCount returns the nonce of the wallet with the given address (encrypted with the acc viewing key)
	GetTransactionCount(encryptedParams EncryptedParamsGetTxCount) (*responses.TxCount, SystemError)

	// Stop gracefully stops the enclave
	Stop() SystemError

	// GetTransaction returns a transaction in JSON format, encrypted with the viewing key for the transaction's `from` field.
	GetTransaction(encryptedParams EncryptedParamsGetTxByHash) (*responses.TxByHash, SystemError)

	// GetTransactionReceipt returns a transaction receipt given its signed hash, or nil if the transaction is unknown
	GetTransactionReceipt(encryptedParams EncryptedParamsGetTxReceipt) (*responses.TxReceipt, SystemError)

	// GetBalance returns the balance of the address on the Obscuro network, encrypted with the viewing key for the
	// address.
	GetBalance(encryptedParams EncryptedParamsGetBalance) (*responses.Balance, SystemError)

	// GetCode returns the code stored at the given address in the state for the given rollup hash.
	GetCode(address gethcommon.Address, rollupHash *gethcommon.Hash) ([]byte, SystemError)

	// Subscribe adds a log subscription to the enclave under the given ID, provided the request is authenticated
	// correctly. The events will be populated in the BlockSubmissionResponse. If there is an existing subscription
	// with the given ID, it is overwritten.
	Subscribe(id rpc.ID, encryptedParams EncryptedParamsLogSubscription) SystemError

	// Unsubscribe removes the log subscription with the given ID from the enclave. If there is no subscription with
	// the given ID, nothing is deleted.
	Unsubscribe(id rpc.ID) SystemError

	// StopClient stops the enclave client if one exists - only implemented by the RPC layer
	StopClient() SystemError

	// EstimateGas tries to estimate the gas needed to execute a specific transaction based on the pending state.
	EstimateGas(encryptedParams EncryptedParamsEstimateGas) (*responses.Gas, SystemError)

	// GetLogs returns all the logs matching the filter.
	GetLogs(encryptedParams EncryptedParamsGetLogs) (*responses.Logs, SystemError)

	// HealthCheck returns whether the enclave is in a healthy state
	HealthCheck() (bool, SystemError)

	// GetBatch - retrieve a batch if existing within the enclave db.
	GetBatch(hash L2BatchHash) (*ExtBatch, SystemError)

	// GetBatchBySeqNo - retrieve batch by sequencer number if it's in the db
	GetBatchBySeqNo(seqNo uint64) (*ExtBatch, SystemError)

	// CreateBatch - creates a new head batch extending the previous one for the latest known L1 head if the node is
	// a sequencer. Will panic otherwise.
	CreateBatch(skipIfEmpty bool) SystemError

	// CreateRollup - will create a new rollup by going through the sequencer if the node is a sequencer
	// or panic otherwise.
	CreateRollup(fromSeqNo uint64) (*ExtRollup, SystemError)

	// DebugTraceTransaction returns the trace of a transaction
	DebugTraceTransaction(hash gethcommon.Hash, config *tracers.TraceConfig) (json.RawMessage, SystemError)

	// StreamL2Updates - will stream any new batches as they are created/detected
	// All will be queued in the channel that has been returned.
	StreamL2Updates() (chan StreamL2UpdatesResponse, func())
	// DebugEventLogRelevancy returns the logs of a transaction
	DebugEventLogRelevancy(hash gethcommon.Hash) (json.RawMessage, SystemError)
}

Enclave represents the API of the service that runs inside the TEE.

type EnclaveScan added in v0.14.0

type EnclaveScan interface {
	// GetTotalContractCount returns the total number of contracts that have been deployed
	GetTotalContractCount() (*big.Int, SystemError)

	// GetCustomQuery returns the data of a custom query
	GetCustomQuery(encryptedParams EncryptedParamsGetStorageAt) (*responses.PrivateQueryResponse, SystemError)

	// GetPublicTransactionData returns a list of public transaction data
	GetPublicTransactionData(pagination *QueryPagination) (*TransactionListingResponse, SystemError)
}

EnclaveScan represents the methods that are used for data scanning in the enclave

type EncodedAttestationReport

type EncodedAttestationReport []byte

type EncodedBatchMsg added in v0.8.0

type EncodedBatchMsg []byte

type EncodedBatchRequest added in v0.8.0

type EncodedBatchRequest []byte

type EncodedL1Block added in v0.7.0

type EncodedL1Block []byte

EncodedL1Block the encoded version of an L1 block.

func EncodeBlock

func EncodeBlock(b *types.Block) (EncodedL1Block, error)

func (EncodedL1Block) DecodeBlock added in v0.7.0

func (eb EncodedL1Block) DecodeBlock() (*types.Block, error)

type EncodedRollup

type EncodedRollup []byte

func EncodeRollup

func EncodeRollup(r *ExtRollup) (EncodedRollup, error)

type EncryptedParamsCall

type EncryptedParamsCall []byte // As above, but for an RPC call request.

type EncryptedParamsEstimateGas added in v0.4.0

type EncryptedParamsEstimateGas []byte // As above, but for an RPC estimateGas request.

type EncryptedParamsGetBalance

type EncryptedParamsGetBalance []byte // The params for an RPC getBalance request, as a JSON object encrypted with the public key of the enclave.

type EncryptedParamsGetLogs added in v0.5.0

type EncryptedParamsGetLogs []byte // As above, but for an RPC getLogs request.

type EncryptedParamsGetStorageAt added in v0.14.0

type EncryptedParamsGetStorageAt []byte

type EncryptedParamsGetTxByHash

type EncryptedParamsGetTxByHash []byte // As above, but for an RPC getTransactionByHash request.

type EncryptedParamsGetTxCount added in v0.4.0

type EncryptedParamsGetTxCount []byte // As above, but for an RPC getTransactionCount request.

type EncryptedParamsGetTxReceipt

type EncryptedParamsGetTxReceipt []byte // As above, but for an RPC getTransactionReceipt request.

type EncryptedParamsLogSubscription added in v0.4.0

type EncryptedParamsLogSubscription []byte // As above, but for an RPC logs subscription request.

type EncryptedParamsSendRawTx

type EncryptedParamsSendRawTx []byte // As above, but for an RPC sendRawTransaction request.

type EncryptedSharedEnclaveSecret

type EncryptedSharedEnclaveSecret []byte

type EncryptedSubscriptionLogs added in v0.14.0

type EncryptedSubscriptionLogs = map[rpc.ID][]byte

EncryptedSubscriptionLogs - Alias for the event subscription updates going out of the enclave.

type EncryptedTransactions

type EncryptedTransactions []byte // A blob of encrypted transactions, as they're stored in the rollup, with the nonce prepended.

type EncryptedTx

type EncryptedTx []byte // A single transaction, encoded as a JSON list of transaction binary hexes and encrypted using the enclave's public key

type ExtBatch added in v0.7.0

type ExtBatch struct {
	Header *BatchHeader
	// todo - remove
	TxHashes        []TxHash // The hashes of the transactions included in the batch.
	EncryptedTxBlob EncryptedTransactions
	// contains filtered or unexported fields
}

ExtBatch is an encrypted form of batch used when passing the batch around outside of an enclave. todo (#718) - expand this structure to contain the required fields.

func DecodeExtBatch added in v0.14.0

func DecodeExtBatch(encoded []byte) (*ExtBatch, error)

func (*ExtBatch) Encoded added in v0.14.0

func (b *ExtBatch) Encoded() ([]byte, error)

func (*ExtBatch) Hash added in v0.8.0

func (b *ExtBatch) Hash() L2BatchHash

Hash returns the keccak256 hash of the batch's header. The hash is computed on the first call and cached thereafter.

func (*ExtBatch) SDump added in v0.13.0

func (b *ExtBatch) SDump() string

type ExtRollup

type ExtRollup struct {
	Header               *RollupHeader // the fields required by the management contract
	CalldataRollupHeader []byte        // encrypted header useful for recreating the batches
	BatchPayloads        []byte        // The transactions included in the rollup, in external/encrypted form.
	// contains filtered or unexported fields
}

ExtRollup is an encrypted form of rollup used when passing the rollup around outside an enclave.

func DecodeRollup

func DecodeRollup(encoded EncodedRollup) (*ExtRollup, error)

func (*ExtRollup) Hash added in v0.7.0

func (r *ExtRollup) Hash() L2RollupHash

Hash returns the keccak256 hash of the rollup's header. The hash is computed on the first call and cached thereafter.

type FilterCriteriaJSON added in v0.5.0

type FilterCriteriaJSON struct {
	BlockHash *common.Hash     `json:"blockHash"`
	FromBlock *rpc.BlockNumber `json:"fromBlock"`
	ToBlock   *rpc.BlockNumber `json:"toBlock"`
	Addresses interface{}      `json:"address"`
	Topics    []interface{}    `json:"topics"`
}

FilterCriteriaJSON is a structure that JSON-serialises to a format that can be successfully deserialised into a filters.FilterCriteria object (round-tripping a filters.FilterCriteria to JSON and back doesn't work, due to a custom serialiser implemented by filters.FilterCriteria).

type FinalityType added in v0.14.0

type FinalityType string
const (
	MempoolPending FinalityType = "Pending"
	BatchFinal     FinalityType = "Final"
)

type IDAndEncLog added in v0.5.0

type IDAndEncLog struct {
	SubID  rpc.ID
	EncLog []byte
}

IDAndEncLog pairs an encrypted log with the ID of the subscription that generated it.

type IDAndLog added in v0.5.0

type IDAndLog struct {
	SubID rpc.ID
	Log   *types.Log
}

IDAndLog pairs a log with the ID of the subscription that generated it.

type L1Address added in v0.8.0

type L1Address = common.Address

MainNet aliases

type L1Block added in v0.8.0

type L1Block = types.Block

type L1BlockHash added in v0.12.0

type L1BlockHash = common.Hash

type L1Receipt added in v0.8.0

type L1Receipt = types.Receipt

type L1Receipts added in v0.8.0

type L1Receipts = types.Receipts

type L1Transaction added in v0.8.0

type L1Transaction = types.Transaction

type L2Address added in v0.8.0

type L2Address = common.Address

type L2BatchHash added in v0.12.0

type L2BatchHash = common.Hash

Local Obscuro aliases

type L2Receipt added in v0.8.0

type L2Receipt = types.Receipt

type L2Receipts added in v0.8.0

type L2Receipts = types.Receipts

type L2RollupHash added in v0.14.0

type L2RollupHash = common.Hash

type L2Transactions added in v0.8.0

type L2Transactions = types.Transactions

type L2Tx

type L2Tx = types.Transaction

type L2TxHash added in v0.8.0

type L2TxHash = common.Hash

type Latency

type Latency func() time.Duration

type LogSubscription added in v0.3.0

type LogSubscription struct {
	// The account the events relate to.
	Account *common.Address

	// A signature over the account address using a private viewing key. Prevents attackers from subscribing to
	// (encrypted) logs for other accounts to see the pattern of logs.
	// todo - this does not protect against replay attacks, where someone resends an intercepted subscription request.
	Signature []byte

	// PublicViewingKey stores the viewing key used for this subscription
	PublicViewingKey []byte

	// A subscriber-defined filter to apply to the stream of logs.
	Filter *filters.FilterCriteria

	// Handles the viewing key encryption
	VkHandler *vkhandler.VKHandler
}

LogSubscription is an authenticated subscription to logs.

type NodeType added in v0.6.0

type NodeType int

NodeType represents the type of the node.

const (
	Sequencer NodeType = iota
	Validator
	Unknown
)

func ToNodeType added in v0.6.0

func ToNodeType(s string) (NodeType, error)

func (NodeType) String added in v0.6.0

func (n NodeType) String() string

type Nonce

type Nonce = uint64

type ObscuroNetworkInfo added in v0.17.0

type ObscuroNetworkInfo struct {
	ManagementContractAddress common.Address
	L1StartHash               common.Hash
	SequencerID               common.Address
	MessageBusAddress         common.Address
}

type PrivateCustomQueryListTransactions added in v0.14.0

type PrivateCustomQueryListTransactions struct {
	Address    common.Address  `json:"address"`
	Pagination QueryPagination `json:"pagination"`
}

type PrivateQueryResponse added in v0.14.0

type PrivateQueryResponse struct {
	Receipts types.Receipts
	Total    uint64
}

type ProducedSecretResponse added in v0.5.0

type ProducedSecretResponse struct {
	Secret      []byte
	RequesterID gethcommon.Address
	HostAddress string
}

ProducedSecretResponse contains the data to publish to L1 in response to a secret request discovered while processing an L1 block

type PublicBatch added in v0.15.0

type PublicBatch struct {
	BatchHeader
}

type PublicBlock added in v0.15.0

type PublicBlock struct {
	BlockHeader types.Header `json:"blockHeader"`
	RollupHash  common.Hash  `json:"rollupHash"`
}

type PublicTransaction added in v0.15.0

type PublicTransaction struct {
	TransactionHash TxHash
	BatchHeight     *big.Int
	Finality        FinalityType
}

type QueryPagination added in v0.14.0

type QueryPagination struct {
	Offset uint64
	Size   uint
}

func (*QueryPagination) UnmarshalJSON added in v0.14.0

func (p *QueryPagination) UnmarshalJSON(data []byte) error

type RollupHeader added in v0.8.0

type RollupHeader struct {
	Coinbase          common.Address
	CompressionL1Head L1BlockHash // the l1 block that the sequencer considers canonical at the time when this rollup is created

	CrossChainMessages []MessageBus.StructsCrossChainMessage `json:"crossChainMessages"`

	PayloadHash common.Hash // The hash of the compressed batches. TODO
	R, S        *big.Int    // signature values

	LastBatchSeqNo uint64
}

RollupHeader is a public / plaintext struct that holds common properties of rollups. All these fields are processed by the Management contract

func (*RollupHeader) Hash added in v0.8.0

func (r *RollupHeader) Hash() L2RollupHash

Hash returns the block hash of the header, which is simply the keccak256 hash of its RLP encoding excluding the signature.

func (*RollupHeader) MarshalJSON added in v0.14.0

func (r *RollupHeader) MarshalJSON() ([]byte, error)

MarshalJSON custom marshals the RollupHeader into a json

type StateRoot

type StateRoot = common.Hash

type Status added in v0.4.0

type Status struct {
	StatusCode StatusCode
	L1Head     gethcommon.Hash
	L2Head     *big.Int
}

Status represents the enclave's current state - whether the enclave is healthy and ready to process requests, as well as its latest known heads for the L1 and L2 chains

type StatusCode added in v0.14.0

type StatusCode int
const (
	Running        StatusCode = iota // the enclave is running, accepting L1 blocks
	AwaitingSecret                   // the enclave has not received the network secret and cannot process L1 blocks
	Unavailable                      // the enclave is unavailable (no guarantee it will self-recover)
)

type StreamL2UpdatesResponse added in v0.14.0

type StreamL2UpdatesResponse struct {
	Batch *ExtBatch
	Logs  EncryptedSubscriptionLogs
}

StreamL2UpdatesResponse - the struct encoded for each response message when streaming batches out of the enclave. The properties inside need to be encrypted according to the privacy rules.

type SystemError added in v0.13.0

type SystemError interface {
	Error() string
}

SystemError is the interface for the internal errors generated in the Enclave and consumed by the Host

type TransactionListingResponse added in v0.15.0

type TransactionListingResponse struct {
	TransactionsData []PublicTransaction
	Total            uint64
}

type TxHash

type TxHash = common.Hash

type ValueTransferEvent added in v0.18.0

type ValueTransferEvent struct {
	Sender   common.Address
	Receiver common.Address
	Amount   *big.Int
}

type ValueTransferEvents added in v0.18.0

type ValueTransferEvents = []ValueTransferEvent

Directories

Path Synopsis
rpc
nolint
nolint
native
// Package native: This file was copied/adapted from geth - go-ethereum/eth/tracers // // // Copyright 2021 The go-ethereum Authors // This file is part of the go-ethereum library.
// Package native: This file was copied/adapted from geth - go-ethereum/eth/tracers // // // Copyright 2021 The go-ethereum Authors // This file is part of the go-ethereum library.

Jump to

Keyboard shortcuts

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