 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func ParsePublicKeysFromStrings(pubKeys []string) (keys.PublicKeys, error)
- type AlphabetContracts
- type ChainConfig
- type ChainEndpointConfig
- type ContractProcessor
- type GlagoliticLetter
- type IrFetcherWithNotary
- type IrFetcherWithoutNotary
- type MultinetConfig
- type Server
- func (s *Server) AlphabetIndex(ctx context.Context) int
- func (s *Server) CompareAndSwapHealthStatus(ctx context.Context, oldSt, newSt control.HealthStatus) (swapped bool)
- func (s *Server) EpochCounter() uint64
- func (s *Server) EpochDuration() uint64
- func (s *Server) HealthStatus() control.HealthStatus
- func (s *Server) InnerRingIndex(ctx context.Context) int
- func (s *Server) InnerRingSize(ctx context.Context) int
- func (s *Server) IsActive(ctx context.Context) bool
- func (s *Server) IsAlphabet(ctx context.Context) bool
- func (s *Server) ResetEpochTimer(h uint32) error
- func (s *Server) SetEpochCounter(val uint64)
- func (s *Server) SetEpochDuration(val uint64)
- func (s *Server) SetExtraWallets(wallets []string) error
- func (s *Server) Start(ctx context.Context, intError chan<- error) (err error)
- func (s *Server) Stop(ctx context.Context)
- func (s *Server) VoteForSidechainValidator(ctx context.Context, prm governance.VoteValidatorPrm) error
 
- type ServerConfig
- type SubnetConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParsePublicKeysFromStrings ¶
func ParsePublicKeysFromStrings(pubKeys []string) (keys.PublicKeys, error)
ParsePublicKeysFromStrings returns slice of neo public keys from slice of hex encoded strings.
Types ¶
type AlphabetContracts ¶ added in v0.37.0
type AlphabetContracts map[GlagoliticLetter]util.Uint160
func NewAlphabetContracts ¶ added in v0.37.0
func NewAlphabetContracts() AlphabetContracts
func (AlphabetContracts) GetByIndex ¶ added in v0.37.0
func (a AlphabetContracts) GetByIndex(ind int) (util.Uint160, bool)
type ChainConfig ¶ added in v0.46.7
type ChainConfig struct {
	Endpoints      []ChainEndpointConfig
	DialTimeout    time.Duration
	SwitchInterval time.Duration
}
    type ChainEndpointConfig ¶ added in v0.46.7
type ContractProcessor ¶
type ContractProcessor interface {
	ListenerNotificationHandlers() []event.NotificationHandlerInfo
	ListenerNotaryParsers() []event.NotaryParserInfo
	ListenerNotaryHandlers() []event.NotaryHandlerInfo
}
    ContractProcessor interface defines functions for binding event producers such as event.Listener and Timers with contract processor.
type GlagoliticLetter ¶
type GlagoliticLetter int8
func (GlagoliticLetter) String ¶
func (l GlagoliticLetter) String() string
String returns l in config-compatible format.
type IrFetcherWithNotary ¶
type IrFetcherWithNotary struct {
	// contains filtered or unexported fields
}
    IrFetcherWithNotary fetches keys using notary contract. Must be created with NewIRFetcherWithNotary.
func NewIRFetcherWithNotary ¶
func NewIRFetcherWithNotary(cli *client.Client) *IrFetcherWithNotary
NewIRFetcherWithNotary creates IrFetcherWithNotary.
IrFetcherWithNotary can be used to obtain innerring key list if network that client is connected to supports notary contract.
Passed client is required. Panics if nil.
func (IrFetcherWithNotary) InnerRingKeys ¶
func (fN IrFetcherWithNotary) InnerRingKeys(ctx context.Context) (keys.PublicKeys, error)
InnerRingKeys fetches list of innerring keys from NeoFSAlphabet role in the sidechain.
type IrFetcherWithoutNotary ¶
type IrFetcherWithoutNotary struct {
	// contains filtered or unexported fields
}
    IrFetcherWithoutNotary fetches keys using netmap contract. Must be created with NewIRFetcherWithoutNotary.
