Comments about design document #34
Replies: 9 comments 1 reply
-
|
cardano-conformance-testing-of-consensus/docs/design.md Lines 25 to 36 in 72c4c13 While it's very important to acknowledge that most interesting properties cannot be expressed in terms of a single isolated node (making it a good argument for the need of a sophisticated testing approach involving point schedules), there exist (to the best of my limited knowledge) some properties that are always true in a vacuum. E.g.:
I think what makes these interesting is that they usually admit a much simpler testing strategy (maybe even unit tests). They often also have the side effect of being simpler to debug when something goes wrong. Maybe it makes sense to mention that (and I might be very wrong here) the goal of this project is to provide an effective testing strategy to be used after all these simple smoke tests have passed? |
Beta Was this translation helpful? Give feedback.
-
|
cardano-conformance-testing-of-consensus/docs/design.md Lines 51 to 55 in 72c4c13 If I understand correctly, the abstract consensus protocol is relatively generic. In particular, I'm wondering if one could potentially instantiate it to use a different node to node communication abstraction other than the network stack (e.g., IPC via message queues). In other words, is "we will look only at the messages sent over the network" a constraint derived from the SUT or a design choice in the conformance test suite? |
Beta Was this translation helpful? Give feedback.
-
|
cardano-conformance-testing-of-consensus/docs/design.md Lines 68 to 70 in 72c4c13 I think the consensus implementation makes a good job at providing test-friendly implementations. One notable quirk is the pervasive use of explicit record datatypes to implement interfaces. This is rather boring Haskell-wise, but makes testing implementations against mocked relatively easy. |
Beta Was this translation helpful? Give feedback.
-
|
cardano-conformance-testing-of-consensus/docs/design.md Lines 71 to 73 in 72c4c13 Is this assuming the SUT not having any non-deterministic internal choice? Or perhaps are you planning to control its sources of non-determinism (rng, scheduler, etc.) somehow? Something along the lines of what Antithesis* does. [*] I think this is already being somewhat covered by |
Beta Was this translation helpful? Give feedback.
-
|
cardano-conformance-testing-of-consensus/docs/design.md Lines 193 to 195 in 72c4c13 One detail that would be missing from such a loop is the bias on test size. By default, QuickCheck tries smaller inputs first and progressively increases* the generation size over time. This is generally seen as a good thing, as small tests are often faster to run, and can be shrunk in fewer steps. Perhaps this is something your generic interface could also expose, either by embedding the notion of size in the order of the result of This could allow users to write something with the same size bias like: test_classes = testgen list-classes
max_size = 10
for size in range(1, max_size):
for test_class in test_classes:
test = generate test_class --size=size
result = run test
...
end
end[*] this is not entirely true, terms and conditions apply. |
Beta Was this translation helpful? Give feedback.
-
|
cardano-conformance-testing-of-consensus/docs/design.md Lines 242 to 244 in 72c4c13 Wouldn't having an isolated observer node severely limit what one could observe from the NUT? I imagine there being other observable effects in the NUT that could be useful to define properties around, e.g., certain error codes in logs, number of open file handles, or even memory utilization (esp. its derivative), etc. These are probably not needed to validate the correctness of a consensus implementation, but one could also argue that any sensible implementation should also fit within certain margins to not destabilize its peers (e.g. by not being able to react to stimuli quickly enough). Maybe I'm trying to look too far ahead into the fog. Feel free to disregard 😂 |
Beta Was this translation helpful? Give feedback.
-
|
cardano-conformance-testing-of-consensus/docs/design.md Lines 301 to 302 in 72c4c13 I would try to mention the tradeoffs of this somewhere. IIUC:
|
Beta Was this translation helpful? Give feedback.
-
|
cardano-conformance-testing-of-consensus/docs/design.md Lines 411 to 413 in 72c4c13 This would be excellent, but it can't be the only evidence in favor of your new testing strategy. Especially not at this late stage in the project. Have you considered injecting bugs into Cardano's consensus algorithm and making sure the tool finds them before moving to other implementations? Note that this can bite you in the ass if used too heavily as feedback when developing the tool (because it's both very tempting to bias the generation strategy towards finding the bugs you can come up with, and to forget that other kinds of bugs exist but you just haven't thought about them yet), but it would be an early indication of whether the tool can find bugs at all. |
Beta Was this translation helpful? Give feedback.
-
|
cardano-conformance-testing-of-consensus/docs/design.md Lines 444 to 445 in 72c4c13 This is nugget I learnt from people working at Antithesis: you can do all kinds of fancy shenanigans by intercepting* the Not sure this is helpful in any way, but the idea of doing something like that sounds fun as hell 😈 [*] via something like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey 👋
For lack of a better way, I will try to add comments about the design document here.
Beta Was this translation helpful? Give feedback.
All reactions