Weak Independence
As stated earlier, FastSet allows claims to be processed and settled in any order, unless they originate from the same account, in which case, the claim order is preserved.
Although the ordering is relaxed, FastSet provides the same correctness guarantees as systems that enforce a total order. However, it does not employ a strong consistency consensus algorithm like blockchains do to achieve correctness. Instead, FastSet adopts an eventual consistency consensus, sometimes called "weak consensus". And this is possible because of the weak independence requirement on claims it enforces.
This section explains weak independence and how it enables the next generation of decentralized and concurrent infrastructure for digital assets.
Total ordering
There has been a long-held belief that decentralized payment systems are required to enforce a total order on transactions in order to prevent the double-spending attack.
This is why all blockchains are built the way they are. Validated transactions are chained together to preserve the historical order and to solve the double-spending issue.
However, it turns out that payments can be generated and settled in different orders by different nodes in the network and still prevent the attack from taking place. See recent work on The consensus number of a cryptocurrency and FastPay introducing this idea. The insight here is that the order in which an account receives payments is irrelevant. Moreover, even the order in which different accounts send payments is irrelevant, provided each account stays valid for every transaction, i.e., no double-spending and sufficient balance. As long as the nodes/validators are in agreement on the set of locally valid transactions that took place in the system, consensus on a total order is unnecessary.
FastSet extends this idea beyond payments to voting, auctioning, and basically to any type of verifiable statement, which we call claim. Moreover, it generalizes the property of commutativity on payments mentioned above to arbitrary state-effectful computations and introduces this generalization as the notion of weak independence.
Payment transactions as claims
Although FastSet is more than payments, in this section we will focus mostly on payment transactions. Payments are a special instance of a claim because a transaction is simply a claim on the change of account balance.
Like in blockchains, every FastSet account has a state (for example, a token balance) and is required to sign any claims it issues. These signatures allow validators to confirm both the authenticity and integrity of the claim.
A claim referring to a payment transaction would be a signature by $sender

which specifies $sender
is transferring $value
tokens to $recipient
.
Node state
Nodes in FastSet maintain their own state, which is a consistent copy of the system’s state.
Through their states, nodes in FastSet keep the balances of all the tokens in the system, but also the state of all clients and the global state of the protocol, such as the set of all the claims that were settled.
For simplicity, let’s just focus on particular claims which are token transfers, that is, the state of the system at a certain time is just the token balances corresponding to the various accounts:
s =
Nodes process the claims issued by the clients. However, two points are worth mentioning. The first is that only valid claims are processed and the second that the system’s (or individual node’s) state may change after a claim is processed. Let’s take a look at each point and see what it means.
1. A claim may or may not be valid in a given state.
We use a color palette to distinguish valid claims (green) from invalid ones (red).

In the state above, claim is invalid as
balance
(Charlie) < 60, while claim is valid because
balance
(Alice) ≥ 80.
2. Processing a claim can (and usually does) change the state.
Processing valid claim in state s (left) gives state s’ (right):


In this new state s', balances of both Alice and Bob are updated—Alice’s decreases by 80, while Bob’s increases by the same amount.
Processing a claim may lead to a state change. However, a state change may also lead to validity status change for other claims.
3. An invalid claim becomes valid.


Initially, Charlie’s balance would not allow him to send 60 tokens to Dave (balance
(Charlie) < 60). However, Bob’s valid transaction increased Charlie’s balance, so now Charlie can perform his payment to Dave.
4. A valid claim becomes invalid.


In the initial state, Alice has enough balance to perform either of the transactions (balance
(Alice) ≥ 45 and balance
(Alice) ≥ 80), hence both claims are valid. After performing the payment to Bob, Alice does not have enough tokens to perform the transaction to Charlie too, and the claim for this payment becomes invalid.
Any order and weak independence
We said that, in FastSet, the claims from different accounts may be processed in a different order and that we can achieve strong eventual consistency if the claims are weakly independent. But what does it mean for two claims to be weakly independent?
Intuitively, the weak independence of payments by different clients says that the overall state of the system will be the same independently of the order in which they are processed, provided that the initial state of the system allows for each payment to be independently made.
We would like to stress that although we give the intuition for weak independence of claims as payment transactions, weak independence is a general concept covering all the other verifiable statements one can settle in FastSet.


The diagram in Figure 2 depicting weak independence of claims c1 and c2 says the following: Suppose that both c1 and c2 are valid in initial state s. If we process any of these claims in s, the other claim will continue to be valid in the subsequent state, meaning c2 will be valid in s1 and c1 will be valid in s2. Moreover, processing the remaining claims from the states they are valid into (c2 from s1 and c1 from s2) leads to the same final state s’. Or, simply put, processing both claims in any order leads to the same final state.
Example 1 (Weak independence): Let’s see what this means by having a look at a concrete example. Claims and
are weakly independent in state s below:
s =
Let’s prove that.
First, both claims are valid in state s, as balance
(Alice) ≥ 80 and balance
(Dave) ≥ 20:
Now, processing the claims in either order leads to the same final state:


While this is a proof by example, a general proof would follow a similar reasoning.
Example 2 (Vacuous weak independence): Recall the example from before with the invalid claim becoming valid:
Weak independence holds vacuously in this case. Recall that weak independence requires both claims to be valid in the current state, and then if they are processed independently from the same state, the claim not processed in one state will continue to be valid in the subsequent state. Then, the final state will be the same in both cases. In this example, the payment claim from Charlie to Dave is not valid in the initial state, so it satisfies the weak independence of any claim vacuously.
Strong eventual consistency
FastSet ensures the correctness of the protocol, including its node/validator transaction processing determinism, whenever the weak independence property holds. More specifically, in FastSet, we achieve strong eventual consistency whenever weak independence holds.
Basically, strong eventual consistency is a generalization of weak independence to claim sequences of arbitrary length, not just 2, where one sequence is an interleaving of the other. This means that both sequences contain the same claims, but in different order.
For example, two interleaving equivalent claim sequences are γ and γ' below:
γ =
γ' =
They contain the same payment transactions, but the order they should be processed in differs, with the exception of the payment transfers of Alice, which are in the same order in which they were initiated in both sequences.
Assuming the current state of the system to be state s specified above, processing the two sequences of transactions γ and γ' leads to the following two series of node state change:




As you can see in Figures 3a and 3b, the intermediate states are different, as the transactions are processed in different sequences. However, the initial and final states are the same. And this is what strong eventual consistency is about, whenever the claims they process are weakly independent, nodes eventually converge to the same global state.
For FastSet, this means that if two different nodes/validators process the same claim sequences for the same clients, then they end up in the same state regardless of how the claim sequences were interleaved. That is, from the collective perspective of the clients, validators behave deterministically and do not diverge. Or put differently, they are in “consensus”.


In the diagram above, the sequences of colored stripes represent two different sequences of the same set of transactions to be processed by two nodes (depicted as cubes) in FastSet, initially in the same state.
While the intermediate states of the individual nodes are out of sync as the sequence of transactions is processed, eventually, the states become again in sync, or achieve consensus, once they all process their last transaction in the sequence. In their final states, the nodes will have processed the same set of transactions, albeit in different order.
A more detailed and formal explanation of weak independence you can find in our whitepaper on FastSet.
Last updated
Was this helpful?