Module exonum::blockchain [] [src]

The module containing building blocks for creating blockchains powered by the Exonum framework.

Services are the main extension point for the Exonum framework. To create your service on top of Exonum blockchain you need to do the following:

  • Define your own information schema.
  • Create one or more transaction types using the message! macro and implement the Transaction trait for them.
  • Create a data structure implementing the Service trait.
  • Write API handlers for the service, if required.

You may consult the service creation tutorial for a more detailed manual on how to create services.

Re-exports

pub use self::config::ConsensusConfig;
pub use self::config::StoredConfiguration;
pub use self::config::TimeoutAdjusterConfig;
pub use self::config::ValidatorKeys;

Modules

config

Exonum global variables which stored in blockchain as utf8 encoded json.

Structs

ApiContext

Provides the current node state to api handlers.

Block

Exonum block header data structure.

BlockProof

Block with pre-commits.

Blockchain

Exonum blockchain instance with the concrete services set and data storage. Only blockchains with the identical set of services and genesis block can be combined into the single network.

ExecutionError

Result of unsuccessful transaction execution.

GenesisConfig

The initial exonum-core configuration which is committed into the genesis block.

Schema

Information schema for exonum-core.

ServiceContext

The current node state on which the blockchain is running, or in other words execution context.

SharedNodeState

Shared part of the context, used to take some values from the Nodes State should be used to take some metrics.

TransactionError

Result of unsuccessful transaction execution encompassing both service and framework-wide error handling.

TxLocation

Transaction location in block.

Enums

TransactionErrorType

Type of the transaction error.

Constants

SCHEMA_MAJOR_VERSION

Current core information schema version.

Traits

Service

A trait that describes business logic of a concrete service.

Transaction

Transaction processing functionality for Messages allowing to apply authenticated, atomic, constraint-preserving groups of changes to the blockchain storage.

TransactionSet

TransactionSet trait describes a type which is an enum of several transactions. The implementation of this trait is generated automatically by the transactions! macro.

Functions

gen_prefix

Generates an array of bytes from the prefix.

Type Definitions

ExecutionResult

Return value of the Transaction's execute' method. Changes made by the transaction are discarded ifErris returned, seeTransaction` documentation for the details.

TransactionResult

Extended version of ExecutionResult (with additional values set exclusively by Exonum framework) that can be obtained through Schema's transaction_statuses method.