Documentation ¶
Overview ¶
Package ordering defines the interface of the ordering service. The high-level purpose of this service is to order the transactions from the pool.
Depending on the implementation, the service can be composed of multiple sub-components. For instance, an ordering service using CoSiPBFT will need to elect a leader every round but one running PoW will only do an ordering locally and creates a block with the proof of work.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Index uint64 Transactions []validation.TransactionResult }
Event describes the current state of the service after an update.
type Proof ¶
type Proof interface { // GetKey returns the key of the proof. GetKey() []byte // GetValue returns the value of the key. GetValue() []byte }
Proof contains the value of a specific key.
type Service ¶
type Service interface { // GetProof must return a proof of the value at the provided key. GetProof(key []byte) (Proof, error) // GetStore returns the store used by the service. GetStore() store.Readable // Watch returns a channel populated with events when transactions are // accepted. Watch(ctx context.Context) <-chan Event // Close closes the service and cleans the resources. Close() error }
Service is the interface of an ordering service. It provides the primitives to order transactions from a pool.
Directories ¶
Path | Synopsis |
---|---|
Package cosipbft implements an ordering service using collective signatures for the consensus.
|
Package cosipbft implements an ordering service using collective signatures for the consensus. |
authority
Package authority defines the collective authority for cosipbft.
|
Package authority defines the collective authority for cosipbft. |
blockstore
Package blockstore defines the different storage the ordering service is using.
|
Package blockstore defines the different storage the ordering service is using. |
blocksync
Package blocksync defines a block synchronizer for the ordering service.
|
Package blocksync defines a block synchronizer for the ordering service. |
blocksync/types
Package types implements the network messages for a synchronization.
|
Package types implements the network messages for a synchronization. |
contracts/viewchange
Package viewchange implements a native smart contract to update the roster of a chain.
|
Package viewchange implements a native smart contract to update the roster of a chain. |
controller
Package controller implements a minimal controller for cosipbft.
|
Package controller implements a minimal controller for cosipbft. |
pbft
Package pbft defines a state machine to perform PBFT using collective signatures.
|
Package pbft defines a state machine to perform PBFT using collective signatures. |
types
Package types implements the network messages for cosipbft.
|
Package types implements the network messages for cosipbft. |
Package pow implements a Proof-of-Work ordering service.
|
Package pow implements a Proof-of-Work ordering service. |