alphabet

package
v1.1.6-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIndexTooLarge = errors.New("index is larger than the maximum index")
)

Functions

func BuildAlphabetPreimage

func BuildAlphabetPreimage(i uint64, letter string) []byte

BuildAlphabetPreimage constructs the claim bytes for the index and state item.

func IndexToBytes

func IndexToBytes(i uint64) []byte

IndexToBytes converts an index to a byte slice big endian

func LetterToBytes

func LetterToBytes(letter string) []byte

LetterToBytes converts a letter to a 32 byte array

func NewOracleUpdater

func NewOracleUpdater(logger log.Logger) *alphabetUpdater

NewOracleUpdater returns a new updater.

Types

type AlphabetTraceProvider

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

AlphabetTraceProvider is a [TraceProvider] that provides claims for specific indices in the given trace.

func NewTraceProvider

func NewTraceProvider(state string, depth uint64) *AlphabetTraceProvider

NewTraceProvider returns a new [AlphabetProvider].

func (*AlphabetTraceProvider) AbsolutePreState

func (ap *AlphabetTraceProvider) AbsolutePreState(ctx context.Context) ([]byte, error)

AbsolutePreState returns the absolute pre-state for the alphabet trace.

func (*AlphabetTraceProvider) AbsolutePreStateCommitment

func (ap *AlphabetTraceProvider) AbsolutePreStateCommitment(ctx context.Context) (common.Hash, error)

func (*AlphabetTraceProvider) Get

Get returns the claim value at the given index in the trace.

func (*AlphabetTraceProvider) GetStepData

Jump to

Keyboard shortcuts

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