Conversation
f0f6b0e to
03717b1
Compare
Also adds a library package for reading and writing .io files.
03717b1 to
9c3b1d8
Compare
|
A couple of things maybe worth fixing?
|
|
Thanks for feedback. I will check it about the loader test. I enlarged the token buffer a bit to make it work. |
|
Regarding execution timeout, it's a good point. I will add this. |
lightclient
left a comment
There was a problem hiding this comment.
This is awesome! So ideally this will also solve ethereum/hive#1588 which it looks like you already commented on.
In that scenario, I think the way it will work is that we'll check the full schema for the tracer and if that passes we know the schema is correct. Then it should just be a matter of verifying that the type of tracer matches the expected, i.e. if we're trying to test opcode tracer we use the JS script to just check that the response was that tracer type and not another. We've already validated the schema so we know it is at least properly formed.
Does that seem correct @MysticRyuujin ?
This was required for running scripts in rpctestgen, but it's not required anymore.
|
I have added a let schema = openrpc.components.schemas.OpcodeBlockTransactionTrace;
jsonschema.validate(schema, messages[1].response.result);This doesn't work at the moment because we operate on the dereferenced spec and it doesn't contain the |
|
Ahh, I realize that making this work also requires a different API for the let schema = "#/components/schemas/OpcodeBlockTransactionTrace";
jsonschema.validate(openrpc, schema, messages[1].response.result); |
This adds a facility for defining 'validation scripts' in test files. Example file:
The validation script runs after message exchanges are completed, and can access all data in the test,
as well as the server's responses. Scripts are executed during test filling (to verify the script is syntactically correct), and will also be run in the hive runner with the actual server responses.
To make this work, I have refactored the handling of .io files a bit and there is now a Go package
for working with them. This package will be used in hive to load the files and run the scripts.