Documentation ¶
Overview ¶
Package isaacoperation provides the base operations.
Index ¶
- Variables
- type GenesisNetworkPolicy
- func (op GenesisNetworkPolicy) IsValid(networkID []byte) error
- func (GenesisNetworkPolicy) PreProcess(ctx context.Context, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (op GenesisNetworkPolicy) Process(context.Context, base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type GenesisNetworkPolicyFact
- type NetworkPolicy
- type NetworkPolicyFact
- type NetworkPolicyProcessor
- func (p *NetworkPolicyProcessor) Close() error
- func (p *NetworkPolicyProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (p *NetworkPolicyProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type SuffrageCandidate
- type SuffrageCandidateFact
- func (fact SuffrageCandidateFact) Address() base.Address
- func (fact *SuffrageCandidateFact) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (fact SuffrageCandidateFact) IsValid([]byte) error
- func (fact SuffrageCandidateFact) MarshalJSON() ([]byte, error)
- func (fact SuffrageCandidateFact) Publickey() base.Publickey
- type SuffrageCandidateProcessor
- func (p *SuffrageCandidateProcessor) Close() error
- func (p *SuffrageCandidateProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (p *SuffrageCandidateProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type SuffrageCandidatesStateValueMerger
- type SuffrageDisjoin
- type SuffrageDisjoinFact
- func (fact *SuffrageDisjoinFact) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (fact SuffrageDisjoinFact) IsValid([]byte) error
- func (fact SuffrageDisjoinFact) MarshalJSON() ([]byte, error)
- func (fact SuffrageDisjoinFact) Node() base.Address
- func (fact SuffrageDisjoinFact) Start() base.Height
- type SuffrageDisjoinProcessor
- func (p *SuffrageDisjoinProcessor) Close() error
- func (p *SuffrageDisjoinProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (p *SuffrageDisjoinProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type SuffrageExpelProcessor
- func (p *SuffrageExpelProcessor) Close() error
- func (p *SuffrageExpelProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (p *SuffrageExpelProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type SuffrageGenesisJoin
- func (op SuffrageGenesisJoin) IsValid(networkID []byte) error
- func (SuffrageGenesisJoin) PreProcess(ctx context.Context, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (op SuffrageGenesisJoin) Process(context.Context, base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type SuffrageGenesisJoinFact
- type SuffrageJoin
- type SuffrageJoinFact
- type SuffrageJoinProcessor
- func (p *SuffrageJoinProcessor) Close() error
- func (p *SuffrageJoinProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (p *SuffrageJoinProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type SuffrageJoinStateValueMerger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GenesisNetworkPolicyFactHint = hint.MustNewHint("genesis-network-policy-fact-v0.0.1") GenesisNetworkPolicyHint = hint.MustNewHint("genesis-network-policy-operation-v0.0.1") NetworkPolicyFactHint = hint.MustNewHint("network-policy-fact-v0.0.1") NetworkPolicyHint = hint.MustNewHint("network-policy-operation-v0.0.1") )
View Source
var ( SuffrageCandidateFactHint = hint.MustNewHint("suffrage-candidate-fact-v0.0.1") SuffrageCandidateHint = hint.MustNewHint("suffrage-candidate-operation-v0.0.1") )
View Source
var ( SuffrageDisjoinFactHint = hint.MustNewHint("suffrage-disjoin-fact-v0.0.1") SuffrageDisjoinHint = hint.MustNewHint("suffrage-disjoin-operation-v0.0.1") )
View Source
var ( SuffrageJoinFactHint = hint.MustNewHint("suffrage-join-fact-v0.0.1") SuffrageJoinHint = hint.MustNewHint("suffrage-join-operation-v0.0.1") SuffrageGenesisJoinFactHint = hint.MustNewHint("suffrage-genesis-join-fact-v0.0.1") SuffrageGenesisJoinHint = hint.MustNewHint("suffrage-genesis-join-operation-v0.0.1") )
View Source
var ExpelPreProcessedContextKey = util.ContextKey("expel-preprocessed")
Functions ¶
This section is empty.
Types ¶
type GenesisNetworkPolicy ¶
type GenesisNetworkPolicy struct {
base.BaseOperation
}
GenesisNetworkPolicy is only for used for genesis block
func NewGenesisNetworkPolicy ¶
func NewGenesisNetworkPolicy(fact GenesisNetworkPolicyFact) GenesisNetworkPolicy
func (GenesisNetworkPolicy) IsValid ¶
func (op GenesisNetworkPolicy) IsValid(networkID []byte) error
func (GenesisNetworkPolicy) PreProcess ¶
func (GenesisNetworkPolicy) PreProcess(ctx context.Context, getStateFunc base.GetStateFunc) ( context.Context, base.OperationProcessReasonError, error, )
func (GenesisNetworkPolicy) Process ¶
func (op GenesisNetworkPolicy) Process(context.Context, base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type GenesisNetworkPolicyFact ¶
type GenesisNetworkPolicyFact struct {
// contains filtered or unexported fields
}
func NewGenesisNetworkPolicyFact ¶
func NewGenesisNetworkPolicyFact(policy base.NetworkPolicy) GenesisNetworkPolicyFact
func (*GenesisNetworkPolicyFact) DecodeJSON ¶
func (GenesisNetworkPolicyFact) IsValid ¶
func (fact GenesisNetworkPolicyFact) IsValid([]byte) error
func (GenesisNetworkPolicyFact) MarshalJSON ¶
func (GenesisNetworkPolicyFact) Policy ¶
func (fact GenesisNetworkPolicyFact) Policy() base.NetworkPolicy
type NetworkPolicy ¶
type NetworkPolicy struct {
base.BaseNodeOperation
}
func NewNetworkPolicy ¶
func NewNetworkPolicy(fact NetworkPolicyFact) NetworkPolicy
func (NetworkPolicy) IsValid ¶
func (op NetworkPolicy) IsValid(networkID []byte) error
type NetworkPolicyFact ¶
type NetworkPolicyFact struct {
// contains filtered or unexported fields
}
func NewNetworkPolicyFact ¶
func NewNetworkPolicyFact(token base.Token, policy base.NetworkPolicy) NetworkPolicyFact
func (*NetworkPolicyFact) DecodeJSON ¶
func (NetworkPolicyFact) IsValid ¶
func (fact NetworkPolicyFact) IsValid([]byte) error
func (NetworkPolicyFact) MarshalJSON ¶
func (NetworkPolicyFact) Policy ¶
func (fact NetworkPolicyFact) Policy() base.NetworkPolicy
type NetworkPolicyProcessor ¶
type NetworkPolicyProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func NewNetworkPolicyProcessor ¶
func NewNetworkPolicyProcessor( height base.Height, threshold base.Threshold, getStateFunc base.GetStateFunc, newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc, newProcessConstraintFunc base.NewOperationProcessorProcessFunc, ) (*NetworkPolicyProcessor, error)
func (*NetworkPolicyProcessor) Close ¶
func (p *NetworkPolicyProcessor) Close() error
func (*NetworkPolicyProcessor) PreProcess ¶
func (p *NetworkPolicyProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( context.Context, base.OperationProcessReasonError, error, )
func (*NetworkPolicyProcessor) Process ¶
func (p *NetworkPolicyProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type SuffrageCandidate ¶
type SuffrageCandidate struct {
base.BaseNodeOperation
}
func NewSuffrageCandidate ¶
func NewSuffrageCandidate(fact SuffrageCandidateFact) SuffrageCandidate
func (SuffrageCandidate) IsValid ¶
func (op SuffrageCandidate) IsValid(networkID []byte) error
type SuffrageCandidateFact ¶
func (SuffrageCandidateFact) Address ¶
func (fact SuffrageCandidateFact) Address() base.Address
func (*SuffrageCandidateFact) DecodeJSON ¶
func (fact *SuffrageCandidateFact) DecodeJSON(b []byte, enc encoder.Encoder) error
func (SuffrageCandidateFact) IsValid ¶
func (fact SuffrageCandidateFact) IsValid([]byte) error
func (SuffrageCandidateFact) MarshalJSON ¶
func (fact SuffrageCandidateFact) MarshalJSON() ([]byte, error)
func (SuffrageCandidateFact) Publickey ¶
func (fact SuffrageCandidateFact) Publickey() base.Publickey
type SuffrageCandidateProcessor ¶
type SuffrageCandidateProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func NewSuffrageCandidateProcessor ¶
func NewSuffrageCandidateProcessor( height base.Height, getStateFunc base.GetStateFunc, newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc, newProcessConstraintFunc base.NewOperationProcessorProcessFunc, lifespan base.Height, ) (*SuffrageCandidateProcessor, error)
func (*SuffrageCandidateProcessor) Close ¶
func (p *SuffrageCandidateProcessor) Close() error
func (*SuffrageCandidateProcessor) PreProcess ¶
func (p *SuffrageCandidateProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( context.Context, base.OperationProcessReasonError, error, )
func (*SuffrageCandidateProcessor) Process ¶
func (p *SuffrageCandidateProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type SuffrageCandidatesStateValueMerger ¶
type SuffrageCandidatesStateValueMerger struct { *base.BaseStateValueMerger // contains filtered or unexported fields }
func NewSuffrageCandidatesStateValueMerger ¶
func NewSuffrageCandidatesStateValueMerger(height base.Height, st base.State) *SuffrageCandidatesStateValueMerger
func (*SuffrageCandidatesStateValueMerger) CloseValue ¶
func (s *SuffrageCandidatesStateValueMerger) CloseValue() (base.State, error)
func (*SuffrageCandidatesStateValueMerger) Merge ¶
func (s *SuffrageCandidatesStateValueMerger) Merge(value base.StateValue, op util.Hash) error
type SuffrageDisjoin ¶
type SuffrageDisjoin struct {
base.BaseNodeOperation
}
func NewSuffrageDisjoin ¶
func NewSuffrageDisjoin(fact SuffrageDisjoinFact) SuffrageDisjoin
func (SuffrageDisjoin) IsValid ¶
func (op SuffrageDisjoin) IsValid(networkID []byte) error
type SuffrageDisjoinFact ¶
func NewSuffrageDisjoinFact ¶
func (*SuffrageDisjoinFact) DecodeJSON ¶
func (fact *SuffrageDisjoinFact) DecodeJSON(b []byte, enc encoder.Encoder) error
func (SuffrageDisjoinFact) IsValid ¶
func (fact SuffrageDisjoinFact) IsValid([]byte) error
func (SuffrageDisjoinFact) MarshalJSON ¶
func (fact SuffrageDisjoinFact) MarshalJSON() ([]byte, error)
func (SuffrageDisjoinFact) Node ¶
func (fact SuffrageDisjoinFact) Node() base.Address
func (SuffrageDisjoinFact) Start ¶
func (fact SuffrageDisjoinFact) Start() base.Height
type SuffrageDisjoinProcessor ¶
type SuffrageDisjoinProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func NewSuffrageDisjoinProcessor ¶
func NewSuffrageDisjoinProcessor( height base.Height, getStateFunc base.GetStateFunc, newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc, newProcessConstraintFunc base.NewOperationProcessorProcessFunc, ) (*SuffrageDisjoinProcessor, error)
func (*SuffrageDisjoinProcessor) Close ¶
func (p *SuffrageDisjoinProcessor) Close() error
func (*SuffrageDisjoinProcessor) PreProcess ¶
func (p *SuffrageDisjoinProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( context.Context, base.OperationProcessReasonError, error, )
func (*SuffrageDisjoinProcessor) Process ¶
func (p *SuffrageDisjoinProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type SuffrageExpelProcessor ¶
type SuffrageExpelProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func NewSuffrageExpelProcessor ¶
func NewSuffrageExpelProcessor( height base.Height, getStateFunc base.GetStateFunc, newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc, newProcessConstraintFunc base.NewOperationProcessorProcessFunc, ) (*SuffrageExpelProcessor, error)
func (*SuffrageExpelProcessor) Close ¶
func (p *SuffrageExpelProcessor) Close() error
func (*SuffrageExpelProcessor) PreProcess ¶
func (p *SuffrageExpelProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( context.Context, base.OperationProcessReasonError, error, )
func (*SuffrageExpelProcessor) Process ¶
func (p *SuffrageExpelProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type SuffrageGenesisJoin ¶
type SuffrageGenesisJoin struct {
base.BaseOperation
}
SuffrageGenesisJoin is only for used for genesis block
func NewSuffrageGenesisJoin ¶
func NewSuffrageGenesisJoin(fact SuffrageGenesisJoinFact) SuffrageGenesisJoin
func (SuffrageGenesisJoin) IsValid ¶
func (op SuffrageGenesisJoin) IsValid(networkID []byte) error
func (SuffrageGenesisJoin) PreProcess ¶
func (SuffrageGenesisJoin) PreProcess( ctx context.Context, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (SuffrageGenesisJoin) Process ¶
func (op SuffrageGenesisJoin) Process(context.Context, base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type SuffrageGenesisJoinFact ¶
func NewSuffrageGenesisJoinFact ¶
func NewSuffrageGenesisJoinFact( nodes []base.Node, networkID base.NetworkID, ) SuffrageGenesisJoinFact
func (*SuffrageGenesisJoinFact) DecodeJSON ¶
func (fact *SuffrageGenesisJoinFact) DecodeJSON(b []byte, enc encoder.Encoder) error
func (SuffrageGenesisJoinFact) IsValid ¶
func (fact SuffrageGenesisJoinFact) IsValid(networkID []byte) error
func (SuffrageGenesisJoinFact) MarshalJSON ¶
func (fact SuffrageGenesisJoinFact) MarshalJSON() ([]byte, error)
func (SuffrageGenesisJoinFact) Nodes ¶
func (fact SuffrageGenesisJoinFact) Nodes() []base.Node
type SuffrageJoin ¶
type SuffrageJoin struct {
base.BaseNodeOperation
}
func NewSuffrageJoin ¶
func NewSuffrageJoin(fact SuffrageJoinFact) SuffrageJoin
func (SuffrageJoin) IsValid ¶
func (op SuffrageJoin) IsValid(networkID []byte) error
type SuffrageJoinFact ¶
func NewSuffrageJoinFact ¶
func (SuffrageJoinFact) Candidate ¶
func (fact SuffrageJoinFact) Candidate() base.Address
func (*SuffrageJoinFact) DecodeJSON ¶
func (fact *SuffrageJoinFact) DecodeJSON(b []byte, enc encoder.Encoder) error
func (SuffrageJoinFact) IsValid ¶
func (fact SuffrageJoinFact) IsValid([]byte) error
func (SuffrageJoinFact) MarshalJSON ¶
func (fact SuffrageJoinFact) MarshalJSON() ([]byte, error)
func (SuffrageJoinFact) Start ¶
func (fact SuffrageJoinFact) Start() base.Height
type SuffrageJoinProcessor ¶
type SuffrageJoinProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func NewSuffrageJoinProcessor ¶
func NewSuffrageJoinProcessor( height base.Height, threshold base.Threshold, getStateFunc base.GetStateFunc, newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc, newProcessConstraintFunc base.NewOperationProcessorProcessFunc, ) (*SuffrageJoinProcessor, error)
func (*SuffrageJoinProcessor) Close ¶
func (p *SuffrageJoinProcessor) Close() error
func (*SuffrageJoinProcessor) PreProcess ¶
func (p *SuffrageJoinProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( context.Context, base.OperationProcessReasonError, error, )
func (*SuffrageJoinProcessor) Process ¶
func (p *SuffrageJoinProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type SuffrageJoinStateValueMerger ¶
type SuffrageJoinStateValueMerger struct { *base.BaseStateValueMerger // contains filtered or unexported fields }
func NewSuffrageJoinStateValueMerger ¶
func NewSuffrageJoinStateValueMerger(height base.Height, st base.State) *SuffrageJoinStateValueMerger
func (*SuffrageJoinStateValueMerger) CloseValue ¶
func (s *SuffrageJoinStateValueMerger) CloseValue() (base.State, error)
func (*SuffrageJoinStateValueMerger) Merge ¶
func (s *SuffrageJoinStateValueMerger) Merge(value base.StateValue, op util.Hash) error
Source Files ¶
- doc.go
- policy_network.go
- policy_network_json.go
- policy_network_processor.go
- suffrage_candidate.go
- suffrage_candidate_json.go
- suffrage_candidate_processor.go
- suffrage_disjoin.go
- suffrage_disjoin_json.go
- suffrage_disjoin_processor.go
- suffrage_expel_processor.go
- suffrage_join.go
- suffrage_join_json.go
- suffrage_join_processor.go
Click to show internal directories.
Click to hide internal directories.