OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
cbdc::sentinel Namespace Reference

Namespaces

namespace  rpc
 

Data Structures

class  async_interface
 Interface for an asynchronous sentinel. More...
 
class  controller
 Sentinel implementation. More...
 
struct  execute_request
 Sentinel request message. More...
 
struct  execute_response
 Sentinel response message. More...
 
class  interface
 Interface for a sentinel. More...
 
struct  shard_info
 Sentinel-specific representation of shard network information. More...
 
struct  validate_request
 Request type for transaction validation and attestation. More...
 

Typedefs

using validate_response = transaction::sentinel_attestation
 Response type from transaction validation, a sentinel attestation on the given transaction.
 
using request = std::variant<execute_request, validate_request>
 Sentinel RPC request type.
 
using response = std::variant<execute_response, validate_response>
 Sentinel RPC response type.
 

Enumerations

enum class  tx_status { pending , static_invalid , state_invalid , confirmed }
 Status of the transaction following sentinel processing. More...
 

Functions

auto to_string (tx_status status) -> std::string
 Return a human-readable string describing a tx_status.
 

Typedef Documentation

◆ request

Sentinel RPC request type.

Either a transaction execution or validation request.

Definition at line 70 of file uhs/sentinel/interface.hpp.

◆ response

Sentinel RPC response type.

Either a transaction execution or validation response.

Definition at line 73 of file uhs/sentinel/interface.hpp.

◆ validate_response

Response type from transaction validation, a sentinel attestation on the given transaction.

Definition at line 66 of file uhs/sentinel/interface.hpp.

Enumeration Type Documentation

◆ tx_status

enum class cbdc::sentinel::tx_status
strong

Status of the transaction following sentinel processing.

Enumerator
pending 

Statically valid, and the sentinel has submitted the transaction to the network for processing.

static_invalid 

Statically invalid. Must be fixed and resubmitted.

state_invalid 

Statically valid, but rejected by the shards for trying to spend inputs either that do not exist or that a previous transaction already spent.

confirmed 

Executed to completion.

Included in a block generated by the atomizer cluster or completed by a distributed transaction batch coordinated between locking shards.

Definition at line 18 of file uhs/sentinel/interface.hpp.

Function Documentation

◆ to_string()

auto cbdc::sentinel::to_string ( tx_status status) -> std::string

Return a human-readable string describing a tx_status.

Parameters
statustx_status to print.
Returns
human-readable string.

Definition at line 15 of file uhs/sentinel/interface.cpp.

References confirmed, pending, state_invalid, and static_invalid.

Referenced by print_tx_result(), and cbdc::client::send_transaction().