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 GenesisNetworkPolicyFactJSONMarshaler
- type GenesisNetworkPolicyFactJSONUnmarshaler
- type SuffrageCandidate
- type SuffrageCandidateFact
- func (fact SuffrageCandidateFact) Address() base.Address
- func (fact *SuffrageCandidateFact) DecodeJSON(b []byte, enc *jsonenc.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 *jsonenc.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 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
- type SuffrageWithdrawProcessor
- func (p *SuffrageWithdrawProcessor) Close() error
- func (p *SuffrageWithdrawProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (p *SuffrageWithdrawProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
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-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 WithdrawPreProcessedContextKey = util.ContextKey("withdraw-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 ¶
func NewGenesisNetworkPolicyFact ¶
func NewGenesisNetworkPolicyFact(policy base.NetworkPolicy) GenesisNetworkPolicyFact
func (*GenesisNetworkPolicyFact) DecodeJSON ¶
func (fact *GenesisNetworkPolicyFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (GenesisNetworkPolicyFact) IsValid ¶
func (fact GenesisNetworkPolicyFact) IsValid([]byte) error
func (GenesisNetworkPolicyFact) MarshalJSON ¶
func (fact GenesisNetworkPolicyFact) MarshalJSON() ([]byte, error)
func (GenesisNetworkPolicyFact) Policy ¶
func (fact GenesisNetworkPolicyFact) Policy() base.NetworkPolicy
type GenesisNetworkPolicyFactJSONMarshaler ¶
type GenesisNetworkPolicyFactJSONMarshaler struct { Policy base.NetworkPolicy `json:"policy"` base.BaseFactJSONMarshaler }
type GenesisNetworkPolicyFactJSONUnmarshaler ¶
type GenesisNetworkPolicyFactJSONUnmarshaler struct { base.BaseFactJSONUnmarshaler Policy json.RawMessage `json:"policy"` }
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 *jsonenc.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) Close ¶
func (s *SuffrageCandidatesStateValueMerger) Close() error
func (*SuffrageCandidatesStateValueMerger) Merge ¶
func (s *SuffrageCandidatesStateValueMerger) Merge(value base.StateValue, ops []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 *jsonenc.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 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 *jsonenc.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 *jsonenc.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) Close ¶
func (s *SuffrageJoinStateValueMerger) Close() error
func (*SuffrageJoinStateValueMerger) Merge ¶
func (s *SuffrageJoinStateValueMerger) Merge(value base.StateValue, ops []util.Hash) error
type SuffrageWithdrawProcessor ¶
type SuffrageWithdrawProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func NewSuffrageWithdrawProcessor ¶
func NewSuffrageWithdrawProcessor( height base.Height, getStateFunc base.GetStateFunc, newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc, newProcessConstraintFunc base.NewOperationProcessorProcessFunc, ) (*SuffrageWithdrawProcessor, error)
func (*SuffrageWithdrawProcessor) Close ¶
func (p *SuffrageWithdrawProcessor) Close() error
func (*SuffrageWithdrawProcessor) PreProcess ¶
func (p *SuffrageWithdrawProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( context.Context, base.OperationProcessReasonError, error, )
func (*SuffrageWithdrawProcessor) Process ¶
func (p *SuffrageWithdrawProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
Source Files ¶
- doc.go
- policy_network.go
- policy_network_json.go
- suffrage_candidate.go
- suffrage_candidate_json.go
- suffrage_candidate_processor.go
- suffrage_disjoin.go
- suffrage_disjoin_json.go
- suffrage_disjoin_processor.go
- suffrage_join.go
- suffrage_join_json.go
- suffrage_join_processor.go
- suffrage_withdraw_processor.go
Click to show internal directories.
Click to hide internal directories.