prover

package
v0.0.0-...-6c1e745 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyProof

func VerifyProof(root common.Hash, key []byte, value []byte, proof []hexutil.Bytes) (bool, error)

Types

type EthProofResult

type EthProofResult struct {
	AccountProof []hexutil.Bytes `json:"accountProof"`
	Balance      hexutil.Big     `json:"balance"`
	CodeHash     common.Hash     `json:"codeHash"`
	Nonce        hexutil.Uint64  `json:"nonce"`
	StorageHash  common.Hash     `json:"storageHash"`
	StorageProof []struct {
		Key   hexutil.Big     `json:"key"`
		Proof []hexutil.Bytes `json:"proof"`
		Value hexutil.Big     `json:"value"`
	} `json:"storageProof"`
}

type MemDB

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

func NewMemDB

func NewMemDB() *MemDB

func (*MemDB) Get

func (m *MemDB) Get(key []byte) ([]byte, error)

func (*MemDB) Has

func (m *MemDB) Has(key []byte) (bool, error)

func (*MemDB) Put

func (m *MemDB) Put(key []byte, value []byte)

type Prover

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

func NewProver

func NewProver(config *ProverConfig) *Prover

func (*Prover) GetVerifiedStorageValues

func (p *Prover) GetVerifiedStorageValues(ctx context.Context, logger *zap.Logger, address common.Address, slots []hexutil.Big) ([]hexutil.Big, error)

type ProverConfig

type ProverConfig struct {
	// A list of Ethereum endpoints. Secure as long as any one of them is honest.
	EthApiEndpointList []string

	// Arbitrum L2 EVM-compatible endpoint. This does not have to be trusted.
	UntrustedArbApiEndpoint string

	// Arbitrum rollup contract address on L1.
	ArbRollupContractAddress common.Address
}

type RollupHead

type RollupHead struct {
	NodeIndex      uint64
	CreatedAtBlock uint64
	ConfirmData    [32]byte
}

func FetchRollupHead

func FetchRollupHead(ctx context.Context, arbRollupContractAddr common.Address, ethEndpoints []string) (*RollupHead, error)

Jump to

Keyboard shortcuts

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