1. A fault-tolerant data processing computer system utilizing a two-tier state machine aimed for distributed data stores, the system comprising: a network of computing devices having functions and consecutively numbered commands, one of said devices being designated as a leader for sending proposed commands to the other devices in ballots for a given command number, wherein each of the devices includes a processing unit having at least one processor, the processing units of the devices collectively configured: to define a majority set of the devices such that any two majority sets selected in a similar manner will have at least one device in common, to send a message from the leader to the other devices in the majority set to indicate that the leader is going to propose commands, to send reply messages from the other devices in the majority set to the leader identifying the most recent ballots for given command numbers in which they have voted, such that the commands for the given command numbers are not yet issued, in response to the reply messages from the devices in the majority set, to send a ballot to the devices in the majority set for a given command number on some command voted for in a previous ballot for said command number, such that the command for said command number is not yet issued, in response to the reply messages from the devices in the majority set, to send a ballot to the devices in the majority set on a command for some command number for which no commands have yet been proposed, to exchange votes between the devices, and to ensure that all devices agree a command is issued, wherein the two-tier state machine is equipped with a set of functions, that are intended to be called and executed only by the leader; wherein the functions transform a leader state that is associated with the leader that executes the functions; wherein the leader state is separate from a machine state of the two-tier state machine; wherein the functions return commands intended for the state machine; wherein the commands that have been issued for an execution by the two-tier state machine are executable concurrently with the functions; wherein all the issued commands form a dependent sequence of commands; and wherein the two-tier state machine is configured to execute a prefix of the dependent sequence of the issued commands with no intervening command in-between, and wherein said commands are being the results of executing said functions by some computing device, where the order of function executions determines the logical precedence between commands, and wherein said leader is designated also for executing functions, and wherein the response to the reply messages for sending a ballot for a given command number on some command voted for in a previous ballot, includes choosing the command that was identified as being the one most recently voted for in a previous ballot for said command number, such that declaring said command as issued does not break the logical dependency between issued commands, or if there is no such command, choosing any arbitrary command, and wherein the processing units of the devices are collectively configured to ensure that all devices agree a command is issued and to require that: (i) the devices in the majority set voted for the proposed command in some ballot, and (ii) the precedent command of the proposed command was issued, in the event the proposed command is not to be issued for the first command number, and wherein the response to the reply messages for sending a ballot for a given command number on some command voted for in a previous ballot, and the response to the reply messages for sending a ballot for a given command number for which no commands have yet been proposed, are independent and can be active at the same time.