Documentation ¶
Index ¶
- Constants
- func InitiateChallenge(ctx context.Context, rollup arbbridge.ArbRollup, ...) ([]arbbridge.Event, error)
- func LogChallengeResult(err error)
- func MakeAssertion(ctx context.Context, rollup arbbridge.ArbRollup, prepared *PreparedAssertion, ...) ([]arbbridge.Event, error)
- type AnnouncerListener
- func (al *AnnouncerListener) AddedToChain(context.Context, []*structures.Node)
- func (al *AnnouncerListener) AdvancedKnownNode(context.Context, *nodegraph.StakedNodeGraph, *structures.Node)
- func (al *AnnouncerListener) AssertionPrepared(context.Context, valprotocol.ChainParams, *nodegraph.StakedNodeGraph, ...)
- func (al *AnnouncerListener) CompletedChallenge(ctx context.Context, ng *nodegraph.StakedNodeGraph, ...)
- func (al *AnnouncerListener) ConfirmableNodes(context.Context, *valprotocol.ConfirmOpportunity)
- func (al *AnnouncerListener) ConfirmedNode(ctx context.Context, ev arbbridge.ConfirmedEvent)
- func (al *AnnouncerListener) MessageDelivered(_ context.Context, ev arbbridge.MessageDeliveredEvent)
- func (al *AnnouncerListener) MootableStakes(context.Context, []nodegraph.RecoverStakeMootedParams)
- func (al *AnnouncerListener) OldStakes(context.Context, []nodegraph.RecoverStakeOldParams)
- func (al *AnnouncerListener) PrunableLeafs(context.Context, []valprotocol.PruneParams)
- func (al *AnnouncerListener) PrunedLeaf(ctx context.Context, ev arbbridge.PrunedEvent)
- func (al *AnnouncerListener) RestartingFromLatestValid(context.Context, *structures.Node)
- func (al *AnnouncerListener) ResumedChallenge(context.Context, *structures.MessageStack, *nodegraph.Challenge)
- func (al *AnnouncerListener) SawAssertion(ctx context.Context, ev arbbridge.AssertedEvent)
- func (al *AnnouncerListener) StakeCreated(ctx context.Context, ng *nodegraph.StakedNodeGraph, ...)
- func (al *AnnouncerListener) StakeMoved(ctx context.Context, ng *nodegraph.StakedNodeGraph, ...)
- func (al *AnnouncerListener) StakeRemoved(ctx context.Context, ev arbbridge.StakeRefundedEvent)
- func (al *AnnouncerListener) StartedChallenge(context.Context, *structures.MessageStack, *nodegraph.Challenge)
- type ChainListener
- type NoopListener
- func (nl *NoopListener) AddedToChain(context.Context, []*structures.Node)
- func (NoopListener) AdvancedKnownNode(context.Context, *nodegraph.StakedNodeGraph, *structures.Node)
- func (NoopListener) AssertionPrepared(context.Context, valprotocol.ChainParams, *nodegraph.StakedNodeGraph, ...)
- func (NoopListener) CompletedChallenge(context.Context, *nodegraph.StakedNodeGraph, arbbridge.ChallengeCompletedEvent)
- func (NoopListener) ConfirmableNodes(context.Context, *valprotocol.ConfirmOpportunity)
- func (NoopListener) ConfirmedNode(context.Context, arbbridge.ConfirmedEvent)
- func (NoopListener) MessageDelivered(context.Context, arbbridge.MessageDeliveredEvent)
- func (NoopListener) MootableStakes(context.Context, []nodegraph.RecoverStakeMootedParams)
- func (NoopListener) OldStakes(context.Context, []nodegraph.RecoverStakeOldParams)
- func (NoopListener) PrunableLeafs(context.Context, []valprotocol.PruneParams)
- func (NoopListener) PrunedLeaf(context.Context, arbbridge.PrunedEvent)
- func (nl *NoopListener) RestartingFromLatestValid(context.Context, *structures.Node)
- func (NoopListener) ResumedChallenge(context.Context, *structures.MessageStack, *nodegraph.Challenge)
- func (NoopListener) SawAssertion(context.Context, arbbridge.AssertedEvent)
- func (NoopListener) StakeCreated(context.Context, *nodegraph.StakedNodeGraph, arbbridge.StakeCreatedEvent)
- func (NoopListener) StakeMoved(context.Context, *nodegraph.StakedNodeGraph, arbbridge.StakeMovedEvent)
- func (NoopListener) StakeRemoved(context.Context, arbbridge.StakeRefundedEvent)
- func (NoopListener) StartedChallenge(context.Context, *structures.MessageStack, *nodegraph.Challenge)
- type PreparedAssertion
- type StakingKey
- type ValidatorChainListener
- func (lis *ValidatorChainListener) AddStaker(client arbbridge.ArbAuthClient) error
- func (lis *ValidatorChainListener) AddedToChain(context.Context, []*structures.Node)
- func (lis *ValidatorChainListener) AdvancedKnownNode(ctx context.Context, nodeGraph *nodegraph.StakedNodeGraph, ...)
- func (lis *ValidatorChainListener) AssertionPrepared(ctx context.Context, _ valprotocol.ChainParams, ...)
- func (lis *ValidatorChainListener) CompletedChallenge(ctx context.Context, nodeGraph *nodegraph.StakedNodeGraph, ...)
- func (lis *ValidatorChainListener) ConfirmableNodes(ctx context.Context, conf *valprotocol.ConfirmOpportunity)
- func (lis *ValidatorChainListener) ConfirmedNode(context.Context, arbbridge.ConfirmedEvent)
- func (lis *ValidatorChainListener) MessageDelivered(context.Context, arbbridge.MessageDeliveredEvent)
- func (lis *ValidatorChainListener) MootableStakes(ctx context.Context, params []nodegraph.RecoverStakeMootedParams)
- func (lis *ValidatorChainListener) OldStakes(ctx context.Context, params []nodegraph.RecoverStakeOldParams)
- func (lis *ValidatorChainListener) PrunableLeafs(ctx context.Context, params []valprotocol.PruneParams)
- func (lis *ValidatorChainListener) PrunedLeaf(context.Context, arbbridge.PrunedEvent)
- func (lis *ValidatorChainListener) RestartingFromLatestValid(context.Context, *structures.Node)
- func (lis *ValidatorChainListener) ResumedChallenge(ctx context.Context, msgStack *structures.MessageStack, ...)
- func (lis *ValidatorChainListener) SawAssertion(context.Context, arbbridge.AssertedEvent)
- func (lis *ValidatorChainListener) StakeCreated(ctx context.Context, nodeGraph *nodegraph.StakedNodeGraph, ...)
- func (lis *ValidatorChainListener) StakeMoved(ctx context.Context, nodeGraph *nodegraph.StakedNodeGraph, ...)
- func (lis *ValidatorChainListener) StakeRemoved(context.Context, arbbridge.StakeRefundedEvent)
- func (lis *ValidatorChainListener) StartedChallenge(ctx context.Context, msgStack *structures.MessageStack, ...)
Constants ¶
View Source
const (
PruneSizeLimit = 120
)
Variables ¶
This section is empty.
Functions ¶
func InitiateChallenge ¶
func LogChallengeResult ¶
func LogChallengeResult(err error)
Types ¶
type AnnouncerListener ¶
type AnnouncerListener struct {
Prefix string
}
func (*AnnouncerListener) AddedToChain ¶
func (al *AnnouncerListener) AddedToChain(context.Context, []*structures.Node)
func (*AnnouncerListener) AdvancedKnownNode ¶
func (al *AnnouncerListener) AdvancedKnownNode(context.Context, *nodegraph.StakedNodeGraph, *structures.Node)
func (*AnnouncerListener) AssertionPrepared ¶
func (al *AnnouncerListener) AssertionPrepared( context.Context, valprotocol.ChainParams, *nodegraph.StakedNodeGraph, *structures.Node, *PreparedAssertion, )
func (*AnnouncerListener) CompletedChallenge ¶
func (al *AnnouncerListener) CompletedChallenge( ctx context.Context, ng *nodegraph.StakedNodeGraph, event arbbridge.ChallengeCompletedEvent, )
func (*AnnouncerListener) ConfirmableNodes ¶
func (al *AnnouncerListener) ConfirmableNodes(context.Context, *valprotocol.ConfirmOpportunity)
func (*AnnouncerListener) ConfirmedNode ¶
func (al *AnnouncerListener) ConfirmedNode(ctx context.Context, ev arbbridge.ConfirmedEvent)
func (*AnnouncerListener) MessageDelivered ¶
func (al *AnnouncerListener) MessageDelivered(_ context.Context, ev arbbridge.MessageDeliveredEvent)
func (*AnnouncerListener) MootableStakes ¶
func (al *AnnouncerListener) MootableStakes(context.Context, []nodegraph.RecoverStakeMootedParams)
func (*AnnouncerListener) OldStakes ¶
func (al *AnnouncerListener) OldStakes(context.Context, []nodegraph.RecoverStakeOldParams)
func (*AnnouncerListener) PrunableLeafs ¶
func (al *AnnouncerListener) PrunableLeafs(context.Context, []valprotocol.PruneParams)
func (*AnnouncerListener) PrunedLeaf ¶
func (al *AnnouncerListener) PrunedLeaf(ctx context.Context, ev arbbridge.PrunedEvent)
func (*AnnouncerListener) RestartingFromLatestValid ¶
func (al *AnnouncerListener) RestartingFromLatestValid(context.Context, *structures.Node)
func (*AnnouncerListener) ResumedChallenge ¶
func (al *AnnouncerListener) ResumedChallenge( context.Context, *structures.MessageStack, *nodegraph.Challenge)
func (*AnnouncerListener) SawAssertion ¶
func (al *AnnouncerListener) SawAssertion(ctx context.Context, ev arbbridge.AssertedEvent)
func (*AnnouncerListener) StakeCreated ¶
func (al *AnnouncerListener) StakeCreated(ctx context.Context, ng *nodegraph.StakedNodeGraph, ev arbbridge.StakeCreatedEvent)
func (*AnnouncerListener) StakeMoved ¶
func (al *AnnouncerListener) StakeMoved(ctx context.Context, ng *nodegraph.StakedNodeGraph, ev arbbridge.StakeMovedEvent)
func (*AnnouncerListener) StakeRemoved ¶
func (al *AnnouncerListener) StakeRemoved(ctx context.Context, ev arbbridge.StakeRefundedEvent)
func (*AnnouncerListener) StartedChallenge ¶
func (al *AnnouncerListener) StartedChallenge( context.Context, *structures.MessageStack, *nodegraph.Challenge)
type ChainListener ¶
type ChainListener interface { // This function is called when a ChainListener is added to a ChainObserver AddedToChain(context.Context, []*structures.Node) // This function is called every time ChainObserver starts running. This // includes both the initial run, and after a reorg. The third parameter // is the current calculated valid node RestartingFromLatestValid(context.Context, *structures.Node) StakeCreated(context.Context, *nodegraph.StakedNodeGraph, arbbridge.StakeCreatedEvent) StakeRemoved(context.Context, arbbridge.StakeRefundedEvent) StakeMoved(context.Context, *nodegraph.StakedNodeGraph, arbbridge.StakeMovedEvent) StartedChallenge( context.Context, *structures.MessageStack, *nodegraph.Challenge) ResumedChallenge( context.Context, *structures.MessageStack, *nodegraph.Challenge) CompletedChallenge(context.Context, *nodegraph.StakedNodeGraph, arbbridge.ChallengeCompletedEvent) SawAssertion(context.Context, arbbridge.AssertedEvent) ConfirmedNode(context.Context, arbbridge.ConfirmedEvent) PrunedLeaf(context.Context, arbbridge.PrunedEvent) MessageDelivered(context.Context, arbbridge.MessageDeliveredEvent) AssertionPrepared( context.Context, valprotocol.ChainParams, *nodegraph.StakedNodeGraph, *structures.Node, *PreparedAssertion) ConfirmableNodes(context.Context, *valprotocol.ConfirmOpportunity) PrunableLeafs(context.Context, []valprotocol.PruneParams) MootableStakes(context.Context, []nodegraph.RecoverStakeMootedParams) OldStakes(context.Context, []nodegraph.RecoverStakeOldParams) AdvancedKnownNode(context.Context, *nodegraph.StakedNodeGraph, *structures.Node) }
type NoopListener ¶
type NoopListener struct{}
func (*NoopListener) AddedToChain ¶
func (nl *NoopListener) AddedToChain(context.Context, []*structures.Node)
func (NoopListener) AdvancedKnownNode ¶
func (NoopListener) AdvancedKnownNode(context.Context, *nodegraph.StakedNodeGraph, *structures.Node)
func (NoopListener) AssertionPrepared ¶
func (NoopListener) AssertionPrepared( context.Context, valprotocol.ChainParams, *nodegraph.StakedNodeGraph, *structures.Node, *PreparedAssertion)
func (NoopListener) CompletedChallenge ¶
func (NoopListener) CompletedChallenge(context.Context, *nodegraph.StakedNodeGraph, arbbridge.ChallengeCompletedEvent)
func (NoopListener) ConfirmableNodes ¶
func (NoopListener) ConfirmableNodes(context.Context, *valprotocol.ConfirmOpportunity)
func (NoopListener) ConfirmedNode ¶
func (NoopListener) ConfirmedNode(context.Context, arbbridge.ConfirmedEvent)
func (NoopListener) MessageDelivered ¶
func (NoopListener) MessageDelivered(context.Context, arbbridge.MessageDeliveredEvent)
func (NoopListener) MootableStakes ¶
func (NoopListener) MootableStakes(context.Context, []nodegraph.RecoverStakeMootedParams)
func (NoopListener) OldStakes ¶
func (NoopListener) OldStakes(context.Context, []nodegraph.RecoverStakeOldParams)
func (NoopListener) PrunableLeafs ¶
func (NoopListener) PrunableLeafs(context.Context, []valprotocol.PruneParams)
func (NoopListener) PrunedLeaf ¶
func (NoopListener) PrunedLeaf(context.Context, arbbridge.PrunedEvent)
func (*NoopListener) RestartingFromLatestValid ¶
func (nl *NoopListener) RestartingFromLatestValid(context.Context, *structures.Node)
func (NoopListener) ResumedChallenge ¶
func (NoopListener) ResumedChallenge( context.Context, *structures.MessageStack, *nodegraph.Challenge)
func (NoopListener) SawAssertion ¶
func (NoopListener) SawAssertion(context.Context, arbbridge.AssertedEvent)
func (NoopListener) StakeCreated ¶
func (NoopListener) StakeCreated(context.Context, *nodegraph.StakedNodeGraph, arbbridge.StakeCreatedEvent)
func (NoopListener) StakeMoved ¶
func (NoopListener) StakeMoved(context.Context, *nodegraph.StakedNodeGraph, arbbridge.StakeMovedEvent)
func (NoopListener) StakeRemoved ¶
func (NoopListener) StakeRemoved(context.Context, arbbridge.StakeRefundedEvent)
func (NoopListener) StartedChallenge ¶
func (NoopListener) StartedChallenge( context.Context, *structures.MessageStack, *nodegraph.Challenge)
type PreparedAssertion ¶
type PreparedAssertion struct { Prev *structures.Node BeforeState *valprotocol.VMProtoData Params *valprotocol.AssertionParams AssertionStub *valprotocol.ExecutionAssertionStub Assertion *protocol.ExecutionAssertion Machine machine.Machine ValidBlock *common.BlockId }
func (*PreparedAssertion) Clone ¶
func (pa *PreparedAssertion) Clone() *PreparedAssertion
func (*PreparedAssertion) GetAssertionParams ¶
func (prep *PreparedAssertion) GetAssertionParams() [8][32]byte
func (*PreparedAssertion) GetAssertionParams2 ¶
func (prep *PreparedAssertion) GetAssertionParams2() [5]*big.Int
func (*PreparedAssertion) String ¶
func (pa *PreparedAssertion) String() string
type StakingKey ¶
type StakingKey struct {
// contains filtered or unexported fields
}
type ValidatorChainListener ¶
func (*ValidatorChainListener) AddStaker ¶
func (lis *ValidatorChainListener) AddStaker(client arbbridge.ArbAuthClient) error
func (*ValidatorChainListener) AddedToChain ¶
func (lis *ValidatorChainListener) AddedToChain(context.Context, []*structures.Node)
func (*ValidatorChainListener) AdvancedKnownNode ¶
func (lis *ValidatorChainListener) AdvancedKnownNode( ctx context.Context, nodeGraph *nodegraph.StakedNodeGraph, node *structures.Node)
func (*ValidatorChainListener) AssertionPrepared ¶
func (lis *ValidatorChainListener) AssertionPrepared( ctx context.Context, _ valprotocol.ChainParams, nodeGraph *nodegraph.StakedNodeGraph, nodeLocation *structures.Node, prepared *PreparedAssertion, )
func (*ValidatorChainListener) CompletedChallenge ¶
func (lis *ValidatorChainListener) CompletedChallenge( ctx context.Context, nodeGraph *nodegraph.StakedNodeGraph, ev arbbridge.ChallengeCompletedEvent, )
func (*ValidatorChainListener) ConfirmableNodes ¶
func (lis *ValidatorChainListener) ConfirmableNodes(ctx context.Context, conf *valprotocol.ConfirmOpportunity)
func (*ValidatorChainListener) ConfirmedNode ¶
func (lis *ValidatorChainListener) ConfirmedNode(context.Context, arbbridge.ConfirmedEvent)
func (*ValidatorChainListener) MessageDelivered ¶
func (lis *ValidatorChainListener) MessageDelivered(context.Context, arbbridge.MessageDeliveredEvent)
func (*ValidatorChainListener) MootableStakes ¶
func (lis *ValidatorChainListener) MootableStakes(ctx context.Context, params []nodegraph.RecoverStakeMootedParams)
func (*ValidatorChainListener) OldStakes ¶
func (lis *ValidatorChainListener) OldStakes(ctx context.Context, params []nodegraph.RecoverStakeOldParams)
func (*ValidatorChainListener) PrunableLeafs ¶
func (lis *ValidatorChainListener) PrunableLeafs(ctx context.Context, params []valprotocol.PruneParams)
func (*ValidatorChainListener) PrunedLeaf ¶
func (lis *ValidatorChainListener) PrunedLeaf(context.Context, arbbridge.PrunedEvent)
func (*ValidatorChainListener) RestartingFromLatestValid ¶
func (lis *ValidatorChainListener) RestartingFromLatestValid(context.Context, *structures.Node)
func (*ValidatorChainListener) ResumedChallenge ¶
func (lis *ValidatorChainListener) ResumedChallenge( ctx context.Context, msgStack *structures.MessageStack, chal *nodegraph.Challenge)
func (*ValidatorChainListener) SawAssertion ¶
func (lis *ValidatorChainListener) SawAssertion(context.Context, arbbridge.AssertedEvent)
func (*ValidatorChainListener) StakeCreated ¶
func (lis *ValidatorChainListener) StakeCreated( ctx context.Context, nodeGraph *nodegraph.StakedNodeGraph, ev arbbridge.StakeCreatedEvent, )
func (*ValidatorChainListener) StakeMoved ¶
func (lis *ValidatorChainListener) StakeMoved( ctx context.Context, nodeGraph *nodegraph.StakedNodeGraph, ev arbbridge.StakeMovedEvent, )
func (*ValidatorChainListener) StakeRemoved ¶
func (lis *ValidatorChainListener) StakeRemoved(context.Context, arbbridge.StakeRefundedEvent)
func (*ValidatorChainListener) StartedChallenge ¶
func (lis *ValidatorChainListener) StartedChallenge( ctx context.Context, msgStack *structures.MessageStack, chal *nodegraph.Challenge)
Click to show internal directories.
Click to hide internal directories.