casper icon indicating copy to clipboard operation
casper copied to clipboard

Tests take too long

Open djrtwo opened this issue 7 years ago • 0 comments

Issue

Tests take too long. I believe this has to do primarily with two factors

  • Cannot reuse setup in most cases so have to scrap chain and redeploy all contracts
  • Length of epochs and dynasties that the tests have to churn through

The second is probably the main one. I would not try to optimize the first until the second has been fully optimized.

Proposed implementation

  • Reduce the base casper constants as small as possible while still capturing the spirit of the tests
  • Be careful. The default of eth-tester is to mine a block every time a tx is submit. If you keep this enabled and reduce the constant sizes too small, you might get weird behavior. For example: if you have num_validators > EPOCH_LENGTH and there is only one validator vote per block, you won't be able to fit all the validator votes into a single epoch!
  • Don't make the tests too complex in terms of readability or writability in favor of time reduction.
  • Examine any other bottlenecks and optimize if it's worth it.

djrtwo avatar Jun 04 '18 14:06 djrtwo