SALT model. In both models, transactions have a
well-defined order that is consistent within the net-
work. In BASE systems, in contrast, a defined global
order of transactions is not enforced by the system
and does not have to exist, which is why BASE sys-
tems are soft-state.
Both, the agreed-on property of SALT and the
consistency property of ACID, refer to the validity
of transactions and are thus closely related. While
essentially the same guarantee, the parties enforcing
the guraranee differ: In the ACID case, specific com-
ponents of the TP system check the post transaction
database state for integrity and reject transactions in
case of violations. In the SALT case, all nodes in the
network independently validate transactions based on
an agreed-on ruleset and acknowledge them depend-
ing on the result.
Note, that this notion of consistency in ACID and
SALT is different from the system-centric consistency
notion in BASE. With BASE systems, consistency
refers to (reaching) equivalence of state across repli-
cas. This notion of consistency is a pre-requisite for
distributed systems in support of ACID transactions,
also. Yet, ACID makes no direct statement about
replica consistency. In systems supporting BASE,
replicas can be in conflicting state because they each
process a different set of transactions. The same can
happen in systems supporting SALT, when two nodes
mine different blocks and hence temporarily maintain
different state. Whereas systems supporting BASE
are guaranteed to converge in the absence of new
transactions, in SALT systems the conflict is resolved
by deciding for exactly one block to be agreed-on by
all peers.
Another interesting relation exists between the
ledgered property of SALT and the durability prop-
erty of ACID, as already briefly discussed in 4.1. Not
considering factors external to the system, a trans-
action written to a TP system supporting ACID or
BASE is guaranteed to be persistent and cannot be
lost. This guarantee is weakened to a probabilis-
tic version in the SALT model. It can happen, that
a transaction is no longer represented in the system
state although it has been processed successfully at
an earlier point in time. With the number of subse-
quent transactions, the probability of this happening
quickly diminishes (Nakamoto, 2008). While having
to rely on probabilistic state appears unreliable, it is
barely a problem in current networks (e.g., Bitcoin or
Ethereum). As a best practice, users wait for a cer-
tain number of blocks (based on their risk threshold)
succeeding the block containing their transaction until
they consider the transaction to be final.
4.5 T for Turing Complete?
Traditional TP systems know the concepts of stored
procedures. These procedures group a sequence of
database operations and can be exposed to clients.
This reduces the permissions clients require and can
also improve usability.
With blockchains, the same concept becomes
much more powerful. The procedure is executed
on every node in the network and the resulting state
changes are applied. Hence, a stored procedure on
a blockchain is essentially a piece of software that is
executed in a fully decentralized way without anyone
being able to control it.
Applying the concept of stored procedures to
blockchains has two challenges, though. Because the
state changes caused by the stored procedures on ev-
ery node have to be consistent, the code needs to be
deterministic. Furthermore, for the network to make
progress and for block times to average the targeted
block interval, there can be no infinite loops or long
running transactions.
Determinism can be achieved by not allowing any
non-deterministic operations in stored procedures.
External API calls, for example, cannot be allowed,
as they might yield different results when performed
on different nodes in the network.
The second problem, preventing infinite loops,
theoretically reduces to the halting problem: Does
a given program terminate or will it run forever? It
is well known, that this problem is undecidable for
turing-complete languages, so another way of pre-
venting infinite loops has to be found.
One approach is to write stored procedures in a
less powerful language so they are guaranteed to ter-
minate after a well-defined number of steps. While
this constrains overall expressiveness, it enhances se-
curity by reducing potential vulnerabilities. A promi-
nent example of a blockchain following this approach
is Bitcoin, which provides a rather limited scripting
language mainly used for signature verification.
Another approach is to introduce a cost model
to a turing-complete language: Every operation is
assigned a price and an initial endowment is speci-
fied for a stored procedure when it is called. With
that, every stored procedure is guaranteed to halt, be-
cause even if it contains an infinite loop, the endow-
ment will be used up at some point which causes ex-
ecution to stop. Although it involves additional risk
from a security perspective, this approach is certainly
more expressive and enables more powerful appli-
cations. However, the cost calculation and tracking
during execution involve considerable overhead. The
Ethereum blockchain adopts this approach and refers
CLOSER 2017 - 7th International Conference on Cloud Computing and Services Science
760