Documentation ¶
Index ¶
- Variables
- func BuildAlphabetPreimage(i uint64, letter string) []byte
- func IndexToBytes(i uint64) []byte
- func LetterToBytes(letter string) []byte
- func NewOracleUpdater(logger log.Logger) *alphabetUpdater
- type AlphabetTraceProvider
- func (ap *AlphabetTraceProvider) AbsolutePreState(ctx context.Context) ([]byte, error)
- func (ap *AlphabetTraceProvider) AbsolutePreStateCommitment(ctx context.Context) (common.Hash, error)
- func (ap *AlphabetTraceProvider) Get(ctx context.Context, i uint64) (common.Hash, error)
- func (ap *AlphabetTraceProvider) GetStepData(ctx context.Context, i uint64) ([]byte, []byte, *types.PreimageOracleData, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrIndexTooLarge = errors.New("index is larger than the maximum index")
)
Functions ¶
func BuildAlphabetPreimage ¶
BuildAlphabetPreimage constructs the claim bytes for the index and state item.
func IndexToBytes ¶
IndexToBytes converts an index to a byte slice big endian
func LetterToBytes ¶
LetterToBytes converts a letter to a 32 byte array
func NewOracleUpdater ¶
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 (*AlphabetTraceProvider) GetStepData ¶
func (ap *AlphabetTraceProvider) GetStepData(ctx context.Context, i uint64) ([]byte, []byte, *types.PreimageOracleData, error)
Click to show internal directories.
Click to hide internal directories.