Just add in the bottom of the Challenge #6c: Totally-Available, Read Committed Transactions · Fly Docs that the way to abort transactions is to reply with:
{"type": "error",
"in_reply_to": 5,
"code": 30, // txn-conflict
"text": "The requested transaction has been aborted because of a conflict with another transaction. Servers need not return this error on every conflict: they may choose to retry automatically instead."
}
that can be generated in the following way:
return n.Reply(msg, map[string]any{"type": "error", "code": maelstrom.ErrorCode(err), "text": err.Error()})
where err = maelstrom.NewRPCError(maelstrom.TxnConflict, "txn abort")
.
Then it’s trivial to show g1a in uncommitted.
For more information on the protocol see maelstrom/protocol.md at main · jepsen-io/maelstrom · GitHub.