-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
Create the generate command to bootstrap seed data from a live RPC network.
Related to: Cliient load testing tool Feature - #4
Related to: Client load testing Epic - #2
Prerequisite
Depends on #6 to be done first. It will create the initial CLI tool scaffolding.
Scope
This task focuses on:
- Implementing the
generatecommand functionality to collect seed data from target network - Saving collected data to
bootstrap.datfile
Details
stellar-rpc-loadtest generate \
--rpc-url <RPC_URL> \
--network-passphrase <NETWORK_PASSPHRASE> \
--output <PATH_TO_BOOTSTRAP_DAT> \
[--ledger-window <NUM_LEDGERS>]Parameters:
--rpc-url: Target RPC server URL (required)--network-passphrase: Network passphrase for the target network (required)--output: Path to save bootstrap data file (default:./bootstrap.dat)--ledger-window: Number of ledgers prior to last checkpoint ledger to sample data from (default: 1000)
Data Collection Requirements
The generate command must collect and save the following data:
-
Recent transaction hashes
- Sample transactions from the requested ledger window
- Detect status, whether successful and failed
- Store transaction hash and success status
-
Valid ledger keys
- Query ledger entries for different key types:
- Account entries
- Contract data entries
- Contract code entries
- Trustline entries
- Store the base64-encoded ledger keys
- Query ledger entries for different key types:
-
Active contract IDs
- Identify contracts that have activity in the sampled ledgers
- Store contract IDs (C... addresses)
-
Contract event topics
- Extract event topics from contract events in sampled ledgers
- Store unique topic values
-
Recent ledger sequences
- Store the range of ledger sequences sampled
- Include first and last ledger in the window
Bootstrap Data File Format
Define a data format for bootstrap.dat:
- Use serialized JSON for structured data formatting on each row in the file
- Organize rows by type for efficient loading
Acceptance Criteria
- CLI tool runs 'generate' command successfully
- Bootstrap data is saved to
bootstrap.datfile in structured format -
generatecommand displays progress/status during data collection, time elapsed number of tx's, contract ids, ledgers -
generatecommand handles errors gracefully (network failures, invalid parameters) - Basic README with usage instructions for
generatecommand
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Needs Review