Documentation
¶
Index ¶
- func WaitForBalance(ctx context.Context, client ethutils.EthClient, tokenAddress common.Address, ...) error
- func WaitForReceiptWithResults(ctx context.Context, client ethutils.EthClient, from ethcommon.Address, ...) (*types.Receipt, error)
- func WaitForReceiptWithResultsSimple(ctx context.Context, client ethutils.ReceiptFetcher, txHash ethcommon.Hash) (*types.Receipt, error)
- type ArbAddresses
- type Bridge
- type BridgeWatcher
- func (r *BridgeWatcher) CurrentBlockHeight(ctx context.Context) (*big.Int, error)
- func (r *BridgeWatcher) LookupMessageBlock(ctx context.Context, messageNum *big.Int) (*common.BlockId, error)
- func (r *BridgeWatcher) LookupMessagesInRange(ctx context.Context, from, to *big.Int) ([]*DeliveredInboxMessage, error)
- type BuilderBackend
- func (b *BuilderBackend) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (b *BuilderBackend) ClearTransactions()
- func (b *BuilderBackend) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
- func (b *BuilderBackend) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
- func (b *BuilderBackend) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
- func (b *BuilderBackend) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
- func (b *BuilderBackend) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
- func (b *BuilderBackend) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (b *BuilderBackend) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (b *BuilderBackend) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (b *BuilderBackend) TransactionCount() int
- type Challenge
- func (c *Challenge) BisectExecution(ctx context.Context, prevBisection *core.Bisection, segmentToChallenge int, ...) error
- func (c *Challenge) OneStepProveExecution(ctx context.Context, prevBisection *core.Bisection, segmentToChallenge int, ...) error
- func (c *Challenge) ProveContinuedExecution(ctx context.Context, prevBisection *core.Bisection, segmentToChallenge int, ...) error
- type ChallengeTurn
- type ChallengeWatcher
- func (c *ChallengeWatcher) Address() common.Address
- func (c *ChallengeWatcher) Asserter(ctx context.Context) (common.Address, error)
- func (c *ChallengeWatcher) ChallengeState(ctx context.Context) (common.Hash, error)
- func (c *ChallengeWatcher) Challenger(ctx context.Context) (common.Address, error)
- func (c *ChallengeWatcher) CurrentResponder(ctx context.Context) (common.Address, error)
- func (c *ChallengeWatcher) LookupBisection(ctx context.Context, challengeState common.Hash) (*core.Bisection, error)
- func (c *ChallengeWatcher) Turn(ctx context.Context) (ChallengeTurn, error)
- type ConfirmType
- type ConflictType
- type DeliveredInboxMessage
- type DeliveredInboxMessageList
- type InboxMessageGetter
- type NodeWatcher
- type RawTransaction
- type Rollup
- func (r *Rollup) AddToDeposit(ctx context.Context, address common.Address, amount *big.Int) error
- func (r *Rollup) ConfirmNextNode(ctx context.Context, assertion *core.Assertion, sends [][]byte) error
- func (r *Rollup) CreateChallenge(ctx context.Context, staker1 common.Address, node1 *core.NodeInfo, ...) error
- func (r *Rollup) NewStake(ctx context.Context, amount *big.Int) error
- func (r *Rollup) ReduceDeposit(ctx context.Context, amount *big.Int) error
- func (r *Rollup) RejectNextNode(ctx context.Context, staker common.Address) error
- func (r *Rollup) RemoveOldZombies(ctx context.Context, startIndex *big.Int) error
- func (r *Rollup) RemoveZombie(ctx context.Context, zombieNum *big.Int, maxNodes *big.Int) error
- func (r *Rollup) ReturnOldDeposit(ctx context.Context, staker common.Address) error
- func (r *Rollup) StakeOnExistingNode(ctx context.Context, nodeNumber core.NodeID, nodeHash [32]byte) error
- func (r *Rollup) StakeOnNewNode(ctx context.Context, nodeHash [32]byte, assertion *core.Assertion, ...) error
- type RollupConfig
- type RollupWatcher
- func (r *RollupWatcher) ArbGasSpeedLimitPerBlock(ctx context.Context) (*big.Int, error)
- func (r *RollupWatcher) BaseStake(ctx context.Context) (*big.Int, error)
- func (r *RollupWatcher) Bridge(ctx context.Context) (common.Address, error)
- func (r *RollupWatcher) ConfirmPeriodBlocks(ctx context.Context) (*big.Int, error)
- func (r *RollupWatcher) CurrentRequiredStake(ctx context.Context) (*big.Int, error)
- func (r *RollupWatcher) FirstUnresolvedNode(ctx context.Context) (*big.Int, error)
- func (r *RollupWatcher) GetNode(ctx context.Context, node core.NodeID) (*NodeWatcher, error)
- func (r *RollupWatcher) LatestConfirmedNode(ctx context.Context) (*big.Int, error)
- func (r *RollupWatcher) LatestNodeCreated(ctx context.Context) (*big.Int, error)
- func (r *RollupWatcher) LookupChallengedNode(ctx context.Context, address common.Address) (*big.Int, error)
- func (r *RollupWatcher) LookupCreation(ctx context.Context) (*ethbridgecontracts.RollupRollupCreated, error)
- func (r *RollupWatcher) LookupNode(ctx context.Context, number *big.Int) (*core.NodeInfo, error)
- func (r *RollupWatcher) LookupNodeChildren(ctx context.Context, parentHash [32]byte, fromBlock *big.Int) ([]*core.NodeInfo, error)
- func (r *RollupWatcher) MinimumAssertionPeriod(ctx context.Context) (*big.Int, error)
- func (r *RollupWatcher) StakeToken(ctx context.Context) (common.Address, error)
- func (r *RollupWatcher) StakerCount(ctx context.Context) (*big.Int, error)
- func (r *RollupWatcher) StakerInfo(ctx context.Context, staker common.Address) (*StakerInfo, error)
- type StakerInfo
- type StandardInbox
- type StandardInboxWatcher
- type TransactAuth
- type ValidatorUtils
- func (v *ValidatorUtils) AreUnresolvedNodesLinear(ctx context.Context) (bool, error)
- func (v *ValidatorUtils) CheckDecidableNextNode(ctx context.Context) (ConfirmType, error)
- func (v *ValidatorUtils) FindStakerConflict(ctx context.Context, staker1, staker2 common.Address) (ConflictType, *big.Int, *big.Int, error)
- func (v *ValidatorUtils) GetConfig(ctx context.Context) (*RollupConfig, error)
- func (v *ValidatorUtils) GetStakers(ctx context.Context) ([]common.Address, error)
- func (v *ValidatorUtils) LatestStaked(ctx context.Context, staker common.Address) (*big.Int, [32]byte, error)
- func (v *ValidatorUtils) RefundableStakers(ctx context.Context) ([]common.Address, error)
- func (v *ValidatorUtils) StakedNodes(ctx context.Context, staker common.Address) ([]*big.Int, error)
- func (v *ValidatorUtils) TimedOutChallenges(ctx context.Context, max int) ([]common.Address, error)
- type ValidatorWallet
- func (v *ValidatorWallet) Address() common.Address
- func (v *ValidatorWallet) ExecuteTransactions(ctx context.Context, builder *BuilderBackend) (*types.Transaction, error)
- func (v *ValidatorWallet) From() common.Address
- func (v *ValidatorWallet) ReturnOldDeposits(ctx context.Context, stakers []common.Address) (*types.Transaction, error)
- func (v *ValidatorWallet) RollupAddress() common.Address
- func (v *ValidatorWallet) TimeoutChallenges(ctx context.Context, challenges []common.Address) (*types.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitForBalance ¶
Types ¶
type ArbAddresses ¶
type ArbAddresses struct {
ArbFactory string `json:"ArbFactory"`
}
func (ArbAddresses) ArbFactoryAddress ¶
func (a ArbAddresses) ArbFactoryAddress() common.Address
type Bridge ¶
type Bridge struct { *BridgeWatcher // contains filtered or unexported fields }
func (*Bridge) SendL2MessageFromOrigin ¶
func (b *Bridge) SendL2MessageFromOrigin()
type BridgeWatcher ¶
type BridgeWatcher struct {
// contains filtered or unexported fields
}
func NewBridgeWatcher ¶
func (*BridgeWatcher) CurrentBlockHeight ¶
func (*BridgeWatcher) LookupMessageBlock ¶
func (*BridgeWatcher) LookupMessagesInRange ¶
func (r *BridgeWatcher) LookupMessagesInRange(ctx context.Context, from, to *big.Int) ([]*DeliveredInboxMessage, error)
type BuilderBackend ¶
type BuilderBackend struct {
// contains filtered or unexported fields
}
func NewBuilderBackend ¶
func NewBuilderBackend(wallet *ValidatorWallet) (*BuilderBackend, error)
func (*BuilderBackend) CallContract ¶
func (*BuilderBackend) ClearTransactions ¶
func (b *BuilderBackend) ClearTransactions()
func (*BuilderBackend) EstimateGas ¶
func (b *BuilderBackend) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
func (*BuilderBackend) FilterLogs ¶
func (*BuilderBackend) PendingCodeAt ¶
func (*BuilderBackend) PendingNonceAt ¶
func (*BuilderBackend) SendTransaction ¶
func (b *BuilderBackend) SendTransaction(ctx context.Context, tx *types.Transaction) error
func (*BuilderBackend) SubscribeFilterLogs ¶
func (*BuilderBackend) SuggestGasPrice ¶
func (*BuilderBackend) TransactionCount ¶
func (b *BuilderBackend) TransactionCount() int
type Challenge ¶
type Challenge struct { *ChallengeWatcher *BuilderBackend // contains filtered or unexported fields }
func NewChallenge ¶
func (*Challenge) BisectExecution ¶
func (*Challenge) OneStepProveExecution ¶
func (*Challenge) ProveContinuedExecution ¶
type ChallengeTurn ¶
type ChallengeTurn uint8
const ( NONE ChallengeTurn = iota ASSERTER_TURN CHALLENGER_TURN )
type ChallengeWatcher ¶
type ChallengeWatcher struct {
// contains filtered or unexported fields
}
func NewChallengeWatcher ¶
func (*ChallengeWatcher) Address ¶
func (c *ChallengeWatcher) Address() common.Address
func (*ChallengeWatcher) ChallengeState ¶
func (*ChallengeWatcher) Challenger ¶
func (*ChallengeWatcher) CurrentResponder ¶
func (*ChallengeWatcher) LookupBisection ¶
func (*ChallengeWatcher) Turn ¶
func (c *ChallengeWatcher) Turn(ctx context.Context) (ChallengeTurn, error)
type ConfirmType ¶
type ConfirmType uint8
const ( CONFIRM_TYPE_NONE ConfirmType = iota CONFIRM_TYPE_VALID CONFIRM_TYPE_INVALID )
type ConflictType ¶
type ConflictType uint8
const ( CONFLICT_TYPE_NONE ConflictType = iota CONFLICT_TYPE_FOUND CONFLICT_TYPE_INDETERMINATE CONFLICT_TYPE_INCOMPLETE )
type DeliveredInboxMessage ¶
type DeliveredInboxMessage struct { BlockHash common.Hash BeforeInboxAcc common.Hash Message inbox.InboxMessage }
func (*DeliveredInboxMessage) AfterInboxAcc ¶
func (d *DeliveredInboxMessage) AfterInboxAcc() common.Hash
func (*DeliveredInboxMessage) Block ¶
func (d *DeliveredInboxMessage) Block() *common.BlockId
type DeliveredInboxMessageList ¶
type DeliveredInboxMessageList []*DeliveredInboxMessage
func (DeliveredInboxMessageList) Len ¶
func (d DeliveredInboxMessageList) Len() int
func (DeliveredInboxMessageList) Less ¶
func (d DeliveredInboxMessageList) Less(i, j int) bool
func (DeliveredInboxMessageList) Swap ¶
func (d DeliveredInboxMessageList) Swap(i, j int)
type InboxMessageGetter ¶
type InboxMessageGetter interface {
// contains filtered or unexported methods
}
type NodeWatcher ¶
type NodeWatcher struct {
// contains filtered or unexported fields
}
func NewNodeWatcher ¶
func (*NodeWatcher) DeadlineBlock ¶
func (*NodeWatcher) StakerCount ¶
type RawTransaction ¶
type Rollup ¶
type Rollup struct { *RollupWatcher *BuilderBackend // contains filtered or unexported fields }
func (*Rollup) AddToDeposit ¶
func (*Rollup) ConfirmNextNode ¶
func (*Rollup) CreateChallenge ¶
func (*Rollup) ReduceDeposit ¶
func (*Rollup) RejectNextNode ¶
func (*Rollup) RemoveOldZombies ¶
func (*Rollup) RemoveZombie ¶
func (*Rollup) ReturnOldDeposit ¶
func (*Rollup) StakeOnExistingNode ¶
type RollupConfig ¶
type RollupWatcher ¶
type RollupWatcher struct {
// contains filtered or unexported fields
}
func NewRollupWatcher ¶
func (*RollupWatcher) ArbGasSpeedLimitPerBlock ¶
func (*RollupWatcher) ConfirmPeriodBlocks ¶
func (*RollupWatcher) CurrentRequiredStake ¶
func (*RollupWatcher) FirstUnresolvedNode ¶
func (*RollupWatcher) GetNode ¶
func (r *RollupWatcher) GetNode(ctx context.Context, node core.NodeID) (*NodeWatcher, error)
func (*RollupWatcher) LatestConfirmedNode ¶
func (*RollupWatcher) LatestNodeCreated ¶
func (*RollupWatcher) LookupChallengedNode ¶
func (*RollupWatcher) LookupCreation ¶
func (r *RollupWatcher) LookupCreation(ctx context.Context) (*ethbridgecontracts.RollupRollupCreated, error)
func (*RollupWatcher) LookupNode ¶
func (*RollupWatcher) LookupNodeChildren ¶
func (*RollupWatcher) MinimumAssertionPeriod ¶
func (*RollupWatcher) StakeToken ¶
func (*RollupWatcher) StakerCount ¶
func (*RollupWatcher) StakerInfo ¶
func (r *RollupWatcher) StakerInfo(ctx context.Context, staker common.Address) (*StakerInfo, error)
type StakerInfo ¶
type StandardInbox ¶
type StandardInbox struct { *StandardInboxWatcher // contains filtered or unexported fields }
func NewStandardInbox ¶
func NewStandardInbox(address ethcommon.Address, client ethutils.EthClient, auth *TransactAuth) (*StandardInbox, error)
func (*StandardInbox) SendL2MessageFromOrigin ¶
type StandardInboxWatcher ¶
type StandardInboxWatcher struct {
// contains filtered or unexported fields
}
func NewStandardInboxWatcher ¶
type TransactAuth ¶
func NewTransactAuth ¶
func NewTransactAuth(auth *bind.TransactOpts) *TransactAuth
type ValidatorUtils ¶
type ValidatorUtils struct {
// contains filtered or unexported fields
}
func NewValidatorUtils ¶
func (*ValidatorUtils) AreUnresolvedNodesLinear ¶
func (v *ValidatorUtils) AreUnresolvedNodesLinear(ctx context.Context) (bool, error)
func (*ValidatorUtils) CheckDecidableNextNode ¶
func (v *ValidatorUtils) CheckDecidableNextNode(ctx context.Context) (ConfirmType, error)
func (*ValidatorUtils) FindStakerConflict ¶
func (*ValidatorUtils) GetConfig ¶
func (v *ValidatorUtils) GetConfig(ctx context.Context) (*RollupConfig, error)
func (*ValidatorUtils) GetStakers ¶
func (*ValidatorUtils) LatestStaked ¶
func (*ValidatorUtils) RefundableStakers ¶
func (*ValidatorUtils) StakedNodes ¶
func (*ValidatorUtils) TimedOutChallenges ¶
type ValidatorWallet ¶
type ValidatorWallet struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator(address, rollupAddress ethcommon.Address, client ethutils.EthClient, auth *TransactAuth) (*ValidatorWallet, error)
func (*ValidatorWallet) Address ¶
func (v *ValidatorWallet) Address() common.Address
func (*ValidatorWallet) ExecuteTransactions ¶
func (v *ValidatorWallet) ExecuteTransactions(ctx context.Context, builder *BuilderBackend) (*types.Transaction, error)
func (*ValidatorWallet) From ¶
func (v *ValidatorWallet) From() common.Address
func (*ValidatorWallet) ReturnOldDeposits ¶
func (v *ValidatorWallet) ReturnOldDeposits(ctx context.Context, stakers []common.Address) (*types.Transaction, error)
func (*ValidatorWallet) RollupAddress ¶
func (v *ValidatorWallet) RollupAddress() common.Address
func (*ValidatorWallet) TimeoutChallenges ¶
func (v *ValidatorWallet) TimeoutChallenges(ctx context.Context, challenges []common.Address) (*types.Transaction, error)
Click to show internal directories.
Click to hide internal directories.