 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- type ContractProcessor
- type IrFetcherWithNotary
- type IrFetcherWithoutNotary
- type Server
- func (s *Server) AlphabetIndex() int
- func (s *Server) EpochCounter() uint64
- func (s *Server) EpochDuration() time.Duration
- func (s *Server) HealthStatus() control.HealthStatus
- func (s *Server) InnerRingIndex() int
- func (s *Server) InnerRingSize() int
- func (s *Server) IsActive() bool
- func (s *Server) IsAlphabet() bool
- func (s *Server) ListNotaryRequests() ([]util.Uint256, error)
- func (s *Server) RequestNotary(method string, args ...[]byte) (util.Uint256, error)
- func (s *Server) ResetEpochTimer(height uint32) error
- func (s *Server) SetEpochCounter(val uint64)
- func (s *Server) SetEpochDuration(val uint64)
- func (s *Server) SignNotary(hash util.Uint256) error
- func (s *Server) Start(ctx context.Context, intError chan<- error) (err error)
- func (s *Server) Stop()
- func (s *Server) VoteForFSChainValidator(validators keys.PublicKeys, trigger *util.Uint256) error
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContractProcessor ¶
type ContractProcessor interface {
	ListenerNotificationParsers() []event.NotificationParserInfo
	ListenerNotificationHandlers() []event.NotificationHandlerInfo
	ListenerNotaryParsers() []event.NotaryParserInfo
	ListenerNotaryHandlers() []event.NotaryHandlerInfo
	TimersHandlers() []event.NotificationHandlerInfo
}
    ContractProcessor interface defines functions for binding event producers such as event.Listener and Timers with contract processor.
type IrFetcherWithNotary ¶ added in v0.23.0
type IrFetcherWithNotary struct {
	// contains filtered or unexported fields
}
    IrFetcherWithNotary fetches keys using notary contract. Must be created with NewIRFetcherWithNotary.
func NewIRFetcherWithNotary ¶ added in v0.23.0
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 ¶ added in v0.23.0
func (fN IrFetcherWithNotary) InnerRingKeys() (keys.PublicKeys, error)
InnerRingKeys fetches list of innerring keys from NeoFSAlphabet role in FS chain.
type IrFetcherWithoutNotary ¶ added in v0.23.0
type IrFetcherWithoutNotary struct {
	// contains filtered or unexported fields
}
    IrFetcherWithoutNotary fetches keys using netmap contract. Must be created with NewIRFetcherWithoutNotary.
func NewIRFetcherWithoutNotary ¶ added in v0.23.0
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 ¶ added in v0.23.0
func (f IrFetcherWithoutNotary) InnerRingKeys() (keys.PublicKeys, error)
InnerRingKeys fetches list of innerring keys from netmap contract in FS chain.
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 *zap.Logger, cfg *config.Config, errChan chan<- error) (*Server, error)
New creates instance of inner ring server structure.
func (*Server) AlphabetIndex ¶ added in v0.18.0
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) EpochCounter ¶
EpochCounter is a getter for a global epoch counter.
func (*Server) EpochDuration ¶ added in v0.26.0
EpochDuration is a getter for a global epoch duration.
func (*Server) HealthStatus ¶ added in v0.22.0
func (s *Server) HealthStatus() control.HealthStatus
HealthStatus returns the current health status of the IR application.
func (*Server) InnerRingIndex ¶ added in v0.18.0
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 ¶ added in v0.14.0
InnerRingSize is a getter for a global size of inner ring list. This value paired with inner ring index.
func (*Server) IsAlphabet ¶ added in v0.18.0
IsAlphabet is a getter for a global alphabet flag state.
func (*Server) ListNotaryRequests ¶ added in v0.45.0
ListNotaryRequests list hashes of all P2PNotaryRequest transactions that are currently in the RPC node's notary request pool.
func (*Server) RequestNotary ¶ added in v0.45.0
RequestNotary create and send a notary request with the sign of current node with the following methods and args:
- "newEpoch", transaction for creating of new NeoFS epoch event in FS chain, no args;
- "setConfig", transaction to add/update global config value in the NeoFS network, 2 args - key and value UTF-8 encoded strings;
- "removeNode", transaction to move nodes to the netmap.NodeStateOffline state in the candidates list, 1 arg is the public key of the node in binary form.
func (*Server) ResetEpochTimer ¶ added in v0.15.0
ResetEpochTimer resets the epoch timer that produces events to update epoch counter in the netmap contract. It is used to synchronize this time-based even production with a notification of the last epoch. Must be called after new epoch notification is received with a corresponding block height.
func (*Server) SetEpochCounter ¶
SetEpochCounter is a setter for contract processors to update global epoch counter.
func (*Server) SetEpochDuration ¶ added in v0.26.0
SetEpochDuration is a setter for the Netmap processor to update global epoch duration.
func (*Server) SignNotary ¶ added in v0.45.0
SignNotary get a notary transaction by its hash, then send it with sign of the current node.
func (*Server) VoteForFSChainValidator ¶ added in v0.44.0
VoteForFSChainValidator calls vote method on alphabet contracts with the provided list of keys and hash of the triggering transaction.
       Source Files
      ¶
      Source Files
      ¶
    
  
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| internal
       | |
| 
          
            client
            
            
          
           Package neofsapiclient provides functionality for IR application communication with NeoFS network. | Package neofsapiclient provides functionality for IR application communication with NeoFS network. | 
| processors
       | |
| 
          
            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. |