harbor run -t openthoughts/tasktrove-exp-rpt-stack-rust-v2-stack-rust-0799harbor download openthoughts/tasktrove-exp-rpt-stack-rust-v2-stack-rust-0799Task Description: Implement Account Pair Generation and Transaction Handling for a Blockchain Simulator
Your task is to implement functionality related to account pair generation and transaction handling in a blockchain simulator. This functionality will ensure that account pair generators return the correct indexes and that transactions are processed consistently according to specified conditions.
Account Pair Generation:
AccountPairGen struct and the associated methods, ensuring that it can generate valid pairs of accounts from an AccountUniverse.pick method must return an AccountPair struct containing two account indices and references to the accounts themselves.AccountUniverse, which should be verified by the account_pair_gen test.Transaction Handling:
all_transactions_strategy function. Ensure that this function is capable of generating:
AUTransactionGen trait.Consistency Check in Transactions:
run_and_assert_universe function, which executes all generated transactions on the blockchain simulator and verifies the output:
AccountUniverse matches the state in the FakeExecutor after executing transactions, validated through the assert_accounts_match function.Implementation Structure:
/app/ directory.Result and TestCaseError.Completion of this task will ensure that the account pair generation and transaction handling functionalities work as expected, allowing the rest of the blockchain simulator to function correctly.