serp-chat / index /docstore.json
matthoffner's picture
Update index/docstore.json
1fe3266
raw
history blame
33.8 kB
{"docstore/metadata": {"8ced199c-f95b-4e3f-b257-dada8d54a55d": {"doc_hash": "46058eadd904a825aebbe7837bc99d1470311336dff046005edcbb02ad36a2e0"}, "ec3daf8e-bae2-44d6-8c70-97e5e74ebbb7": {"doc_hash": "56ceb6ae86fb3887dc0939a1f5c4dbfd994304186b817ba021de140315d0c52d"}, "9f1a3e4e-6fe6-4580-85ed-a6c15856c7a2": {"doc_hash": "25aa44f21ebc8354f28021c3daefdc80847660c61d488ce0e7e9892e35444685"}, "6691ff87-c5c6-4e59-b9c6-3257f47b77e1": {"doc_hash": "019db476096b4a9fbc014d71c9634f5d01ad3bf6e51d093ba7f5bcb3f1a6d7a1"}, "c4b8f302-807e-4714-81a6-b0b6cc5a5f55": {"doc_hash": "37e82baffd9bcb78e6fda3645adaf5b647a502b3e8c75f4f9d5fad3adc56e24e"}, "0867d7c0-321a-4248-8d1a-e38083fb8533": {"doc_hash": "c01640a9026941025384be8c763709f29955f54deb80b1f319f3673fff646b39"}, "31d64cd1-61ca-4aa3-b592-4dbdaf74ed8d": {"doc_hash": "86b2375c5e598a26712f2a748d483df9f458f192009b37d41b65e3300a156964"}, "b8b3c21d-2a62-49e6-a62f-53b87cb90f0f": {"doc_hash": "08b5ab8c522e5b8adfc2b738a155ca85335d1f2c2ede00a967f69406c54b37b3"}, "cb4b7053-efcb-4b62-bef8-d401726a49a3": {"doc_hash": "a1adc57df1046c4bab52af9f1ee767ec009c3a41b6d8b4d642ee6099d109e957"}, "65050326-fdf0-421d-8135-003d0277153a": {"doc_hash": "e042c399f010602b6ea30ddd6e02a6e2d2221a35c4f3bc67027169349762c36f"}}, "docstore/data": {"ec3daf8e-bae2-44d6-8c70-97e5e74ebbb7": {"__data__": {"text": "Bitcoin: A Peer-to-Peer Electronic Cash System\n\nSatoshi Nakamoto\nsatoshin@gmx.com\nwww.bitcoin.org\n\nAbstract. A purely peer-to-peer version of electronic cash would allow online \npayments to be sent directly from one party to another without going through a \nfinancial institution. Digital signatures provide part of the solution, but the main \nbenefits are lost if a trusted third party is still required to prevent double-spending. \nWe propose a solution to the double-spending problem using a peer-to-peer network. \nThe network timestamps transactions by hashing them into an ongoing chain of \nhash-based proof-of-work, forming a record that cannot be changed without redoing \nthe proof-of-work. The longest chain not only serves as proof of the sequence of \nevents witnessed, but proof that it came from the largest pool of CPU power. As \nlong as a majority of CPU power is controlled by nodes that are not cooperating to \nattack the network, they'll generate the longest chain and outpace attackers. The \nnetwork itself requires minimal structure. Messages are broadcast on a best effort \nbasis, and nodes can leave and rejoin the network at will, accepting the longest \nproof-of-work chain as proof of what happened while they were gone.\n\n1.\n\nIntroduction\n\nCommerce on the Internet has come to rely almost exclusively on financial institutions serving as \ntrusted third parties to process electronic payments. While the system works well enough for \nmost transactions, it still suffers from the inherent weaknesses of the trust based model. \nCompletely non-reversible transactions are not really possible, since financial institutions cannot \navoid mediating disputes. The cost of mediation increases transaction costs, limiting the \nminimum practical transaction size and cutting off the possibility for small casual transactions, \nand there is a broader cost in the loss of ability to make non-reversible payments for non-\nreversible services. With the possibility of reversal, the need for trust spreads. Merchants must \nbe wary of their customers, hassling them for more information than they would otherwise need. \nA certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties \ncan be avoided in person by using physical currency, but no mechanism exists to make payments \nover a communications channel without a trusted party.\n\nWhat is needed is an electronic payment system based on cryptographic proof instead of trust, \nallowing any two willing parties to transact directly with each other without the need for a trusted \nthird party. Transactions that are computationally impractical to reverse would protect sellers \nfrom fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In \nthis paper, we propose a solution to the double-spending problem using a peer-to-peer distributed \ntimestamp server to generate computational proof of the chronological order of transactions. The \nsystem is secure as long as honest nodes collectively control more CPU power than any \ncooperating group of attacker nodes.\n\n1\n\n\f\n2. Transactions\n\nWe define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the \nnext by digitally signing a hash of the previous transaction and the public key of the next owner \nand adding these to the end of the coin. A payee can verify the signatures to verify the chain of \nownership.\n\nTransaction\n\nTransaction\n\nTransaction\n\nOwner 1's\nPublic Key\n\nOwner 2's\nPublic Key\n\nOwner", "doc_id": "ec3daf8e-bae2-44d6-8c70-97e5e74ebbb7", "embedding": null, "doc_hash": "56ceb6ae86fb3887dc0939a1f5c4dbfd994304186b817ba021de140315d0c52d", "extra_info": null, "node_info": {"start": 0, "end": 3659}, "relationships": {"1": "8ced199c-f95b-4e3f-b257-dada8d54a55d", "3": "9f1a3e4e-6fe6-4580-85ed-a6c15856c7a2"}}, "__type__": "1"}, "9f1a3e4e-6fe6-4580-85ed-a6c15856c7a2": {"__data__": {"text": "distributed \ntimestamp server to generate computational proof of the chronological order of transactions. The \nsystem is secure as long as honest nodes collectively control more CPU power than any \ncooperating group of attacker nodes.\n\n1\n\n\f\n2. Transactions\n\nWe define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the \nnext by digitally signing a hash of the previous transaction and the public key of the next owner \nand adding these to the end of the coin. A payee can verify the signatures to verify the chain of \nownership.\n\nTransaction\n\nTransaction\n\nTransaction\n\nOwner 1's\nPublic Key\n\nOwner 2's\nPublic Key\n\nOwner 3's\nPublic Key\n\nHash\n\nHash\n\nHash\n\nOwner 0's\nSignature\n\n Verify\n\nS ig n \n\nOwner 1's\nSignature\n\n Verify\n\nS ig n \n\nOwner 2's\nSignature\n\nOwner 1's\nPrivate Key\n\nOwner 2's\nPrivate Key\n\nOwner 3's\nPrivate Key\n\nThe problem of course is the payee can't verify that one of the owners did not double-spend \nthe coin. A common solution is to introduce a trusted central authority, or mint, that checks every \ntransaction for double spending. After each transaction, the coin must be returned to the mint to \nissue a new coin, and only coins issued directly from the mint are trusted not to be double-spent. \nThe problem with this solution is that the fate of the entire money system depends on the \ncompany running the mint, with every transaction having to go through them, just like a bank.\n\nWe need a way for the payee to know that the previous owners did not sign any earlier \ntransactions. For our purposes, the earliest transaction is the one that counts, so we don't care \nabout later attempts to double-spend. The only way to confirm the absence of a transaction is to \nbe aware of all transactions. In the mint based model, the mint was aware of all transactions and \ndecided which arrived first. To accomplish this without a trusted party, transactions must be \npublicly announced [1], and we need a system for participants to agree on a single history of the \norder in which they were received. The payee needs proof that at the time of each transaction, the \nmajority of nodes agreed it was the first received. \n\n3. Timestamp Server\n\nThe solution we propose begins with a timestamp server. A timestamp server works by taking a \nhash of a block of items to be timestamped and widely publishing the hash, such as in a \nnewspaper or Usenet post [2-5]. The timestamp proves that the data must have existed at the \ntime, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in \nits hash, forming a chain, with each additional timestamp reinforcing the ones before it.\n\nHash\n\nHash\n\nBlock\n\nBlock\n\nItem\n\nItem\n\n...\n\nItem\n\nItem\n\n...\n\n2\n\n\f\n4. Proof-of-Work\n\nTo implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof-\nof-work system similar to Adam Back's Hashcash [6], rather than newspaper or Usenet posts. \nThe proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the \nhash begins with a number of zero bits. The average work required is exponential in the number \nof zero bits required and can be verified by executing a single hash.\n\nFor our timestamp network, we implement the proof-of-work by incrementing a nonce in the \nblock until a value is found that gives the block's hash the required zero bits.", "doc_id": "9f1a3e4e-6fe6-4580-85ed-a6c15856c7a2", "embedding": null, "doc_hash": "25aa44f21ebc8354f28021c3daefdc80847660c61d488ce0e7e9892e35444685", "extra_info": null, "node_info": {"start": 3097, "end": 6575}, "relationships": {"1": "8ced199c-f95b-4e3f-b257-dada8d54a55d", "2": "ec3daf8e-bae2-44d6-8c70-97e5e74ebbb7", "3": "6691ff87-c5c6-4e59-b9c6-3257f47b77e1"}}, "__type__": "1"}, "6691ff87-c5c6-4e59-b9c6-3257f47b77e1": {"__data__": {"text": "Proof-of-Work\n\nTo implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof-\nof-work system similar to Adam Back's Hashcash [6], rather than newspaper or Usenet posts. \nThe proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the \nhash begins with a number of zero bits. The average work required is exponential in the number \nof zero bits required and can be verified by executing a single hash.\n\nFor our timestamp network, we implement the proof-of-work by incrementing a nonce in the \nblock until a value is found that gives the block's hash the required zero bits. Once the CPU \neffort has been expended to make it satisfy the proof-of-work, the block cannot be changed \nwithout redoing the work. As later blocks are chained after it, the work to change the block \nwould include redoing all the blocks after it.\n\nBlock\n\nBlock\n\nPrev Hash\n\nNonce\n\nPrev Hash\n\nNonce\n\nTx\n\nTx\n\n...\n\nTx\n\nTx\n\n...\n\nThe proof-of-work also solves the problem of determining representation in majority decision \nmaking. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone \nable to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority \ndecision is represented by the longest chain, which has the greatest proof-of-work effort invested \nin it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the \nfastest and outpace any competing chains. To modify a past block, an attacker would have to \nredo the proof-of-work of the block and all blocks after it and then catch up with and surpass the \nwork of the honest nodes. We will show later that the probability of a slower attacker catching up \ndiminishes exponentially as subsequent blocks are added.\n\nTo compensate for increasing hardware speed and varying interest in running nodes over time, \nthe proof-of-work difficulty is determined by a moving average targeting an average number of \nblocks per hour. If they're generated too fast, the difficulty increases.\n\n5. Network\n\nThe steps to run the network are as follows:\n\n1) New transactions are broadcast to all nodes.\n2) Each node collects new transactions into a block. \n3) Each node works on finding a difficult proof-of-work for its block.\n4) When a node finds a proof-of-work, it broadcasts the block to all nodes.\n5) Nodes accept the block only if all transactions in it are valid and not already spent.\n6) Nodes express their acceptance of the block by working on creating the next block in the \n\nchain, using the hash of the accepted block as the previous hash.\n\nNodes always consider the longest chain to be the correct one and will keep working on \nextending it. If two nodes broadcast different versions of the next block simultaneously, some \nnodes may receive one or the other first. In that case, they work on the first one they received, \nbut save the other branch in case it becomes longer. The tie will be broken when the next proof-\nof-work is found and one branch becomes longer; the nodes that were working on the other \nbranch will then switch to the longer one.\n\n3\n\n\f\nNew transaction broadcasts do not necessarily need to reach all nodes. As long as they reach \nmany nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped \nmessages. If a node does not receive a block, it will request it when it receives the next block and \nrealizes it missed one.\n\n6.\n\nIncentive\n\nBy convention, the first transaction in a block is a special transaction that starts a new coin owned \nby the creator of the block. This adds an incentive for", "doc_id": "6691ff87-c5c6-4e59-b9c6-3257f47b77e1", "embedding": null, "doc_hash": "019db476096b4a9fbc014d71c9634f5d01ad3bf6e51d093ba7f5bcb3f1a6d7a1", "extra_info": null, "node_info": {"start": 6606, "end": 10280}, "relationships": {"1": "8ced199c-f95b-4e3f-b257-dada8d54a55d", "2": "9f1a3e4e-6fe6-4580-85ed-a6c15856c7a2", "3": "c4b8f302-807e-4714-81a6-b0b6cc5a5f55"}}, "__type__": "1"}, "c4b8f302-807e-4714-81a6-b0b6cc5a5f55": {"__data__": {"text": "save the other branch in case it becomes longer. The tie will be broken when the next proof-\nof-work is found and one branch becomes longer; the nodes that were working on the other \nbranch will then switch to the longer one.\n\n3\n\n\f\nNew transaction broadcasts do not necessarily need to reach all nodes. As long as they reach \nmany nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped \nmessages. If a node does not receive a block, it will request it when it receives the next block and \nrealizes it missed one.\n\n6.\n\nIncentive\n\nBy convention, the first transaction in a block is a special transaction that starts a new coin owned \nby the creator of the block. This adds an incentive for nodes to support the network, and provides \na way to initially distribute coins into circulation, since there is no central authority to issue them. \nThe steady addition of a constant of amount of new coins is analogous to gold miners expending \nresources to add gold to circulation. In our case, it is CPU time and electricity that is expended.\n\nThe incentive can also be funded with transaction fees. If the output value of a transaction is \nless than its input value, the difference is a transaction fee that is added to the incentive value of \nthe block containing the transaction. Once a predetermined number of coins have entered \ncirculation, the incentive can transition entirely to transaction fees and be completely inflation \nfree.\n\nThe incentive may help encourage nodes to stay honest. If a greedy attacker is able to \nassemble more CPU power than all the honest nodes, he would have to choose between using it \nto defraud people by stealing back his payments, or using it to generate new coins. He ought to \nfind it more profitable to play by the rules, such rules that favour him with more new coins than \neveryone else combined, than to undermine the system and the validity of his own wealth.\n\n7. Reclaiming Disk Space\n\nOnce the latest transaction in a coin is buried under enough blocks, the spent transactions before \nit can be discarded to save disk space. To facilitate this without breaking the block's hash, \ntransactions are hashed in a Merkle Tree [7][2][5], with only the root included in the block's hash. \nOld blocks can then be compacted by stubbing off branches of the tree. The interior hashes do \nnot need to be stored.\n\nBlock\n\nBlock Header (Block Hash)\n\nBlock\n\nBlock Header (Block Hash)\n\nPrev Hash\n\nNonce\n\nPrev Hash\n\nNonce\n\nRoot Hash\n\nRoot Hash\n\nHash01\n\nHash23\n\nHash01\n\nHash23\n\nHash0\n\nHash1\n\nHash2\n\nHash3\n\nHash2\n\nHash3\n\nTx0\n\nTx1\n\nTx2\n\nTx3\n\nTx3\n\nTransactions Hashed in a Merkle Tree\n\nAfter Pruning Tx0-2 from the Block\n\nA block header with no transactions would be about 80 bytes. If we suppose blocks are \ngenerated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems \ntypically selling with 2GB of RAM as of 2008, and Moore's Law predicting current growth of \n1.2GB per year, storage should not be a problem even if the block headers must be kept in \nmemory.\n\n4\n\n\f\n8.\n\nSimplified Payment Verification\n\nIt is possible to verify payments without running a full network node. A user only needs to keep \na copy of the block headers of the longest proof-of-work chain, which he can get by querying \nnetwork nodes until he's convinced he has the longest chain, and obtain", "doc_id": "c4b8f302-807e-4714-81a6-b0b6cc5a5f55", "embedding": null, "doc_hash": "37e82baffd9bcb78e6fda3645adaf5b647a502b3e8c75f4f9d5fad3adc56e24e", "extra_info": null, "node_info": {"start": 10213, "end": 13672}, "relationships": {"1": "8ced199c-f95b-4e3f-b257-dada8d54a55d", "2": "6691ff87-c5c6-4e59-b9c6-3257f47b77e1", "3": "0867d7c0-321a-4248-8d1a-e38083fb8533"}}, "__type__": "1"}, "0867d7c0-321a-4248-8d1a-e38083fb8533": {"__data__": {"text": "would be about 80 bytes. If we suppose blocks are \ngenerated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems \ntypically selling with 2GB of RAM as of 2008, and Moore's Law predicting current growth of \n1.2GB per year, storage should not be a problem even if the block headers must be kept in \nmemory.\n\n4\n\n\f\n8.\n\nSimplified Payment Verification\n\nIt is possible to verify payments without running a full network node. A user only needs to keep \na copy of the block headers of the longest proof-of-work chain, which he can get by querying \nnetwork nodes until he's convinced he has the longest chain, and obtain the Merkle branch \nlinking the transaction to the block it's timestamped in. He can't check the transaction for \nhimself, but by linking it to a place in the chain, he can see that a network node has accepted it, \nand blocks added after it further confirm the network has accepted it.\n\nLongest Proof-of-Work Chain\n\nBlock Header\n\nBlock Header\n\nBlock Header\n\nPrev Hash\n\nNonce\n\nPrev Hash\n\nNonce\n\nPrev Hash\n\nNonce\n\nMerkle Root\n\nMerkle Root\n\nMerkle Root\n\nHash01\n\nHash23\n\nMerkle Branch for Tx3\n\nHash2\n\nHash3\n\nTx3\n\nAs such, the verification is reliable as long as honest nodes control the network, but is more \nvulnerable if the network is overpowered by an attacker. While network nodes can verify \ntransactions for themselves, the simplified method can be fooled by an attacker's fabricated \ntransactions for as long as the attacker can continue to overpower the network. One strategy to \nprotect against this would be to accept alerts from network nodes when they detect an invalid \nblock, prompting the user's software to download the full block and alerted transactions to \nconfirm the inconsistency. Businesses that receive frequent payments will probably still want to \nrun their own nodes for more independent security and quicker verification.\n\n9. Combining and Splitting Value\n\nAlthough it would be possible to handle coins individually, it would be unwieldy to make a \nseparate transaction for every cent in a transfer. To allow value to be split and combined, \ntransactions contain multiple inputs and outputs. Normally there will be either a single input \nfrom a larger previous transaction or multiple inputs combining smaller amounts, and at most two \noutputs: one for the payment, and one returning the change, if any, back to the sender. \n\nTransaction\n\nOut\n\n...\n\nIn\n\nIn\n\n...\n\nIt should be noted that fan-out, where a transaction depends on several transactions, and those \ntransactions depend on many more, is not a problem here. There is never the need to extract a \ncomplete standalone copy of a transaction's history.\n\n5\n\n\f\n10. Privacy\n\nThe traditional banking model achieves a level of privacy by limiting access to information to the \nparties involved and the trusted third party. The necessity to announce all transactions publicly \nprecludes this method, but privacy can still be maintained by breaking the flow of information in \nanother place: by keeping public keys anonymous. The public can see that someone is sending \nan amount to someone else, but without information linking the transaction to anyone. This is \nsimilar to the", "doc_id": "0867d7c0-321a-4248-8d1a-e38083fb8533", "embedding": null, "doc_hash": "c01640a9026941025384be8c763709f29955f54deb80b1f319f3673fff646b39", "extra_info": null, "node_info": {"start": 13744, "end": 17120}, "relationships": {"1": "8ced199c-f95b-4e3f-b257-dada8d54a55d", "2": "c4b8f302-807e-4714-81a6-b0b6cc5a5f55", "3": "31d64cd1-61ca-4aa3-b592-4dbdaf74ed8d"}}, "__type__": "1"}, "31d64cd1-61ca-4aa3-b592-4dbdaf74ed8d": {"__data__": {"text": "should be noted that fan-out, where a transaction depends on several transactions, and those \ntransactions depend on many more, is not a problem here. There is never the need to extract a \ncomplete standalone copy of a transaction's history.\n\n5\n\n\f\n10. Privacy\n\nThe traditional banking model achieves a level of privacy by limiting access to information to the \nparties involved and the trusted third party. The necessity to announce all transactions publicly \nprecludes this method, but privacy can still be maintained by breaking the flow of information in \nanother place: by keeping public keys anonymous. The public can see that someone is sending \nan amount to someone else, but without information linking the transaction to anyone. This is \nsimilar to the level of information released by stock exchanges, where the time and size of \nindividual trades, the \"tape\", is made public, but without telling who the parties were.\n\nTraditional Privacy Model\n\nIdentities\n\nTransactions\n\nTrusted\nThird Party\n\nCounterparty\n\nPublic\n\nNew Privacy Model\n\nIdentities\n\nTransactions\n\nPublic\n\nAs an additional firewall, a new key pair should be used for each transaction to keep them \nfrom being linked to a common owner. Some linking is still unavoidable with multi-input \ntransactions, which necessarily reveal that their inputs were owned by the same owner. The risk \nis that if the owner of a key is revealed, linking could reveal other transactions that belonged to \nthe same owner.\n\n11. Calculations\n\nWe consider the scenario of an attacker trying to generate an alternate chain faster than the honest \nchain. Even if this is accomplished, it does not throw the system open to arbitrary changes, such \nas creating value out of thin air or taking money that never belonged to the attacker. Nodes are \nnot going to accept an invalid transaction as payment, and honest nodes will never accept a block \ncontaining them. An attacker can only try to change one of his own transactions to take back \nmoney he recently spent.\n\nThe race between the honest chain and an attacker chain can be characterized as a Binomial \nRandom Walk. The success event is the honest chain being extended by one block, increasing its \nlead by +1, and the failure event is the attacker's chain being extended by one block, reducing the \ngap by -1.\n\nThe probability of an attacker catching up from a given deficit is analogous to a Gambler's \nRuin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an \ninfinite number of trials to try to reach breakeven. We can calculate the probability he ever \nreaches breakeven, or that an attacker ever catches up with the honest chain, as follows [8]:\n\np = probability an honest node finds the next block\nq = probability the attacker finds the next block\nqz = probability the attacker will ever catch up from z blocks behind\n\nq z={ 1\n\n\ue09eq / p\ue09fz\n\nif p\u2264q\n\nif p\ue085q}\n\n6\n\n\f\nGiven our assumption that p > q, the probability drops exponentially as the number of blocks the \nattacker has to catch up with increases. With the odds against him, if he doesn't make a lucky \nlunge forward early on, his chances become vanishingly small as he falls further behind.\n\nWe now consider how long the recipient of a new transaction needs to wait before being \nsufficiently certain the sender can't change the transaction. We assume the sender is an attacker \nwho wants to make the recipient believe he paid him for a while, then switch it to pay back to \nhimself after some time has passed. The receiver will be alerted when that happens, but the \nsender hopes it will be too late.\n\nThe receiver generates a new key pair and gives the", "doc_id": "31d64cd1-61ca-4aa3-b592-4dbdaf74ed8d", "embedding": null, "doc_hash": "86b2375c5e598a26712f2a748d483df9f458f192009b37d41b65e3300a156964", "extra_info": null, "node_info": {"start": 17007, "end": 20730}, "relationships": {"1": "8ced199c-f95b-4e3f-b257-dada8d54a55d", "2": "0867d7c0-321a-4248-8d1a-e38083fb8533", "3": "b8b3c21d-2a62-49e6-a62f-53b87cb90f0f"}}, "__type__": "1"}, "b8b3c21d-2a62-49e6-a62f-53b87cb90f0f": {"__data__": {"text": "our assumption that p > q, the probability drops exponentially as the number of blocks the \nattacker has to catch up with increases. With the odds against him, if he doesn't make a lucky \nlunge forward early on, his chances become vanishingly small as he falls further behind.\n\nWe now consider how long the recipient of a new transaction needs to wait before being \nsufficiently certain the sender can't change the transaction. We assume the sender is an attacker \nwho wants to make the recipient believe he paid him for a while, then switch it to pay back to \nhimself after some time has passed. The receiver will be alerted when that happens, but the \nsender hopes it will be too late.\n\nThe receiver generates a new key pair and gives the public key to the sender shortly before \nsigning. This prevents the sender from preparing a chain of blocks ahead of time by working on \nit continuously until he is lucky enough to get far enough ahead, then executing the transaction at \nthat moment. Once the transaction is sent, the dishonest sender starts working in secret on a \nparallel chain containing an alternate version of his transaction.\n\nThe recipient waits until the transaction has been added to a block and z blocks have been \nlinked after it. He doesn't know the exact amount of progress the attacker has made, but \nassuming the honest blocks took the average expected time per block, the attacker's potential \nprogress will be a Poisson distribution with expected value:\n\n\ue0c1=z\n\nq\np\n\nTo get the probability the attacker could still catch up now, we multiply the Poisson density for \neach amount of progress he could have made by the probability he could catch up from that point:\n\n\u221e \ue0c1k e\u2212\ue0c1\n\u2211\nk !\n\nk =0\n\n\u22c5{\ue09eq / p\ue09f\ue09e z\u2212k \ue09f\n\n1\n\nif k \u2264 z\n\nif k \ue085 z}\n\nRearranging to avoid summing the infinite tail of the distribution...\n\n1\u2212\u2211\n\nz \ue0c1k e\u2212\ue0c1\nk!\n\nk =0\n\n\ue09e1\u2212\ue09eq / p\ue09f\ue09e z\u2212 k \ue09f\ue09f\n\nConverting to C code...\n\n#include <math.h>\ndouble AttackerSuccessProbability(double q, int z)\n{\n double p = 1.0 - q;\n double lambda = z * (q / p);\n double sum = 1.0;\n int i, k;\n for (k = 0; k <= z; k++)\n {\n double poisson = exp(-lambda);\n for (i = 1; i <= k; i++)\n poisson *= lambda / i;\n sum -= poisson * (1 - pow(q / p, z - k));\n }\n return sum;\n}\n\n7\n\n\f\nRunning some results, we can see the probability drop off exponentially with z.\n\nq=0.1\nz=0 P=1.0000000\nz=1 P=0.2045873\nz=2 P=0.0509779\nz=3 P=0.0131722\nz=4 P=0.0034552\nz=5 P=0.0009137\nz=6 P=0.0002428\nz=7 P=0.0000647\nz=8 P=0.0000173\nz=9 P=0.0000046\nz=10 P=0.0000012\n\nq=0.3\nz=0 P=1.0000000\nz=5 P=0.1773523\nz=10 ", "doc_id": "b8b3c21d-2a62-49e6-a62f-53b87cb90f0f", "embedding": null, "doc_hash": "08b5ab8c522e5b8adfc2b738a155ca85335d1f2c2ede00a967f69406c54b37b3", "extra_info": null, "node_info": {"start": 20764, "end": 23431}, "relationships": {"1": "8ced199c-f95b-4e3f-b257-dada8d54a55d", "2": "31d64cd1-61ca-4aa3-b592-4dbdaf74ed8d", "3": "cb4b7053-efcb-4b62-bef8-d401726a49a3"}}, "__type__": "1"}, "cb4b7053-efcb-4b62-bef8-d401726a49a3": {"__data__": {"text": "off exponentially with z.\n\nq=0.1\nz=0 P=1.0000000\nz=1 P=0.2045873\nz=2 P=0.0509779\nz=3 P=0.0131722\nz=4 P=0.0034552\nz=5 P=0.0009137\nz=6 P=0.0002428\nz=7 P=0.0000647\nz=8 P=0.0000173\nz=9 P=0.0000046\nz=10 P=0.0000012\n\nq=0.3\nz=0 P=1.0000000\nz=5 P=0.1773523\nz=10 P=0.0416605\nz=15 P=0.0101008\nz=20 P=0.0024804\nz=25 P=0.0006132\nz=30 P=0.0001522\nz=35 P=0.0000379\nz=40 P=0.0000095\nz=45 P=0.0000024\nz=50 P=0.0000006\n\nSolving for P less than 0.1%...\n\nP < 0.001\nq=0.10 z=5\nq=0.15 z=8\nq=0.20 z=11\nq=0.25 z=15\nq=0.30 z=24\nq=0.35 z=41\nq=0.40 z=89\nq=0.45 z=340\n\n12. Conclusion\n\nWe have proposed a system for electronic transactions without relying on trust. We started with \nthe usual framework of coins made from digital signatures, which provides strong control of \nownership, but is incomplete without a way to prevent double-spending. To solve this, we \nproposed a peer-to-peer network using proof-of-work to record a public history of transactions \nthat quickly becomes computationally impractical for an attacker to change if honest nodes \ncontrol a majority of CPU power. The network is robust in its unstructured simplicity. Nodes \nwork all at once with little coordination. They do not need to be identified, since messages are \nnot routed to any particular place and only need to be delivered on a best effort basis. Nodes can \nleave and rejoin the network at will, accepting the proof-of-work chain as proof of what \nhappened while they were gone. They vote with their CPU power, expressing their acceptance of \nvalid blocks by working on extending them and rejecting invalid blocks by refusing to work on \nthem. Any needed rules and incentives can be enforced with this consensus mechanism.\n\n8\n\n\f\nReferences\n\n[1] W. Dai, \"b-money,\" http://www.weidai.com/bmoney.txt, 1998.\n\n[2] H. Massias, X.S. Avila, and J.-J. Quisquater, \"Design of a secure timestamping service with minimal \n\ntrust requirements,\" In 20th Symposium on Information Theory in the Benelux, May 1999.\n\n[3] S. Haber, W.S. Stornetta, \"How to time-stamp a digital document,\" In Journal of Cryptology, vol 3, no \n\n2, pages 99-111, 1991.\n\n[4] D. Bayer, S. Haber, W.S. Stornetta, \"Improving the efficiency and reliability of digital time-stamping,\" \nIn Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.\n\n[5] S. Haber, W.S. Stornetta, \"Secure names for bit-strings,\" In Proceedings of the", "doc_id": "cb4b7053-efcb-4b62-bef8-d401726a49a3", "embedding": null, "doc_hash": "a1adc57df1046c4bab52af9f1ee767ec009c3a41b6d8b4d642ee6099d109e957", "extra_info": null, "node_info": {"start": 23806, "end": 26344}, "relationships": {"1": "8ced199c-f95b-4e3f-b257-dada8d54a55d", "2": "b8b3c21d-2a62-49e6-a62f-53b87cb90f0f", "3": "65050326-fdf0-421d-8135-003d0277153a"}}, "__type__": "1"}, "65050326-fdf0-421d-8135-003d0277153a": {"__data__": {"text": "Massias, X.S. Avila, and J.-J. Quisquater, \"Design of a secure timestamping service with minimal \n\ntrust requirements,\" In 20th Symposium on Information Theory in the Benelux, May 1999.\n\n[3] S. Haber, W.S. Stornetta, \"How to time-stamp a digital document,\" In Journal of Cryptology, vol 3, no \n\n2, pages 99-111, 1991.\n\n[4] D. Bayer, S. Haber, W.S. Stornetta, \"Improving the efficiency and reliability of digital time-stamping,\" \nIn Sequences II: Methods in Communication, Security and Computer Science, pages 329-334, 1993.\n\n[5] S. Haber, W.S. Stornetta, \"Secure names for bit-strings,\" In Proceedings of the 4th ACM Conference \n\non Computer and Communications Security, pages 28-35, April 1997.\n\n[6] A. Back, \"Hashcash - a denial of service counter-measure,\" \nhttp://www.hashcash.org/papers/hashcash.pdf, 2002.\n\n[7] R.C. Merkle, \"Protocols for public key cryptosystems,\" In Proc. 1980 Symposium on Security and \n\nPrivacy, IEEE Computer Society, pages 122-133, April 1980.\n\n[8] W. Feller, \"An introduction to probability theory and its applications,\" 1957.\n\n9\n\n\f", "doc_id": "65050326-fdf0-421d-8135-003d0277153a", "embedding": null, "doc_hash": "e042c399f010602b6ea30ddd6e02a6e2d2221a35c4f3bc67027169349762c36f", "extra_info": null, "node_info": {"start": 25973, "end": 27035}, "relationships": {"1": "8ced199c-f95b-4e3f-b257-dada8d54a55d", "2": "cb4b7053-efcb-4b62-bef8-d401726a49a3"}}, "__type__": "1"}}}