Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
JSON schema for state tests #213
I'm opening this pull request for feedback on what I have implemented so far regarding #204
@jwasinger - thanks for the contribution.
Looks like a great start.
Looking at your failing tests, are there some conditions the schema has to account for, that aren't explicitly in the EIP but needed for state tests to pass?
GeneralStateTests/stTransactionTest/zeroSigTransacrionCreate.json: instance.zeroSigTransacrionCreate.transaction.to does not match pattern "^0x[0-9a-f]*$" instance.zeroSigTransacrionCreate.transaction additionalProperty "r" exists in instance when not allowed instance.zeroSigTransacrionCreate.transaction additionalProperty "s" exists in instance when not allowed instance.zeroSigTransacrionCreate.transaction additionalProperty "v" exists in instance when not allowed
The extra props can be read about here. There are others.
@cdetrio I think this is almost ready to be merged. I just want to add some more linting around allowed hex values for certain fields first (e.g. a byte field cannot have a string of more than length 2, an address cannot be more than length 40, etc.). I'm guessing this will probably reveal some additional flawed tests.
I'll try to have these changes ready within a few hours.
Added a schema for state test fillers. The schemas are quite permissive, only 15 state tests are failing now, all because their
The schemas can be gradually made more strict, and the files fixed over time. Or alternatively, we can add a rule in the schema to detect newly generated files, and enforce a strict schema on those.