bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 7쪽 중 3쪽
data. For example, the application may accept only transactions from/to a
particular address, or may need a certain amount of coin to be moved. Therefore, applications can only
consider valid messages that move a certain amount of coins to a specific address.
Application Layer. Valid messages that respect the requested format and have the requested signatures
from the list of the application’s messages. Messages can update the state of their application. Different
applications can share the same messages or can refer to messages of another application. The message
references are the unique hash pointer to the transaction in the ledger containing the digest of the
messages. The hash pointer is basically a pointer to the place where some (cryptographic) hash of the
information is stored. It’s an identifier that can be used to uniquely select a transaction in a database and
to verify it hasn’t changed.
2.1 Messaging Layer
There are several reasons we think the control logic, as well as the business logic, should be decoupled
from the transaction level. The first reason lies in the consideration that, in general, blockchain protocols
can’t accept changes without a fork of their chain into two different ones. For several reasons, the
blockchain communities can decide to split and depart from the original chain by adopting different
protocol rules. For example, the Ethereum platform has been forked into two versions: "Ethereum
Classic" (ETC) and "Ethereum" (ETH). Prior to the fork, the token was called Ethereum. After the fork, the
Page of 1648
new tokens kept the name ETH, and the old tokens were renamed ETC. Ethereum Classic appeared as a
result of disagreement with the Ethereum Foundation regarding The DAO Hard Fork [38]. Other notable
examples regard forks of Bitcoin. Reference the implementation of Bitcoin Core, aiming to increase the
transaction processing capacity (e.g., Bitcoin XT, Bitcoin Unlimited, Bitcoin Cash) [39].
Fig. 3: Overledger Architecture Model
Another fact supporting our architecture choice lies in the fact that Bitcoin, and other blockchain based
projects, have originally been conceived and designed to support cryptocurrencies and simple transfers.
That’s why smart contracts and distributed scripts aren’t as powerful as today’s application’s demands.
Moreover, transactions only have scope on their blockchain address space because of the simple original
design. Finally, our architecture is justified by the need to be code language independent. Indeed, the
languages used to build today’s blockchain systems will likely be substituted by other languages in the
future. For example, the Bitcoin Script, the script language of Bitcoin takes inspirations from FORTH - a
50-year-old concatenative programming language. Instead, many other blockchains, like Ethereum, have
implemented a complex business logic within the blockchain layer. Serpent and Solidity (the two Turing
complete programming languages that run on Ethereum) are inspired by Python and JavaScript
respectively, the most adopted scripting languages today, but not necessarily of tomorrow. In the
remaining part of this subsection we explain the technical requirements the Overledger Messaging Layer
needs to meet.
2.1.1 Standardisation
The Messaging Layer shall abstract from all the transactions regardless of the particular ledger. Only the
applications (living in the Application Layer) are responsible for the design rules (according to their
business logic) that will specify which specific information will need to be extracted from the transactions,
and in which order they’ll need to be sorted out. The Messaging Layer extracts all the information about
the transactions from every single ledger in the Transaction Layer. The Messaging Layer stores all the
information recorded in the ledger at any transaction: the source, the recipient, the amount of coin, the
script used, the smart contract and all other types of information that can be recorded in each ledger,
laying in the Transaction Layer. It allows legacy applications to work with our architecture, extending the
capability across-ledgers. However, ledger technologies are very different from each other and follow
different architectural standards [29]. This requires us to build a unique standard naming system for the
Messaging Layer. The standard should define how to refer to the different ledgers and to their particular
fields in a unique and unequivocal way. For example, it should be possible to refer to the address of a
Page of 1748
Bitcoin transaction using a compound syntax (e.g. BTC.Height.TransactionIndex.Outputindex should apply
to the output at index “Outputindex”, of the transaction at index “TransactionIndex”, in the block of the
main chain, with the height equal to the “Height” parameter.) Our proposal will give the opportunity to
build standard libraries for developers to interact in similar ways with different ledgers.
2.1.2 Messages and Information Out of the Chain
Most blockchains provide the ability to add a small amount of metadata to the transaction input/output.
For example, Bitcoin allows us to use the OP_RETURN [23] field to add metadata. Ethereum has the field
used for the script bytecode [24]. Ripple has the ‘memos’ field [25]. Therefore, external messages
(converted into hexadecimal values) can be used for any arbitrary logic. These messages can be
considered transactions, or blocks of an external blockchain, or locally stored by users. Only fingerprints
of these messages are added on the blockchain. The Digital Asset Platform [14] uses this approach as a
privacy enhancement tool, to solve the reconciliation problem between parties. Each user has its own set
of views and can build its view of the transactions. Only the hashes of these transactions are stored in the
[public] ledger to prove their validity. In case of conflict between two views, a user can show the validity of
their set of transactions by showing the transactions containing the hash of their messages, and prove
their validity to the counterpart. We want to extend this approach to messages. Messages are an
exchange of information; they can be a simple transaction, or something more complex concerning the
application logic.
Fig. 4 depicts an example of our hashing approach, applied to the Messaging Layer. In this example, there
are different applications running on the top of the blockchains and their messages are differentiated by
using different colours. From the top, the first white blocks represent a section of the “white” blockchain,
to which the coloured applications (blue, green, orange) are appending messages. The “white”
blockchain only hosts the hash of those messages. Each hash corresponds to a message of one of the
applications. There could be more than one message of the same application, in different transactions,
stored in the same block and there can be messages of different applications in the same block (see block
no. 1 of the white blockchain). Moreover, the same application can run on different blockchains at the
same time. This is shown in our example by letting the blue application add some messages, both on the
“white” blockchain and some others on the “blue” one (bottom of the figure). Note that the numbers of
the messages are monotonically increasing.
Page of 1848
Fig. 4: Messages out of the chain of different applications on different blockchains.
It should be pointed out that the concept of a blockchain “message” is more generic than one of a
blockchain “transaction”. In fact, messages can require a more complex format and be part of more
complicated interactions between the parts. Hence, mark-up languages like XML or JSON can be a good
fit to build messages in this context. The applications could define the valid sequences of messages and
their format through a schema to validate them. Moreover, these messages can be exchanged over
standard HTTP machines and XML, and JSON, all good choices since they’re already widely used in
Internet communication.
2.1.3 Messages and Security Properties
The security properties of the Messaging Layer regard the solutions to the problems of identification,
authentication, authorisation and non-repudiation of the entities and actions involved in the messaging.
Identification. Identification is the action to claim to be a certain entity, e.g. a person, a company, a
department with no ambiguity. In a login system, a user identifies herself through the username, usually an
arbitrary alphanumeric string. In blockchains, the identification is usually achieved through public keys, or
their hash. In this context, a public key seems to be the best approach, but there can also be cases where
users are identified with an address which similarly works as a username. In this respect, the message
format should always have a field which unequivocally identifies the senders and the receivers.
Authentication and Authorisation. Authentication is the action that proves someone is who they claim to
be. In standard login systems, a user can be authenticated with a password. In the blockchain,
authentication is done with a private key in the process of the digital signature. In such a context,
asymmetric cryptography and digital signature are the common approaches to enable a message
compliance with both the will and the authentication of a user. However, after the initial authentication
phase, with username-password, it’s also possible the application shares a secret with the user, then it
starts to exchange messages encrypted with symmetric cryptography. The hash of these messages is
stored in the blockchain, and the future user, with the shared secret and the complete message, will be
able to prove they’ve received those messages.
Page of 1948
Non-Repudiation. Non-repudiation means that, in the future, an action can’t be questioned or disowned
to have taken place. Digital signatures are the most common way to achieve this property in computer
science. This means that, if someone has a copy of the signed message, it can be stated that the message
was compliant with the will of the entities who signed it.
Privacy Constraints. Many applications will need to obfuscate data related to other users in order to be
compliant with privacy requirements. The classic lower level of blockchain cannot satisfy privacy
constraints because of the intrinsic transparency property of the blockchain. In other words, a common
blockchain transaction can’t be completely anonymous, otherwise it would be impossible to check its
validity. With regards to this, our proposed Messaging Layer borrows a similar approach to the Digital
Asset Platform by adding the hash of the messages in a special field of the regular blockchain transaction.
If someone holds a copy of a valid message (e.g. signed by all the stakeholders), it has the opportunity to
show the hash is in the chain, hence it’s valid. Colored Coins (Bitcoin applications for digital representation
and management of real world assets) uses a similar mechanism by using the OP_RETURN field of Bitcoin
[36]. Thus, the proposed solution may have some drawbacks because everyone can add the hash of a
message into blockchain transactions, creating the so called “blockchain bloat” problem [3]. It means
there can be irrelevant or invalid messages whose hash is the chain. Therefore, the presence of the hash in
the chain isn’t a sufficient condition to treat the message as valid, according to the Overledger logic. We
cover how to check message validity in Section 2.1.2.
Fig. 5 depicts a situation in which messages are exchanged off-chain, for example, through the Internet.
Even if it would be sufficient to save the hashes of the messages in separate transactions, here we
represent them stored in different blocks of the chain. User A can see all the hashes in the chain, but she
only has details of her own transactions: the blue one and the green one. She, for example, doesn’t know
there’s a transaction between User B and User C. If there’s conflict between the users’ views of the
records, each user can exhibit their complete transaction history and prove the validity of their
transactions by sending the hash pointers to the counterpart, such that they can be used to verify the data
in the blockchain.
!
Fig.5: Messages out of the chain and user’s views.
Page of 2048
2.1.4 Improve Privacy Specification
To enhance user privacy, we conceive the introduction of the multi-part message hash pointer technique.
In Subsection 2.1.3 we show a way to give the proper view of the application to the proper entity.
However, in certain circumstances the applications may require messages to follow hierarchical structures
that may have different scope regarding privacy. Since in our context we have arbitrary message formats,
we propose adding hash pointers to another part of the message. In this way, the applications can provide
each user with user-specific parts of the messages, i.e., unique content addressed only to specific users.
Thus, if a user has no rights to see some part of the multi-part message, they’ll only see a hash pointer or
a random piece of data. In Fig. 6 we provide an example of messages out of the chain, with different
levels of secrecy. In our example, the user with only the right to see the “blue” part of the message, is
only aware there are two other branches of the message: the one that starts with the “red” part and the
one that starts with the “green” one. However, the user doesn’t know how deep these branches are. At
the same time, the user that can see the “black” part of the message knows about the “green” one and
the “blue” one, but we can’t know if she’s aware of the content of the “red” part. Please consider this
modular approach can be replaced by removing the pointers from the lower part, adding a reference to
the upper ones and treating them as newer messages, adding their hashes on the chain. However, this
can lead to business logic inconsistency if the other parts of the messages aren’t correctly added, or
something happened in between. The problem with the approach described above is, whoever sits on a
given level of privacy is aware of the other levels of privacy. This is something that should be avoided in
most situations. To solve this issue, we can hide the level of secrecy by taking the fields that contain
private information like hash pointers, encrypt them with the public keys of the interested user and make
it look like a random piece of data to other users. This means, in the case there are no more levels of
secrecy, we should add a random sequence of data.
!
Fig. 6: Messages out of the chain and different level of secrecy.
Page of 2148
One of the problems with this approach is the secret information can be different in size and it means we
need to amend the size and use a padding strategy. The main issue to be solved is the users’ awareness
regarding the different parts of the message. Since a message can be encrypted only with one key, if we
want to use this strategy, we need to replicate the different parts concerning that specific key. For
instance, in Fig. 8 three users can see the “green” part of the message and just two of them can see the
“black” one. We need to add three “green” hash pointers to the “blue” extension. One of these three
(the one on the top of the figure) has random pieces of data as an extension field. The following ones (the
one in the middle and the one in the bottom of the figure) have a hash pointer to “black” messages
encrypted with their own keys. Extending this example, we can see the lower the level of secrecy the
higher the number of keys involved.
!
Fig.7: The field to extend the message contains the hash pointers of the other parts of the message and also contains a
random sequence of bytes.
Page of 2248
!
Fig. 8: Cryptography with multi-part messages.
Even if we showed with our example in Fig. 8 that it’s still possible to manage multi-part messages with
different keys, we still have the issue related to the different message sizes, with the need to fix the size to
make sure authorised users aren’t aware of how many branches of secrecy there are at that level. In this
section, we propose an extension field approach (see Fig. 9), that partially solves that problem by adding
only one field per message that can point to a message part that only contains hash pointers. In this case,
the “blue” message has only one extra field for the extension. The content of that field can be a random
sequence of bytes or the hash of the “blue” dashed extension. The “blue” extension contains the
pointers to the “red” part and the “green” part of the message. In this way, users who sit at a lower level
don’t know if there are other levels of secrecy or how many there are. However, with this solution, the
users that can read the “red” part of the message also know the “green” one, as well as those who can
read the “green” part also know the “red” one.
Page of 2348
!
Fig. 9: Level of secrecy without keys.
2.1.5 Shortcomings of Messages Out of the Chain
One of the main issues needing to be overcome when building an over-layer of the message, whose hash
is added on the blockchain, is we can’t control who and which messages can be appended. It means if
there’s no rules to limit it, there can be problems like trashing and spamming. It’s also possible to design a
denial of service. This is what would happen in the lower level, if the blockchain has no consensus
mechanism. In fact, the consensus rules how frequently blocks are added in the chain.
Spamming. In a messaging system, spamming is the action to send unsolicited messages. This action
results in overwhelming the channel with valid messages. In this case, the channel is the space per
transaction of the field we use to add the hash of the application message. One possible solution can be
to let only a third party validate messages by signing them. In this case, only messages with the right
format, which have been signed by the authority and have hashes in a valid chain, can be considered
valid. However, in some business contexts, this approach could be mandatory, and would still give the
user the transparency, and non-repudiation property, traditional centralised applications can’t guarantee
without trust. Without a centralised authority checking message consistency and controlling its growth,
replica issues or replay attacks can also occur. For example, a command of a valid message added many
times, could be executed an arbitrary number of times. Also, it becomes more difficult to build the
application logic if during the scanning of all messages there are messages that have the correct format
and the right signatures, but they’re no longer valid because they’re already in Overledger. There are
techniques to solve this issue, like enumerating messages or using timestamps.
Trashing. Trashing is the action of overwhelming a channel with meaningless data regarding the business
logic (not-valid messages). It can be the action of a malicious user or an involuntary act. In fact, many
applications can run on the same blockchain, and messages from one application are trash data for other
applications (i.e., lack of M2M communication). This means if an entity of the application loses the pointer
Page of 2448
to the particular block transaction that hosts the hash of the message, it should compare this hash with all
the hashes of the valid messages of all the applications that have run into that blockchain, until the
matching one’s found. It also means, to check if a message has been validated and added to the chain,
users have to check all the messages and then store the pointer to it.
2.1.6 Speed and Throughput of Messages
Building new decentralised a프로젝트로 돌아가기