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:
Check that gates exist
Check for out of bounds input/output
Type check between gates
Check that connections are valid (destination exists)
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.
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:
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.