A method for a first compute device from a plurality of compute devices (110, 120, 130, 140) that implement a leaderless distributed database via a network operatively coupled to the plurality of compute devices (110, 120, 130, 140) each compute device from the plurality of compute devices (110, 120, 130, 140) having a separate instance (114, 124, 134, 144) of the distributed database, the method comprising: receiving, at the first compute device from the plurality of compute devices, data associated with a first transaction; defining, at the first compute device and at a first time, a first event including the data associated with the first transaction, and a reference to each event from a first plurality of events, wherein the reference to each event from the first plurality of events indicates that the referenced event from the first plurality of events came before the first event; receiving, at the first compute device and from a second compute device from the plurality of compute devices (110, 120, 130, 140), a second event including data associated with a second transaction, and a reference to each event from a second plurality of events, wherein the reference to each event from the second plurality of events indicates that the referenced event from the second plurality of events came before the second event; storing, at the first compute device, an indication of a plurality of transactions in the instance of the distributed database at the first compute device, the plurality of transactions including at least the first transaction and the second transaction; calculating, at the first compute device and using a consensus algorithm, an event order for: the first event, the second event, the first plurality of events, and the second plurality of events, wherein the event order is calculated based on a partial order defined by the pattern of references between the events; selecting, at the first compute device at a second time after the first time and based on the event order, a plurality of transaction order values including at least a first transaction order value associated with the first transaction and a second transaction order value associated with the second transaction; and calculating, at the first compute device, a database state variable based on at least the plurality of transactions and the plurality of transaction order values, wherein said consensus algorithm implements a deterministic function such that each compute device (110, 120, 130, 140) of the plurality of compute devices calculates the same event order. receiving, at the first compute device from the plurality of compute devices, data associated with a first transaction; defining, at the first compute device and at a first time, a first event including the data associated with the first transaction, and a reference to each event from a first plurality of events, wherein the reference to each event from the first plurality of events indicates that the referenced event from the first plurality of events came before the first event; receiving, at the first compute device and from a second compute device from the plurality of compute devices (110, 120, 130, 140), a second event including data associated with a second transaction, and a reference to each event from a second plurality of events, wherein the reference to each event from the second plurality of events indicates that the referenced event from the second plurality of events came before the second event; storing, at the first compute device, an indication of a plurality of transactions in the instance of the distributed database at the first compute device, the plurality of transactions including at least the first transaction and the second transaction; calculating, at the first compute device and using a consensus algorithm, an event order for: the first event, the second event, the first plurality of events, and the second plurality of events, wherein the event order is calculated based on a partial order defined by the pattern of references between the events; selecting, at the first compute device at a second time after the first time and based on the event order, a plurality of transaction order values including at least a first transaction order value associated with the first transaction and a second transaction order value associated with the second transaction; and calculating, at the first compute device, a database state variable based on at least the plurality of transactions and the plurality of transaction order values, wherein said consensus algorithm implements a deterministic function such that each compute device (110, 120, 130, 140) of the plurality of compute devices calculates the same event order.