Skip to content

Dependencies

yacovm edited this page May 20, 2019 · 35 revisions

Each node communicates with the other nodes by broadcasting messages. To receive messages from Comm nodes must implement the OnReceive(m Message) method.

Comm {
    Broadcast(m Message) 
}

Consensus proposals are different for each application, however, they are all batches of clients' requests and they may contain metadata. The Assembler builds an application specific Proposal that the leader will later propose for consensus. The Assembler is input with metadata that is application specific, and a batch of requests. It returns a proposal that consists of some of the requests, and a remainder of the requests that could be proposed again in a new proposal.

Assembler {
    AssembleProposal(metadata []byte, requests [][]byte) (nextProp Proposal, remainder [][]byte)
}

Each node must store some information on disk.

Storage {
    ...
}

To support different types of signatures, this library is dependent on a Signer.

Signer {
    Sign([]byte) []byte
}

A Verifier is used to validate the proposals suggested by a leader and to verify signatures.

Verifier {
    VerifyProposal(proposal Proposal) error
    VerifyRequest(val []byte) error
    VerifyConsenterSig(signer uint, signature []byte, m []byte) error
}
AppConfig {
    VerificationSequence() uint64
}
Clone this wiki locally