Documentation
¶
Index ¶
- type LogProcessor
- type Server
- func (srv *Server) Commit() error
- func (srv *Server) Commitment() []byte
- func (srv *Server) CountNodes() int
- func (srv *Server) CountRecalculations() int
- func (srv *Server) GetCommitmentDetails(commitment [32]byte) (*wire.Commitment, error)
- func (srv *Server) GetCommitmentHistory(sinceCommitment [32]byte) []*wire.Commitment
- func (srv *Server) GetDeltaProofForKeys(keys [][]byte) (*mpt.DeltaMPT, error)
- func (srv *Server) GetNextLogIndex(logID [32]byte) uint64
- func (srv *Server) GetProofForKeys(keys [][]byte) (*mpt.PartialMPT, error)
- func (srv *Server) GetPubKeyForLogID(logID [32]byte) ([33]byte, error)
- func (srv *Server) RegisterLogID(logID [32]byte, controllingKey [33]byte) error
- func (srv *Server) RegisterLogStatement(logID [32]byte, index uint64, statement []byte) error
- func (srv *Server) Run() error
- func (srv *Server) Stop()
- func (srv *Server) TreeGraph() []byte
- func (srv *Server) TreeSize() int
- type ServerLogProcessor
- func (lp *ServerLogProcessor) AckAppendLog(sls *wire.SignedLogStatement) error
- func (lp *ServerLogProcessor) CommitAppendLog(sls *wire.SignedLogStatement) error
- func (lp *ServerLogProcessor) Process()
- func (lp *ServerLogProcessor) ProcessAppendLog(sls *wire.SignedLogStatement) error
- func (lp *ServerLogProcessor) ProcessCreateLog(scls *wire.SignedCreateLogStatement) error
- func (lp *ServerLogProcessor) ProcessMessage(t wire.MessageType, m []byte) error
- func (lp *ServerLogProcessor) ProcessRequestCommitmentDetails(pm *wire.RequestCommitmentDetailsMessage) error
- func (lp *ServerLogProcessor) ProcessRequestCommitmentHistory(pm *wire.RequestCommitmentHistoryMessage) error
- func (lp *ServerLogProcessor) ProcessRequestDeltaProof(msg *wire.RequestProofMessage) error
- func (lp *ServerLogProcessor) ProcessRequestProof(msg *wire.RequestProofMessage) error
- func (lp *ServerLogProcessor) SendProofs(delta *mpt.DeltaMPT) error
- func (lp *ServerLogProcessor) Stop()
- func (lp *ServerLogProcessor) SubscribeToLog(logID [32]byte)
- func (lp *ServerLogProcessor) VerifyAppendLog(sls *wire.SignedLogStatement) error
- type ServerState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogProcessor ¶
type LogProcessor interface { Process() Stop() SendProofs(delta *mpt.DeltaMPT) error ProcessMessage(t wire.MessageType, m []byte) error ProcessRequestProof(msg *wire.RequestProofMessage) error ProcessCreateLog(scls *wire.SignedCreateLogStatement) error ProcessAppendLog(sls *wire.SignedLogStatement) error }
Interface to be able to mock the LogProcessor for the test cases
func NewLogProcessor ¶
func NewLogProcessor(c net.Conn, srv *Server) LogProcessor
type Server ¶
type Server struct { // The last state of the MPT when we last committed LastCommitMpt *mpt.FullMPT // The state of the MPT upon confirmation from the chain (mined commitment // transaction) LastConfirmedCommitMpt *mpt.FullMPT // The commitment server automatically commits every time a block has been // found. This can be turned off by switching this boolean off. AutoCommit bool // This can be used to switch off keeping a copy of the tree at the commitment // point (used to generate client-side proofs) - this is needed for some tests // and benchmarks where this is not needed to save time KeepCommitmentTree bool // Commit to the blockchain every N blocks (if AutoCommit enabled) CommitEveryNBlocks int // Last block that a commitment was initiated LastCommitHeight int // Blocks to rescan on startup RescanBlocks int // Full server also runs an actual Bitcoin wallet and commits to the actual chain Full bool // Allow disable signature verification to save needless processing time when // initializing benchmarks CheckSignatures bool // contains filtered or unexported fields }
func (*Server) Commitment ¶
func (*Server) CountNodes ¶
func (*Server) CountRecalculations ¶
func (*Server) GetCommitmentDetails ¶
func (srv *Server) GetCommitmentDetails(commitment [32]byte) (*wire.Commitment, error)
func (*Server) GetCommitmentHistory ¶
func (srv *Server) GetCommitmentHistory(sinceCommitment [32]byte) []*wire.Commitment
func (*Server) GetDeltaProofForKeys ¶
func (*Server) GetNextLogIndex ¶
func (*Server) GetProofForKeys ¶
func (srv *Server) GetProofForKeys(keys [][]byte) (*mpt.PartialMPT, error)
func (*Server) GetPubKeyForLogID ¶
func (*Server) RegisterLogID ¶
func (*Server) RegisterLogStatement ¶
type ServerLogProcessor ¶
type ServerLogProcessor struct {
// contains filtered or unexported fields
}
func (*ServerLogProcessor) AckAppendLog ¶
func (lp *ServerLogProcessor) AckAppendLog(sls *wire.SignedLogStatement) error
func (*ServerLogProcessor) CommitAppendLog ¶
func (lp *ServerLogProcessor) CommitAppendLog(sls *wire.SignedLogStatement) error
func (*ServerLogProcessor) Process ¶
func (lp *ServerLogProcessor) Process()
func (*ServerLogProcessor) ProcessAppendLog ¶
func (lp *ServerLogProcessor) ProcessAppendLog(sls *wire.SignedLogStatement) error
func (*ServerLogProcessor) ProcessCreateLog ¶
func (lp *ServerLogProcessor) ProcessCreateLog(scls *wire.SignedCreateLogStatement) error
func (*ServerLogProcessor) ProcessMessage ¶
func (lp *ServerLogProcessor) ProcessMessage(t wire.MessageType, m []byte) error
func (*ServerLogProcessor) ProcessRequestCommitmentDetails ¶
func (lp *ServerLogProcessor) ProcessRequestCommitmentDetails(pm *wire.RequestCommitmentDetailsMessage) error
func (*ServerLogProcessor) ProcessRequestCommitmentHistory ¶
func (lp *ServerLogProcessor) ProcessRequestCommitmentHistory(pm *wire.RequestCommitmentHistoryMessage) error
func (*ServerLogProcessor) ProcessRequestDeltaProof ¶
func (lp *ServerLogProcessor) ProcessRequestDeltaProof(msg *wire.RequestProofMessage) error
func (*ServerLogProcessor) ProcessRequestProof ¶
func (lp *ServerLogProcessor) ProcessRequestProof(msg *wire.RequestProofMessage) error
func (*ServerLogProcessor) SendProofs ¶
func (lp *ServerLogProcessor) SendProofs(delta *mpt.DeltaMPT) error
func (*ServerLogProcessor) Stop ¶
func (lp *ServerLogProcessor) Stop()
func (*ServerLogProcessor) SubscribeToLog ¶
func (lp *ServerLogProcessor) SubscribeToLog(logID [32]byte)
func (*ServerLogProcessor) VerifyAppendLog ¶
func (lp *ServerLogProcessor) VerifyAppendLog(sls *wire.SignedLogStatement) error
type ServerState ¶
Click to show internal directories.
Click to hide internal directories.