Documentation ¶
Index ¶
- Constants
- func ConsensusContext(ctx context.Context) context.Context
- func ECDSAPublicKeyAsPublicKeyStore(pk crypto.PublicKey) cryptkit.PublicKeyStore
- func ECDSAPublicKeyAsSignatureKeyHolder(pk crypto.PublicKey, kp cryptography.KeyProcessor) cryptkit.SigningKeyHolder
- func ECDSAPublicKeyOfNode(n nodeinfo.NetworkNode) *ecdsa.PublicKey
- func ECDSAPublicKeyOfProfile(nip profiles.StaticProfile) crypto.PublicKey
- func NewCensus(localNode profiles.StaticProfile, nodes []profiles.StaticProfile, ...) *censusimpl.PrimingCensusTemplate
- func NewCensusForJoiner(localNode profiles.StaticProfile, vc census.VersionedRegistries, ...) *censusimpl.PrimingCensusTemplate
- func NewChronicles(pf profiles.Factory) censusimpl.LocalConsensusChronicles
- func NewNodeProfileFactory(keyProcessor cryptography.KeyProcessor) profiles.Factory
- func NewPulseData(p pulsar.PulsePacket) pulse.Data
- func NewPulseDigest(data pulse.Data) cryptkit.Digest
- func PacketEarlyLogger(ctx context.Context, senderAddr string) (context.Context, log.Logger)
- func PacketLateLogger(ctx context.Context, parser transport.PacketParser) (context.Context, log.Logger)
- func ReportContext(report api.UpstreamReport) context.Context
- type BeatChanger
- type Candidate
- type ConsensusConfiguration
- type ConsensusControlFeeder
- func (cf *ConsensusControlFeeder) CanFastForwardPulse(expected, received pulse.Number, lastPulseData pulse.Data) bool
- func (cf *ConsensusControlFeeder) CanStopOnHastyPulse(pn pulse.Number, expectedEndOfConsensus time.Time) bool
- func (cf *ConsensusControlFeeder) GetRequiredGracefulLeave() (bool, uint32)
- func (cf *ConsensusControlFeeder) GetRequiredPowerLevel() power.Request
- func (cf *ConsensusControlFeeder) OnAppliedGracefulLeave(exitCode uint32, effectiveSince pulse.Number)
- func (cf *ConsensusControlFeeder) OnAppliedMembershipProfile(mode member.OpMode, pw member.Power, effectiveSince pulse.Number)
- func (cf *ConsensusControlFeeder) OnPulseDetected()
- func (cf *ConsensusControlFeeder) ResumeTraffic()
- func (cf *ConsensusControlFeeder) SetRequiredGracefulLeave(reason uint32)
- func (cf *ConsensusControlFeeder) SetRequiredPowerLevel(level capacity.Level)
- func (cf *ConsensusControlFeeder) SetTrafficLimit(level capacity.Level, duration time.Duration)
- type ConsensusDigestFactory
- func (cdf *ConsensusDigestFactory) CreateAnnouncementDigester() cryptkit.ForkingDigester
- func (cdf *ConsensusDigestFactory) CreateDataDigester() cryptkit.DataDigester
- func (cdf *ConsensusDigestFactory) CreateForkingDigester() cryptkit.ForkingDigester
- func (cdf *ConsensusDigestFactory) CreateGlobulaStateDigester() transport.StateDigester
- func (cdf *ConsensusDigestFactory) CreatePairDigester() cryptkit.PairDigester
- func (cdf *ConsensusDigestFactory) CreateSequenceDigester() cryptkit.SequenceDigester
- type ControlFeederInterceptor
- type DatagramHandler
- type ECDSASignatureVerifierFactory
- type EphemeralControlFeeder
- func (f *EphemeralControlFeeder) CanFastForwardPulse(expected, received pulse.Number, lastPulseData pulse.Data) bool
- func (f *EphemeralControlFeeder) CanStopEphemeralByCensus(expected census.Expected) bool
- func (f *EphemeralControlFeeder) CanStopEphemeralByPulse(pd pulse.Data, localNode profiles.ActiveNode) bool
- func (f *EphemeralControlFeeder) CanStopOnHastyPulse(pn pulse.Number, expectedEndOfConsensus time.Time) bool
- func (f *EphemeralControlFeeder) CreateEphemeralPulsePacket(census census.Operational) proofs.OriginalPulsarPacket
- func (f *EphemeralControlFeeder) EphemeralConsensusFinished(isNextEphemeral bool, roundStartedAt time.Time, expected census.Operational)
- func (f *EphemeralControlFeeder) GetEphemeralTimings(config api.LocalNodeConfiguration) api.RoundTimings
- func (f *EphemeralControlFeeder) GetMaxDuration() time.Duration
- func (f *EphemeralControlFeeder) GetMinDuration() time.Duration
- func (f *EphemeralControlFeeder) IsActive() bool
- func (f *EphemeralControlFeeder) OnEphemeralCancelled()
- func (f *EphemeralControlFeeder) OnNonEphemeralPacket(ctx context.Context, parser transport.PacketParser, inbound endpoints.Inbound) error
- type EphemeralController
- type InternalControlFeederAdapter
- func (cf *InternalControlFeederAdapter) GetRequiredGracefulLeave() (bool, uint32)
- func (cf *InternalControlFeederAdapter) GetRequiredPowerLevel() power.Request
- func (cf *InternalControlFeederAdapter) OnAppliedMembershipProfile(mode member.OpMode, pw member.Power, effectiveSince pulse.Number)
- func (cf *InternalControlFeederAdapter) OnPulseDetected()
- type LocalNodeConfiguration
- func (c *LocalNodeConfiguration) GetConsensusTimings(nextPulseDelta uint16) api.RoundTimings
- func (c *LocalNodeConfiguration) GetEphemeralTimings(nextPulseDelta uint16) api.RoundTimings
- func (c *LocalNodeConfiguration) GetNodeCountHint() int
- func (c *LocalNodeConfiguration) GetParentContext() context.Context
- func (c *LocalNodeConfiguration) GetSecretKeyStore() cryptkit.SecretKeyStore
- type MandateRegistry
- func (mr *MandateRegistry) FindRegisteredProfile(host endpoints.Inbound) profiles.Host
- func (mr *MandateRegistry) GetCloudIdentity() cryptkit.DigestHolder
- func (mr *MandateRegistry) GetConsensusConfiguration() census.ConsensusConfiguration
- func (mr *MandateRegistry) GetPrimingCloudHash() proofs.CloudStateHash
- type MisbehaviorRegistry
- type NodeStater
- type OfflinePopulation
- type Outbound
- type PacketParserFactory
- type PacketProcessor
- type PacketSender
- type PulsePacketParser
- func (p *PulsePacketParser) GetMemberPacket() transport.MemberPacketReader
- func (p *PulsePacketParser) GetPacketSignature() cryptkit.SignedDigest
- func (p *PulsePacketParser) GetPacketType() phases.PacketType
- func (p *PulsePacketParser) GetPulseData() pulse.Data
- func (p *PulsePacketParser) GetPulseDataDigest() cryptkit.DigestHolder
- func (p *PulsePacketParser) GetPulseDataEvidence() proofs.OriginalPulsarPacket
- func (p *PulsePacketParser) GetPulseNumber() pulse.Number
- func (p *PulsePacketParser) GetPulsePacket() transport.PulsePacketReader
- func (p *PulsePacketParser) GetReceiverID() node.ShortNodeID
- func (p *PulsePacketParser) GetSourceID() node.ShortNodeID
- func (p *PulsePacketParser) GetTargetID() node.ShortNodeID
- func (p *PulsePacketParser) IsRelayForbidden() bool
- func (p *PulsePacketParser) OriginalPulsarPacket()
- func (p *PulsePacketParser) ParsePacketBody() (transport.PacketParser, error)
- func (p PulsePacketParser) String() string
- type RoundStrategy
- type RoundStrategyFactory
- type SequenceDigester
- func (d *SequenceDigester) AddNext(digest longbits.FoldableReader)
- func (d *SequenceDigester) FinishSequence() cryptkit.Digest
- func (d *SequenceDigester) ForkSequence() cryptkit.ForkingDigester
- func (d *SequenceDigester) GetDigestMethod() cryptkit.DigestMethod
- func (d *SequenceDigester) GetDigestSize() int
- type StateDigester
- type StateUpdater
- type StaticProfile
- func (sp *StaticProfile) GetBriefIntroSignedDigest() cryptkit.SignedDigestHolder
- func (sp *StaticProfile) GetDefaultEndpoint() endpoints.Outbound
- func (sp *StaticProfile) GetExtension() profiles.StaticProfileExtension
- func (sp *StaticProfile) GetNodePublicKey() cryptkit.SigningKeyHolder
- func (sp *StaticProfile) GetPrimaryRole() member.PrimaryRole
- func (sp *StaticProfile) GetPublicKeyStore() cryptkit.PublicKeyStore
- func (sp *StaticProfile) GetSpecialRoles() member.SpecialRole
- func (sp *StaticProfile) GetStartPower() member.Power
- func (sp *StaticProfile) GetStaticNodeID() node.ShortNodeID
- func (sp *StaticProfile) IsAcceptableHost(from endpoints.Inbound) bool
- func (sp *StaticProfile) String() string
- type StaticProfileExtension
- func (ni *StaticProfileExtension) GetExtraEndpoints() []endpoints.Outbound
- func (ni *StaticProfileExtension) GetIntroducedNodeID() node.ShortNodeID
- func (ni *StaticProfileExtension) GetIssuedAtPulse() pulse.Number
- func (ni *StaticProfileExtension) GetIssuedAtTime() time.Time
- func (ni *StaticProfileExtension) GetIssuerID() node.ShortNodeID
- func (ni *StaticProfileExtension) GetIssuerSignature() cryptkit.SignatureHolder
- func (ni *StaticProfileExtension) GetPowerLevels() member.PowerSet
- func (ni *StaticProfileExtension) GetReference() reference.Global
- type TransportCryptographyFactory
- func (cf *TransportCryptographyFactory) CreateNodeSigner(sks cryptkit.SecretKeyStore) cryptkit.DigestSigner
- func (cf *TransportCryptographyFactory) CreatePublicKeyStore(skh cryptkit.SigningKeyHolder) cryptkit.PublicKeyStore
- func (cf *TransportCryptographyFactory) CreateSignatureVerifierWithPKS(pks cryptkit.PublicKeyStore) cryptkit.SignatureVerifier
- func (cf *TransportCryptographyFactory) GetDigestFactory() transport.ConsensusDigestFactory
- type TransportFactory
- type UpstreamController
- func (u *UpstreamController) CancelPulseChange()
- func (u *UpstreamController) CommitPulseChange(report api.UpstreamReport, pulseData pulse.Data, ...)
- func (u *UpstreamController) ConsensusAborted()
- func (u *UpstreamController) ConsensusFinished(report api.UpstreamReport, expectedCensus census.Operational)
- func (u *UpstreamController) PreparePulseChange(_ api.UpstreamReport, ch chan<- api.UpstreamState)
- func (u *UpstreamController) SetOnFinished(f network.OnConsensusFinished)
- type VersionedRegistries
- func (c *VersionedRegistries) CommitNextPulse(pd pulse.Data, population census.OnlinePopulation) census.VersionedRegistries
- func (c *VersionedRegistries) GetMandateRegistry() census.MandateRegistry
- func (c *VersionedRegistries) GetMisbehaviorRegistry() census.MisbehaviorRegistry
- func (c *VersionedRegistries) GetNearestValidPulseData() pulse.Data
- func (c *VersionedRegistries) GetOfflinePopulation() census.OfflinePopulation
- func (c *VersionedRegistries) GetVersionPulseData() pulse.Data
Constants ¶
View Source
const DefaultStartPower = member.Power(10)
Variables ¶
This section is empty.
Functions ¶
func ECDSAPublicKeyAsPublicKeyStore ¶
func ECDSAPublicKeyAsPublicKeyStore(pk crypto.PublicKey) cryptkit.PublicKeyStore
func ECDSAPublicKeyAsSignatureKeyHolder ¶
func ECDSAPublicKeyAsSignatureKeyHolder(pk crypto.PublicKey, kp cryptography.KeyProcessor) cryptkit.SigningKeyHolder
func ECDSAPublicKeyOfNode ¶
func ECDSAPublicKeyOfNode(n nodeinfo.NetworkNode) *ecdsa.PublicKey
deprecated // for legacy code only
func ECDSAPublicKeyOfProfile ¶
func ECDSAPublicKeyOfProfile(nip profiles.StaticProfile) crypto.PublicKey
func NewCensus ¶
func NewCensus( localNode profiles.StaticProfile, nodes []profiles.StaticProfile, vc census.VersionedRegistries, vf cryptkit.SignatureVerifierFactory, ) *censusimpl.PrimingCensusTemplate
func NewCensusForJoiner ¶
func NewCensusForJoiner( localNode profiles.StaticProfile, vc census.VersionedRegistries, vf cryptkit.SignatureVerifierFactory, ) *censusimpl.PrimingCensusTemplate
func NewChronicles ¶
func NewChronicles(pf profiles.Factory) censusimpl.LocalConsensusChronicles
func NewNodeProfileFactory ¶
func NewNodeProfileFactory(keyProcessor cryptography.KeyProcessor) profiles.Factory
func NewPulseData ¶
func NewPulseData(p pulsar.PulsePacket) pulse.Data
func PacketEarlyLogger ¶
func PacketLateLogger ¶
func ReportContext ¶
func ReportContext(report api.UpstreamReport) context.Context
Types ¶
type BeatChanger ¶
type Candidate ¶
func NewCandidate ¶
func NewCandidate(staticProfile *StaticProfile, keyProcessor cryptography.KeyProcessor) *Candidate
func (Candidate) StaticProfile ¶
func (c Candidate) StaticProfile(keyProcessor cryptography.KeyProcessor) *StaticProfile
type ConsensusConfiguration ¶
type ConsensusConfiguration struct{}
func NewConsensusConfiguration ¶
func NewConsensusConfiguration() *ConsensusConfiguration
type ConsensusControlFeeder ¶
type ConsensusControlFeeder struct {
// contains filtered or unexported fields
}
func NewConsensusControlFeeder ¶
func NewConsensusControlFeeder() *ConsensusControlFeeder
func (*ConsensusControlFeeder) CanFastForwardPulse ¶
func (*ConsensusControlFeeder) CanStopOnHastyPulse ¶
func (*ConsensusControlFeeder) GetRequiredGracefulLeave ¶
func (cf *ConsensusControlFeeder) GetRequiredGracefulLeave() (bool, uint32)
func (*ConsensusControlFeeder) GetRequiredPowerLevel ¶
func (cf *ConsensusControlFeeder) GetRequiredPowerLevel() power.Request
func (*ConsensusControlFeeder) OnAppliedGracefulLeave ¶
func (cf *ConsensusControlFeeder) OnAppliedGracefulLeave(exitCode uint32, effectiveSince pulse.Number)
func (*ConsensusControlFeeder) OnAppliedMembershipProfile ¶
func (*ConsensusControlFeeder) OnPulseDetected ¶
func (cf *ConsensusControlFeeder) OnPulseDetected()
func (*ConsensusControlFeeder) ResumeTraffic ¶
func (cf *ConsensusControlFeeder) ResumeTraffic()
func (*ConsensusControlFeeder) SetRequiredGracefulLeave ¶
func (cf *ConsensusControlFeeder) SetRequiredGracefulLeave(reason uint32)
func (*ConsensusControlFeeder) SetRequiredPowerLevel ¶
func (cf *ConsensusControlFeeder) SetRequiredPowerLevel(level capacity.Level)
func (*ConsensusControlFeeder) SetTrafficLimit ¶
func (cf *ConsensusControlFeeder) SetTrafficLimit(level capacity.Level, duration time.Duration)
type ConsensusDigestFactory ¶
type ConsensusDigestFactory struct {
// contains filtered or unexported fields
}
func NewConsensusDigestFactory ¶
func NewConsensusDigestFactory(scheme cryptography.PlatformCryptographyScheme) *ConsensusDigestFactory
func (*ConsensusDigestFactory) CreateAnnouncementDigester ¶
func (cdf *ConsensusDigestFactory) CreateAnnouncementDigester() cryptkit.ForkingDigester
func (*ConsensusDigestFactory) CreateDataDigester ¶
func (cdf *ConsensusDigestFactory) CreateDataDigester() cryptkit.DataDigester
func (*ConsensusDigestFactory) CreateForkingDigester ¶
func (cdf *ConsensusDigestFactory) CreateForkingDigester() cryptkit.ForkingDigester
func (*ConsensusDigestFactory) CreateGlobulaStateDigester ¶
func (cdf *ConsensusDigestFactory) CreateGlobulaStateDigester() transport.StateDigester
func (*ConsensusDigestFactory) CreatePairDigester ¶
func (cdf *ConsensusDigestFactory) CreatePairDigester() cryptkit.PairDigester
func (*ConsensusDigestFactory) CreateSequenceDigester ¶
func (cdf *ConsensusDigestFactory) CreateSequenceDigester() cryptkit.SequenceDigester
type ControlFeederInterceptor ¶
type ControlFeederInterceptor struct {
// contains filtered or unexported fields
}
func InterceptConsensusControl ¶
func InterceptConsensusControl(originalFeeder *ConsensusControlFeeder) *ControlFeederInterceptor
func (*ControlFeederInterceptor) Feeder ¶
func (i *ControlFeederInterceptor) Feeder() *InternalControlFeederAdapter
func (*ControlFeederInterceptor) Leave ¶
func (i *ControlFeederInterceptor) Leave(leaveReason uint32) <-chan struct{}
func (*ControlFeederInterceptor) PrepareLeave ¶
func (i *ControlFeederInterceptor) PrepareLeave() <-chan struct{}
type DatagramHandler ¶
type DatagramHandler struct {
// contains filtered or unexported fields
}
func NewDatagramHandler ¶
func NewDatagramHandler() *DatagramHandler
func (*DatagramHandler) HandleDatagram ¶
func (dh *DatagramHandler) HandleDatagram(ctx context.Context, address string, buf []byte)
func (*DatagramHandler) SetPacketParserFactory ¶
func (dh *DatagramHandler) SetPacketParserFactory(packetParserFactory PacketParserFactory)
func (*DatagramHandler) SetPacketProcessor ¶
func (dh *DatagramHandler) SetPacketProcessor(packetProcessor PacketProcessor)
type ECDSASignatureVerifierFactory ¶
type ECDSASignatureVerifierFactory struct {
// contains filtered or unexported fields
}
func NewECDSASignatureVerifierFactory ¶
func NewECDSASignatureVerifierFactory( digester legacyadapter.Sha3Digester512, scheme cryptography.PlatformCryptographyScheme, ) *ECDSASignatureVerifierFactory
func (*ECDSASignatureVerifierFactory) CreateSignatureVerifierWithPKS ¶
func (vf *ECDSASignatureVerifierFactory) CreateSignatureVerifierWithPKS(pks cryptkit.PublicKeyStore) cryptkit.SignatureVerifier
type EphemeralControlFeeder ¶
type EphemeralControlFeeder struct {
// contains filtered or unexported fields
}
func NewEphemeralControlFeeder ¶
func NewEphemeralControlFeeder(ephemeralController EphemeralController) *EphemeralControlFeeder
func (*EphemeralControlFeeder) CanFastForwardPulse ¶
func (*EphemeralControlFeeder) CanStopEphemeralByCensus ¶
func (f *EphemeralControlFeeder) CanStopEphemeralByCensus(expected census.Expected) bool
func (*EphemeralControlFeeder) CanStopEphemeralByPulse ¶
func (f *EphemeralControlFeeder) CanStopEphemeralByPulse(pd pulse.Data, localNode profiles.ActiveNode) bool
func (*EphemeralControlFeeder) CanStopOnHastyPulse ¶
func (*EphemeralControlFeeder) CreateEphemeralPulsePacket ¶
func (f *EphemeralControlFeeder) CreateEphemeralPulsePacket(census census.Operational) proofs.OriginalPulsarPacket
func (*EphemeralControlFeeder) EphemeralConsensusFinished ¶
func (f *EphemeralControlFeeder) EphemeralConsensusFinished(isNextEphemeral bool, roundStartedAt time.Time, expected census.Operational)
func (*EphemeralControlFeeder) GetEphemeralTimings ¶
func (f *EphemeralControlFeeder) GetEphemeralTimings(config api.LocalNodeConfiguration) api.RoundTimings
func (*EphemeralControlFeeder) GetMaxDuration ¶
func (f *EphemeralControlFeeder) GetMaxDuration() time.Duration
func (*EphemeralControlFeeder) GetMinDuration ¶
func (f *EphemeralControlFeeder) GetMinDuration() time.Duration
func (*EphemeralControlFeeder) IsActive ¶
func (f *EphemeralControlFeeder) IsActive() bool
func (*EphemeralControlFeeder) OnEphemeralCancelled ¶
func (f *EphemeralControlFeeder) OnEphemeralCancelled()
func (*EphemeralControlFeeder) OnNonEphemeralPacket ¶
func (f *EphemeralControlFeeder) OnNonEphemeralPacket(ctx context.Context, parser transport.PacketParser, inbound endpoints.Inbound) error
type EphemeralController ¶
type EphemeralController interface {
EphemeralMode(census.OnlinePopulation) bool
}
type InternalControlFeederAdapter ¶
type InternalControlFeederAdapter struct { *ConsensusControlFeeder // contains filtered or unexported fields }
func (*InternalControlFeederAdapter) GetRequiredGracefulLeave ¶
func (cf *InternalControlFeederAdapter) GetRequiredGracefulLeave() (bool, uint32)
func (*InternalControlFeederAdapter) GetRequiredPowerLevel ¶
func (cf *InternalControlFeederAdapter) GetRequiredPowerLevel() power.Request
func (*InternalControlFeederAdapter) OnAppliedMembershipProfile ¶
func (*InternalControlFeederAdapter) OnPulseDetected ¶
func (cf *InternalControlFeederAdapter) OnPulseDetected()
type LocalNodeConfiguration ¶
type LocalNodeConfiguration struct {
// contains filtered or unexported fields
}
func NewLocalNodeConfiguration ¶
func NewLocalNodeConfiguration(ctx context.Context, keyStore cryptography.KeyStore) *LocalNodeConfiguration
func (*LocalNodeConfiguration) GetConsensusTimings ¶
func (c *LocalNodeConfiguration) GetConsensusTimings(nextPulseDelta uint16) api.RoundTimings
func (*LocalNodeConfiguration) GetEphemeralTimings ¶
func (c *LocalNodeConfiguration) GetEphemeralTimings(nextPulseDelta uint16) api.RoundTimings
func (*LocalNodeConfiguration) GetNodeCountHint ¶
func (c *LocalNodeConfiguration) GetNodeCountHint() int
func (*LocalNodeConfiguration) GetParentContext ¶
func (c *LocalNodeConfiguration) GetParentContext() context.Context
func (*LocalNodeConfiguration) GetSecretKeyStore ¶
func (c *LocalNodeConfiguration) GetSecretKeyStore() cryptkit.SecretKeyStore
type MandateRegistry ¶
type MandateRegistry struct {
// contains filtered or unexported fields
}
func NewMandateRegistry ¶
func NewMandateRegistry(cloudHash proofs.CloudStateHash, consensusConfiguration census.ConsensusConfiguration) *MandateRegistry
func (*MandateRegistry) FindRegisteredProfile ¶
func (mr *MandateRegistry) FindRegisteredProfile(host endpoints.Inbound) profiles.Host
func (*MandateRegistry) GetCloudIdentity ¶
func (mr *MandateRegistry) GetCloudIdentity() cryptkit.DigestHolder
func (*MandateRegistry) GetConsensusConfiguration ¶
func (mr *MandateRegistry) GetConsensusConfiguration() census.ConsensusConfiguration
func (*MandateRegistry) GetPrimingCloudHash ¶
func (mr *MandateRegistry) GetPrimingCloudHash() proofs.CloudStateHash
type MisbehaviorRegistry ¶
type MisbehaviorRegistry struct{}
func NewMisbehaviorRegistry ¶
func NewMisbehaviorRegistry() *MisbehaviorRegistry
func (*MisbehaviorRegistry) AddReport ¶
func (mr *MisbehaviorRegistry) AddReport(report misbehavior.Report)
type NodeStater ¶
type NodeStater interface { RequestNodeState(chorus.NodeStateFunc) CancelNodeState() }
type OfflinePopulation ¶
type OfflinePopulation struct {
// contains filtered or unexported fields
}
func NewOfflinePopulation ¶
func NewOfflinePopulation(nodeKeeper beat.NodeKeeper) *OfflinePopulation
func (*OfflinePopulation) FindRegisteredProfile ¶
func (op *OfflinePopulation) FindRegisteredProfile(identity endpoints.Inbound) profiles.Host
type Outbound ¶
type Outbound struct {
// contains filtered or unexported fields
}
func NewOutbound ¶
func NewOutboundIP ¶
func (*Outbound) GetEndpointType ¶
func (p *Outbound) GetEndpointType() endpoints.NodeEndpointType
func (*Outbound) GetIPAddress ¶
func (*Outbound) GetNameAddress ¶
func (*Outbound) GetRelayID ¶
func (*Outbound) GetRelayID() node.ShortNodeID
type PacketParserFactory ¶
type PacketProcessor ¶
type PacketSender ¶
type PacketSender struct {
// contains filtered or unexported fields
}
func NewPacketSender ¶
func NewPacketSender(datagramTransport transport.DatagramTransport) *PacketSender
func (*PacketSender) SendPacketToTransport ¶
func (ps *PacketSender) SendPacketToTransport(ctx context.Context, to transport2.TargetProfile, sendOptions transport2.PacketSendOptions, payload interface{})
type PulsePacketParser ¶
type PulsePacketParser struct { longbits.FixedReader // contains filtered or unexported fields }
func NewPulsePacketParser ¶
func NewPulsePacketParser(pulse pulse.Data) *PulsePacketParser
func (*PulsePacketParser) GetMemberPacket ¶
func (p *PulsePacketParser) GetMemberPacket() transport.MemberPacketReader
func (*PulsePacketParser) GetPacketSignature ¶
func (p *PulsePacketParser) GetPacketSignature() cryptkit.SignedDigest
func (*PulsePacketParser) GetPacketType ¶
func (p *PulsePacketParser) GetPacketType() phases.PacketType
func (*PulsePacketParser) GetPulseData ¶
func (p *PulsePacketParser) GetPulseData() pulse.Data
func (*PulsePacketParser) GetPulseDataDigest ¶
func (p *PulsePacketParser) GetPulseDataDigest() cryptkit.DigestHolder
func (*PulsePacketParser) GetPulseDataEvidence ¶
func (p *PulsePacketParser) GetPulseDataEvidence() proofs.OriginalPulsarPacket
func (*PulsePacketParser) GetPulseNumber ¶
func (p *PulsePacketParser) GetPulseNumber() pulse.Number
func (*PulsePacketParser) GetPulsePacket ¶
func (p *PulsePacketParser) GetPulsePacket() transport.PulsePacketReader
func (*PulsePacketParser) GetReceiverID ¶
func (p *PulsePacketParser) GetReceiverID() node.ShortNodeID
func (*PulsePacketParser) GetSourceID ¶
func (p *PulsePacketParser) GetSourceID() node.ShortNodeID
func (*PulsePacketParser) GetTargetID ¶
func (p *PulsePacketParser) GetTargetID() node.ShortNodeID
func (*PulsePacketParser) IsRelayForbidden ¶
func (p *PulsePacketParser) IsRelayForbidden() bool
func (*PulsePacketParser) OriginalPulsarPacket ¶
func (p *PulsePacketParser) OriginalPulsarPacket()
func (*PulsePacketParser) ParsePacketBody ¶
func (p *PulsePacketParser) ParsePacketBody() (transport.PacketParser, error)
func (PulsePacketParser) String ¶
func (p PulsePacketParser) String() string
type RoundStrategy ¶
type RoundStrategy struct {
// contains filtered or unexported fields
}
func NewRoundStrategy ¶
func NewRoundStrategy( localConfig api.LocalNodeConfiguration, ) *RoundStrategy
func (*RoundStrategy) ConfigureRoundContext ¶
func (*RoundStrategy) GetBaselineWeightForNeighbours ¶
func (rs *RoundStrategy) GetBaselineWeightForNeighbours() uint32
func (*RoundStrategy) ShuffleNodeSequence ¶
func (rs *RoundStrategy) ShuffleNodeSequence(n int, swap func(i, j int))
type RoundStrategyFactory ¶
type RoundStrategyFactory struct {
// contains filtered or unexported fields
}
func NewRoundStrategyFactory ¶
func NewRoundStrategyFactory() *RoundStrategyFactory
func (*RoundStrategyFactory) CreateRoundStrategy ¶
func (rsf *RoundStrategyFactory) CreateRoundStrategy(online census.OnlinePopulation, config api.LocalNodeConfiguration) (core.RoundStrategy, core.PhaseControllersBundle)
type SequenceDigester ¶
type SequenceDigester struct {
// contains filtered or unexported fields
}
func NewSequenceDigester ¶
func NewSequenceDigester(dataDigester cryptkit.DataDigester) *SequenceDigester
func (*SequenceDigester) AddNext ¶
func (d *SequenceDigester) AddNext(digest longbits.FoldableReader)
func (*SequenceDigester) FinishSequence ¶
func (d *SequenceDigester) FinishSequence() cryptkit.Digest
func (*SequenceDigester) ForkSequence ¶
func (d *SequenceDigester) ForkSequence() cryptkit.ForkingDigester
func (*SequenceDigester) GetDigestMethod ¶
func (d *SequenceDigester) GetDigestMethod() cryptkit.DigestMethod
func (*SequenceDigester) GetDigestSize ¶
func (d *SequenceDigester) GetDigestSize() int
type StateDigester ¶
type StateDigester struct {
// contains filtered or unexported fields
}
func NewStateDigester ¶
func NewStateDigester(sequenceDigester *SequenceDigester) *StateDigester
func (*StateDigester) AddNext ¶
func (d *StateDigester) AddNext(digest longbits.FoldableReader, fullRank member.FullRank)
func (*StateDigester) FinishSequence ¶
func (d *StateDigester) FinishSequence() cryptkit.Digest
func (*StateDigester) ForkSequence ¶
func (d *StateDigester) ForkSequence() transport.StateDigester
func (*StateDigester) GetDigestMethod ¶
func (d *StateDigester) GetDigestMethod() cryptkit.DigestMethod
type StaticProfile ¶
type StaticProfile struct {
// contains filtered or unexported fields
}
func NewStaticProfile ¶
func NewStaticProfile( shortID node.ShortNodeID, primaryRole member.PrimaryRole, specialRole member.SpecialRole, startPower member.Power, intro profiles.StaticProfileExtension, endpoint endpoints.Outbound, store cryptkit.PublicKeyStore, keyHolder cryptkit.SigningKeyHolder, signature cryptkit.SignedDigestHolder, ) *StaticProfile
func (*StaticProfile) GetBriefIntroSignedDigest ¶
func (sp *StaticProfile) GetBriefIntroSignedDigest() cryptkit.SignedDigestHolder
func (*StaticProfile) GetDefaultEndpoint ¶
func (sp *StaticProfile) GetDefaultEndpoint() endpoints.Outbound
func (*StaticProfile) GetExtension ¶
func (sp *StaticProfile) GetExtension() profiles.StaticProfileExtension
func (*StaticProfile) GetNodePublicKey ¶
func (sp *StaticProfile) GetNodePublicKey() cryptkit.SigningKeyHolder
func (*StaticProfile) GetPrimaryRole ¶
func (sp *StaticProfile) GetPrimaryRole() member.PrimaryRole
func (*StaticProfile) GetPublicKeyStore ¶
func (sp *StaticProfile) GetPublicKeyStore() cryptkit.PublicKeyStore
func (*StaticProfile) GetSpecialRoles ¶
func (sp *StaticProfile) GetSpecialRoles() member.SpecialRole
func (*StaticProfile) GetStartPower ¶
func (sp *StaticProfile) GetStartPower() member.Power
func (*StaticProfile) GetStaticNodeID ¶
func (sp *StaticProfile) GetStaticNodeID() node.ShortNodeID
func (*StaticProfile) IsAcceptableHost ¶
func (sp *StaticProfile) IsAcceptableHost(from endpoints.Inbound) bool
func (*StaticProfile) String ¶
func (sp *StaticProfile) String() string
type StaticProfileExtension ¶
type StaticProfileExtension struct {
// contains filtered or unexported fields
}
func NewStaticProfileExtension ¶
func NewStaticProfileExtension(shortID node.ShortNodeID, ref reference.Global, signature cryptkit.Signature) *StaticProfileExtension
func (*StaticProfileExtension) GetExtraEndpoints ¶
func (ni *StaticProfileExtension) GetExtraEndpoints() []endpoints.Outbound
func (*StaticProfileExtension) GetIntroducedNodeID ¶
func (ni *StaticProfileExtension) GetIntroducedNodeID() node.ShortNodeID
func (*StaticProfileExtension) GetIssuedAtPulse ¶
func (ni *StaticProfileExtension) GetIssuedAtPulse() pulse.Number
func (*StaticProfileExtension) GetIssuedAtTime ¶
func (ni *StaticProfileExtension) GetIssuedAtTime() time.Time
func (*StaticProfileExtension) GetIssuerID ¶
func (ni *StaticProfileExtension) GetIssuerID() node.ShortNodeID
func (*StaticProfileExtension) GetIssuerSignature ¶
func (ni *StaticProfileExtension) GetIssuerSignature() cryptkit.SignatureHolder
func (*StaticProfileExtension) GetPowerLevels ¶
func (ni *StaticProfileExtension) GetPowerLevels() member.PowerSet
func (*StaticProfileExtension) GetReference ¶
func (ni *StaticProfileExtension) GetReference() reference.Global
type TransportCryptographyFactory ¶
type TransportCryptographyFactory struct {
// contains filtered or unexported fields
}
func NewTransportCryptographyFactory ¶
func NewTransportCryptographyFactory(scheme cryptography.PlatformCryptographyScheme) *TransportCryptographyFactory
func (*TransportCryptographyFactory) CreateNodeSigner ¶
func (cf *TransportCryptographyFactory) CreateNodeSigner(sks cryptkit.SecretKeyStore) cryptkit.DigestSigner
func (*TransportCryptographyFactory) CreatePublicKeyStore ¶
func (cf *TransportCryptographyFactory) CreatePublicKeyStore(skh cryptkit.SigningKeyHolder) cryptkit.PublicKeyStore
func (*TransportCryptographyFactory) CreateSignatureVerifierWithPKS ¶
func (cf *TransportCryptographyFactory) CreateSignatureVerifierWithPKS(pks cryptkit.PublicKeyStore) cryptkit.SignatureVerifier
func (*TransportCryptographyFactory) GetDigestFactory ¶
func (cf *TransportCryptographyFactory) GetDigestFactory() transport.ConsensusDigestFactory
type TransportFactory ¶
type TransportFactory struct {
// contains filtered or unexported fields
}
func NewTransportFactory ¶
func NewTransportFactory( cryptographyFactory transport.CryptographyAssistant, packetBuilder transport.PacketBuilder, packetSender transport.PacketSender, ) *TransportFactory
func (*TransportFactory) GetCryptographyFactory ¶
func (tf *TransportFactory) GetCryptographyFactory() transport.CryptographyAssistant
func (*TransportFactory) GetPacketBuilder ¶
func (tf *TransportFactory) GetPacketBuilder(signer cryptkit.DigestSigner) transport.PacketBuilder
func (*TransportFactory) GetPacketSender ¶
func (tf *TransportFactory) GetPacketSender() transport.PacketSender
type UpstreamController ¶
type UpstreamController struct {
// contains filtered or unexported fields
}
func NewUpstreamPulseController ¶
func NewUpstreamPulseController(stateGetter NodeStater, pulseChanger BeatChanger, stateUpdater StateUpdater) *UpstreamController
func (*UpstreamController) CancelPulseChange ¶
func (u *UpstreamController) CancelPulseChange()
func (*UpstreamController) CommitPulseChange ¶
func (u *UpstreamController) CommitPulseChange(report api.UpstreamReport, pulseData pulse.Data, activeCensus census.Operational)
func (*UpstreamController) ConsensusAborted ¶
func (u *UpstreamController) ConsensusAborted()
func (*UpstreamController) ConsensusFinished ¶
func (u *UpstreamController) ConsensusFinished(report api.UpstreamReport, expectedCensus census.Operational)
func (*UpstreamController) PreparePulseChange ¶
func (u *UpstreamController) PreparePulseChange(_ api.UpstreamReport, ch chan<- api.UpstreamState)
func (*UpstreamController) SetOnFinished ¶
func (u *UpstreamController) SetOnFinished(f network.OnConsensusFinished)
type VersionedRegistries ¶
type VersionedRegistries struct {
// contains filtered or unexported fields
}
func NewVersionedRegistries ¶
func NewVersionedRegistries( mandateRegistry census.MandateRegistry, misbehaviorRegistry census.MisbehaviorRegistry, offlinePopulation census.OfflinePopulation, ) *VersionedRegistries
func (*VersionedRegistries) CommitNextPulse ¶
func (c *VersionedRegistries) CommitNextPulse(pd pulse.Data, population census.OnlinePopulation) census.VersionedRegistries
func (*VersionedRegistries) GetMandateRegistry ¶
func (c *VersionedRegistries) GetMandateRegistry() census.MandateRegistry
func (*VersionedRegistries) GetMisbehaviorRegistry ¶
func (c *VersionedRegistries) GetMisbehaviorRegistry() census.MisbehaviorRegistry
func (*VersionedRegistries) GetNearestValidPulseData ¶
func (c *VersionedRegistries) GetNearestValidPulseData() pulse.Data
func (*VersionedRegistries) GetOfflinePopulation ¶
func (c *VersionedRegistries) GetOfflinePopulation() census.OfflinePopulation
func (*VersionedRegistries) GetVersionPulseData ¶
func (c *VersionedRegistries) GetVersionPulseData() pulse.Data
Click to show internal directories.
Click to hide internal directories.