0xPolygonZero / plonky2

Apache License 2.0
777 stars 289 forks source link

Add run_syscall and tests for sload and sstore #1344

Closed LindaGuiga closed 12 months ago

LindaGuiga commented 1 year ago

This PR adds run_syscall to the interpreter, so that any opcode can be tested. The todos were replaced by a syscall, since the remaining opcodes corresponded to syscalls. This PR also adds one test for SLOAD and one for SSTORE.

We noticed that the gas is not charged in the opcodes that were implemented individually, and I think this should be done in another PR since that would enable us to also check gas updates and have comprehensive testing (I also believe exceptions are missing and should probably be added).

Please let me know what you think of these changes!

sonarcloud[bot] commented 12 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information