jepsen-io / maelstrom

A workbench for writing toy implementations of distributed systems.
Eclipse Public License 1.0
3.05k stars 189 forks source link

txn-rw-register: non complete response payload validation #57

Open madtrick opened 1 year ago

madtrick commented 1 year ago

Hi,

When working on the txn-rw-register workload I noticed that my responses to the txn operation weren't conformant to the protocol because I was leaving out some of the operations of the transaction. An example:

[2023-04-06T05:34:52.648Z]: "[recv][from:c6][type:txn][msg_id:1] {\"id\":5,\"src\":\"c6\",\"dest\":\"n0\",\"body\":{\"txn\":[[\"r\",8,null],[\"w\",8,1],[\"r\",9,null]],\"type\":\"txn\",\"msg_id\":1}}"
[2023-04-06T05:34:52.648Z]: "[send] {\"dest\":\"c6\",\"src\":\"n0\",\"body\":{\"msg_id\":1,\"type\":\"txn_ok\",\"txn\":[[\"r\",8,null]],\"in_reply_to\":1}}"

Int the example above, I replied to message 1 with only the "read" operation. However maelstrom reported that all was good at the end of the execution. Is this a bug or is the checker lenient?

aphyr commented 1 year ago

Both, I suppose! Checker only cares about completion ops and actually ignores invocations altogether. Someone with lots of free time (presently, not me, haha) ought to add a pass to Elle which validates that input and output transactions have the same structure. ;-)