mit-dci / opencbdc-tx

A transaction processor for a hypothetical, general-purpose, central bank digital currency
Other
896 stars 198 forks source link

Implement some much-needed improvements for the UHS load-generators #280

Open HalosGhost opened 2 months ago

HalosGhost commented 2 months ago

This first commit brings targeted-load for the 2PC load-gen; another commit will follow updating the atomizer load-gen as well.

cf. #279

I've been locally testing using variants of the configuration below:

Configuration ``` shard0_count=1 shard0_start=0 shard0_end=255 shard0_0_endpoint="0.0.0.0:5002" shard0_0_raft_endpoint="0.0.0.0:5003" shard0_0_readonly_endpoint="0.0.0.0:5004" shard0_audit_log="shard0_audit_log" shard1_count=1 shard1_start=128 shard1_end=255 shard1_0_endpoint="0.0.0.0:5005" shard1_0_raft_endpoint="0.0.0.0:5006" shard1_0_readonly_endpoint="0.0.0.0:5007" shard1_audit_log="shard1_audit_log" coordinator0_count=1 coordinator0_0_endpoint="0.0.0.0:6001" coordinator0_0_raft_endpoint="0.0.0.0:6002" coordinator1_count=1 coordinator1_0_endpoint="0.0.0.0:6003" coordinator1_0_raft_endpoint="0.0.0.0:6004" sentinel0_endpoint="0.0.0.0:7003" sentinel1_endpoint="0.0.0.0:8003" sentinel2_endpoint="0.0.0.0:9003" sentinel3_endpoint="0.0.0.0:9004" coordinator0_loglevel="TRACE" coordinator1_loglevel="TRACE" sentinel0_loglevel="TRACE" sentinel1_loglevel="TRACE" sentinel2_loglevel="TRACE" sentinel3_loglevel="TRACE" shard0_loglevel="WARN" shard1_loglevel="TRACE" twophase-gen0_loglevel="TRACE" loadgen0_loglevel="DEBUG" stxo_cache_depth=0 window_size=100000 batch_size=3000 watchtower_block_cache_size=100 watchtower_error_cache_size=10000000 audit_interval=900 attestation_threshold=2 target_block_interval=250 election_timeout_upper=1000 election_timeout_lower=500 heartbeat=250 raft_max_batch=100000 snapshot_distance=0 batch_delay=1 seed_privkey="a0f36553548b3a66c003413140d7b59e43464ca11af66f25a6e746be501596b7" seed_value=10 seed_from=0 seed_to=10000 loadgen_sendtx_input_count=2 loadgen_sendtx_output_count=2 loadgen_invalid_tx_rate=0.000000 loadgen_fixed_tx_rate=0.07 loadgen_tps_target=850 loadgen_tps_step_time=3.0 loadgen_tps_step_percentage=0.05 loadgen_tps_step_start=0.2 shard_count=1 coordinator_count=2 loadgen_count=1 sentinel_count=2 2pc=1 sentinel0_private_key="1ffed20f548336af31ddc58fb8db7ef6195b91d1851021cf9fc3b8b196f58fc0" sentinel0_public_key="6e4fae7a0c180ff20f54698136e4585bf7be045cd5ad621f5c8881871e29c024" sentinel1_private_key="a94d4bfed8d8679a97f74964c2e19b07098d291ae4967f8f0417821c18253b0e" sentinel1_public_key="3f8f5f79191ef88d25ede8453f09cb8e1ae5b7b1d98aece1cb25e9d047eca505" sentinel2_private_key="1ffed20f548336af31ddc58fb8db7ef6195b91d1851021cf9fc3b8b196f58fc0" sentinel2_public_key="6e4fae7a0c180ff20f54698136e4585bf7be045cd5ad621f5c8881871e29c024" sentinel3_private_key="a94d4bfed8d8679a97f74964c2e19b07098d291ae4967f8f0417821c18253b0e" sentinel3_public_key="3f8f5f79191ef88d25ede8453f09cb8e1ae5b7b1d98aece1cb25e9d047eca505" ```
HalosGhost commented 2 months ago

@maurermi, this doesn't yet include the atomizer updates; but I'd love a review before I dive into that side.

The types and configuration have been modified to mirror the exact current behavior of the test controller (so any currently deployed test controller should be able to now leverage targeted-load schedules in 2PC with no redeployment). Let me know if you want our TC spun up at any point this next week to give a t-ACK.

HalosGhost commented 1 month ago

(pulled to draft as I implement equivalent changes for the atomizer)