Skip to content
This repository was archived by the owner on Aug 22, 2023. It is now read-only.

Conversation

@willscott
Copy link
Contributor

(1/3)

This extends the test-vector schema to allow messages to optionally list syscalls and expected return status, along with defined random values to respond when queried.

Once defined, the lotus driver in the pending 'conformance' PR can be extended to return these values when provided, then tests can begin populating the fields.

Copy link
Member

@raulk raulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's hold off on this one until we have a better sense of where and how the randomness and the syscalls are actually used. It's possible we won't need to be so explicit. If we design this right, and couple it with concrete functions, we might be able to simplify and design a solution that's a lot more context sensitive.

Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please can we have a title and/or description for the new definitions in the JSON schema?

"additionalProperties": false,
"properties": {
"name": {
"type": "string"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a defined list of syscall names we can restrict this to?

"$ref": "#/definitions/base64"
}
},
"syscall": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify my understanding:

  • Syscalls are calls that are expected to be made when a message is applied?
  • Presumably they're not implementation specific? i.e. all implementations have the same syscalls with the same names.
  • The driver in the implementation can optionally verify these calls were made during message application - correct?
  • Some(all?) calls, like for randomness, must return a specific value, as defined in the randomness section.

I think it would be useful to document the expected behaviour for driver implementers in the README, or perhaps we need a separate markdown file for this info?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

randomness may get used in some implicit contexts as well, which is why it's split out, it also should make sense that it's immutable for a requested epoch, rather than being memoized per request.

For the expected syscalls, we currently only stub out a minimal set in the lotus driver, but it seems like the full lotus runs with a larger set. I imagine there is a full enumeration of that expected surface area somewhere?

verification of order and calls seems like a thing the driver can/should do.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

status/deferred Status: Deferred

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants