Documentation
¶
Index ¶
- Constants
- Variables
- func AttributesToReplaceInvalidBlock(invalidatedBlock *eth.ExecutionPayloadEnvelope) *eth.PayloadAttributes
- func DecodeInvalidatedBlockTx(tx *types.Transaction) (*eth.OutputV0, error)
- func DecodeInvalidatedBlockTxFromReplacement(txs []eth.Data) (*eth.OutputV0, error)
- func InvalidatedBlockSourceDepositTx(outputRootPreimage []byte) *types.Transaction
- type InteropAPI
- func (ib *InteropAPI) AnchorPoint(ctx context.Context) (supervisortypes.DerivedBlockRefPair, error)
- func (ib *InteropAPI) BlockRefByNumber(ctx context.Context, num uint64) (eth.BlockRef, error)
- func (ib *InteropAPI) ChainID(ctx context.Context) (eth.ChainID, error)
- func (ib *InteropAPI) Events(ctx context.Context) (*gethrpc.Subscription, error)
- func (ib *InteropAPI) FetchReceipts(ctx context.Context, blockHash common.Hash) (types.Receipts, error)
- func (ib *InteropAPI) InvalidateBlock(ctx context.Context, seal supervisortypes.BlockSeal) error
- func (ib *InteropAPI) L2BlockRefByTimestamp(ctx context.Context, timestamp uint64) (eth.L2BlockRef, error)
- func (ib *InteropAPI) OutputV0AtTimestamp(ctx context.Context, timestamp uint64) (*eth.OutputV0, error)
- func (ib *InteropAPI) PendingOutputV0AtTimestamp(ctx context.Context, timestamp uint64) (*eth.OutputV0, error)
- func (ib *InteropAPI) ProvideL1(ctx context.Context, nextL1 eth.BlockRef) error
- func (ib *InteropAPI) PullEvent() (*supervisortypes.ManagedEvent, error)
- func (ib *InteropAPI) Reset(ctx context.Context, unsafe, safe, finalized eth.BlockID) error
- func (ib *InteropAPI) UpdateCrossSafe(ctx context.Context, derived eth.BlockID, derivedFrom eth.BlockID) error
- func (ib *InteropAPI) UpdateCrossUnsafe(ctx context.Context, id eth.BlockID) error
- func (ib *InteropAPI) UpdateFinalized(ctx context.Context, id eth.BlockID) error
- type L1Source
- type L2Source
- type ManagedMode
- func (m *ManagedMode) AnchorPoint(ctx context.Context) (supervisortypes.DerivedBlockRefPair, error)
- func (m *ManagedMode) AttachEmitter(em event.Emitter)
- func (m *ManagedMode) BlockRefByNumber(ctx context.Context, num uint64) (eth.BlockRef, error)
- func (m *ManagedMode) ChainID(ctx context.Context) (eth.ChainID, error)
- func (m *ManagedMode) Events(ctx context.Context) (*gethrpc.Subscription, error)
- func (m *ManagedMode) FetchReceipts(ctx context.Context, blockHash common.Hash) (types.Receipts, error)
- func (m *ManagedMode) InvalidateBlock(ctx context.Context, seal supervisortypes.BlockSeal) error
- func (m *ManagedMode) JWTSecret() eth.Bytes32
- func (m *ManagedMode) L2BlockRefByTimestamp(ctx context.Context, timestamp uint64) (eth.L2BlockRef, error)
- func (m *ManagedMode) OnEvent(ev event.Event) bool
- func (m *ManagedMode) OutputV0AtTimestamp(ctx context.Context, timestamp uint64) (*eth.OutputV0, error)
- func (m *ManagedMode) PendingOutputV0AtTimestamp(ctx context.Context, timestamp uint64) (*eth.OutputV0, error)
- func (m *ManagedMode) ProvideL1(ctx context.Context, nextL1 eth.BlockRef) error
- func (m *ManagedMode) PullEvent() (*supervisortypes.ManagedEvent, error)
- func (m *ManagedMode) Reset(ctx context.Context, unsafe, safe, finalized eth.BlockID) error
- func (m *ManagedMode) Start(ctx context.Context) error
- func (m *ManagedMode) Stop(ctx context.Context) error
- func (m *ManagedMode) UpdateCrossSafe(ctx context.Context, derived eth.BlockID, derivedFrom eth.BlockID) error
- func (m *ManagedMode) UpdateCrossUnsafe(ctx context.Context, id eth.BlockID) error
- func (m *ManagedMode) UpdateFinalized(ctx context.Context, id eth.BlockID) error
- func (m *ManagedMode) WSEndpoint() string
Constants ¶
View Source
const ( InternalErrorRPCErrcode = -32603 BlockNotFoundRPCErrCode = -39001 ConflictingBlockRPCErrCode = -39002 )
Variables ¶
View Source
var ( OptimisticBlockDepositSenderAddress = common.HexToAddress("0xdeaddeaddeaddeaddeaddeaddeaddeaddead0002") ErrNotReplacementBlock = errors.New("not a replacement block") )
Functions ¶
func AttributesToReplaceInvalidBlock ¶
func AttributesToReplaceInvalidBlock(invalidatedBlock *eth.ExecutionPayloadEnvelope) *eth.PayloadAttributes
AttributesToReplaceInvalidBlock builds the payload-attributes to replace an invalidated block. See https://github.com/ethereum-optimism/specs/blob/main/specs/interop/derivation.md#replacing-invalid-blocks
func DecodeInvalidatedBlockTx ¶
func DecodeInvalidatedBlockTx(tx *types.Transaction) (*eth.OutputV0, error)
func InvalidatedBlockSourceDepositTx ¶
func InvalidatedBlockSourceDepositTx(outputRootPreimage []byte) *types.Transaction
Types ¶
type InteropAPI ¶
type InteropAPI struct {
// contains filtered or unexported fields
}
func (*InteropAPI) AnchorPoint ¶
func (ib *InteropAPI) AnchorPoint(ctx context.Context) (supervisortypes.DerivedBlockRefPair, error)
func (*InteropAPI) BlockRefByNumber ¶
func (*InteropAPI) Events ¶
func (ib *InteropAPI) Events(ctx context.Context) (*gethrpc.Subscription, error)
func (*InteropAPI) FetchReceipts ¶
func (*InteropAPI) InvalidateBlock ¶
func (ib *InteropAPI) InvalidateBlock(ctx context.Context, seal supervisortypes.BlockSeal) error
func (*InteropAPI) L2BlockRefByTimestamp ¶
func (ib *InteropAPI) L2BlockRefByTimestamp(ctx context.Context, timestamp uint64) (eth.L2BlockRef, error)
func (*InteropAPI) OutputV0AtTimestamp ¶
func (*InteropAPI) PendingOutputV0AtTimestamp ¶
func (*InteropAPI) PullEvent ¶
func (ib *InteropAPI) PullEvent() (*supervisortypes.ManagedEvent, error)
func (*InteropAPI) UpdateCrossSafe ¶
func (*InteropAPI) UpdateCrossUnsafe ¶
func (*InteropAPI) UpdateFinalized ¶
type L2Source ¶
type L2Source interface {
L2BlockRefByHash(ctx context.Context, hash common.Hash) (eth.L2BlockRef, error)
L2BlockRefByNumber(ctx context.Context, num uint64) (eth.L2BlockRef, error)
BlockRefByHash(ctx context.Context, hash common.Hash) (eth.BlockRef, error)
PayloadByHash(ctx context.Context, hash common.Hash) (*eth.ExecutionPayloadEnvelope, error)
BlockRefByNumber(ctx context.Context, num uint64) (eth.BlockRef, error)
FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error)
OutputV0AtBlock(ctx context.Context, blockHash common.Hash) (*eth.OutputV0, error)
}
type ManagedMode ¶
type ManagedMode struct {
// contains filtered or unexported fields
}
ManagedMode makes the op-node managed by an op-supervisor, by serving sync work and updating the canonical chain based on instructions.
func NewManagedMode ¶
func (*ManagedMode) AnchorPoint ¶
func (m *ManagedMode) AnchorPoint(ctx context.Context) (supervisortypes.DerivedBlockRefPair, error)
func (*ManagedMode) AttachEmitter ¶
func (m *ManagedMode) AttachEmitter(em event.Emitter)
func (*ManagedMode) BlockRefByNumber ¶
func (*ManagedMode) Events ¶
func (m *ManagedMode) Events(ctx context.Context) (*gethrpc.Subscription, error)
func (*ManagedMode) FetchReceipts ¶
func (*ManagedMode) InvalidateBlock ¶
func (m *ManagedMode) InvalidateBlock(ctx context.Context, seal supervisortypes.BlockSeal) error
func (*ManagedMode) JWTSecret ¶
func (m *ManagedMode) JWTSecret() eth.Bytes32
func (*ManagedMode) L2BlockRefByTimestamp ¶
func (m *ManagedMode) L2BlockRefByTimestamp(ctx context.Context, timestamp uint64) (eth.L2BlockRef, error)
func (*ManagedMode) OutputV0AtTimestamp ¶
func (*ManagedMode) PendingOutputV0AtTimestamp ¶
func (*ManagedMode) PullEvent ¶
func (m *ManagedMode) PullEvent() (*supervisortypes.ManagedEvent, error)
func (*ManagedMode) UpdateCrossSafe ¶
func (*ManagedMode) UpdateCrossUnsafe ¶
func (*ManagedMode) UpdateFinalized ¶
func (*ManagedMode) WSEndpoint ¶
func (m *ManagedMode) WSEndpoint() string
Click to show internal directories.
Click to hide internal directories.