没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
ETHEREUM: A SECURE DECENTRALISED GENERALISED TRANSACTION LEDGER
BYZANTIUM VERSION 7aa0e4c - 2018-03-12
DR. GAVIN WOOD
FOUNDER, ETHEREUM & PARITY
GAVIN@PARITY.IO
Abstract.
The blockchain paradigm when coupled with cryptographically-secured transactions has demonstrated its
utility through a number of projects, with Bitcoin being one of the most notable ones. Each such project can be seen as
a simple application on a decentralised, but singleton, compute resource. We can call this paradigm a transactional
singleton machine with shared-state.
Ethereum implements this paradigm in a generalised manner. Furthermore it provides a plurality of such resources,
each with a distinct state and operating code but able to interact through a message-passing framework with others.
We discuss its design, implementation issues, the opportunities it provides and the future hurdles we envisage.
1. Introduction
With ubiquitous internet connections in most places
of the world, global information transmission has become
incredibly cheap. Technology-rooted movements like Bit-
coin have demonstrated through the power of the default,
consensus mechanisms, and voluntary respect of the social
contract, that it is possible to use the internet to make
a decentralised value-transfer system that can be shared
across the world and virtually free to use. This system can
be said to be a very specialised version of a cryptographi-
cally secure, transaction-based state machine. Follow-up
systems such as Namecoin adapted this original “currency
application” of the technology into other applications albeit
rather simplistic ones.
Ethereum is a project which attempts to build the gen-
eralised technology; technology on which all transaction-
based state machine concepts may be built. Moreover it
aims to provide to the end-developer a tightly integrated
end-to-end system for building software on a hitherto un-
explored compute paradigm in the mainstream: a trustful
object messaging compute framework.
1.1.
Driving Factors.
There are many goals of this
project; one key goal is to facilitate transactions between
consenting individuals who would otherwise have no means
to trust one another. This may be due to geographical
separation, interfacing difficulty, or perhaps the incompati-
bility, incompetence, unwillingness, expense, uncertainty,
inconvenience, or corruption of existing legal systems. By
specifying a state-change system through a rich and unam-
biguous language, and furthermore architecting a system
such that we can reasonably expect that an agreement will
be thus enforced autonomously, we can provide a means
to this end.
Dealings in this proposed system would have several
attributes not often found in the real world. The incorrupt-
ibility of judgement, often difficult to find, comes naturally
from a disinterested algorithmic interpreter. Transparency,
or being able to see exactly how a state or judgement came
about through the transaction log and rules or instructional
codes, never happens perfectly in human-based systems
since natural language is necessarily vague, information
is often lacking, and plain old prejudices are difficult to
shake.
Overall, we wish to provide a system such that users
can be guaranteed that no matter with which other indi-
viduals, systems or organisations they interact, they can
do so with absolute confidence in the possible outcomes
and how those outcomes might come about.
1.2.
Previous Work.
Buterin [2013a] first proposed the
kernel of this work in late November, 2013. Though now
evolved in many ways, the key functionality of a block-
chain with a Turing-complete language and an effectively
unlimited inter-transaction storage capability remains un-
changed.
Dwork and Naor [1992] provided the first work into the
usage of a cryptographic proof of computational expendi-
ture (“proof-of-work”) as a means of transmitting a value
signal over the Internet. The value-signal was utilised here
as a spam deterrence mechanism rather than any kind
of currency, but critically demonstrated the potential for
a basic data channel to carry a strong economic signal,
allowing a receiver to make a physical assertion without
having to rely upon trust. Back [2002] later produced a
system in a similar vein.
The first example of utilising the proof-of-work as a
strong economic signal to secure a currency was by Vish-
numurthy et al. [2003]. In this instance, the token was
used to keep peer-to-peer file trading in check, providing
“consumers” with the ability to make micro-payments to
“suppliers” for their services. The security model afforded
by the proof-of-work was augmented with digital signatures
and a ledger in order to ensure that the historical record
couldn’t be corrupted and that malicious actors could not
spoof payment or unjustly complain about service deliv-
ery. Five years later, Nakamoto [2008] introduced another
such proof-of-work-secured value token, somewhat wider in
scope. The fruits of this project, Bitcoin, became the first
widely adopted global decentralised transaction ledger.
Other projects built on Bitcoin’s success; the alt-coins
introduced numerous other currencies through alteration
to the protocol. Some of the best known are Litecoin and
Primecoin, discussed by Sprankel [2013]. Other projects
sought to take the core value content mechanism of the pro-
tocol and repurpose it; Aron [2012] discusses, for example,
1
ETHEREUM: A SECURE DECENTRALISED GENERALISED TRANSACTION LEDGER BYZANTIUM VERSION 7aa0e4c - 2018-03-12 2
the Namecoin project which aims to provide a decentralised
name-resolution system.
Other projects still aim to build upon the Bitcoin net-
work itself, leveraging the large amount of value placed in
the system and the vast amount of computation that goes
into the consensus mechanism. The Mastercoin project,
first proposed by Willett [2013], aims to build a richer
protocol involving many additional high-level features on
top of the Bitcoin protocol through utilisation of a number
of auxiliary parts to the core protocol. The Coloured Coins
project, proposed by Rosenfeld et al. [2012], takes a similar
but more simplified strategy, embellishing the rules of a
transaction in order to break the fungibility of Bitcoin’s
base currency and allow the creation and tracking of tokens
through a special “chroma-wallet”-protocol-aware piece of
software.
Additional work has been done in the area with discard-
ing the decentralisation foundation; Ripple, discussed by
Boutellier and Heinzen [2014], has sought to create a “fed-
erated” system for currency exchange, effectively creating
a new financial clearing system. It has demonstrated that
high efficiency gains can be made if the decentralisation
premise is discarded.
Early work on smart contracts has been done by Szabo
[1997] and Miller [1997]. Around the 1990s it became clear
that algorithmic enforcement of agreements could become a
significant force in human cooperation. Though no specific
system was proposed to implement such a system, it was
proposed that the future of law would be heavily affected
by such systems. In this light, Ethereum may be seen as a
general implementation of such a crypto-law system.
For a list of terms used in this paper, refer to Appendix
A.
2. The Blockchain Paradigm
Ethereum, taken as a whole, can be viewed as a
transaction-based state machine: we begin with a gen-
esis state and incrementally execute transactions to morph
it into some final state. It is this final state which we
accept as the canonical “version” of the world of Ethereum.
The state can include such information as account bal-
ances, reputations, trust arrangements, data pertaining
to information of the physical world; in short, anything
that can currently be represented by a computer is admis-
sible. Transactions thus represent a valid arc between two
states; the ‘valid’ part is important—there exist far more
invalid state changes than valid state changes. Invalid state
changes might, e.g., be things such as reducing an account
balance without an equal and opposite increase elsewhere.
A valid state transition is one which comes about through
a transaction. Formally:
(1) σ
t+1
≡ Υ(σ
t
, T )
where Υ is the Ethereum state transition function. In
Ethereum, Υ, together with
σ
are considerably more pow-
erful then any existing comparable system; Υ allows com-
ponents to carry out arbitrary computation, while
σ
allows
components to store arbitrary state between transactions.
Transactions are collated into blocks; blocks are chained
together using a cryptographic hash as a means of refer-
ence. Blocks function as a journal, recording a series of
transactions together with the previous block and an iden-
tifier for the final state (though do not store the final state
itself—that would be far too big). They also punctuate the
transaction series with incentives for nodes to mine. This
incentivisation takes place as a state-transition function,
adding value to a nominated account.
Mining is the process of dedicating effort (working) to
bolster one series of transactions (a block) over any other
potential competitor block. It is achieved thanks to a
cryptographically secure proof. This scheme is known as a
proof-of-work and is discussed in detail in section 11.5.
Formally, we expand to:
σ
t+1
≡ Π(σ
t
, B)(2)
B ≡ (..., (T
0
, T
1
, ...))(3)
Π(σ, B) ≡ Ω(B, Υ(Υ(σ, T
0
), T
1
)...)(4)
Where Ω is the block-finalisation state transition func-
tion (a function that rewards a nominated party);
B
is this
block, which includes a series of transactions amongst some
other components; and Π is the block-level state-transition
function.
This is the basis of the blockchain paradigm, a model
that forms the backbone of not only Ethereum, but all
decentralised consensus-based transaction systems to date.
2.1.
Value.
In order to incentivise computation within the
network, there needs to be an agreed method for transmit-
ting value. To address this issue, Ethereum has an intrinsic
currency, Ether, known also as ETH and sometimes referred
to by the Old English
¯
D. The smallest subdenomination
of Ether, and thus the one in which all integer values of
the currency are counted, is the Wei. One Ether is defined
as being 10
18
Wei. There exist other subdenominations of
Ether:
Multiplier Name
10
0
Wei
10
12
Szabo
10
15
Finney
10
18
Ether
Throughout the present work, any reference to value,
in the context of Ether, currency, a balance or a payment,
should be assumed to be counted in Wei.
2.2.
Which History?
Since the system is decentralised
and all parties have an opportunity to create a new block
on some older pre-existing block, the resultant structure is
necessarily a tree of blocks. In order to form a consensus
as to which path, from root (the genesis block) to leaf (the
block containing the most recent transactions) through
this tree structure, known as the blockchain, there must
be an agreed-upon scheme. If there is ever a disagreement
between nodes as to which root-to-leaf path down the block
tree is the ‘best’ blockchain, then a fork occurs.
This would mean that past a given point in time (block),
multiple states of the system may coexist: some nodes be-
lieving one block to contain the canonical transactions,
other nodes believing some other block to be canonical,
potentially containing radically different or incompatible
transactions. This is to be avoided at all costs as the un-
certainty that would ensue would likely kill all confidence
in the entire system.
The scheme we use in order to generate consensus is a
simplified version of the GHOST protocol introduced by
Sompolinsky and Zohar [2013]. This process is described
in detail in section 10.
ETHEREUM: A SECURE DECENTRALISED GENERALISED TRANSACTION LEDGER BYZANTIUM VERSION 7aa0e4c - 2018-03-12 3
Sometimes, a path follows a new protocol from a par-
ticular height. This document describes one version of the
protocol. In order to follow back the history of a path, one
must reference multiple versions of this document.
3. Conventions
We use a number of typographical conventions for the
formal notation, some of which are quite particular to the
present work:
The two sets of highly structured, ‘top-level’, state val-
ues, are denoted with bold lowercase Greek letters. They
fall into those of world-state, which are denoted
σ
(or a
variant thereupon) and those of machine-state, µ.
Functions operating on highly structured values are
denoted with an upper-case Greek letter, e.g. Υ, the
Ethereum state transition function.
For most functions, an uppercase letter is used, e.g.
C
,
the general cost function. These may be subscripted to
denote specialised variants, e.g.
C
SSTORE
, the cost func-
tion for the
SSTORE
operation. For specialised and possibly
externally defined functions, we may format as typewriter
text, e.g. the Keccak-256 hash function (as per the winning
entry to the SHA-3 contest by Bertoni et al. [2017], rather
than later releases), is denoted
KEC
(and generally referred
to as plain Keccak). Also
KEC512
is referring to the Keccak
512 hash function.
Tuples are typically denoted with an upper-case letter,
e.g.
T
, is used to denote an Ethereum transaction. This
symbol may, if accordingly defined, be subscripted to refer
to an individual component, e.g.
T
n
, denotes the nonce
of said transaction. The form of the subscript is used to
denote its type; e.g. uppercase subscripts refer to tuples
with subscriptable components.
Scalars and fixed-size byte sequences (or, synonymously,
arrays) are denoted with a normal lower-case letter, e.g.
n
is used in the document to denote a transaction nonce.
Those with a particularly special meaning may be Greek,
e.g.
δ
, the number of items required on the stack for a
given operation.
Arbitrary-length sequences are typically denoted as a
bold lower-case letter, e.g.
o
is used to denote the byte
sequence given as the output data of a message call. For
particularly important values, a bold uppercase letter may
be used.
Throughout, we assume scalars are positive integers and
thus belong to the set
N
. The set of all byte sequences is
B
,
formally defined in Appendix B. If such a set of sequences
is restricted to those of a particular length, it is denoted
with a subscript, thus the set of all byte sequences of length
32 is named
B
32
and the set of all positive integers smaller
than 2
256
is named
N
256
. This is formally defined in section
4.3.
Square brackets are used to index into and reference
individual components or subsequences of sequences, e.g.
µ
s
[0] denotes the first item on the machine’s stack. For
subsequences, ellipses are used to specify the intended
range, to include elements at both limits, e.g.
µ
m
[0
..
31]
denotes the first 32 items of the machine’s memory.
In the case of the global state
σ
, which is a sequence of
accounts, themselves tuples, the square brackets are used
to reference an individual account.
When considering variants of existing values, we follow
the rule that within a given scope for definition, if we
assume that the unmodified ‘input’ value be denoted by
the placeholder
then the modified and utilisable value is
denoted as
0
, and intermediate values would be
∗
,
∗∗
&c. On very particular occasions, in order to maximise
readability and only if unambiguous in meaning, we may
use alpha-numeric subscripts to denote intermediate values,
especially those of particular note.
When considering the use of existing functions, given a
function
f
, the function
f
∗
denotes a similar, element-wise
version of the function mapping instead between sequences.
It is formally defined in section 4.3.
We define a number of useful functions throughout. One
of the more common is
`
, which evaluates to the last item
in the given sequence:
(5) `(x) ≡ x[kxk − 1]
4. Blocks, State and Transactions
Having introduced the basic concepts behind Ethereum,
we will discuss the meaning of a transaction, a block and
the state in more detail.
4.1.
World State.
The world state (state), is a map-
ping between addresses (160-bit identifiers) and account
states (a data structure serialised as RLP, see Appendix
B). Though not stored on the blockchain, it is assumed
that the implementation will maintain this mapping in a
modified Merkle Patricia tree (trie, see Appendix D). The
trie requires a simple database backend that maintains a
mapping of bytearrays to bytearrays; we name this under-
lying database the state database. This has a number of
benefits; firstly the root node of this structure is crypto-
graphically dependent on all internal data and as such its
hash can be used as a secure identity for the entire system
state. Secondly, being an immutable data structure, it
allows any previous state (whose root hash is known) to
be recalled by simply altering the root hash accordingly.
Since we store all such root hashes in the blockchain, we
are able to trivially revert to old states.
The account state,
σ
[
a
], comprises the following four
fields:
nonce:
A scalar value equal to the number of trans-
actions sent from this address or, in the case
of accounts with associated code, the number of
contract-creations made by this account. For ac-
count of address
a
in state
σ
, this would be for-
mally denoted σ[a]
n
.
balance:
A scalar value equal to the number of Wei
owned by this address. Formally denoted σ[a]
b
.
storageRoot:
A 256-bit hash of the root node of a
Merkle Patricia tree that encodes the storage con-
tents of the account (a mapping between 256-bit
integer values), encoded into the trie as a mapping
from the Keccak 256-bit hash of the 256-bit integer
keys to the RLP-encoded 256-bit integer values.
The hash is formally denoted σ[a]
s
.
codeHash:
The hash of the EVM code of this
account—this is the code that gets executed should
this address receive a message call; it is immutable
and thus, unlike all other fields, cannot be changed
after construction. All such code fragments are
contained in the state database under their corre-
sponding hashes for later retrieval. This hash is
ETHEREUM: A SECURE DECENTRALISED GENERALISED TRANSACTION LEDGER BYZANTIUM VERSION 7aa0e4c - 2018-03-12 4
formally denoted
σ
[
a
]
c
, and thus the code may be
denoted as b, given that KEC(b) = σ[a]
c
.
Since we typically wish to refer not to the trie’s root
hash but to the underlying set of key/value pairs stored
within, we define a convenient equivalence:
(6) TRIE
L
∗
I
(σ[a]
s
)
≡ σ[a]
s
The collapse function for the set of key/value pairs in
the trie,
L
∗
I
, is defined as the element-wise transformation
of the base function L
I
, given as:
(7) L
I
(k, v)
≡
KEC(k), RLP(v)
where:
(8) k ∈ B
32
∧ v ∈ N
It shall be understood that
σ
[
a
]
s
is not a ‘physical’
member of the account and does not contribute to its later
serialisation.
If the
codeHash
field is the Keccak-256 hash of the
empty string, i.e.
σ
[
a
]
c
=
KEC
()
, then the node represents
a simple account, sometimes referred to as a “non-contract”
account.
Thus we may define a world-state collapse function
L
S
:
(9) L
S
(σ) ≡ {p(a) : σ[a] 6= ∅}
where
(10) p(a) ≡
KEC(a), RLP
(σ[a]
n
, σ[a]
b
, σ[a]
s
, σ[a]
c
)
This function,
L
S
, is used alongside the trie function
to provide a short identity (hash) of the world state. We
assume:
(11) ∀a : σ[a] = ∅ ∨ (a ∈ B
20
∧ v(σ[a]))
where v is the account validity function:
(12) v(x) ≡ x
n
∈ N
256
∧x
b
∈ N
256
∧x
s
∈ B
32
∧x
c
∈ B
32
An account is empty when it has no code, zero nonce
and zero balance:
(13)
EMPTY(σ, a) ≡ σ[a]
c
= KEC
()
∧σ[a]
n
= 0∧σ[a]
b
= 0
Even callable precompiled contracts can have an empty
account state. This is because their account states do not
usually contain the code describing its behavior.
An account is dead when its account state is non-existent
or empty:
(14) DEAD(σ, a) ≡ σ[a] = ∅ ∨ EMPTY(σ, a)
4.2.
The Transaction.
A transaction (formally,
T
) is a
single cryptographically-signed instruction constructed by
an actor externally to the scope of Ethereum. While it is
assumed that the ultimate external actor will be human in
nature, software tools will be used in its construction and
dissemination
1
. There are two types of transactions: those
which result in message calls and those which result in
the creation of new accounts with associated code (known
informally as ‘contract creation’). Both types specify a
number of common fields:
nonce:
A scalar value equal to the number of trans-
actions sent by the sender; formally T
n
.
gasPrice:
A scalar value equal to the number of
Wei to be paid per unit of gas for all computation
costs incurred as a result of the execution of this
transaction; formally T
p
.
gasLimit:
A scalar value equal to the maximum
amount of gas that should be used in executing
this transaction. This is paid up-front, before any
computation is done and may not be increased
later; formally T
g
.
to:
The 160-bit address of the message call’s recipi-
ent or, for a contract creation transaction,
∅
, used
here to denote the only member of
B
0
; formally
T
t
.
value:
A scalar value equal to the number of Wei to
be transferred to the message call’s recipient or,
in the case of contract creation, as an endowment
to the newly created account; formally T
v
.
v, r, s:
Values corresponding to the signature of the
transaction and used to determine the sender of
the transaction; formally
T
w
,
T
r
and
T
s
. This is
expanded in Appendix F.
Additionally, a contract creation transaction contains:
init:
An unlimited size byte array specifying the
EVM-code for the account initialisation procedure,
formally T
i
.
init
is an EVM-code fragment; it returns the
body
,
a second fragment of code that executes each time the
account receives a message call (either through a trans-
action or due to the internal execution of code).
init
is
executed only once at account creation and gets discarded
immediately thereafter.
In contrast, a message call transaction contains:
data:
An unlimited size byte array specifying the
input data of the message call, formally T
d
.
Appendix F specifies the function,
S
, which maps trans-
actions to the sender, and happens through the ECDSA of
the SECP-256k1 curve, using the hash of the transaction
(excepting the latter three signature fields) as the datum
to sign. For the present we simply assert that the sender
of a given transaction T can be represented with S(T ).
(15)
L
T
(T ) ≡
(
(T
n
, T
p
, T
g
, T
t
, T
v
, T
i
, T
w
, T
r
, T
s
) if T
t
= ∅
(T
n
, T
p
, T
g
, T
t
, T
v
, T
d
, T
w
, T
r
, T
s
) otherwise
Here, we assume all components are interpreted by the
RLP as integer values, with the exception of the arbitrary
length byte arrays T
i
and T
d
.
(16) T
n
∈ N
256
∧ T
v
∈ N
256
∧ T
p
∈ N
256
∧
T
g
∈ N
256
∧ T
w
∈ N
5
∧ T
r
∈ N
256
∧
T
s
∈ N
256
∧ T
d
∈ B ∧ T
i
∈ B
where
(17) N
n
= {P : P ∈ N ∧ P < 2
n
}
The address hash
T
t
is slightly different: it is either a
20-byte address hash or, in the case of being a contract-
creation transaction (and thus formally equal to
∅
), it is
1
Notably, such ‘tools’ could ultimately become so causally removed from their human-based initiation—or humans may become so
causally-neutral—that there could be a point at which they rightly be considered autonomous agents. e.g. contracts may offer bounties to
humans for being sent transactions to initiate their execution.
ETHEREUM: A SECURE DECENTRALISED GENERALISED TRANSACTION LEDGER BYZANTIUM VERSION 7aa0e4c - 2018-03-12 5
the RLP empty byte sequence and thus the member of
B
0
:
(18) T
t
∈
(
B
20
if T
t
6= ∅
B
0
otherwise
4.3.
The Block.
The block in Ethereum is the collec-
tion of relevant pieces of information (known as the block
header),
H
, together with information corresponding to
the comprised transactions,
T
, and a set of other block
headers
U
that are known to have a parent equal to the
present block’s parent’s parent (such blocks are known as
ommers
2
). The block header contains several pieces of
information:
parentHash:
The Keccak 256-bit hash of the parent
block’s header, in its entirety; formally H
p
.
ommersHash:
The Keccak 256-bit hash of the om-
mers list portion of this block; formally H
o
.
beneficiary:
The 160-bit address to which all fees
collected from the successful mining of this block
be transferred; formally H
c
.
stateRoot:
The Keccak 256-bit hash of the root
node of the state trie, after all transactions are
executed and finalisations applied; formally H
r
.
transactionsRoot:
The Keccak 256-bit hash of the
root node of the trie structure populated with each
transaction in the transactions list portion of the
block; formally H
t
.
receiptsRoot:
The Keccak 256-bit hash of the root
node of the trie structure populated with the re-
ceipts of each transaction in the transactions list
portion of the block; formally H
e
.
logsBloom:
The Bloom filter composed from index-
able information (logger address and log topics)
contained in each log entry from the receipt of
each transaction in the transactions list; formally
H
b
.
difficulty:
A scalar value corresponding to the dif-
ficulty level of this block. This can be calculated
from the previous block’s difficulty level and the
timestamp; formally H
d
.
number:
A scalar value equal to the number of an-
cestor blocks. The genesis block has a number of
zero; formally H
i
.
gasLimit:
A scalar value equal to the current limit
of gas expenditure per block; formally H
l
.
gasUsed:
A scalar value equal to the total gas used
in transactions in this block; formally H
g
.
timestamp:
A scalar value equal to the reasonable
output of Unix’s time() at this block’s inception;
formally H
s
.
extraData:
An arbitrary byte array containing data
relevant to this block. This must be 32 bytes or
fewer; formally H
x
.
mixHash:
A 256-bit hash which, combined with the
nonce, proves that a sufficient amount of compu-
tation has been carried out on this block; formally
H
m
.
nonce:
A 64-bit value which, combined with the mix-
hash, proves that a sufficient amount of computa-
tion has been carried out on this block; formally
H
n
.
The other two components in the block are simply a list
of ommer block headers (of the same format as above),
B
U
and a series of the transactions,
B
T
. Formally, we can
refer to a block B:
(19) B ≡ (B
H
, B
T
, B
U
)
4.3.1. Transaction Receipt. In order to encode information
about a transaction concerning which it may be useful
to form a zero-knowledge proof, or index and search, we
encode a receipt of each transaction containing certain
information from concerning its execution. Each receipt,
denoted
B
R
[
i
] for the
i
th transaction, is placed in an index-
keyed trie and the root recorded in the header as H
e
.
The transaction receipt,
R
, is a tuple of four items com-
prising the cumulative gas used in the block containing the
transaction receipt as of immediately after the transaction
has happened,
R
u
, the set of logs created through execu-
tion of the transaction,
R
l
and the Bloom filter composed
from information in those logs,
R
b
and the status code of
the transaction, R
z
:
(20) R ≡ (R
u
, R
b
, R
l
, R
z
)
The function
L
R
trivially prepares a transaction receipt
for being transformed into an RLP-serialised byte array:
(21) L
R
(R) ≡ (0 ∈ B
256
, R
u
, R
b
, R
l
)
where 0
∈ B
256
replaces the pre-transaction state root that
existed in previous versions of the protocol.
We assert that the status code R
z
is an integer.
(22) R
z
∈ N
We assert
R
u
, the cumulative gas used is a positive
integer and that the logs Bloom,
R
b
, is a hash of size 2048
bits (256 bytes):
(23) R
u
∈ N ∧ R
b
∈ B
256
The sequence
R
l
is a series of log entries, (
O
0
, O
1
, ...
).
A log entry,
O
, is a tuple of the logger’s address,
O
a
, a
series of 32-byte log topics,
O
t
and some number of bytes
of data, O
d
:
(24) O ≡ (O
a
, (O
t
0
, O
t
1
, ...), O
d
)
(25) O
a
∈ B
20
∧ ∀
t∈O
t
: t ∈ B
32
∧ O
d
∈ B
We define the Bloom filter function,
M
, to reduce a log
entry into a single 256-byte hash:
(26) M(O) ≡
_
t∈{O
a
}∪O
t
M
3:2048
(t)
where
M
3:2048
is a specialised Bloom filter that sets
three bits out of 2048, given an arbitrary byte sequence.
It does this through taking the low-order 11 bits of each of
the first three pairs of bytes in a Keccak-256 hash of the
2
ommer is a gender-neutral term to mean “sibling of parent”; see
https://nonbinary.miraheze.org/wiki/Gender_neutral_language#Aunt.
2FUncle
3
11 bits = 2
2048
, and the low-order 11 bits is the modulo 2048 of the operand, which is in this case is “each of the first three pairs of
bytes in a Keccak-256 hash of the byte sequence.”
剩余37页未读,继续阅读
资源评论
miao129
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- libguestfs-winsupport-7.2-3.el7.x64-86.rpm.tar.gz
- 建立数学模型与Simulink实现:四旋翼、共轴直升机及带尾翼直升机的动力学与控制研究,控制系统的数学建模,被控对象的数学模型建立,simulink模型实现 提供四旋翼和带尾翼直升机,共轴式直升机的
- libgusb-0.2.9-1.el7.x64-86.rpm.tar.gz
- MPC控制器设计:模型预测控制及LTV MPC理论讲解与应用实例,涵盖直升机与四旋翼应用及matlab工具箱mpcDesign使用指南,MPC控制器设计,模型预测控制,线性时变模型预测控制,LTV M
- libgusb-devel-0.2.9-1.el7.x64-86.rpm.tar.gz
- 斑马打印机C#控制源代码合集:支持二维码与条形码标签打印,完整文档助力二次开发,斑马打印机C#控制程序源代码,适合自己进行二次开发 文档齐全,包括驱动程序和如何设置斑马打印机的说明文档 源代码可以
- libgweather-3.28.2-4.el7-9.x64-86.rpm.tar.gz
- 昆仑通态触摸屏与三台英威腾GD变频器通讯指南:接线、设置及功能实现,昆仑通态MCGS与3台英威腾GD变频器通讯 器件:昆仑通态触摸屏,3台英威腾GD系列变频器,附送接线说明和设置说明 功能:实现频率设
- libgweather-devel-3.28.2-4.el7-9.x64-86.rpm.tar.gz
- 不确定性下机会约束最优潮流的风险感知网络控制策略及python代码复现 ,机会约束最优潮流:不确定性下的风险感知网络控制 python源代码,代码按照高水平文章复现,保证正确 当不可控制的资源波动时
- libgxim-0.5.0-3.el7.x64-86.rpm.tar.gz
- 基于最优控制理论的电池储能模型与Python实现:从CSV数据到最优解求解与结果可视化,最优控制电池储能模型 蓄电池储能模型的最优控制python源代码,代码按照高水平文章复现 包含五个python脚
- libgxim-devel-0.5.0-3.el7.x64-86.rpm.tar.gz
- libgxps-0.3.0-4.el7.x64-86.rpm.tar.gz
- 分布式鲁棒优化微电网单元分配方法:结合K-L分歧概率与两级分解策略应对电网负荷和电价波动挑战,一种分布式鲁棒优化的微电网单元分配方法 python源代码,代码按照高水平文章复现,保证正确 针对电网负荷
- libgxps-devel-0.3.0-4.el7.x64-86.rpm.tar.gz
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功