wire-fpga icon indicating copy to clipboard operation
wire-fpga copied to clipboard

Better serverside error checking

Open llysdal opened this issue 3 years ago • 0 comments

When a chip is uploaded, it is first validated, compiled, and then executed.

The validation step is to make sure that the player doesn't send some garbage that will just waste servertime, and possibly throw a lua error. It simplifies the other steps greatly that it's known that the data is valid.

Validation right now consists of:

  1. Check that gates exist
  2. Check for out of bounds input/output
  3. Type check between gates
  4. Check that connections are valid (destination exists)
  5. Check if gate is banned

To really make this work well, some sort of automated testing should be made. In general tests could be nice, to quickly verify that no security issues have been added with a feature, but it is a lot of effort to get started.

llysdal avatar Mar 05 '21 22:03 llysdal