enclave

package
v0.0.0-...-bceb1a6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultCARoots contains the PEM encoded roots for verifying Nitro
	// Enclave attestation signatures. You can download them from
	// https://docs.aws.amazon.com/enclaves/latest/user/verify-root.html
	DefaultCARoots       = "" /* 1000-byte string literal not displayed */
	DefaultCARootsSHA256 = "8cf60e2b2efca96c6a9e71e851d00c1b6991cc09eadbe64a6a1d1b1eb9faff7c"
)

Variables

This section is empty.

Functions

func NewL1ReceiptsFetcher

func NewL1ReceiptsFetcher(hash common.Hash, header *types.Header, receipts types.Receipts) derive.L1ReceiptsFetcher

func NewL2SystemConfigFetcher

func NewL2SystemConfigFetcher(config *rollup.Config, hash common.Hash, header *types.Header, txs []*types.Transaction) derive.SystemConfigL2Fetcher

Types

type Block

type Block struct {
	*types.Block
}

func (*Block) UnmarshalJSON

func (b *Block) UnmarshalJSON(input []byte) error

type Proposal

type Proposal struct {
	OutputRoot   common.Hash
	Signature    hexutil.Bytes
	L1OriginHash common.Hash
}

type RollupConfig

type RollupConfig struct {
	params.ChainConfig

	Genesis   rollup.Genesis `json:"genesis"`
	BlockTime uint64         `json:"block_time"`

	DepositContractAddress common.Address `json:"deposit_contract_address"`
	L1SystemConfigAddress  common.Address `json:"l1_system_config_address"`
}

func (*RollupConfig) Hash

func (c *RollupConfig) Hash() (common.Hash, error)

func (*RollupConfig) MarshalBinary

func (c *RollupConfig) MarshalBinary() (data []byte, err error)

func (*RollupConfig) ToRollupConfig

func (c *RollupConfig) ToRollupConfig() *rollup.Config

type Server

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

func NewServer

func NewServer() (*Server, error)

func (*Server) Aggregate

func (s *Server) Aggregate(config *RollupConfig, prevOutputRoot common.Hash, proposals []*Proposal) (*Proposal, error)

func (*Server) DecryptionAttestation

func (s *Server) DecryptionAttestation() (hexutil.Bytes, error)

func (*Server) DecryptionPublicKey

func (s *Server) DecryptionPublicKey() (hexutil.Bytes, error)

func (*Server) EncryptedSignerKey

func (s *Server) EncryptedSignerKey(attestation hexutil.Bytes) (hexutil.Bytes, error)

func (*Server) ExecuteStateless

func (s *Server) ExecuteStateless(
	config *RollupConfig,
	l1Origin *types.Header,
	l1Receipts types.Receipts,
	previousBlockTxs []*types.Transaction,
	block *Block,
	witness hexutil.Bytes,
	messageAccount *eth.AccountResult,
	prevMessageAccountHash common.Hash,
) (*Proposal, error)

func (*Server) SetSignerKey

func (s *Server) SetSignerKey(encrypted hexutil.Bytes) error

func (*Server) SignerAttestation

func (s *Server) SignerAttestation() (hexutil.Bytes, error)

func (*Server) SignerPublicKey

func (s *Server) SignerPublicKey() (hexutil.Bytes, error)

Jump to

Keyboard shortcuts

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