OpenCBDC Transaction Processor
|
Namespaces | |
namespace | agent |
namespace | broker |
namespace | directory |
namespace | runtime_locking_shard |
namespace | ticket_machine |
Data Structures | |
struct | config |
Configuration parameters for a phase two system. More... | |
Enumerations | |
enum class | load_type { transfer , erc20 } |
Type of load to generate for benchmarking. More... | |
enum class | runner_type { lua , evm } |
Execution/transaction model. More... | |
Functions | |
auto | split (const std::string &s, const std::string &delim) -> std::vector< std::string > |
auto | parse_args (int argc, char **argv) -> std::optional< std::unordered_map< std::string, std::string > > |
auto | read_endpoints (const std::unordered_map< std::string, std::string > &opts, const std::string &component_name) -> std::optional< std::vector< network::endpoint_t > > |
auto | read_cluster_endpoints (const std::unordered_map< std::string, std::string > &opts, const std::string &component_name) -> std::optional< std::vector< std::vector< network::endpoint_t > > > |
auto | read_config (int argc, char **argv) -> std::optional< config > |
Reads the configuration parameters from the program arguments. | |
auto | put_row (const std::shared_ptr< broker::interface > &broker, broker::key_type key, broker::value_type value, const std::function< void(bool)> &result_callback) -> bool |
Asynchronously inserts the given row into the cluster. | |
auto | get_row (const std::shared_ptr< broker::interface > &broker, broker::key_type key, const std::function< void( cbdc::parsec::broker::interface::try_lock_return_type)> &result_callback) -> cbdc::parsec::broker::interface::try_lock_return_type |
Asynchronously get the value stored at key from the cluster. | |
|
strong |
Type of load to generate for benchmarking.
Enumerator | |
---|---|
transfer | Base token transfer. |
erc20 | ERC20 token transfer. |
Definition at line 15 of file parsec/util.hpp.
|
strong |
Execution/transaction model.
Enumerator | |
---|---|
lua | Transaction semantics defined using Lua. |
evm | Ethereum-style transactions using EVM. |
Definition at line 23 of file parsec/util.hpp.
auto cbdc::parsec::get_row | ( | const std::shared_ptr< broker::interface > & | broker, |
broker::key_type | key, | ||
const std::function< void(cbdc::parsec::broker::interface::try_lock_return_type)> & | result_callback ) -> cbdc::parsec::broker::interface::try_lock_return_type |
Asynchronously get the value stored at key from the cluster.
Intended for testing and administrative purposes.
broker | broker to use for reading the row. |
key | key at which to read. |
result_callback | function to call on fetch success or failure. |
Definition at line 250 of file util.cpp.
References cbdc::parsec::runtime_locking_shard::read.
auto cbdc::parsec::parse_args | ( | int | argc, |
char ** | argv ) -> std::optional<std::unordered_map<std::string, std::string>> |
Definition at line 28 of file util.cpp.
References cbdc::config::get_args(), and split().
Referenced by read_config().
auto cbdc::parsec::put_row | ( | const std::shared_ptr< broker::interface > & | broker, |
broker::key_type | key, | ||
broker::value_type | value, | ||
const std::function< void(bool)> & | result_callback ) -> bool |
Asynchronously inserts the given row into the cluster.
broker | broker to use for inserting the row. |
key | key at which to insert value. |
value | value to insert at given key. |
result_callback | function to call on insertion success or failure. |
Definition at line 195 of file util.cpp.
References cbdc::parsec::runtime_locking_shard::write.
Referenced by cbdc::parsec::agent::runner::mint_initial_accounts().
auto cbdc::parsec::read_cluster_endpoints | ( | const std::unordered_map< std::string, std::string > & | opts, |
const std::string & | component_name ) -> std::optional<std::vector<std::vector<network::endpoint_t>>> |
Definition at line 75 of file util.cpp.
References read_endpoints().
Referenced by read_config().
auto cbdc::parsec::read_config | ( | int | argc, |
char ** | argv ) -> std::optional< config > |
Reads the configuration parameters from the program arguments.
argc | number of program arguments. |
argv | program arguments. |
Definition at line 100 of file util.cpp.
References erc20, evm, lua, cbdc::parsec::config::m_component_id, parse_args(), cbdc::logging::parse_loglevel(), read_cluster_endpoints(), read_endpoints(), cbdc::logging::trace, and transfer.
Referenced by main().
auto cbdc::parsec::read_endpoints | ( | const std::unordered_map< std::string, std::string > & | opts, |
const std::string & | component_name ) -> std::optional<std::vector<network::endpoint_t>> |
Definition at line 50 of file util.cpp.
References cbdc::config::parse_ip_port().
Referenced by read_cluster_endpoints(), and read_config().
auto cbdc::parsec::split | ( | const std::string & | s, |
const std::string & | delim ) -> std::vector<std::string> |
Definition at line 12 of file util.cpp.
Referenced by parse_args().