Skip to content

transactions: Optionally use timestamps for deterministic results

Patrick Steinhardt requested to merge pks-deterministic-rpcs into master

Our RPCs which generate commits are currently non-deterministic based on only their inputs because they use the current system time as commiter and/or author date. This hasn't been a problem until now, but it is now because with transactions we expect a call with the same parameters to produce the same result (that's not a hundred 100% true given that many just encode branch names which might get updated meanwhile, but that's exactly what we want to catch with transactions and thus expected).

This commit creates the groundwork to make our RPCs deterministic by adding a timestamp to their requests. While not yet used, we will at a later point convert Rails to always put its own timestamp in there. Like this, all nodes will get the same timestamp and produce the same result.

This series also contains a fix for the Go port of UserCommitFiles, which had an incompatibility with regards to how it derives the author/committer.

Part of #3411 (closed)

Edited by Patrick Steinhardt

Merge request reports

Loading