func NewIRFetcherWithoutNotary ¶
func NewIRFetcherWithoutNotary(nm *nmClient.Client) *IrFetcherWithoutNotary
NewIRFetcherWithoutNotary creates IrFetcherWithoutNotary.
IrFetcherWithoutNotary must be used to obtain innerring key list if network that netmap wrapper is connected to does not support notary contract.
Passed netmap wrapper is required. Panics if nil.
func (IrFetcherWithoutNotary) InnerRingKeys ¶
func (f IrFetcherWithoutNotary) InnerRingKeys(ctx context.Context) (keys.PublicKeys, error)
InnerRingKeys fetches list of innerring keys from netmap contract in the sidechain.
type MultinetConfig ¶ added in v0.46.7
type Server ¶
type Server struct {
	// contains filtered or unexported fields
}
    Server is the inner ring application structure, that contains all event processors, shared variables and event handlers.
func New ¶
func New(ctx context.Context, log *logger.Logger, c *ServerConfig, cfg *viper.Viper, errChan chan<- error, metrics *metrics.InnerRingServiceMetrics, cmode *atomic.Bool, audit *atomic.Bool, ) (*Server, error)
New creates instance of inner ring sever structure.
func (*Server) AlphabetIndex ¶
AlphabetIndex is a getter for a global index of node in alphabet list. Negative index means that node is not in the alphabet list.
func (*Server) CompareAndSwapHealthStatus ¶ added in v0.42.9
func (*Server) EpochCounter ¶
EpochCounter is a getter for a global epoch counter.
func (*Server) EpochDuration ¶
EpochDuration is a getter for a global epoch duration.
func (*Server) HealthStatus ¶
func (s *Server) HealthStatus() control.HealthStatus
HealthStatus returns the current health status of the IR application.
func (*Server) InnerRingIndex ¶
InnerRingIndex is a getter for a global index of node in inner ring list. Negative index means that node is not in the inner ring list.
func (*Server) InnerRingSize ¶
InnerRingSize is a getter for a global size of inner ring list. This value paired with inner ring index.
func (*Server) IsAlphabet ¶
IsAlphabet is a getter for a global alphabet flag state.
func (*Server) ResetEpochTimer ¶
ResetEpochTimer resets the block timer that produces events to update epoch counter in the netmap contract. It is used to synchronize this even production based on the block with a notification of the last epoch.
func (*Server) SetEpochCounter ¶
SetEpochCounter is a setter for contract processors to update global epoch counter.
func (*Server) SetEpochDuration ¶
SetEpochDuration is a setter for the Netmap processor to update global epoch duration.
func (*Server) SetExtraWallets ¶ added in v0.37.0
func (*Server) VoteForSidechainValidator ¶
func (s *Server) VoteForSidechainValidator(ctx context.Context, prm governance.VoteValidatorPrm) error
VoteForSidechainValidator calls vote method on alphabet contracts with the provided list of keys.
type ServerConfig ¶ added in v0.46.7
type ServerConfig struct {
	Multinet MultinetConfig
	MainChain  ChainConfig
	MorphChain struct {
		ChainConfig
		Validators []string
	}
	Emit struct {
		Storage struct {
			Amount uint64
		}
		Mint struct {
			Value     int64
			CacheSize int
			Threshold uint64
		}
		Gas struct {
			BalanceThreshold int64
		}
		ExtraWallets []string
	}
	PersistentStatePath  string
	LocodeDBPath         string
	SystemdNotifyEnabled bool
	IndexerCacheTimeout  time.Duration
	GovernanceDisable    bool
	WithoutMainnet       bool
	Workers struct {
		Alphabet  int
		Balance   int
		Container int
		Frostfs   int
		Netmap    int
	}
	WalletPath     string
	WalletAddress  string
	WalletPassword string
	ControlGrpcEndpoint   string
	ControlAuthorizedKeys []string
	MainChainFee fixedn.Fixed8
	SideChainFee fixedn.Fixed8
	NetmapCleanerEnabled   bool
	NetmapCleanerThreshold uint64
	TimersEmit uint32
}
    type SubnetConfig ¶ added in v0.46.7
       Source Files
      ¶
      Source Files
      ¶
    
  
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| 
          
            netmap/nodevalidation/state
            
            
          
           Package state collects functionality for verifying states of network map members. | Package state collects functionality for verifying states of network map members. |