cs-codex-dist-tests/Tools/AutoClient
benbierens fc942b11f8
Implements /check command
2024-10-16 14:05:02 +02:00
..
docker Bumps containers to dotnet 8.0 2024-10-10 11:54:42 +02:00
App.cs implements performance logger for autoclient 2024-09-12 15:03:06 +02:00
AutoClient.csproj Bump to dotnet 8 2024-10-03 14:02:28 +02:00
CidRepo.cs setup 2024-09-12 14:38:15 +02:00
CodexUser.cs setup 2024-09-12 14:38:15 +02:00
Configuration.cs defaults for EC params that actually work 2024-09-12 15:29:50 +02:00
ImageGenerator.cs setup 2024-09-12 14:38:15 +02:00
Performance.cs div by zero in time calculation 2024-09-12 15:14:15 +02:00
Program.cs setup 2024-09-12 14:38:15 +02:00
Purchaser.cs Implements /check command 2024-10-16 14:05:02 +02:00
README.md Bumps containers to dotnet 8.0 2024-10-10 11:54:42 +02:00

README.md

Codex auto-client

This thing will generate files, upload them, and purchase storage for them in an endless loop.

Can generate random images or random data of a specified size.

How to run

  • dotnet 8.0 and CLI arguments: dotnet run -- --codex-host=... --codex-port=...
  • docker and env-vars: codexstorage/codex-autoclient:sha-88daab3

Configuration options

Options can be configured via CLI option or environment variable.

CLI option Environment variable Description
"--codex-host" "CODEXHOST" Codex Host address. (default 'http://localhost')
"--codex-port" "CODEXPORT" port number of Codex API. (8080 by default)
"--datapath" "DATAPATH" Root path where all data files will be saved.
"--purchases" "PURCHASES" Number of concurrent purchases.
"--contract-duration" "CONTRACTDURATION" contract duration in minutes. (default 6 hours)
"--contract-expiry" "CONTRACTEXPIRY" contract expiry in minutes. (default 15 minutes)
"--num-hosts" "NUMHOSTS" Number of hosts for contract. (default 5)
"--num-hosts-tolerance" "NUMTOL" Number of host tolerance for contract. (default 2)
"--price" "PRICE" Price of contract. (default 10)
"--collateral" "COLLATERAL" Required collateral. (default 1)
"--filesizemb" "FILESIZEMB" When greater than zero, size of file generated and uploaded. When zero, random images are used instead. (default 0)

Timing

Configuration: purchases controls the number of concurrently running storage requests. Configuration: contract-duration controls the duration in minutes of each storage request. Auto-client will create a new storage request every X minutes, where X is the contract duration divided by the number of purchases. (Timing may start to vary when contracts fail or time out.)