Documentation ¶
Index ¶
- Constants
- Variables
- func ReadLastStep(dir string) (uint64, error)
- func WriteLastStep(dir string, proof *ProofData, step uint64) error
- type GameInputsSource
- type L1HeadSource
- type L2HeaderSource
- type LocalGameInputs
- type PreimageLoader
- type PreimageOpt
- type PreimageSource
- type PreimageSourceCreator
- type ProofData
- type ProofGenerator
Constants ¶
View Source
const (
ProofsDir = "proofs"
)
Variables ¶
View Source
var (
ErrInvalidBlobKeyPreimage = errors.New("invalid blob key preimage")
)
Functions ¶
func ReadLastStep ¶
ReadLastStep reads the tracked last step from disk.
Types ¶
type GameInputsSource ¶
type L1HeadSource ¶
type L2HeaderSource ¶
type LocalGameInputs ¶
type LocalGameInputs struct { L1Head common.Hash L2Head common.Hash L2OutputRoot common.Hash L2Claim common.Hash L2BlockNumber *big.Int }
func FetchLocalInputs ¶
func FetchLocalInputs(ctx context.Context, caller GameInputsSource, l2Client L2HeaderSource) (LocalGameInputs, error)
type PreimageLoader ¶
type PreimageLoader struct {
// contains filtered or unexported fields
}
func NewPreimageLoader ¶
func NewPreimageLoader(makeSource PreimageSourceCreator) *PreimageLoader
func (*PreimageLoader) LoadPreimage ¶
func (l *PreimageLoader) LoadPreimage(proof *ProofData) (*types.PreimageOracleData, error)
type PreimageOpt ¶
type PreimageOpt func() preimageOpts
func FirstKeccakPreimageLoad ¶
func FirstKeccakPreimageLoad() PreimageOpt
func FirstPrecompilePreimageLoad ¶
func FirstPrecompilePreimageLoad() PreimageOpt
func FirstPreimageLoadOfType ¶
func FirstPreimageLoadOfType(preimageType string) PreimageOpt
func PreimageLargerThan ¶
func PreimageLargerThan(size int) PreimageOpt
func PreimageLoad ¶
func PreimageLoad(key preimage.Key, offset uint32) PreimageOpt
type PreimageSource ¶ added in v1.9.2
type PreimageSourceCreator ¶ added in v1.9.2
type PreimageSourceCreator func() (PreimageSource, error)
type ProofData ¶
type ProofData struct { ClaimValue common.Hash `json:"post"` StateData hexutil.Bytes `json:"state-data"` ProofData hexutil.Bytes `json:"proof-data"` OracleKey hexutil.Bytes `json:"oracle-key,omitempty"` OracleValue hexutil.Bytes `json:"oracle-value,omitempty"` OracleOffset uint32 `json:"oracle-offset,omitempty"` }
Click to show internal directories.
Click to hide internal directories.