stellar-deprecated/transfer-server-validator

Refactor for Mainnet

Closed this issue · 3 comments

There are several ways our tests would not be able to run on mainnet deployments. A couple I can think of off the top:

  • SEP10 tests set up a lot of accounts via friendbot, mainnet doesn't have friendbot
  • Its not clear how we would test E2E flows (transactions that ultimately get submitted to the stellar network)
    • On testnet, anchors are expected to auto-approve pending deposits. However on mainnet, the anchor would need to actually receive the real asset in the account they expect, which is unique for each anchor.
    • Its more than likely that we wouldn't be able to test E2E deposits for this reason. Without a deposit test, we wouldn't be able to run a withdrawal test either.

We'll also need UI toggles or CLI options to specify if the tests are for is mainnet or testnet

As a solution to the friendBot, I think you can enter an entry field in the page when choose mainnet tests, so you can enter a private key with less 20/30 XLM and make a local friendBot function to be able to take balances from that account, create the accounts for testing and make corresponding merger at the end to the source account. i think that can be done with small changes on Cli and UI.

I even think that it would be good if all the keys created in the mainnet test can be exported so that they can be reused in subsequent tests.

@theclabs providing a sufficiently-funded account for mainnet tests would definitely work. All we would need in terms of UI changes is another input field to accept the account's secret key.

However right now, the CLI is just a jest command. We can't add additional arguments unknown to jest. We'll likely have to build a wrapper CLI in order to accept the config options presented in the UI.

After discussing with the team we've decided to scrap this ticket. Assuming anchors use the same code base on testnet as they do for mainnet, the value added by doing this non-trivial refactor is low.