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

Data Structures

class  async_client
 Client to asynchronously request information from the watchtower. More...
 
struct  best_block_height_request
 Request the watchtower's known best block height. More...
 
class  best_block_height_response
 Contains the watchtower's known best block height. More...
 
class  block_cache
 Stores a set of blocks in memory and maintains an index of the UHS IDs contained therein. More...
 
class  blocking_client
 Client to synchronously request information from the watchtower. More...
 
class  controller
 Wrapper for the watchtower executable implementation. More...
 
class  error_cache
 Stores a set of internal transaction errors in memory, indexed by Tx ID and UHS ID. More...
 
class  request
 RPC request message to the watchtower external endpoint. More...
 
class  response
 RPC response message from the watchtower external endpoint. More...
 
class  status_request_check_success
 Indicates a successful check request, sent with a StatusUpdateResponse. More...
 
class  status_update_request
 Network request to interact with the Watchtower's status update service. More...
 
class  status_update_state
 Represents the internal state of an ongoing status update request. More...
 
class  tx_error
 Wrapper for transaction errors. More...
 
struct  tx_error_incomplete
 Indicates that the atomizer did not receive enough attestations for a particular transaction from shards before it had to clean up the transaction and free up space for others. More...
 
class  tx_error_inputs_dne
 Indicates a shard that tried to process a given transaction could not locate one or more of the transaction's inputs it expected to possess. More...
 
class  tx_error_inputs_spent
 Indicates that the given transaction contains one or more inputs that have already been spent in other transactions sent to the atomizer. More...
 
struct  tx_error_stxo_range
 Indicates that a shard did not attest to this transaction recently enough for the atomizer to check it against the STXO cache. More...
 
struct  tx_error_sync
 Indicates a shard that tried to process a given transaction was out of sync with the atomizer, and the transaction should be retried. More...
 
class  watchtower
 Service to answer client requests for processing status updates on submitted transactions. More...
 

Typedefs

using block_cache_result = std::pair<size_t, hash_t>
 With respect to a particular UHS ID, block height + ID of containing transaction.
 
using tx_id_uhs_ids
 Set of UHS IDs to query, keyed by Tx IDs.
 
using tx_id_states
 Reported UHS ID states, keyed by Tx IDs.
 
using tx_error_info
 

Enumerations

enum class  search_status {
  no_history , unspent , spent , tx_rejected ,
  invalid_input , internal_error
}
 The current status of the Watchtower's progress in searching for a particular UHS ID. More...
 

Typedef Documentation

◆ block_cache_result

using cbdc::watchtower::block_cache_result = std::pair<size_t, hash_t>

With respect to a particular UHS ID, block height + ID of containing transaction.

Definition at line 27 of file block_cache.hpp.

◆ tx_error_info

Initial value:
std::variant<tx_error_sync,
tx_error_inputs_dne,
tx_error_stxo_range,
tx_error_incomplete,
tx_error_inputs_spent>

Definition at line 32 of file tx_error_messages.hpp.

◆ tx_id_states

Initial value:
std::unordered_map<hash_t,
std::vector<status_update_state>,
hashing::const_sip_hash<hash_t>>
std::array< unsigned char, cbdc::hash_size > hash_t
SHA256 hash container.

Reported UHS ID states, keyed by Tx IDs.

Definition at line 133 of file status_update.hpp.

◆ tx_id_uhs_ids

Initial value:
std::unordered_map<hash_t,
std::vector<hash_t>,
hashing::const_sip_hash<hash_t>>

Set of UHS IDs to query, keyed by Tx IDs.

Definition at line 45 of file status_update.hpp.

Enumeration Type Documentation

◆ search_status

The current status of the Watchtower's progress in searching for a particular UHS ID.

Enumerator
no_history 

The Watchtower has finished scanning the block history for the UHS ID in the request and hasn't found it.

unspent 

The UTXO set contains the requested UHS ID.

The holder can spend the corresponding output.

spent 

The STXO set contains the requested UHS ID.

The corresponding output has already been spent and cannot be spent again.

tx_rejected 

The transaction processing system rejected the requested UHS ID's transaction due to a problem with another input.

invalid_input 

The transaction processing system rejected the transaction because the requested UHS ID was already spent in another transaction or it did not exist in the first place.

internal_error 

The transaction processing system failed to process the transaction containing the requested UHS ID due to an internal (non-client) issue.

The transaction may be retried.

Definition at line 21 of file status_update.hpp.