Helium 백서

Helium

원문

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

sign and a finished product available at launch of the Heilum network. 2.6 Devices A Device is any wireless hardware capable of communicating with Hotspots via WHIP. WHIP is designed to facilitate low power data transmission and reception, so typically devices would exist in the form of battery-powered sensors that can function for several years using standard batteries. WHIP is designed such that Devices can be manufactured using commodity hardware available from a wide variety of vendors with a very low-cost bill of materials (BOM). The technology in modern radio transceivers, such as the Texas Instruments CC1125 or STMicroelectronics S2-LP, enables exceptionally long-range network systems that can be built without the need for proprietary modulation schemes or physical layers. Some of these radios are available for around $1 at reasonable volumes. It is recommended that each Device use the Microchip ECC508A or equivalent hardware-based key storage device, which can securely generate, store, and authenticate pub- lic/private NIST P-256 ECC [3] key pairs without leaking the private key. Also, a wide array of defense mechanisms prevent logical attacks on the encrypted data between the key storage device and its host MacDevicehine, along with physi- cal protections on the security device itself. Users program their key storage device as part of the onboarding process defined in the WHIP wireless specification using a defined API. 2.7 Routers Routers are Internet-deployed applications that receive pack- ets from Devices via Hotspots and route them to appropriate destinations such as an HTTP or MQTT endpoint. Routers serve several functions on the Helium network, including: • Authenticating Devices with the Helium network; • Receiving packets from Hotspots and routing them to the Internet; • Delivering downlink messages, including OTA updates, to Devices via Hotspots; 5 • Providing delivery confirmations to ensure transport trans- actions are honest; • Providing authentication and routing mechanisms to third- party cloud services such as Google Cloud Platform or Microsoft Azure; and • Storing and making available a full copy of the blockchain ledger by acting as a full node [Section 5.5] When a Hotspot receives a data packet from a Device on the Helium network, it queries the blockchain to determine which Router to use given the Device’s Helium network address. Anyone is free to host their own Router and define their Devices’ traffic to be delivered there by any Hotspot on the Helium network. This ability allows users of the Helium network to create VPN-like functionality whereby encrypted data is delivered only to a Router (or set of Routers) that they specify and can optionally host themselves. Routers can implement a system called a channel which han- dles the authentication and routing of data to a specific third party Internet application, such as Google Cloud Platform IoT Core. These channel implementations can take advantage of a Device’s onboard hardware security to create a secure, hardware-authenticated connection to a third party which would otherwise be difficult to implement directly on an embedded microcontroller. We will make available an open source reference implementation of a Channel that can be used to build additional interfaces to Internet services. We will also host a high-availability cloud router for anyone to use and also provides and maintains an open-source router that is available either as source code or a binary package for a variety of operating systems and distributions. The protocol specification required for implementing a router is defined in the WHIP Wireless Specification document that will be made available by the Decentralized Device Network Alliance. 3. Proof-of-Coverage and Proof-of-Serialization In the Helium network, Miners must prove that they are pro- viding wireless network coverage that Devices are able to use to communicate with the Internet. Miners do this by comply- ing with the Proof-of-Coverage protocol which the Helium network and other Miners audit and verify. We use aProof-of- Serialization to ensure that Miners are correctly representing their time in relation to others on the network, and obtain cryptographic proof of dishonest behavior. Several compo- nents of the Helium network, such as Proof-of-Coverage, use Proof-of-Serialization as a cryptographic “anchor” that root those occurrences with a cryptographic time proof. With a combination of Proof-of-Coverage and Proof-of-Serialization we can obtain cryptographic proof of the approximate loca- tion and time of events occurring within the Helium network. 3.1 Motivation Most existing blockchain networks such as Bitcoin [9] and Ethereum [5] use a Proof-of-Work system that relies on an algorithmic puzzle that is asymmetric in nature. These proofs are extremely difficult to generate, but simple for a third party to verify. Security on these networks is achieved by the network-wide consensus that the amount of computing power required to generate a valid proof is difficult to forge, and as subsequent blocks are added to the blockchain, the cumulative difficulty of the chain becoming prohibitively difficult to fabricate. These computation-heavy proofs are, however, not otherwise useful to blockhain networks. We define useful as work that is valuable to a blockchain network beyond securing the ledger. While there have been attempts in other networks to turn mining power into something useful, such as Ethereum executing small programs calledsmart contracts, the majority of the work is not useful or reusable. The mining process is also extremely wasteful, as the determining factor in the work is typically computational power, which consumes massive amounts of electricity and requires significant hardware to execute. The proofs used in the Helium network must be resistant to Sybil attacks in which dishonest Miners create pseudonymous identities and use them to subvert the Helium network and gain access to block rewards to which they should not be entitled. This is a particularly difficult attack vector to manage in a physical network like the Helium network. We must also be resistant to a new attack vector: alternate reality attacks, which exist where a dishonest group of Miners are able to simulate that wireless network coverage exists in the physical world when it in fact does not. An example of this would be running the mining software on a single computer and simulating GPS coordinates and RF networking. We later propose the Helium Consensus Protocol [Section 6] that uses Proof-of-Coverageto both secure the blockchain and provide an extremely useful service to the Helium network, which provides wireless network coverage that Devices can use to send data to and from the Internet. 3.2 Inspiration Proof-of-Coverage is an innovative proof that allows Miners to prove that they are providing wireless network coverage W in a specific region to a challenger,C. Proof-of-Coverage is an interactive protocol where a set of targetsTn assert that W exists in a specific GPS locationL and then convincesC thatTn are in fact creating W and that said coverage must 6 have been created using the wireless RF network. Proof-of- Coverage is the first such protocol that attempts to prove the veracity of miners in a physical space, and then use it to achieve consensus on a blockchain network. With Proof-of-Coverage we aim to solve for the following: • Prove that Miners are operating RF hardware and firmware compatible with WHIP; • Prove that Miners are located in the geography they claim by having them communicate via RF; and • Correctly identify which version of reality is correct when there is a conflict Proof-of-Coverage is inspired by the Guided Tour Protocol (GTP) [13] which devises a system for denial of service prevention by requiring a client c to make a request to a variety of “tour guide” computersGn in order to gain access to a server s. The tour guides must be visited in a specific order and a hash of data exchanged which reveals the location of the nextGn in order. Only after everyGn has been visited canc gain access tos. Oncec gets to the last stop of the tour, it submits evidence of the first and last stop to s who is able to verify that the first and last stops of the tour are correct without needing to contactGn, and thatc could only know the first and last stops if it had completed the tour correctly. While an extremely clever and innovative system, GTP is not directly suitable as a proof in the Helium network as RF networking has limited range and therefore cannot communicate with peers anywhere on the Helium network. We aim to construct a proof loosely based on the ideas presented in GTP, but applicable to our protocol. We combineProof-of-Coverage with Proof-of-Serialization— a proof that allows Miners on the Helium network to achieve cryptographic time consensus among decentralized clients. We aim to achieve rough time synchronization in a secure way that does not depend on any particular time server, and in such a way that, if a time server does misbehave, then clients end up with cryptographic proof of that behavior. 3.3 Constructing Proof-of-Coverage With the Proof-of-Coverage protocol, we aim to construct a proof that takes advantage of the following characteristics of radio frequency (RF) communication that are unique and different to Internet communication: 1. RF has limited physical propagation and, therefore, dis- tance; 2. The strength of a received RF signal is inversely propor- tional to the square of the distance from the transmitter; and 3. RF travels at the speed of light with (effectively) no latency Our goal is to verify whether Miners in a physical region are acting honestly and creating wireless network coverage compatible with WHIP. To do this, a challengerC determin- istically constructs a multi-layer data packetO which begins at an initial target,T1, and is broadcast wirelessly to a set of sequential targets,Tn, each of which are only able to decrypt the outer-most layer ofO if they were the intended recipient. Each target signs a receipt,Ks, delivers it toC, removes their layer ofO, and broadcasts it for the next target. Essentially an “envelope of envelopes” only decipherable by the intended recipient. Target 1 (T1) Target L (TL) Target (T ) Challenger (C ) KT 1 O O1 OT OL KT KT L Figure 2. Multi-Layer Data Packet Deconstruction 3.3.1 Selecting the Initial Target We aim to deterministically locate a geographic reference tar- get,T , for the challenger,C. BothC andT are Miners in the Helium network.T does not need to be geographically proxi- mate toC. To locateT ,C initially seeds verifiable entropy,η, into the selection process by signing the current block hash with its private key. Since the probabilities associated to each miner form a discrete probability distribution [Equation 1], C uses the probability associated to each eligible Miner to locateT and applies the inverse cumulative distribution func- tion using a uniform random number generated via η. This allows us to ensure that we always target potentially dishonest Miners as they have a lower score, thus increasing their prob- ability of being targeted byC. Given that a Miners score is diminishing linearly over time [Section 3.3.4], it is necessary to create this inverse relationship to give low-scoring Miners an opportunity to participate in the process and increase their score. This diminishing score also incentivizes all the partic- ipants to send receipts toC and broadcast the remainder of O. 3.3.2 Constructing the multi-layer challenge OnceT has been selected, C must construct a multi-layer challenge,O.O is a data packet broadcast over the Helium network and received by geographically proximate targetsTn. 7 Geographically proximate is defined as within a radius ofT , a network valueT radius. Each layer ofO,Ol, consists of a three- tuple ofE (S,ψ,R ), whereE is a secure encryption function using the Elliptic-Curve Diffie-Hellman (ECDH) derived symmetric key,S is a nonce,ψ is the time to broadcast the next layer of the challenge and R is the remainder of O consisting of recursive three-tuples. The maximum number ofOl is bounded by a network value,Omax. The construction logic ofO byC is as follows: 1. A set of candidate nodes, Tn, are selected such that all members ofTn are within a contiguous radio network that also containsT ; 2. Two targets,T1 andTL, are selected by finding the highest scoring targets inTn furthest fromT ; 3. A weighted graph, Tg, is constructed from Tn such that members of Tg in radio range of each other are connected by an edge weighted by the value of 1−( score(Ta)−score(Tb) ) ; 4. The shortest path between T1 to T to TL is computed using Dijkstra’s algorithm [10] using the edge weights from the previous step; 5. An ephemeral public/private keypair Ek and Ek-1 are generated; 6. A layerOl is created and added toO, andS is encrypted with the combination of the public key of TL, retrieved from the blockchain as TLk and Ek-1 as an ECDH ex- change to compute a shared secret, known only to both partiesC andTL; and 7. The previous step repeats with additional layers added to O until allTL→T1 have a layerOl included inO The resulting O can be visually represented as depicted in [Figure 3]. 3.3.3 Creating the Proof OnceO has been constructed, it is delivered to T1 via the Helium network and immediately broadcast by T1 via the Helium network. WHIP is not a point-to-point system, so several Miners within proximity of T1 will hear O. In this example, only the specific targetT will be able to decryptE and send a valid receipt back to the challenger,C. We describe the approximate flow of Proof-of-Coverage creation as follows: 1. T1 receivesO fromC via the Helium network, decrypts the outermost layer and immediately broadcasts itR via the Helium network; 2. T hearsO and attempts to decrypt the value ofE by using its private key wherepk : Epk (S,ψ,R ); O O1=E(S 1,ψ,R) T T1 T2 T3 TL Figure 3. Construction ofO 3. T records both the time of arrivalβ and the signal strength υ ofO; 4. If successful, T then creates signed receiptKs, where Ks = (S||β||υ) signed by the private key ofT ; 5. T submitsKs toC via the Helium network, removes the outer most layer, and wirelessly broadcasts the remainder O; and 6. These steps repeat forT1..T ..TL, withTL being the last target in the graph C expects to hear responses fromTg within a time threshold λ, otherwise it considers the Proof-of-Coverage to have con- cluded. BecauseC is the only party with complete knowledge ofO, upper bounds of the values forβ andυ are assigned by C which are used to verify that each layer of O was trans- mitted approximately where and when it was expected. The upper bound forβ is limited by the speed of lightτ between Tn andTn− 1. Thus we know that, subject to some slight delays from reflection or multipath, the packet should not arrive atTg later thanτ multiplied by the geographical dis- 8 tanceD plus some small episilon value,υ =τ× ( D +ϵ ) . Forυ, because of the inverse-square law, we can calculate the maximum RSSI (Received Signal Strength Indication) possible for a packet transmitted, µ, from Tg− 1 toTg as µ = 1D2 . Hotspots that are closer than expected, or which are transmitting at a higher power to mask their location disparity, are unlikely to getµ correct, given that they do not know who the next layer ofO is addressed to. OnceTL has delivered receipt to C, or λ has elapsed, the Proof-of-Coverage is completed. The collection of signed receipts,Ks, constitute the Proof-of-Coverage thatC will submit to the Helium network. K1 = (S 1 || β || υ) KT = (S T || β || υ) KL = (S L || β || υ) Challenger (C ) Target 1 (T1) Target (T ) Target L (TL) Figure 4. Proof-of-Coverage flow 3.3.4 Scoring The score allocated to a Miner, and therefore the resulting score of the Proof-of-Coverage, is an integral part of the Helium Consensus Protocol described in [Section 6]. When Miners join the Helium network, they are assigned a score, φm. We consider any Miner with a score greater thanφm to be an honest miner. This score depreciates according to the number of verifications the Miner has as well as the height since its last successful verification. As φm decreases the probability of the MinerM being the target forC increases, such that the Helium network continually attempts to prove that the lowest scoring Miners are acting honestly, and giving Miners a reasonable chance to improve their scores. In order to achieve this behavior we define the following invariants: M, Miner v, number of successful verfications for M - number of failed verifications forM h, height since the last successful verification for M If we assume that the ideal verification interval for any Miner is close to 240 blocks (4 hours if we assume a 60 second block time), we scale these invariants to fit the scoring functions: v′, v/10.0 h′, h/480 Using the above we can now construct a staleness-factor,δ, which would be used in determining the score of the Miner M. δm =    −(8.h′)2 v′ = 0 v′.(1− h′2min(0.25,v′)) v′> 0 v′.(1− 10.v′.h′2) v′< 0 The above conditions strictly adhere to the following princi- ples: 1. A negativev indicates that the Miner is consistently failing verification. 2. If v = 0, then we do not have any trust information, therefore, we use a steep parabolic curve for the decay dependent onh′. 3. If v > 0, then it implies that the Miner has been suc- cessfully verified consistently, hence, we use an inverse parabolic curve that crosses the Y axis at 1, where the width of the parabola increases as a factor of v up to 0.25. This implies that the more positive verifications [Section 3] the Miner has accrued, the slower its score decays as a factor ofh′. 4. Finally, ifv< 0, then this is the inverse of the above case, wherein, a Miner has consistently been failing verification. Therefore, we use a similar parabola as above; however, the width of the parabola decreases as a factor ofv, leading to a higher score decay for the Miner as a factor ofh′. [Figure 5] shows the trends for each of the above functions. 0 0.13 0.25 0.38 0.5 0.63 0.75 0.88 1 1.13 1.25 1.38 1.5 −20 −19 −18 −17 −16 −15 −14 −13 −12 −11 −10 −9 −8 −7 −6 −5 −4 −3 −2 −1 0 1 2 3 4 5 v′ = 0 v′ > 0 v′ < 0 h′ δm Figure 5. Trendlines for the scoring functions Adhering to the above set of rules, we define the following scoring function, which is essentially a variation of a sigmoid curve fluctuating between values (0, 1): 9 φm = arctan(2.δm) + 1.583.16 This scoring function yields [Figure 6], which shows the variation of the score with the staleness-factor: −10 −5 0 5 10 0 0.2 0.4 0.6 0.8 1 δm φm Figure 6. Scoring algorithm and the resulting staleness factor [Figure 7] shows a snapshot of a random subset of the Helium network at any blockchain height h. The Miners represent random locations with an illustrated score, while the edges are calculated using Dijkstra’s algorithm [10]. Figure 7. Snapshot of a random subset of the initial network After 10,000 iterations the Helium network appears as repre- sented in [Figure 8]. The goal of this system is to ensure that the scoring algorithm considers that some Miners may attempt to act dishonestly. However, because the calculated edge-weights (via Dijkstra’s algorithm) and the target selection mechanism ensure that we only boost the score of a Miner when it is being verified by other high scoring Miners, we believe that the system will favor legitimate Miners and deter dishonest ones. Figure 8. Snapshot of a random subset of the network after 10000 iterations 3.3.5 Target Selection Due to the way scoring decays, there is a possibility that a given Miners’ score may become stale as that Miner may not be verified within a reasonable interval. We therefore structure the target selection mechanism to give Miners a statistically greater chance to increase their score by being selected as a target as their score decays. This is accom- plished by bi
프로젝트로 돌아가기