Documentation ¶
Index ¶
- Variables
- func CleanStorage(permuri, root string, encs *encoder.Encoders, enc encoder.Encoder) error
- func DefaultINITPS() *ps.PS
- func DefaultMainPS() *ps.PS
- func DefaultQuicConfig() *quic.Config
- func DefaultRunPS() *ps.PS
- func DefaultWhenNewBlockConfirmedFunc(log *logging.Logging) func(base.Height)
- func DefaultWhenNewBlockSavedInConsensusStateFunc(log *logging.Logging, params *isaac.LocalParams, ...) func(base.Height)
- func DefaultWhenNewBlockSavedInSyncingStateFunc(log *logging.Logging, db isaac.Database, ...) func(base.Height)
- func FindLastHeightFromLocalFS(dataroot string, enc encoder.Encoder, networkID base.NetworkID) (last base.Height, _ error)
- func FixedSuffrageCandidateLimiterFunc() func(base.SuffrageCandidateLimiterRule) (base.SuffrageCandidateLimiter, error)
- func GenerateNewTLSConfig(networkID base.NetworkID) *tls.Config
- func GetDiscoveriesFromLocked(l *util.Locked[[]quicstream.UDPConnInfo]) []quicstream.UDPConnInfo
- func GetLastSuffrageCandidateFunc(pctx context.Context) (isaac.GetLastSuffrageCandidateStateRemoteFunc, error)
- func GetLastSuffrageProofFunc(pctx context.Context) (isaac.GetLastSuffrageProofFromRemoteFunc, error)
- func GetSuffrageProofFromRemoteFunc(pctx context.Context) (isaac.GetSuffrageProofFromRemoteFunc, error)
- func ImportBlocks(from, root string, fromHeight, toHeight base.Height, encs *encoder.Encoders, ...) error
- func IsSupportedProposalOperationFactHintFunc() func(hint.Hint) bool
- func IsValidSyncSourcesDesign(d SyncSourcesDesign, localAddress base.Address, ...) error
- func LastHeightOfLocalFS(pctx context.Context, from string) (last base.Height, _ error)
- func LoadDatabase(fsnodeinfo NodeInfo, permuri string, root string, encs *encoder.Encoders, ...) (*leveldbstorage.Storage, *isaacdatabase.Center, isaac.PermanentDatabase, ...)
- func LoadHinters(enc encoder.Encoder) error
- func LoadPermanentDatabase(uri, id string, encs *encoder.Encoders, enc encoder.Encoder, root string) (*leveldbstorage.Storage, isaac.PermanentDatabase, error)
- func LocalFSDataDirectory(root string) string
- func LocalFSDatabaseDirectory(root string) string
- func LocalFromDesign(design NodeDesign) (base.LocalNode, error)
- func MajoritySuffrageCandidateLimiterFunc(db isaac.Database) func(base.SuffrageCandidateLimiterRule) (base.SuffrageCandidateLimiter, error)
- func MergeBlockWriteToPermanentDatabase(ctx context.Context, bwdb isaac.BlockWriteDatabase, ...) error
- func NetworkHandlerPprofFunc(encs *encoder.Encoders) quicstream.Handler
- func NewBlockWriterFunc(local base.LocalNode, networkID base.NetworkID, dataroot string, ...) isaac.NewBlockWriterFunc
- func NewNetworkClient(encs *encoder.Encoders, enc encoder.Encoder, idleTimeout time.Duration, ...) *isaacnetwork.QuicstreamClient
- func NewProposalSelector(pctx context.Context) (*isaac.BaseProposalSelector, error)
- func NewSuffrageCandidateLimiterFunc(pctx context.Context) (...)
- func OperationPreProcess(oprs *hint.CompatibleSet, op base.Operation, height base.Height) (...)
- func PAddHinters(pctx context.Context) (context.Context, error)
- func PBallotStuckResolver(pctx context.Context) (context.Context, error)
- func PBallotbox(pctx context.Context) (context.Context, error)
- func PCallbackBroadcaster(pctx context.Context) (context.Context, error)
- func PCheckDesign(pctx context.Context) (context.Context, error)
- func PCheckLeveldbStorage(pctx context.Context) (context.Context, error)
- func PCheckLocalFS(pctx context.Context) (context.Context, error)
- func PCleanStorage(pctx context.Context) (context.Context, error)
- func PCloseLastConsensusNodesWatcher(pctx context.Context) (context.Context, error)
- func PCloseMemberlist(pctx context.Context) (context.Context, error)
- func PCloseNetwork(pctx context.Context) (context.Context, error)
- func PCloseStates(pctx context.Context) (context.Context, error)
- func PCloseStorage(pctx context.Context) (context.Context, error)
- func PCloseSyncSourceChecker(pctx context.Context) (context.Context, error)
- func PCloseTimeSyncer(pctx context.Context) (context.Context, error)
- func PCreateLocalFS(pctx context.Context) (context.Context, error)
- func PDiscoveryFlag(pctx context.Context) (context.Context, error)
- func PEncoder(pctx context.Context) (context.Context, error)
- func PGenerateGenesis(pctx context.Context) (context.Context, error)
- func PGenesisDesign(pctx context.Context) (context.Context, error)
- func PINIT(ctx context.Context) (context.Context, error)
- func PLastConsensusNodesWatcher(pctx context.Context) (context.Context, error)
- func PLoadDatabase(pctx context.Context) (context.Context, error)
- func PLoadDesign(pctx context.Context) (context.Context, error)
- func PLoadFromDatabase(pctx context.Context) (context.Context, error)
- func PLocal(pctx context.Context) (context.Context, error)
- func PLogging(ctx context.Context) (context.Context, error)
- func PLoggingWithCLI(ctx context.Context) (context.Context, error)
- func PLongRunningMemberlistJoin(pctx context.Context) (context.Context, error)
- func PMemberlist(pctx context.Context) (context.Context, error)
- func PNetwork(pctx context.Context) (context.Context, error)
- func PNetworkHandlers(pctx context.Context) (context.Context, error)
- func PNodeInConsensusNodesFunc(pctx context.Context) (context.Context, error)
- func PNodeInfo(pctx context.Context) (context.Context, error)
- func POperationProcessorsMap(pctx context.Context) (context.Context, error)
- func PPatchLastConsensusNodesWatcher(pctx context.Context) (context.Context, error)
- func PPatchMemberlist(pctx context.Context) (context.Context, error)
- func PProposalMaker(pctx context.Context) (context.Context, error)
- func PProposalProcessors(pctx context.Context) (context.Context, error)
- func PProposerSelector(pctx context.Context) (context.Context, error)
- func PQuicstreamClient(pctx context.Context) (context.Context, error)
- func PStartLastConsensusNodesWatcher(pctx context.Context) (context.Context, error)
- func PStartMemberlist(pctx context.Context) (context.Context, error)
- func PStartNetwork(pctx context.Context) (context.Context, error)
- func PStartStorage(pctx context.Context) (context.Context, error)
- func PStartSyncSourceChecker(pctx context.Context) (context.Context, error)
- func PStartTimeSyncer(pctx context.Context) (context.Context, error)
- func PStates(pctx context.Context) (context.Context, error)
- func PStatesSetHandlers(pctx context.Context) (context.Context, error)
- func PStorage(pctx context.Context) (context.Context, error)
- func PSuffrageCandidateLimiterSet(pctx context.Context) (context.Context, error)
- func PSuffrageVoting(pctx context.Context) (context.Context, error)
- func PSyncSourceChecker(pctx context.Context) (context.Context, error)
- func PWatchDesign(pctx context.Context) (context.Context, error)
- func QuicstreamHandlerGetNodeInfoFunc(enc encoder.Encoder, nodeinfo *isaacnetwork.NodeInfoUpdater) func() ([]byte, error)
- func QuicstreamHandlerLastBlockMapFunc(db isaac.Database) func(last util.Hash) (hint.Hint, []byte, []byte, bool, error)
- func QuicstreamHandlerSuffrageNodeConnInfoFunc(db isaac.Database, memberlist *quicmemberlist.Memberlist) func() ([]isaac.NodeConnInfo, error)
- func RemoveLocalFS(root string) error
- func SaveNodeInfo(root string, i NodeInfo) error
- func SetupLoggingFromFlags(flag LoggingFlags) (*logging.Logging, error)
- func UpdateNodeInfoWithNewBlock(db isaac.Database, nodeinfo *isaacnetwork.NodeInfoUpdater) error
- func ValidateBlockFromLocalFS(height base.Height, dataroot string, enc encoder.Encoder, ...) error
- func ValidateLocalFS(dataroot string, enc encoder.Encoder, last base.Height) error
- func ValidateOperationsOfBlock(opstree fixedtree.Tree, ops []base.Operation, manifest base.Manifest, ...) error
- func ValidateStatesOfBlock(ststree fixedtree.Tree, sts []base.State, manifest base.Manifest, ...) error
- type AddressFlag
- type BaseFlags
- type ConnInfoFlag
- type DefaultNodeInfo
- func (info DefaultNodeInfo) CreatedAt() time.Time
- func (info DefaultNodeInfo) ID() string
- func (info DefaultNodeInfo) IsValid([]byte) error
- func (info DefaultNodeInfo) LastStartedAt() time.Time
- func (info DefaultNodeInfo) MarshalJSON() ([]byte, error)
- func (info DefaultNodeInfo) NetworkID() base.NetworkID
- func (info *DefaultNodeInfo) UnmarshalJSON(b []byte) error
- func (info DefaultNodeInfo) UpdateLastStartedAt() NodeInfo
- func (info DefaultNodeInfo) Version() util.Version
- type DesignFlag
- type DesignURIFlag
- type DesignURIProperties
- type DevFlags
- type FilterMemberlistNotifyMsgFunc
- type GenesisBlockGenerator
- type GenesisDesign
- type GenesisDesignYAMLUnmarshaler
- type HeightFlag
- type LogLevelFlag
- type LogOutFlag
- type LoggingFlags
- type LongRunningMemberlistJoin
- type NodeDesign
- func NodeDesignFromConsul(addr, key string, enc *jsonenc.Encoder) (design NodeDesign, _ []byte, _ error)
- func NodeDesignFromFile(f string, enc *jsonenc.Encoder) (d NodeDesign, _ []byte, _ error)
- func NodeDesignFromHTTP(u string, tlsInsecure bool, enc *jsonenc.Encoder) (design NodeDesign, _ []byte, _ error)
- type NodeDesignYAMLMarshaler
- type NodeDesignYAMLUnmarshaler
- type NodeInfo
- type NodeNetworkDesign
- type NodeNetworkDesignYAMLMarshaler
- type NodeStorageDesign
- type NodeStorageDesignYAMLMarshal
- type PprofRequestHeader
- func (h PprofRequestHeader) GC() bool
- func (PprofRequestHeader) HandlerPrefix() string
- func (h PprofRequestHeader) IsValid([]byte) error
- func (h PprofRequestHeader) Label() string
- func (h PprofRequestHeader) MarshalJSON() ([]byte, error)
- func (h PprofRequestHeader) Seconds() uint64
- func (h *PprofRequestHeader) UnmarshalJSON(b []byte) error
- type SuffragePool
- type SyncSourcesDesign
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultNetworkBind = &net.UDPAddr{IP: net.ParseIP("127.0.0.1"), Port: 4321} //nolint:gomnd //... DefaultNetworkPublish = &net.UDPAddr{IP: net.ParseIP("127.0.0.1"), Port: 4321} //nolint:gomnd //... DefaultStorageBase string DefaultStorageDatabaseDirectoryName = "db" )
View Source
var ( DefaultNodeInfoHint = hint.MustNewHint("default-node-info-v0.0.1") NodeInfoFilename = "info.json" )
View Source
var ( PNameDesign = ps.Name("design") PNameCheckDesign = ps.Name("check-design") PNameGenesisDesign = ps.Name("genesis-design") DesignFlagContextKey = util.ContextKey("design-flag") DevFlagsContextKey = util.ContextKey("dev-flags") GenesisDesignFileContextKey = util.ContextKey("genesis-design-file") DesignContextKey = util.ContextKey("design") DesignStringContextKey = util.ContextKey("design-string") GenesisDesignContextKey = util.ContextKey("genesis-design") VaultContextKey = util.ContextKey("vault") )
View Source
var ( PNameDiscoveryFlag = ps.Name("discovery-flag") DiscoveryFlagContextKey = util.ContextKey("discovery-flag") DiscoveryContextKey = util.ContextKey("discovery") )
View Source
var ( PNameEncoder = ps.Name("encoder") PNameAddHinters = ps.Name("add-hinters") EncodersContextKey = util.ContextKey("encoders") EncoderContextKey = util.ContextKey("encoder") )
View Source
var ( PNameLocal = ps.Name("local") LocalContextKey = util.ContextKey("local") LocalParamsContextKey = util.ContextKey("local-params") )
View Source
var ( PNameMemberlist = ps.Name("memberlist") PNameStartMemberlist = ps.Name("start-memberlist") PNameLongRunningMemberlistJoin = ps.Name("long-running-memberlist-join") PNameCallbackBroadcaster = ps.Name("callback-broadcaster") PNameSuffrageVoting = ps.Name("suffrage-voting") PNamePatchMemberlist = ps.Name("patch-memberlist") MemberlistContextKey = util.ContextKey("memberlist") LongRunningMemberlistJoinContextKey = util.ContextKey("long-running-memberlist-join") EventWhenEmptyMembersContextKey = util.ContextKey("event-when-empty-members") SuffrageVotingContextKey = util.ContextKey("suffrage-voting") SuffrageVotingVoteFuncContextKey = util.ContextKey("suffrage-voting-vote-func") CallbackBroadcasterContextKey = util.ContextKey("callback-broadcaster") FilterMemberlistNotifyMsgFuncContextKey = util.ContextKey("filter-memberlist-notify-msg-func") )
View Source
var ( PNameNetwork = ps.Name("network") PNameStartNetwork = ps.Name("start-network") PNameQuicstreamClient = ps.Name("network-client") QuicstreamClientContextKey = util.ContextKey("network-client") QuicstreamServerContextKey = util.ContextKey("quicstream-server") QuicstreamHandlersContextKey = util.ContextKey("quicstream-handlers") )
View Source
var ( PNameNetworkHandlers = ps.Name("network-handlers") PNameOperationProcessorsMap = ps.Name("operation-processors-map") OperationProcessorsMapContextKey = util.ContextKey("operation-processors-map") )
View Source
var ( PNameNodeInfo = ps.Name("nodeinfo") NodeInfoContextKey = util.ContextKey("nodeinfo") )
View Source
var ( PNameProposalMaker = ps.Name("proposal-maker") ProposalMakerContextKey = util.ContextKey("proposal-maker") )
View Source
var ( PNameStatesReady = ps.Name("states-ready") PNameStates = ps.Name("states") PNameBallotbox = ps.Name("ballotbox") PNameProposalProcessors = ps.Name("proposal-processors") PNameStatesSetHandlers = ps.Name("states-set-handlers") PNameProposerSelector = ps.Name("proposer-selector") PNameBallotStuckResolver = ps.Name("ballot-stuck-resolver") BallotboxContextKey = util.ContextKey("ballotbox") StatesContextKey = util.ContextKey("states") ProposalProcessorsContextKey = util.ContextKey("proposal-processors") ProposerSelectorContextKey = util.ContextKey("proposer-selector") ProposalSelectorContextKey = util.ContextKey("proposal-selector") WhenNewBlockSavedInSyncingStateFuncContextKey = util.ContextKey("when-new-block-saved-in-syncing-state-func") WhenNewBlockSavedInConsensusStateFuncContextKey = util.ContextKey("when-new-block-saved-in-consensus-state-func") WhenNewBlockConfirmedFuncContextKey = util.ContextKey("when-new-block-confirmed-func") BallotStuckResolverContextKey = util.ContextKey("ballot-stuck-resolver") )
View Source
var ( PNameStorage = ps.Name("storage") PNameStartStorage = ps.Name("start-storage") PNameCheckLeveldbStorage = ps.Name("check-leveldb-storage") PNameCheckLoadFromDatabase = ps.Name("load-from-database") PNameCleanStorage = ps.Name("clean-storage") PNameCreateLocalFS = ps.Name("create-localfs") PNameCheckLocalFS = ps.Name("check-localfs") PNameLoadDatabase = ps.Name("load-database") FSNodeInfoContextKey = util.ContextKey("fs-node-info") LeveldbStorageContextKey = util.ContextKey("leveldb-storage") CenterDatabaseContextKey = util.ContextKey("center-database") PermanentDatabaseContextKey = util.ContextKey("permanent-database") PoolDatabaseContextKey = util.ContextKey("pool-database") LastVoteproofsHandlerContextKey = util.ContextKey("last-voteproofs-handler") )
View Source
var ( LocalFSDataDirectoryName = "data" LocalFSDatabaseDirectoryName = "db" LeveldbURIScheme = "leveldb" RedisPermanentDatabasePrefixFormat = "mitum-%s" )
View Source
var ( PNameSuffrageCandidateLimiterSet = ps.Name("suffrage-candidate-limiter-set") PNamePatchLastConsensusNodesWatcher = ps.Name("patch-last-consensus-nodes-watcher") PNameLastConsensusNodesWatcher = ps.Name("last-consensus-nodes-watcher") PNameStartLastConsensusNodesWatcher = ps.Name("start-last-consensus-nodes-watcher") PNameNodeInConsensusNodesFunc = ps.Name("node-in-consensus-nodes-func") SuffrageCandidateLimiterSetContextKey = util.ContextKey("suffrage-candidate-limiter-set") LastConsensusNodesWatcherContextKey = util.ContextKey("last-consensus-nodes-watcher") NodeInConsensusNodesFuncContextKey = util.ContextKey("node-in-consensus-nodes-func") SuffragePoolContextKey = util.ContextKey("suffrage-pool") )
View Source
var ( PNameSyncSourceChecker = ps.Name("sync-source-checker") PNameStartSyncSourceChecker = ps.Name("start-sync-source-checker") SyncSourceCheckerContextKey = util.ContextKey("sync-source-checker") SyncSourcePoolContextKey = util.ContextKey("sync-source-pool") )
View Source
var ( PNameTimeSyncer = ps.Name("time-syncer") TimeSyncerContextKey = util.ContextKey("time-syncer") )
View Source
var ( PprofRequestHeaderHint = hint.MustNewHint("pprof-header-v0.0.1") HandlerPrefixPprof = "pprof" )
View Source
var ( PNameLogging = ps.Name("logging") PNameLoggingWithCLI = ps.Name("logging-cli") )
View Source
var ( VersionContextKey = util.ContextKey("version") FlagsContextKey = util.ContextKey("flags") KongContextContextKey = util.ContextKey("kong-context") LoggingContextKey = util.ContextKey("logging") )
View Source
var DefaultDesignURI = "./config.yml"
View Source
var DefaultTimeSyncerInterval = time.Minute * 10
View Source
var Hinters = []encoder.DecodeDetail{ {Hint: DefaultNodeInfoHint, Instance: DefaultNodeInfo{}}, {Hint: base.BaseOperationProcessReasonErrorHint, Instance: base.BaseOperationProcessReasonError{}}, {Hint: base.BaseStateHint, Instance: base.BaseState{}}, {Hint: base.MPrivatekeyHint, Instance: base.MPrivatekey{}}, {Hint: base.MPublickeyHint, Instance: base.MPublickey{}}, {Hint: base.OperationFixedtreeHint, Instance: base.OperationFixedtreeNode{}}, {Hint: base.StateFixedtreeHint, Instance: fixedtree.BaseNode{}}, {Hint: base.StringAddressHint, Instance: base.StringAddress{}}, {Hint: isaac.ACCEPTBallotFactHint, Instance: isaac.ACCEPTBallotFact{}}, {Hint: isaac.ACCEPTBallotHint, Instance: isaac.ACCEPTBallot{}}, {Hint: isaac.ACCEPTBallotSignFactHint, Instance: isaac.ACCEPTBallotSignFact{}}, {Hint: isaac.ACCEPTVoteproofHint, Instance: isaac.ACCEPTVoteproof{}}, {Hint: isaac.ACCEPTWithdrawVoteproofHint, Instance: isaac.ACCEPTWithdrawVoteproof{}}, {Hint: isaac.ACCEPTStuckVoteproofHint, Instance: isaac.ACCEPTStuckVoteproof{}}, {Hint: isaac.FixedSuffrageCandidateLimiterRuleHint, Instance: isaac.FixedSuffrageCandidateLimiterRule{}}, {Hint: isaac.INITBallotFactHint, Instance: isaac.INITBallotFact{}}, {Hint: isaac.INITBallotHint, Instance: isaac.INITBallot{}}, {Hint: isaac.INITBallotSignFactHint, Instance: isaac.INITBallotSignFact{}}, {Hint: isaac.INITVoteproofHint, Instance: isaac.INITVoteproof{}}, {Hint: isaac.INITWithdrawVoteproofHint, Instance: isaac.INITWithdrawVoteproof{}}, {Hint: isaac.INITStuckVoteproofHint, Instance: isaac.INITStuckVoteproof{}}, {Hint: isaac.LocalParamsHint, Instance: &isaac.LocalParams{}}, {Hint: isaac.ManifestHint, Instance: isaac.Manifest{}}, {Hint: isaac.NetworkPolicyHint, Instance: isaac.NetworkPolicy{}}, {Hint: isaac.NetworkPolicyStateValueHint, Instance: isaac.NetworkPolicyStateValue{}}, {Hint: isaac.NodeHint, Instance: base.BaseNode{}}, {Hint: isaac.ProposalFactHint, Instance: isaac.ProposalFact{}}, {Hint: isaac.ProposalSignFactHint, Instance: isaac.ProposalSignFact{}}, {Hint: isaac.SuffrageConfirmBallotFactHint, Instance: isaac.SuffrageConfirmBallotFact{}}, {Hint: isaac.SuffrageCandidateStateValueHint, Instance: isaac.SuffrageCandidateStateValue{}}, {Hint: isaac.SuffrageCandidatesStateValueHint, Instance: isaac.SuffrageCandidatesStateValue{}}, {Hint: isaac.SuffrageNodeStateValueHint, Instance: isaac.SuffrageNodeStateValue{}}, {Hint: isaac.SuffrageNodesStateValueHint, Instance: isaac.SuffrageNodesStateValue{}}, {Hint: isaac.SuffrageWithdrawOperationHint, Instance: isaac.SuffrageWithdrawOperation{}}, {Hint: isaacblock.BlockMapHint, Instance: isaacblock.BlockMap{}}, {Hint: isaacblock.SuffrageProofHint, Instance: isaacblock.SuffrageProof{}}, { Hint: isaacnetwork.ExistsInStateOperationRequestHeaderHint, Instance: isaacnetwork.ExistsInStateOperationRequestHeader{}, }, {Hint: isaacnetwork.BlockMapItemRequestHeaderHint, Instance: isaacnetwork.BlockMapItemRequestHeader{}}, {Hint: isaacnetwork.BlockMapRequestHeaderHint, Instance: isaacnetwork.BlockMapRequestHeader{}}, {Hint: isaacnetwork.CallbackBroadcastMessageHint, Instance: isaacnetwork.CallbackBroadcastMessage{}}, {Hint: isaacnetwork.CallbackMessageHeaderHint, Instance: isaacnetwork.CallbackMessageHeader{}}, {Hint: isaacnetwork.LastBlockMapRequestHeaderHint, Instance: isaacnetwork.LastBlockMapRequestHeader{}}, {Hint: isaacnetwork.LastSuffrageProofRequestHeaderHint, Instance: isaacnetwork.LastSuffrageProofRequestHeader{}}, {Hint: isaacnetwork.NodeChallengeRequestHeaderHint, Instance: isaacnetwork.NodeChallengeRequestHeader{}}, {Hint: isaacnetwork.NodeInfoHint, Instance: isaacnetwork.NodeInfo{}}, {Hint: isaacnetwork.NodeInfoRequestHeaderHint, Instance: isaacnetwork.NodeInfoRequestHeader{}}, {Hint: isaacnetwork.OperationRequestHeaderHint, Instance: isaacnetwork.OperationRequestHeader{}}, {Hint: isaacnetwork.ProposalRequestHeaderHint, Instance: isaacnetwork.ProposalRequestHeader{}}, {Hint: isaacnetwork.RequestProposalRequestHeaderHint, Instance: isaacnetwork.RequestProposalRequestHeader{}}, {Hint: isaacnetwork.ResponseHeaderHint, Instance: isaacnetwork.ResponseHeader{}}, {Hint: isaacnetwork.SendBallotsHeaderHint, Instance: isaacnetwork.SendBallotsHeader{}}, {Hint: isaacnetwork.SendOperationRequestHeaderHint, Instance: isaacnetwork.SendOperationRequestHeader{}}, {Hint: isaacnetwork.StateRequestHeaderHint, Instance: isaacnetwork.StateRequestHeader{}}, { Hint: isaacnetwork.SuffrageNodeConnInfoRequestHeaderHint, Instance: isaacnetwork.SuffrageNodeConnInfoRequestHeader{}, }, {Hint: isaacnetwork.SuffrageProofRequestHeaderHint, Instance: isaacnetwork.SuffrageProofRequestHeader{}}, {Hint: isaacnetwork.SyncSourceConnInfoRequestHeaderHint, Instance: isaacnetwork.SyncSourceConnInfoRequestHeader{}}, {Hint: isaacoperation.GenesisNetworkPolicyFactHint, Instance: isaacoperation.GenesisNetworkPolicyFact{}}, {Hint: isaacoperation.GenesisNetworkPolicyHint, Instance: isaacoperation.GenesisNetworkPolicy{}}, {Hint: isaacoperation.SuffrageCandidateHint, Instance: isaacoperation.SuffrageCandidate{}}, {Hint: isaacoperation.SuffrageGenesisJoinHint, Instance: isaacoperation.SuffrageGenesisJoin{}}, {Hint: isaacoperation.SuffrageDisjoinHint, Instance: isaacoperation.SuffrageDisjoin{}}, {Hint: isaacoperation.SuffrageJoinHint, Instance: isaacoperation.SuffrageJoin{}}, { Hint: isaacoperation.SuffrageGenesisJoinFactHint, Instance: isaacoperation.SuffrageGenesisJoinFact{}, }, {Hint: isaacstates.MissingBallotsRequestsMessageHint, Instance: isaacstates.MissingBallotsRequestMessage{}}, {Hint: PprofRequestHeaderHint, Instance: PprofRequestHeader{}}, {Hint: quicmemberlist.NodeHint, Instance: quicmemberlist.BaseNode{}}, }
View Source
var PNameGenerateGenesis = ps.Name("generate-genesis")
View Source
var PNameWatchDesign = ps.Name("watch-design")
View Source
var SupportedProposalOperationFactHinters = []encoder.DecodeDetail{ {Hint: isaac.SuffrageWithdrawFactHint, Instance: isaac.SuffrageWithdrawFact{}}, {Hint: isaacoperation.SuffrageCandidateFactHint, Instance: isaacoperation.SuffrageCandidateFact{}}, {Hint: isaacoperation.SuffrageDisjoinFactHint, Instance: isaacoperation.SuffrageDisjoinFact{}}, {Hint: isaacoperation.SuffrageJoinFactHint, Instance: isaacoperation.SuffrageJoinFact{}}, }
Functions ¶
func CleanStorage ¶
func DefaultINITPS ¶
func DefaultMainPS ¶
func DefaultQuicConfig ¶
func DefaultQuicConfig() *quic.Config
func DefaultRunPS ¶
func DefaultWhenNewBlockSavedInConsensusStateFunc ¶
func DefaultWhenNewBlockSavedInConsensusStateFunc( log *logging.Logging, params *isaac.LocalParams, ballotbox *isaacstates.Ballotbox, db isaac.Database, nodeinfo *isaacnetwork.NodeInfoUpdater, ) func(base.Height)
func DefaultWhenNewBlockSavedInSyncingStateFunc ¶
func DefaultWhenNewBlockSavedInSyncingStateFunc( log *logging.Logging, db isaac.Database, nodeinfo *isaacnetwork.NodeInfoUpdater, ) func(base.Height)
func FixedSuffrageCandidateLimiterFunc ¶
func FixedSuffrageCandidateLimiterFunc() func( base.SuffrageCandidateLimiterRule, ) (base.SuffrageCandidateLimiter, error)
func GetDiscoveriesFromLocked ¶
func GetDiscoveriesFromLocked(l *util.Locked[[]quicstream.UDPConnInfo]) []quicstream.UDPConnInfo
func GetLastSuffrageCandidateFunc ¶
func GetLastSuffrageCandidateFunc(pctx context.Context) (isaac.GetLastSuffrageCandidateStateRemoteFunc, error)
func GetLastSuffrageProofFunc ¶
func GetLastSuffrageProofFunc(pctx context.Context) (isaac.GetLastSuffrageProofFromRemoteFunc, error)
func GetSuffrageProofFromRemoteFunc ¶
func GetSuffrageProofFromRemoteFunc(pctx context.Context) ( isaac.GetSuffrageProofFromRemoteFunc, error, )
func ImportBlocks ¶
func IsValidSyncSourcesDesign ¶
func IsValidSyncSourcesDesign( d SyncSourcesDesign, localAddress base.Address, localPublishString, localPublishResolved string, ) error
func LastHeightOfLocalFS ¶
func LoadDatabase ¶
func LoadDatabase( fsnodeinfo NodeInfo, permuri string, root string, encs *encoder.Encoders, enc encoder.Encoder, ) ( *leveldbstorage.Storage, *isaacdatabase.Center, isaac.PermanentDatabase, *isaacdatabase.TempPool, error, )
func LoadHinters ¶
func LoadPermanentDatabase ¶
func LocalFSDataDirectory ¶
func LocalFromDesign ¶
func LocalFromDesign(design NodeDesign) (base.LocalNode, error)
func MajoritySuffrageCandidateLimiterFunc ¶
func MajoritySuffrageCandidateLimiterFunc( db isaac.Database, ) func(base.SuffrageCandidateLimiterRule) (base.SuffrageCandidateLimiter, error)
func MergeBlockWriteToPermanentDatabase ¶
func MergeBlockWriteToPermanentDatabase( ctx context.Context, bwdb isaac.BlockWriteDatabase, perm isaac.PermanentDatabase, ) error
func NetworkHandlerPprofFunc ¶
func NetworkHandlerPprofFunc(encs *encoder.Encoders) quicstream.Handler
func NewBlockWriterFunc ¶
func NewNetworkClient ¶
func NewNetworkClient( encs *encoder.Encoders, enc encoder.Encoder, idleTimeout time.Duration, networkID base.NetworkID, ) *isaacnetwork.QuicstreamClient
func NewProposalSelector ¶
func NewProposalSelector(pctx context.Context) (*isaac.BaseProposalSelector, error)
func NewSuffrageCandidateLimiterFunc ¶
func NewSuffrageCandidateLimiterFunc(pctx context.Context) ( func(base.Height, base.GetStateFunc) (base.OperationProcessorProcessFunc, error), error, )
func OperationPreProcess ¶
func PBallotStuckResolver ¶
func PCallbackBroadcaster ¶
func PCheckLeveldbStorage ¶
func PCloseSyncSourceChecker ¶
func POperationProcessorsMap ¶
func PStartSyncSourceChecker ¶
func QuicstreamHandlerGetNodeInfoFunc ¶
func QuicstreamHandlerGetNodeInfoFunc( enc encoder.Encoder, nodeinfo *isaacnetwork.NodeInfoUpdater, ) func() ([]byte, error)
func QuicstreamHandlerSuffrageNodeConnInfoFunc ¶
func QuicstreamHandlerSuffrageNodeConnInfoFunc( db isaac.Database, memberlist *quicmemberlist.Memberlist, ) func() ([]isaac.NodeConnInfo, error)
func RemoveLocalFS ¶
func SaveNodeInfo ¶
func SetupLoggingFromFlags ¶
func SetupLoggingFromFlags(flag LoggingFlags) (*logging.Logging, error)
func UpdateNodeInfoWithNewBlock ¶
func UpdateNodeInfoWithNewBlock( db isaac.Database, nodeinfo *isaacnetwork.NodeInfoUpdater, ) error
func ValidateLocalFS ¶
Types ¶
type AddressFlag ¶
type AddressFlag struct {
// contains filtered or unexported fields
}
func (AddressFlag) Address ¶
func (f AddressFlag) Address() base.Address
func (*AddressFlag) UnmarshalText ¶
func (f *AddressFlag) UnmarshalText(b []byte) error
type BaseFlags ¶
type BaseFlags struct {
LoggingFlags `embed:"" prefix:"log."`
}
type ConnInfoFlag ¶
type ConnInfoFlag struct {
// contains filtered or unexported fields
}
func (*ConnInfoFlag) ConnInfo ¶
func (f *ConnInfoFlag) ConnInfo() (quicstream.UDPConnInfo, error)
func (ConnInfoFlag) MarshalText ¶
func (f ConnInfoFlag) MarshalText() ([]byte, error)
func (ConnInfoFlag) String ¶
func (f ConnInfoFlag) String() string
func (*ConnInfoFlag) UnmarshalText ¶
func (f *ConnInfoFlag) UnmarshalText(b []byte) error
type DefaultNodeInfo ¶
type DefaultNodeInfo struct { hint.BaseHinter // contains filtered or unexported fields }
func CreateDefaultNodeInfo ¶
func CreateDefaultNodeInfo(networkID base.NetworkID, version util.Version) DefaultNodeInfo
func NewDefaultNodeInfo ¶
func (DefaultNodeInfo) CreatedAt ¶
func (info DefaultNodeInfo) CreatedAt() time.Time
func (DefaultNodeInfo) ID ¶
func (info DefaultNodeInfo) ID() string
func (DefaultNodeInfo) IsValid ¶
func (info DefaultNodeInfo) IsValid([]byte) error
func (DefaultNodeInfo) LastStartedAt ¶
func (info DefaultNodeInfo) LastStartedAt() time.Time
func (DefaultNodeInfo) MarshalJSON ¶
func (info DefaultNodeInfo) MarshalJSON() ([]byte, error)
func (DefaultNodeInfo) NetworkID ¶
func (info DefaultNodeInfo) NetworkID() base.NetworkID
func (*DefaultNodeInfo) UnmarshalJSON ¶
func (info *DefaultNodeInfo) UnmarshalJSON(b []byte) error
func (DefaultNodeInfo) UpdateLastStartedAt ¶
func (info DefaultNodeInfo) UpdateLastStartedAt() NodeInfo
func (DefaultNodeInfo) Version ¶
func (info DefaultNodeInfo) Version() util.Version
type DesignFlag ¶
type DesignFlag struct { //revive:disable:line-length-limit URI DesignURIFlag `name:"design" help:"design uri; 'file:///config.yml', 'https://a.b.c.d/config.yml'" group:"design" default:"${design_uri}"` DesignURIProperties `embed:"" prefix:"design."` }
DesignFlag is the flag for loading design from various locations. Only one location is allowed. For example, - "--design=./no0sas.yml", or - "--design=https://a.b.c.d/no0sas.yml", or - "--design=consul://a.b.c.d:8500/no0sas/design", or - "--design=consul:///no0sas/design": If address not set, the environment variables of consul will be used.
func (DesignFlag) Properties ¶
func (f DesignFlag) Properties() DesignURIProperties
func (DesignFlag) Scheme ¶
func (f DesignFlag) Scheme() string
func (DesignFlag) URL ¶
func (f DesignFlag) URL() *url.URL
type DesignURIFlag ¶
type DesignURIFlag struct {
// contains filtered or unexported fields
}
func (*DesignURIFlag) UnmarshalText ¶
func (f *DesignURIFlag) UnmarshalText(b []byte) error
type DesignURIProperties ¶
type DesignURIProperties struct {
HTTPSTLSInsecure bool `name:"https.tls_insecure" negatable:"" help:"https tls insecure" group:"design"`
}
type DevFlags ¶
type DevFlags struct { // revive:disable:line-length-limit //revive:disable:struct-tag AllowRiskyThreshold bool `name:"allow-risky-threshold" help:"allow risky threshold under threshold, ${safe_threshold}" group:"dev"` DelaySyncer time.Duration `name:"delay-syncer" help:"initial delay when sync one block" group:"dev"` }
type GenesisBlockGenerator ¶
type GenesisDesign ¶
func GenesisDesignFromFile ¶
func (*GenesisDesign) DecodeYAML ¶
func (d *GenesisDesign) DecodeYAML(b []byte, enc *jsonenc.Encoder) error
func (*GenesisDesign) IsValid ¶
func (*GenesisDesign) IsValid([]byte) error
type GenesisDesignYAMLUnmarshaler ¶
type GenesisDesignYAMLUnmarshaler struct {
Facts []interface{} `yaml:"facts" json:"facts"`
}
type HeightFlag ¶
type HeightFlag struct {
// contains filtered or unexported fields
}
func (*HeightFlag) Height ¶
func (f *HeightFlag) Height() base.Height
func (*HeightFlag) IsSet ¶
func (f *HeightFlag) IsSet() bool
func (*HeightFlag) UnmarshalText ¶
func (f *HeightFlag) UnmarshalText(b []byte) error
type LogLevelFlag ¶
type LogLevelFlag struct {
// contains filtered or unexported fields
}
func (LogLevelFlag) Level ¶
func (f LogLevelFlag) Level() zerolog.Level
func (LogLevelFlag) String ¶
func (f LogLevelFlag) String() string
func (*LogLevelFlag) UnmarshalText ¶
func (f *LogLevelFlag) UnmarshalText(b []byte) error
type LogOutFlag ¶
type LogOutFlag string
type LoggingFlags ¶
type LoggingFlags struct { // revive:disable:line-length-limit //revive:disable:struct-tag Out LogOutFlag `name:"out" default:"${log_out}" help:"log output file: {stdout, stderr, <file>}" group:"logging"` Format string `enum:"json, terminal" default:"${log_format}" help:"log format: {${enum}}" group:"logging"` Level LogLevelFlag `name:"level" default:"${log_level}" help:"log level: {trace, debug, info, warn, error}" group:"logging"` ForceColor bool `name:"force-color" default:"${log_force_color}" negatable:"" help:"log force color" group:"logging"` }
type LongRunningMemberlistJoin ¶
type LongRunningMemberlistJoin struct {
// contains filtered or unexported fields
}
func NewLongRunningMemberlistJoin ¶
func NewLongRunningMemberlistJoin( ensureJoin func() (bool, error), isJoined func() bool, ) *LongRunningMemberlistJoin
func (*LongRunningMemberlistJoin) Cancel ¶
func (l *LongRunningMemberlistJoin) Cancel() bool
func (*LongRunningMemberlistJoin) Join ¶
func (l *LongRunningMemberlistJoin) Join() <-chan struct{}
type NodeDesign ¶
type NodeDesign struct { Address base.Address Privatekey base.Privatekey Storage NodeStorageDesign Network NodeNetworkDesign NetworkID base.NetworkID LocalParams *isaac.LocalParams SyncSources SyncSourcesDesign TimeServerPort int TimeServer string }
func NodeDesignFromConsul ¶
func NodeDesignFromFile ¶
func NodeDesignFromHTTP ¶
func (*NodeDesign) Check ¶
func (d *NodeDesign) Check(devflags DevFlags) error
func (*NodeDesign) DecodeYAML ¶
func (d *NodeDesign) DecodeYAML(b []byte, enc *jsonenc.Encoder) error
func (*NodeDesign) IsValid ¶
func (d *NodeDesign) IsValid([]byte) error
func (NodeDesign) MarshalYAML ¶
func (d NodeDesign) MarshalYAML() (interface{}, error)
func (NodeDesign) MarshalZerologObject ¶
func (d NodeDesign) MarshalZerologObject(e *zerolog.Event)
type NodeDesignYAMLMarshaler ¶
type NodeDesignYAMLMarshaler struct { Address base.Address `yaml:"address"` Privatekey base.Privatekey `yaml:"privatekey"` Storage NodeStorageDesign `yaml:"storage"` NetworkID string `yaml:"network_id"` TimeServer string `yaml:"time_server,omitempty"` Network NodeNetworkDesign `yaml:"network"` LocalParams *isaac.LocalParams `yaml:"parameters"` //nolint:tagliatelle //... SyncSources SyncSourcesDesign `yaml:"sync_sources"` }
type NodeDesignYAMLUnmarshaler ¶
type NodeDesignYAMLUnmarshaler struct { SyncSources interface{} `yaml:"sync_sources"` Storage NodeStorageDesignYAMLMarshal `yaml:"storage"` Address string `yaml:"address"` Privatekey string `yaml:"privatekey"` NetworkID string `yaml:"network_id"` TimeServer string `yaml:"time_server,omitempty"` LocalParams map[string]interface{} `yaml:"parameters"` //nolint:tagliatelle //... Network NodeNetworkDesignYAMLMarshaler `yaml:"network"` }
type NodeInfo ¶
type NodeInfo interface { util.IsValider ID() string NetworkID() base.NetworkID CreatedAt() time.Time LastStartedAt() time.Time UpdateLastStartedAt() NodeInfo Version() util.Version // NOTE mitum build version }
func CheckLocalFS ¶
func CreateLocalFS ¶
type NodeNetworkDesign ¶
type NodeNetworkDesign struct { Bind *net.UDPAddr `yaml:"bind"` PublishString string `yaml:"publish"` //nolint:tagliatelle //... TLSInsecure bool `yaml:"tls_insecure"` // contains filtered or unexported fields }
func (*NodeNetworkDesign) DecodeYAML ¶
func (d *NodeNetworkDesign) DecodeYAML(b []byte, enc *jsonenc.Encoder) error
func (*NodeNetworkDesign) IsValid ¶
func (d *NodeNetworkDesign) IsValid([]byte) error
func (NodeNetworkDesign) MarshalYAML ¶
func (d NodeNetworkDesign) MarshalYAML() (interface{}, error)
func (NodeNetworkDesign) Publish ¶
func (d NodeNetworkDesign) Publish() *net.UDPAddr
type NodeNetworkDesignYAMLMarshaler ¶
type NodeNetworkDesignYAMLMarshaler struct { Bind string `yaml:"bind,omitempty"` Publish string `yaml:"publish"` TLSInsecure bool `yaml:"tls_insecure"` }
func (*NodeNetworkDesignYAMLMarshaler) Decode ¶
func (y *NodeNetworkDesignYAMLMarshaler) Decode(*jsonenc.Encoder) (d NodeNetworkDesign, _ error)
type NodeStorageDesign ¶
func (*NodeStorageDesign) DecodeYAML ¶
func (d *NodeStorageDesign) DecodeYAML(b []byte, enc *jsonenc.Encoder) error
func (*NodeStorageDesign) IsValid ¶
func (d *NodeStorageDesign) IsValid([]byte) error
func (NodeStorageDesign) MarshalYAML ¶
func (d NodeStorageDesign) MarshalYAML() (interface{}, error)
type NodeStorageDesignYAMLMarshal ¶
type NodeStorageDesignYAMLMarshal struct { Base string `yaml:"base"` Database string `yaml:"database"` }
func (*NodeStorageDesignYAMLMarshal) Decode ¶
func (y *NodeStorageDesignYAMLMarshal) Decode(*jsonenc.Encoder) (d NodeStorageDesign, _ error)
type PprofRequestHeader ¶
type PprofRequestHeader struct { isaacnetwork.BaseHeader // contains filtered or unexported fields }
func NewPprofRequestHeader ¶
func NewPprofRequestHeader(label string, seconds uint64, gc bool) PprofRequestHeader
func (PprofRequestHeader) GC ¶
func (h PprofRequestHeader) GC() bool
func (PprofRequestHeader) HandlerPrefix ¶
func (PprofRequestHeader) HandlerPrefix() string
func (PprofRequestHeader) IsValid ¶
func (h PprofRequestHeader) IsValid([]byte) error
func (PprofRequestHeader) Label ¶
func (h PprofRequestHeader) Label() string
func (PprofRequestHeader) MarshalJSON ¶
func (h PprofRequestHeader) MarshalJSON() ([]byte, error)
func (PprofRequestHeader) Seconds ¶
func (h PprofRequestHeader) Seconds() uint64
func (*PprofRequestHeader) UnmarshalJSON ¶
func (h *PprofRequestHeader) UnmarshalJSON(b []byte) error
type SuffragePool ¶
func NewSuffragePool ¶
func (*SuffragePool) Purge ¶
func (s *SuffragePool) Purge()
type SyncSourcesDesign ¶
type SyncSourcesDesign []isaacnetwork.SyncSource
func (*SyncSourcesDesign) DecodeYAML ¶
func (d *SyncSourcesDesign) DecodeYAML(b []byte, enc *jsonenc.Encoder) error
func (*SyncSourcesDesign) IsValid ¶
func (d *SyncSourcesDesign) IsValid([]byte) error
Source Files ¶
- block.go
- design.go
- flags.go
- genesis.go
- hinters.go
- info.go
- logging.go
- p_design.go
- p_design_watch.go
- p_discovery.go
- p_encoder.go
- p_genesis.go
- p_local.go
- p_memberlist.go
- p_network.go
- p_network_handlers.go
- p_nodeinfo.go
- p_proposal.go
- p_proposal_maker.go
- p_states.go
- p_storage.go
- p_suffrage.go
- p_sync.go
- p_time_sync.go
- profile.go
- ps_init.go
- ps_main.go
- ps_run.go
- suffrage.go
Click to show internal directories.
Click to hide internal directories.