umbra-protocol icon indicating copy to clipboard operation
umbra-protocol copied to clipboard

Create End-to-End "Fuzz Integration" Tests

Open apbendi opened this issue 3 years ago • 0 comments

Create a test suite that will simulate— as closely as possible— the end to end process of an Umbra transaction, and configure the test to run thousands of times in succession with randomized data. In the case any step of the process fails, log all relevant data.

Ideally, we would build this for both tokens and ETH, but I think it's ok to start with a just ETH for now. We would start by forking a real network locally with hardhat. The subsequent steps of the process should include:

  • [ ] Generate a new/random wallet,
  • [ ] Sign the appropriate message to generate stealth keys
  • [ ] Publish the stealth keys on the local chain with the registry
  • [ ] Fetch the stealth keys from the registry
  • [ ] Generate a stealth address from the stealth keys
  • [ ] From a new wallet, send ETH via Umbra using the stealth address and viewing key
  • [ ] Fetch and decrypt the Announcement from the contract's event logs
  • [ ] "Withdraw" (i.e. transfer) the ETH from the stealth address to a new (random) wallet

apbendi avatar Dec 16 '21 20:12 apbendi