Gram 백서

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 16쪽 중 10쪽

e lower performance. We think that a similar result might have been obtained by publishing a formal specication of the proposed block interpretation function ev_trans , without xing a particular implementation . 2.9.5. Casper. 30 Casper is an upcoming PoS algorithm for Ethereum; its gradual deployment in 2017 (or 2018), if successful, will change Ethereum into a single-chain PoS or mixed PoW+PoS system with smart contract support, transforming Ethereum into a third-generation project. 2.9.6. BitShares [8]; https://bitshares.org . BitShares (2014) is a plat- form for distributed blockchain-based exchanges. It is a heterogeneous multi- blockchain DPoS system without smart contracts; it achieves its high per- formance by allowing only a small set of predened specialized transaction types, which can be eciently implemented in C++, assuming the blockchain state ts into memory. It is also the rst blockchain project to use Delegated Proof-of-Stake (DPoS), demonstrating its viability at least for some special- ized purposes. 2.9.7. EOS [5]; https://eos.io . EOS (2018 or later) is a proposed het- erogeneous multi-blockchain DPoS system with smart contract support and with some minimal support for messaging (still loosely-coupled in the sense described in 2.8.14 ). It is an attempt by the same team that has previously 30 https://blog.ethereum.org/2015/08/01/introducing-casper-friendly-ghost/ 75 2.9. Comparison to Other Blockchain Projects successfully created the BitShares and SteemIt projects, demonstrating the strong points of the DPoS consensus algorithm. Scalability will be achieved by creating specialized workchains for projects that need it (e.g., a distributed exchange might use a workchain supporting a special set of optimized trans- actions, similarly to what BitShares did) and by creating multiple workchains with the same rules ( confederations in the sense described in 2.8.10 ). The drawbacks and limitations of this approach to scalability have been discussed in loc. cit. Cf. also 2.8.5 , 2.8.12 , and 2.8.14 for a more detailed discussion of DPoS, sharding, interaction between workchains and their implications for the scalability of a blockchain system. At the same time, even if one will not be able to create a Facebook inside a blockchain (cf. 2.9.13 ), EOS or otherwise, we think that EOS might become a convenient platform for some highly-specialized weakly interacting distributed applications, similar to BitShares (decentralized exchange) and SteemIt (decentralized blog platform). 2.9.8. PolkaDot [17]; https://polkadot.io/ . PolkaDot (2019 or later) is one of the best thought-out and most detailed proposed multichain Proof- of-Stake projects; its development is led by one of the Ethereum co-founders. This project is one of the closest projects to the TON Blockchain on our map. (In fact, we are indebted for our terminology for shermen and nominators to the PolkaDot project.) PolkaDot is a heterogeneous loosely-coupled multichain Proof-of-Stake project, with Byzantine Fault Tolerant (BFT) consensus for generation of new blocks and a masterchain (which might be externale.g., the Ethereum blockchain). It also uses hypercube routing, somewhat like (the slow version of) TON's as described in 2.4.19 . Its unique feature is its ability to create not only public , but also private blockchains. These private blockchains would also be able to interact with other public blockchains, PolkaDot or otherwise. As such, PolkaDot might become a platform for large-scale private block- chains, which might be used, for example, by bank consortiums to quickly transfer funds to each other, or for any other uses a large corporation might have for private blockchain technology. However, PolkaDot has no sharding support and is not tightly-coupled. This somewhat hampers its scalability, which is similar to that of EOS. (Per- haps a bit better, because PolkaDot uses BFT PoS instead of DPoS.) 2.9.9. Universa; https://universa.io . The only reason we mention this 76 2.9. Comparison to Other Blockchain Projects unusual blockchain project here is because it is the only project so far to make in passing an explicit reference to something similar to our Innite Sharding Paradigm (cf. 2.1.2 ). Its other peculiarity is that it bypasses all complications related to Byzantine Fault Tolerance by promising that only trusted and licensed partners of the project will be admitted as validators, hence they will never commit invalid blocks. This is an interesting decision; however, it essentially makes a blockchain project deliberately centralized , something blockchain projects usually want to avoid (why does one need a blockchain at all to work in a trusted centralized environment?). 2.9.10. Plasma; https://plasma.io ). Plasma (2019?) is an unconven- tional blockchain project from another co-founder of Ethereum. It is sup- posed to mitigate some limitations of Ethereum without introducing shard- ing. In essence, it is a separate project from Ethereum, introducing a hier- archy of (heterogeneous) workchains, bound to the Ethereum blockchain (to be used as an external masterchain) at the top level. Funds can be trans- ferred from any blockchain up in the hierarchy (starting from the Ethereum blockchain as the root), along with a description of a job to be done. Then the necessary computations are done in the child workchain (possibly re- quiring forwarding of parts of the original job further down the tree), their results are passed up, and a reward is collected. The problem of achieving consistency and validating these workchains is circumvented by a (payment channel-inspired) mechanism allowing users to unilaterally withdraw their funds from a misbehaving workchain to its parent workchain (albeit slowly), and re-allocate their funds and their jobs to another workchain. In this way, Plasma might become a platform for distributed compu- tations bound to the Ethereum blockchain, something like a mathematical co-processor. However, this does not seem like a way to achieve true general- purpose scalability. 2.9.11. Specialized blockchain projects. There are also some specialized blockchain projects, such as FileCoin (a system that incentivizes users to oer their disk space for storing the les of other users who are willing to pay for it), Golem (a blockchain-based platform for renting and lending computing power for specialized applications such as 3D-rendering) or SONM (another similar computing power-lending project). Such projects do not introduce anything conceptually new on the level of blockchain organization; rather, they are particular blockchain applications, which could be implemented by smart contracts running in a general-purpose blockchain, provided it can 77 2.9. Comparison to Other Blockchain Projects deliver the required performance. As such, projects of this kind are likely to use one of the existing or planned blockchain projects as their base, such as EOS, PolkaDot or TON. If a project needs true scalability (based on sharding), it would better use TON; if it is content to work in a confederated context by dening a family of workchains of its own, explicitly optimized for its purpose, it might opt for EOS or PolkaDot. 2.9.12. The TON Blockchain. The TON (The Open Network) Block- chain (planned 2018) is the project we are describing in this document. It is designed to be the rst fth-generation blockchain projectthat is, a BFT PoS-multichain project, mixed homogeneous/heterogeneous, with support for (shardable) custom workchains, with native sharding support, and tightly- coupled (in particular, capable of forwarding messages between shards almost instantly while preserving a consistent state of all shardchains). As such, it will be a truly scalable general-purpose blockchain project, capable of accommodating essentially any applications that can be implemented in a blockchain at all. When augmented by the other components of the TON Project (cf. 1 ), its possibilities expand even further. 2.9.13. Is it possible to upload Facebook into a blockchain? Some- times people claim that it will be possible to implement a social network on the scale of Facebook as a distributed application residing in a blockchain. Usually a favorite blockchain project is cited as a possible host for such an application. We cannot say that this is a technical impossibility. Of course, one needs a tightly-coupled blockchain project with true sharding (i.e., TON) in order for such a large application not to work too slowly (e.g., deliver messages and updates from users residing in one shardchain to their friends residing in another shardchain with reasonable delays). However, we think that this is not needed and will never be done, because the price would be prohibitive. Let us consider uploading Facebook into a blockchain as a thought ex- periment; any other project of similar scale might serve as an example as well. Once Facebook is uploaded into a blockchain, all operations currently done by Facebook's servers will be serialized as transactions in certain blockchains (e.g., TON's shardchains), and will be performed by all validators of these blockchains. Each operation will have to be performed, say, at least twenty times, if we expect every block to collect at least twenty validator signatures (immediately or eventually, as in DPOS systems). Similarly, all data kept by 78 2.9. Comparison to Other Blockchain Projects Facebook's servers on their disks will be kept on the disks of all validators for the corresponding shardchain (i.e., in at least twenty copies). Because the validators are essentially the same servers (or perhaps clus- ters of servers, but this does not aect the validity of this argument) as those currently used by Facebook, we see that the total hardware expenses associ- ated with running Facebook in a blockchain are at least twenty times higher than if it were implemented in the conventional way. In fact, the expenses would be much higher still, because the blockchain's virtual machine is slower than the bare CPU running optimized compiled code, and its storage is not optimized for Facebook-specic problems. One might partially mitigate this problem by crafting a specic workchain with some special transactions adapted for Facebook; this is the approach of BitShares and EOS to achieving high performance, available in the TON Blockchain as well. However, the general blockchain design would still im- pose some additional restrictions by itself, such as the necessity to register all operations as transactions in a block, to organize these transactions in a Merkle tree, to compute and check their Merkle hashes, to propagate this block further, and so on. Therefore, a conservative estimate is that one would need 100 times more servers of the same performance as those used by Facebook now in order to validate a blockchain project hosting a social network of that scale. Some- body will have to pay for these servers, either the company owning the dis- tributed application (imagine seeing 700 ads on each Facebook page instead of 7) or its users. Either way, this does not seem economically viable. We believe that it is not true that everything should be uploaded into the blockchain . For example, it is not necessary to keep user photographs in the blockchain; registering the hashes of these photographs in the blockchain and keeping the photographs in a distributed o-chain storage (such as FileCoin or TON Storage) would be a better idea. This is the reason why TON is not just a blockchain project, but a collection of several components (TON P2P Network, TON Storage, TON Services) centered around the TON Blockchain as outlined in Chapters 1 and 4 . 79 3.1. Abstract Datagram Network Layer 3 TON Networking Any blockchain project requires not only a specication of block format and blockchain validation rules, but also a network protocol used to propagate new blocks, send and collect transaction candidates and so on. In other words, a specialized peer-to-peer network must be set up by every blockchain project. This network must be peer-to-peer, because blockchain projects are normally expected to be decentralized, so one cannot rely on a centralized group of servers and use conventional client-server architecture, as, for in- stance, classical online banking applications do. Even light clients (e.g., light cryptocurrency wallet smartphone applications), which must connect to full nodes in a client-serverlike fashion, are actually free to connect to another full node if their previous peer goes down, provided the protocol used to connect to full nodes is standardized enough. While the networking demands of single-blockchain projects, such as Bit- coin or Ethereum, can be met quite easily (one essentially needs to construct a random peer-to-peer overlay network, and propagate all new blocks and transaction candidates by a gossip protocol), multi-blockchain projects, such as the TON Blockchain, are much more demanding (e.g., one must be able to subscribe to updates of only some shardchains, not necessarily all of them). Therefore, the networking part of the TON Blockchain and the TON Project as a whole merits at least a brief discussion. On the other hand, once the more sophisticated network protocols needed to support the TON Blockchain are in place, it turns out that they can easily be used for purposes not necessarily related to the immediate demands of the TON Blockchain, thus providing more possibilities and exibility for creating new services in the TON ecosystem. 3.1 Abstract Datagram Network Layer The cornerstone in building the TON networking protocols is the (TON) Abstract (Datagram) Network Layer . It enables all nodes to assume certain network identities, represented by 256-bit abstract network addresses, and communicate (send datagrams to each other, as a rst step) using only these 256-bit network addresses to identify the sender and the receiver. In partic- ular, one does not need to worry about IPv4 or IPv6 addresses, UDP port numbers, and the like; they are hidden by the Abstract Network Layer. 80 3.1. Abstract Datagram Network Layer 3.1.1. Abstract network addresses. An abstract network address , or an abstract address , or just address for short, is a 256-bit integer, essentially equal to a 256-bit ECC public key. This public key can be generated arbi- trarily, thus creating as many dierent network identities as the node likes. However, one must know the corresponding private key in order to receive (and decrypt) messages intended for such an address. In fact, the address is not the public key itself; instead, it is a 256-bit hash ( Hash = sha256 ) of a serialized TL-object (cf. 2.2.5 ) that can describe several types of public keys and addresses depending on its constructor (rst four bytes). In the simplest case, this serialized TL-object consists just of a 4-byte magic number and a 256-bit elliptic curve cryptography (ECC) public key; in this case, the address will equal the hash of this 36-byte structure. One might use, however, 2048-bit RSA keys, or any other scheme of public- key cryptography instead. When a node learns another node's abstract address, it must also receive its preimage (i.e., the serialized TL-object, the hash of which equals that abstract address) or else it will not be able to encrypt and send datagrams to that address. 3.1.2. Lower-level networks. UDP implementation. From the per- spective of almost all TON Networking components, the only thing that exists is a network (the Abstract Datagram Networking Layer) able to (un- reliably) send datagrams from one abstract address to another. In principle, the Abstract Datagram Networking Layer (ADNL) can be implemented over dierent existing network technologies. However, we are going to implement it over UDP in IPv4/IPv6 networks (such as the Internet or intranets), with an optional TCP fallback if UDP is not available. 3.1.3. Simplest case of ADNL over UDP. The simplest case of sending a datagram from a sender's abstract address to any other abstract address (with known preimage) can be implemented as follows. Suppose that the sender somehow knows the IP-address and the UDP port of the receiver who owns the destination abstract address, and that both the receiver and the sender use abstract addresses derived from 256-bit ECC public keys. In this case, the sender simply augments the datagram to be sent by its ECC signature (done with its private key) and its source address (or the preimage of the source address, if the receiver is not known to know that 81 3.1. Abstract Datagram Network Layer preimage yet). The result is encrypted with the recipient's public key, em- bedded into a UDP datagram and sent to the known IP and port of the recipient. Because the rst 256 bits of the UDP datagram contain the recip- ient's abstract address, the recipient can identify which private key should be used to decrypt the remainder of the datagram. Only after that is the sender's identity revealed. 3.1.4. Less secure way, with the sender's address in plaintext. Some- times a less secure scheme is sucient, when the recipient's and the sender's addresses are kept in plaintext in the UDP datagram; the sender's private key and the recipient's public key are combined together using ECDH (Ellip- tic Curve DieHellman) to generate a 256-bit shared secret, which is used afterwards, along with a random 256-bit nonce also included in the unen- crypted part, to derive AES keys used for encryption. The integrity may be provided, for instance, by concatenating the hash of the original plaintext data to the plaintext before encryption. This approach has the advantage that, if more than one datagram is expected to be exchanged between the two addresses, the shared secret can be computed only once and then cached; then slower elliptic curve operations will no longer be required for encrypting or decrypting the next datagrams. 3.1.5. Channels and channel identiers. In the simplest case, the rst 256 bits of a UDP datagram carrying an embedded TON ADNL datagram will be equal to the recipient's address. However, in general they constitute a channel identier . There are dierent types of channels. Some of them are point-to-point; they are created by two parties who wish to exchange a lot of data in the future and generate a shared secret by exchanging several packets encrypted as described in 3.1.3 or 3.1.4 , by running classical or elliptic curve DieHellman (if extra security is required), or simply by one party generating a random shared secret and sending it to the other party. After that, a channel identier is derived from the shared secret combined with some additional data (such as the sender's and recipient's addresses), for instance by hashing, and that identier is used as the rst 256 bits of UDP datagrams carrying data encrypted with the aid of that shared secret. 3.1.6. Channel as a tunnel identier. In general, a channel, or chan- nel identier simply selects a way of processing an inbound UDP datagram, known to the receiver. If the channel is the receiver's abstract address, the processing is done as outlined in 3.1.3 or 3.1.4 ; if the channel is an estab- 82 3.1. Abstract Datagram Network Layer lished point-to-point channel discussed in 3.1.5 , the processing consists in decrypting the datagram with the aid of the shared secret as explained in loc. cit. , and so on. In particular, a channel identier can actually select a tunnel, when the immediate recipient simply forwards the received message to somebody elsethe actual recipient or another proxy. Some encryption or decryption steps (reminiscent of onion routing [6] or even garlic routing 31 ) might be done along the way, and another channel identier might be used for re- encrypted forwarded packets (for example, a peer-to-peer channel could be employed to forward the packet to the nex
프로젝트로 돌아가기