-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PVF: Add test instructions #2058
Conversation
I was mentoring someone and figured I could copy/paste this info into a doc. This is especially needed now that we have multiple contributors. :)
Two things about pvf have been a bit confusing for me. The The terminology precheck / prepare / pre-validate. I thought they refer to different process, as they are different words. But the more I read the code and docs, the more confusing I got. Sometimes, they seem to refer the same thing, sometimes not. Not sure any more 😅. |
Thanks @eagr, that is valuable feedback! I've previously documented the terms we use. I added some links to the existing docs that are hopefully helpful - let me know. Yeah, |
At first, I thought it defines the interfaces between components, that is, traits. Coz it's a common practice in languages with the I guess you don't want to just use
|
The doc is a bit ambiguous, though. (Not surprised, our docs are far from perfect).
One could read it as "the very first time the PVF appears on chain, that is, during parachain onboarding only" (because the term "first added" is not defined and thus is ambiguous; known relevant processes are onboarding, upgrading, acceptance, rejection, encation, but not "addition"). It is not clear that the process takes place every time a parachain upgrades its STF.
Technically, that's not true. There is a |
Hmm, good suggestions, but I still see potential for confusion. People may see |
You can always raise an issue or PR to improve them! The docs were even more unclear when I joined, so I tried to improve them based on my notes, but I didn't have a great understanding back then. Thanks for the feedback, I'll make those changes here.
I see, in that case the comment in |
If it were up to me, I'd probably just use worker.rs in the sense of related to worker and call it a day. Name is hard. :) |
It shouldn't be |
For more info on how our logs work, check [the | ||
docs](https://github.com/paritytech/polkadot-sdk/blob/master/polkadot/node/gum/src/lib.rs). | ||
|
||
## Running a test-network with zombienet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Wouldn't this steps be better at the top of this repo ? And if we already have them can we just reference them, since they might change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, there is a polkadot/doc/testing.md
file. Looks much of this file can go there, and then this file can just reference that like you said.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This testing.md
doc is pretty old and needs some love. I've never heard anyone mention Gurke or simnet, can that be removed? @sandreim
|
||
#### Subsystem tests (2) | ||
|
||
One particular subsystem (subsystem under test) interacts with a mocked overseer that is made to assert incoming and | ||
outgoing messages of the subsystem under test. This is largely present today, but has some fragmentation in the evolved | ||
integration test implementation. A `proc-macro`/`macro_rules` would allow for more consistent implementation and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this feature-ask because it should be in an issue, not in user-facing documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this has been here for like three years, if it was an issue it would have been lost in the monorepo migration. So, I won't create it. :)
|
||
#### Behavior tests (3) | ||
|
||
Launching small scale networks, with multiple adversarial nodes without any further tooling required. This should | ||
include tests around the thresholds in order to evaluate the error handling once certain assumed invariants fail. | ||
|
||
For this purpose based on `AllSubsystems` and `proc-macro` `AllSubsystemsGen`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this stuff because I couldn't find any reference to AllSubsystems
in the codebase.
I raised a follow-up for full resuscitation of testing.md. (I'm pretty sure the old stuff can just be deleted, but it seemed best to leave it out of scope of this PR). |
I was mentoring someone and figured I could copy/paste this info into a doc. This is especially needed now that we have multiple contributors. :) cc @jpserrat @eagr