Nonce - Bitcoin Wiki

An In-Depth Guide to: How do I Fix my Ledger Nano’s Stuck Ethereum Transaction?!?!?! (It’s Been Stuck for Weeks and NOTHING Traditional has Worked!!!!) As Well as: How Do I Choose My Nonce??? I’ve Tried MetaMask, MEW/MyEtherWallet, and Others, but Nothing is Working Correctly!!! I’m Dying by Stress!

So, if you were like me 1-2 months ago, you’ve probably already gone through 2,or 3, ...or 40 articles and guides that probably say something like:
“YeP, eVeRy EtHeReUm UsEr WiLl EvEnTuAlLy HaVe ThE LoW-gAs ExPeRiEnCe, YoU’rE nOt AlOnE! DoN’t FrEaK OuT tHoUgH; ThErE iS a WaY tO fIx It!”
Chances are, every time you read another useless article, you want to kill the nearest inanimate object, even though it was never alive in the first place. Nonetheless, you’re gonna kill it as much as it can be killed, holding nothing back; or, you’re just plotting to and slowly getting closer to executing the plan (and the object) every time you are insulted once again.
However, if you have the ability to download software (MyCryptoWallet) on a PC, it should be safe to relax now. I think you’ve finally found some good news, because I am 99.99...% sure this will work for the issue that so many people are having at this time, around the end of the month of May, year 2020.
More and more people are likely to be having this issue soon, since Ethereum's gas prices have been insanely high lately as well as having 300% price changes in a matter of minutes; Etherscan’s Gas tracker is nearly uselessly-inaccurate at this time. I've heard that there's a congestion attack; that was said a week ago, and it appears to be ongoing... (I can't think of any other suspect besides Justin Sun to blame it on... it must be incredibly expensive to overload the blockchain for this long... I may be wrong though...)
 
Let’s begin
For myself, I was trying to send an ERC20 token when this dreadful issue attacked. Specifically, the token was either BSOV or GRT; I sent them 1 after the other and the first succeeded, and the second one took over a week.
(They’re both great tokens in my opinion and deserve much more attention than they’ve been getting. BSOV is nearing its 1 year anniversary as I write this, and GRT is still in its 90 day community-development progress test, so of course I'm gonna take this opportunity to "shill" them; they are great tokens with great communities).
I was able to finally fix it, after a week of mental agony (also the txn finally processed 1-2 hours before I found the solution, robbing me of the gratitude of fixing it myself... (╯‵□′)╯︵┻━┻ ...but now I guess I can hopefully save some of you the headaches that I endured... ) I’m providing the ability to do the same, in a step by step guide.
Why did I go through all of this trouble? I'd fault the fact that I have ADHD and autism, which in my case can multiply each other’s intensity and cause me to “hyper-focus” on things, much much more than most with the same qualities, intentionally or not. Adderall is supposed to give me a bit of control over it, but except for in a very-generalized way, it’s still 90% up to chance and my default-capabilities to allow me control over my attention with self-willpower. But also Karma and Moons pls... ʘ‿ʘ
 
  1. In MyCrypto, (I'm using the Windows 10 app, version 1.7.10) you will open to a screen that says "How would you like to access your wallet?". Choose Ledger, of course. (Unless your here for some non-ledger issue? Idk why you would be but ok.)
  2. On the next screen (having your nano already plugged in, unlocked, and opened into the Ethereum app) click "Connect to Ledger Wallet"
  3. A screen overlay should appear, titled: "Select an Address". Here is where it may get confusing for some users. Refer to "AAA" below to know how to find your account. (Geez, sorry lol that was a huge amount of info for a reddit reply; I might've over-elaborated a little bit too much. but hey it's valuable information nonetheless!)
  4. After escaping the "AAA" section, you'll have accessed your account with MyCrypto. Awesome! To find your ERC20 tokens, (slight evil-laughter is heard from an unidentifiable origin somewhere in the back of your mind) go to "AAB".
  5. (You may have decided to find the token(s) on your own, rather than daring to submit to my help again; if so, you may pity those who chose the other path... ~~( ̄▽ ̄)~~) Now, once you've added your token, you should revert your attention to the account's transfer fill-out form!
  6. I'll combine the steps you probably understood on your own, already. Put in the address that your stuck transaction is still trying to send currency to. If an ERC20 token is involved, use the drop-down menu to change "ETH" to the token in trouble. Input your amount into the box labeled... wait for it... "Amount". Click on "+Advanced".
  7. Refer to Etherscan.com for the data you will need. Find the page for your "transaction(txn) hash/address" from the transaction history on the wallet/Ethereum-manager you used to send from. If that is unavailable, put your public address that your txn was sent from into the search tool and go to its info page; you should be able to find the pending txn there. Look to open the "more details" option to find the transaction's "Nonce" number.
  8. Put the nonce in the "Nonce" box on MyCrypto; you will contest the pending txn with a new txn that offers larger gas fees, by using the same nonce. If (but most likely "When") the new transaction is processed first, for being more miner-beneficial, the nonce will then be completed, and the old transaction will be dropped because it requests an invalid, now-outdated nonce. Your account will soon be usable!
  9. Go to the Gas Tracker, and it may or may not provide an informative reading. Choose whatever amount you think is best, but choose wisely; if you're too stingy it may get stuck again, and you'd need to pay another txn's gas to attempt another txn-fix.
  10. At the time I write this, I'd recommend 50-100 gwei; to repeat myself, gas requirements are insane right now. To be safe, make the gas limit a little higher than MCW's automatic calculation, you may need to undo the check-mark for "Automatically Calculate Gas Limit".
  11. Press "Send Transaction"!!!
  12. You will need to validate the action through your nano. It will have you validate three different things if you are moving an ERC20 Token. It's a good idea to verify accuracy, as always.
 
Well, I hope this worked for you! If not, you can let me know in a reply and I'll try to figure it out with you. I like making these in-depth educational posts, so if you appreciate it please let me know; I'll probably make more posts like this in the future!
( Surely this is at least far better than Ledger's "Support" article where they basically just tell you "Yeah, we haven't bothered to make a way to manually select nonces. I guess we might try to make that available for Bitcoin accounts at some point in the future; who knows? lol"... that's not infuriating at all, right?)
 
AAA:
Before I tell you how to find your address, I will first make it clear, within the italicized text, exactly which address you are looking for, if you are not already sure:
You may also skip the text written in italics if your issue does not include an ERC20 token, if you wish.
Ledger Live can confuse some users with its interface. On LL, to manage an ERC20 token, you first must go to your Ethereum account and add the token. When you then click on the added token under "Tokens" below the graph chart for your account's ETH amount over time, the screen will then open a new screen, that looks just the same, except focused on the specific ERC20 token. To confuse users further, there is then an option to "Star account", which then add the ETH icon with the ERC20 token's first letter or symbol overlapping, onto the easy access sidebar, as if it was another account of similar independency to the ETH account it was added to.
This improperly displays the two "accounts" relation to each other.
Your ERC20 holdings (at least for any and all ERC20 that I know of) are "held" in the exact-same address as the Ethereum address it was added to, which also "holds" any Ether you've added to it. You send both Ether (ETH) and any ERC20 Tokens to and from only Ethereum addresses of equivalent capabilities, in both qualities and quantities. In all basic terms and uses, they are the same.
So, to know what the problematic account's address is, find the address of the Ethereum account it was added to in Ledger Live.
Now, to find your address on MyCrypto, the most reliable way to find it, that I am aware of, is this:
Open Ledger Live. Go to the screen of your Ethereum address (again, this is the one that you added your ERC20 token, if applicable. If you're not dealing with an ERC20 token, you may ignore everything I've put in Italics). Click on "Edit account"; this is the icon next to the star that may look like a hex-wrench tool. On the new screen-overlay, you will see "> ADVANCED LOGS". Click on the ">" and it will point down while revealing a drop-down with some data that you may or may not recognize/understand. Likely to be found indented and in the middle-ish area, you will see this line, or something hopefully similar:
"freshAddressPath": "44'/60'/X'/0/0",
The "X" will probably be the only thing that changes, and the actual data will have a number in its place; it will not be a letter. Let's now put that line to use in MyCrypto:
Take the 44'/60'/X'/0/0 , and make sure you DO NOT copy the quotation marks, or that comma at the end either.
You can do this before or after copying and/or pasting, but drop the second "/0" at the end; it was not necessary in my case, I expect that you won't need it either, and will probably just make MyCrypto see it as an invalid input.
Okay, now go back to the "Select an Address" screen-overlay in MyCrypto.
Next to "Addresses", click on the box on the right, and you should be shown a list of options to select from in a drop-down menu.
Scroll all the way down, and you should find the "Custom" option at the very bottom. Select it.
A new box will appear; probably directly to the right of the now-shortened box that now displays the "Custom" option that you just selected. This box will offer an interface for typed input. ...yep... once again, believe it or not, you should click it.
Type " m/ ", no spaces before or after.
Type in or paste the data we retrieved from ledger live.
The box should now hold this:
m/44'/60'/X'/0
Again, X should be a number. In fact, that number is probably equal to the number of Ethereum (not including any ERC20 wannabe) accounts that you've made on Ledger Live before making the one we're working on right now! (1st Eth. Acc. would have: X = 0, 2nd: X = 1, 3rd: X = 2, ...)
Make sure you've included every apostrophe ( ' ), and solidus ( / ); there is NO APOSTROPHE for the "m" at the start and the "/0" at the end!
If you press the enter key or click on the check-mark to the right of where you typed, the appropriate addresses will be generated, and the address you created through Ledger Live should be the first one on the list!
Select your address and press "Unlock", and you are now accessing your account through the MyCrypto app's interface!
 
AAB:
In order to access your ERC20 token, you will need to add them first.
You may have to scroll down, but on the right-side of your unlocked account screen, you'll see a box with "Token Balances" as its header.
Click "Scan for tokens". This may take a short bit of time, and when it's done it may or may not display your ERC20 token. If it worked, you can head on back to the main part.
If you got the result I did, it won't display your token, or, if our result was exactly the same, it won't display any at all. However, you should now have the "Add Custom Token" option available, so see where that takes you.
You should discover four boxes, specified in order (Address/ Decimals / Token_Symbol / Balance). You may only need to fill in the "Address" box, but if you need to fill others, you'll find those with the token's address; here's 2 ways to find it, if you don't already know.
Method I:
Since you've probably already been managing your token with Ledger Live, you can go to the LL screen of your "account" for that token; Right next to the account's icon, and directly above the name, you'll see:
Contract: 0x??????...????????
Yes, go on; click it. You'll find the token's page on Etherscan; this was just a shortcut to the same place that both of the two previously referenced methods lead to. Skip to method... III?
Method II:
Go to Etherscan.com, or a similar Ethereum-blockchain-monitoring website, if you have a different preference. Search for the name of your token, and you should be able to see it as a search result. Activate your search manually of by selecting search option. Continue on with Method III.
Method III (Iⅈ what makes you think there was a third method? I said 2!):
At this point, you should find the "contract address" somewhere on the screen. This is the identity of the creature that breathes life into the token, allowing it to exist within the world of Ethereum. Steal it, and tell MyCrypto that you've left some of "your" tokens in the address of your ledger's Ethereum account. MyCrypto will trust and believe you without any concern or doubt, just by putting "your" contract address in the box for "Address"; it's almost too easy!
Well whaddya know, this one isn't actually too long! Don't tell anyone who may have taken a little longer whilst finding out how to do it themselves, though. There's value in trying to do something on your own, at least at first, so I'll let them think they made the right choice (¬‿¬). But take this star for humbling yourself enough to seek further help when you need it, since that is a very important life skill as well!
(o゜▽゜)o☆
Now, back to the useful stuff at the top...
 
EDIT: A comment below made me realize that this info should be added too. Here is my reply to the comment saying I could just use MetaMask. I said in the title that this guide is for questions where MEW and MetaMask aren’t working, but I guess it’s easy to miss. I used my u/caddark account to respond:
(Using this account because u/caddarkcrypto doesn’t meet the karma/age standards to comment; the post had to be manually approved.)
I guess I didn’t make it entirely clear; sorry:
The target audience for this guide is anyone with a stuck Ethereum transaction that was initiated through Ledger Live AND are experiencing the same difficulties I had encountered while trying to fix this issue for myself.
This wasn’t any regular stuck Ethereum transaction. Apparently before, there was an issue that made a Ledger Nano nearly impossible to connect to MetaMask (which is also Brave Browser’s integrated “crypto wallet” for the desktop version) and/or MEW (also perhaps any other browser wallets made for chrome and/or brave) that I heard was supposed to be fixed in a recent update. It might’ve been mostly patched, idk, but during my experience, (in which I was using the latest version of Ledger Live that is available right now,) that issue still remained.
The really weird part was that it successfully connected to the browser wallets again after I fixed the stuck transaction. At first I thought that somehow the txn was what was bugging the connection. However, later, during no txn issues, I was again unable to connect.
Seeing the same connection error again later, I opened up the MCW app I downloaded the day before, and was going to just use that. While in the process of operating MCW, I suddenly had another idea to try for the browser wallet so I went back to that just to quickly test it.
The browser wallet worked perfectly...
I don’t know how, but I think that somehow, something in MCW’s software, makes the browser wallets work. They don’t work for me without having MCW opened in the background first.
EDIT 2: Markdown decided to stop working after I did the first edit... I might fix it tomorrow... how did that happen though??? What did I do?
EDIT 3: nvm, I'm just fixing it now; I won't get much sleep tonight I guess.
submitted by CaddarkCrypto to CryptoCurrency [link] [comments]

bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!! bItCoIn tOll FrEE nUmBeR USA.

bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!

bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
What are the impediment of Bitcoin as a Transaction Currency?
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
While it was made as a methods for doing electronic, distributed exchanges, the idea isn't versatile at this stage. It relies a great deal upon confirmation of-work, which happens to be a strategy used to affirm that an arrangement came to fruition.
The benefit of using this technique is that proprietors on the Bitcoin framework don't need to know or even have faith in each other. Neither do they rely on a last gathering as the fundamental force that has an extreme state over an exchange? The procedure's advantages are accessible for speed, in any case. The Bitcoin framework can just oversee seven exchanges for every second.
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
Considerably more unequivocally, every ten mins, a clump of exchanges (alluded to for discourage of activities, along these lines, "square" chain) is affirmed. The issue, in any case, is the bunch is sufficiently enormous to fit a great deal of exchanges. In the event that, for example, you head over Starbucks, and you make a purchase with Bitcoin, in the most ideal situation, your espresso purchase is put into the following cluster. It's checked under ten minutes if Starbucks is sufficient just to remember one confirmation (there are chances associated with just tolerating one affirmation, however we won't get into that in this occurrence).
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
On the other side, if there's a broad rundown of exchanges in front of you, your coffee exchange probably won't get by into that next group. What winds up happening would be that your buy gets lined set up for another shipment. The line which the exchange is persistently holding up in is known as the mempool. Presently you've to hold up an extra ten minutes after the earlier cluster of exchanges is finished; i.e., you've to wait for as much as twenty minutes. And still, at the end of the day, there's just no assurance. Maybe, at this point, you discover the point and unquestionably will see unequivocally how troubling it will become to buy a mug of coffee with Bitcoin.
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
On the off chance that you exchange on each brought together trade, in spite of the fact that, you could be imagining that Bitcoin speeds are close moment that is a deception. On brought together trades, all the bitcoin is kept in one area. The Bitcoin of yours and mine are aggregate. The trade deals with a database that gives and takes away a history on the Bitcoin you own, subject to each exchange. That is the explanation. Bitcoin maximalists contend that you don't genuinely have your Bitcoin except if it is in your wallet; on the off chance that it lays on a trade, you're represented by chance. The exchange may vanish one day with the entirety of your coins, or perhaps only level out decline to furnish you with the coins you purchased.
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
As a retail establishment of worth, Bitcoin has a few great properties. In the first place, it could be had and effectively put away. In contrast to gold, Bitcoin might be put away for a USB stick, regardless of the amount you have. Gold occupies genuine physical room, and holding extensive measures of it can get obvious. Bitcoin likewise offers a fixed cost. Altogether, there'll be close to twenty-one million Bitcoin promptly accessible to the world.
Think about Bitcoin exchange
How Are BITCOIN TRANSACTIONS Processed?
The Bitcoin (BSV) blockchain supports an open record that will keep a background marked by the majority of the exchanges that occurred. Each hub on the framework has a total message of the bookkeeping. Mining will be where extra exchanges between individuals are checked and placed into the Bitcoin (BSV) open record and the way the blockchain is made sure about. Along these lines, blockchain mining will be where fresh out of the box new Bitcoin (BSV) coins are printed and furthermore brought into the current flowing flexibly.
How Does Mining Work?
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
Mining is a fundamental segment that empowers the Bitcoin (BSV) blockchain to work being a decentralized shared framework with zero outsider focal position. In expansive phrasing, exchanges become brought into the blockchain by hubs when one specific social gathering coordinates a Bitcoin to another. Excavators run a particular programming bundle to record the squares upon the Bitcoin (BSV) blockchain.
Hubs are the establishment of the blockchain. A hub is a digger that joins towards the Bitcoin (BSV) framework to reveal obstructs in addition to process exchanges. Hubs talk with each other by transmitting data inside the conveyed framework with the Bitcoin (BSV) distributed procedure. All system hubs get the arrangements at that point affirm the legitimacy of theirs.
What occurs after?
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
An excavator gathers exchanges from the brain pool, independently hashes them, presently amasses them inside an impede. After the exchanges get hashed, the hashes are organized straight into a Merkle Tree (or perhaps a hash tree).
A Merkle Tree is made by orchestrating the distinctive exchange hashes into sets at that point hashing them by and by. The yield is organized into sets and hashed again then over and again, until "the top piece of the tree" is secured. The zenith of the tree is known as a root hash or perhaps Merkle root. Its one hash that presents the entirety of the earlier blends utilized in its age.
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
The square's coming up next: is controlled by header
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
Mining a square is troublesome in light of the fact that the SHA 256 hash of a square's header ought to be not exactly or maybe equivalent to the objective with the square to be recognized by the framework. Diggers consistently hash the square header in, by emphasizing through the nonce until one inside the framework excavator makes a legitimate block hash.
At the point when found, the originator hub is going to communicate the square on the Bitcoin people group. Different hubs look at to discover if the hash is certifiable and, hence, tack the square into a duplicate of theirs of the blockchain. Therefore, they've up record after that begin dealing with mining another square.
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
Blockchain Rewards
The underlying advance in blockchain mining is including a coinbase exchange, e.g., an unmistakable sort of bitcoin exchange that can simply be created by a digger. This exchange doesn't have any sources of info, and there's an individual comprised of each fresh out of the plastic new impede mined on the Bitcoin (BSV) people group. Any exchange and square rewards expenses got together by the digger are presented this exchange as pay for finding the new square.
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
Bitcoin support number.
Bitcoin technical support number.
Bitcoin helpline number.
Bitcoin toll free number.
Bitcoin customer care number.
Bitcoin customer service.
bitcoin toll free number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
submitted by Few-Heat4339 to u/Few-Heat4339 [link] [comments]

bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!! || bItCoIn Customer number USA.

bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
What are the impediment of Bitcoin as a Transaction Currency?
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
While it was made as a methods for doing electronic, distributed exchanges, the idea isn't versatile at this stage. It relies a great deal upon confirmation of-work, which happens to be a strategy used to affirm that an arrangement came to fruition.
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
The benefit of using this technique is that proprietors on the Bitcoin framework don't need to know or even have faith in each other. Neither do they rely on a last gathering as the fundamental force that has an extreme state over an exchange? The procedure's advantages are accessible for speed, in any case. The Bitcoin framework can just oversee seven exchanges for every second.
Considerably more unequivocally, every ten mins, a clump of exchanges (alluded to for discourage of activities, along these lines, "square" chain) is affirmed. The issue, in any case, is the bunch is sufficiently enormous to fit a great deal of exchanges. In the event that, for example, you head over Starbucks, and you make a purchase with Bitcoin, in the most ideal situation, your espresso purchase is put into the following cluster. It's checked under ten minutes if Starbucks is sufficient just to remember one confirmation (there are chances associated with just tolerating one affirmation, however we won't get into that in this occurrence).
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
On the other side, if there's a broad rundown of exchanges in front of you, your coffee exchange probably won't get by into that next group. What winds up happening would be that your buy gets lined set up for another shipment. The line which the exchange is persistently holding up in is known as the mempool. Presently you've to hold up an extra ten minutes after the earlier cluster of exchanges is finished; i.e., you've to wait for as much as twenty minutes. And still, at the end of the day, there's just no assurance. Maybe, at this point, you discover the point and unquestionably will see unequivocally how troubling it will become to buy a mug of coffee with Bitcoin.
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
On the off chance that you exchange on each brought together trade, in spite of the fact that, you could be imagining that Bitcoin speeds are close moment that is a deception. On brought together trades, all the bitcoin is kept in one area. The Bitcoin of yours and mine are aggregate. The trade deals with a database that gives and takes away a history on the Bitcoin you own, subject to each exchange. That is the explanation. Bitcoin maximalists contend that you don't genuinely have your Bitcoin except if it is in your wallet; on the off chance that it lays on a trade, you're represented by chance. The exchange may vanish one day with the entirety of your coins, or perhaps only level out decline to furnish you with the coins you purchased.
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
As a retail establishment of worth, Bitcoin has a few great properties. In the first place, it could be had and effectively put away. In contrast to gold, Bitcoin might be put away for a USB stick, regardless of the amount you have. Gold occupies genuine physical room, and holding extensive measures of it can get obvious. Bitcoin likewise offers a fixed cost. Altogether, there'll be close to twenty-one million Bitcoin promptly accessible to the world.
Think about Bitcoin exchange
How Are BITCOIN TRANSACTIONS Processed?
The Bitcoin (BSV) blockchain supports an open record that will keep a background marked by the majority of the exchanges that occurred. Each hub on the framework has a total message of the bookkeeping. Mining will be where extra exchanges between individuals are checked and placed into the Bitcoin (BSV) open record and the way the blockchain is made sure about. Along these lines, blockchain mining will be where fresh out of the box new Bitcoin (BSV) coins are printed and furthermore brought into the current flowing flexibly.
How Does Mining Work?
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
Mining is a fundamental segment that empowers the Bitcoin (BSV) blockchain to work being a decentralized shared framework with zero outsider focal position. In expansive phrasing, exchanges become brought into the blockchain by hubs when one specific social gathering coordinates a Bitcoin to another. Excavators run a particular programming bundle to record the squares upon the Bitcoin (BSV) blockchain.
Hubs are the establishment of the blockchain. A hub is a digger that joins towards the Bitcoin (BSV) framework to reveal obstructs in addition to process exchanges. Hubs talk with each other by transmitting data inside the conveyed framework with the Bitcoin (BSV) distributed procedure. All system hubs get the arrangements at that point affirm the legitimacy of theirs.
What occurs after?
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
An excavator gathers exchanges from the brain pool, independently hashes them, presently amasses them inside an impede. After the exchanges get hashed, the hashes are organized straight into a Merkle Tree (or perhaps a hash tree).
A Merkle Tree is made by orchestrating the distinctive exchange hashes into sets at that point hashing them by and by. The yield is organized into sets and hashed again then over and again, until "the top piece of the tree" is secured. The zenith of the tree is known as a root hash or perhaps Merkle root. Its one hash that presents the entirety of the earlier blends utilized in its age.
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
The square's coming up next: is controlled by header
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
Mining a square is troublesome in light of the fact that the SHA 256 hash of a square's header ought to be not exactly or maybe equivalent to the objective with the square to be recognized by the framework. Diggers consistently hash the square header in, by emphasizing through the nonce until one inside the framework excavator makes a legitimate block hash.
At the point when found, the originator hub is going to communicate the square on the Bitcoin people group. Different hubs look at to discover if the hash is certifiable and, hence, tack the square into a duplicate of theirs of the blockchain. Therefore, they've up record after that begin dealing with mining another square.
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
Blockchain Rewards
The underlying advance in blockchain mining is including a coinbase exchange, e.g., an unmistakable sort of bitcoin exchange that can simply be created by a digger. This exchange doesn't have any sources of info, and there's an individual comprised of each fresh out of the plastic new impede mined on the Bitcoin (BSV) people group. Any exchange and square rewards expenses got together by the digger are presented this exchange as pay for finding the new square.
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
Bitcoin support number.
Bitcoin technical support number.
Bitcoin helpline number.
Bitcoin toll free number.
Bitcoin customer care number.
Bitcoin customer service.
bitcoin helpline number !!⑧③③~⑤④⓪~⓪ ⑨①⓪!!
submitted by Competitive-Ad-2769 to u/Competitive-Ad-2769 [link] [comments]

bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪|| bitcoin customer service number USA.


bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪

bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
What are the impediment of Bitcoin as a Transaction Currency?
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
While it was made as a methods for doing electronic, distributed exchanges, the idea isn't versatile at this stage. It relies a great deal upon confirmation of-work, which happens to be a strategy used to affirm that an arrangement came to fruition.
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
The benefit of using this technique is that proprietors on the Bitcoin framework don't need to know or even have faith in each other. Neither do they rely on a last gathering as the fundamental force that has an extreme state over an exchange? The procedure's advantages are accessible for speed, in any case. The Bitcoin framework can just oversee seven exchanges for every second.
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
Considerably more unequivocally, every ten mins, a clump of exchanges (alluded to for discourage of activities, along these lines, "square" chain) is affirmed. The issue, in any case, is the bunch is sufficiently enormous to fit a great deal of exchanges. In the event that, for example, you head over Starbucks, and you make a purchase with Bitcoin, in the most ideal situation, your espresso purchase is put into the following cluster. It's checked under ten minutes if Starbucks is sufficient just to remember one confirmation (there are chances associated with just tolerating one affirmation, however we won't get into that in this occurrence).
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
On the other side, if there's a broad rundown of exchanges in front of you, your coffee exchange probably won't get by into that next group. What winds up happening would be that your buy gets lined set up for another shipment. The line which the exchange is persistently holding up in is known as the mempool. Presently you've to hold up an extra ten minutes after the earlier cluster of exchanges is finished; i.e., you've to wait for as much as twenty minutes. And still, at the end of the day, there's just no assurance. Maybe, at this point, you discover the point and unquestionably will see unequivocally how troubling it will become to buy a mug of coffee with Bitcoin.
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
On the off chance that you exchange on each brought together trade, in spite of the fact that, you could be imagining that Bitcoin speeds are close moment that is a deception. On brought together trades, all the bitcoin is kept in one area. The Bitcoin of yours and mine are aggregate. The trade deals with a database that gives and takes away a history on the Bitcoin you own, subject to each exchange. That is the explanation. Bitcoin maximalists contend that you don't genuinely have your Bitcoin except if it is in your wallet; on the off chance that it lays on a trade, you're represented by chance. The exchange may vanish one day with the entirety of your coins, or perhaps only level out decline to furnish you with the coins you purchased.
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
As a retail establishment of worth, Bitcoin has a few great properties. In the first place, it could be had and effectively put away. In contrast to gold, Bitcoin might be put away for a USB stick, regardless of the amount you have. Gold occupies genuine physical room, and holding extensive measures of it can get obvious. Bitcoin likewise offers a fixed cost. Altogether, there'll be close to twenty-one million Bitcoin promptly accessible to the world.
Think about Bitcoin exchange
How Are BITCOIN TRANSACTIONS Processed?
The Bitcoin (BSV) blockchain supports an open record that will keep a background marked by the majority of the exchanges that occurred. Each hub on the framework has a total message of the bookkeeping. Mining will be where extra exchanges between individuals are checked and placed into the Bitcoin (BSV) open record and the way the blockchain is made sure about. Along these lines, blockchain mining will be where fresh out of the box new Bitcoin (BSV) coins are printed and furthermore brought into the current flowing flexibly.
How Does Mining Work?
Mining is a fundamental segment that empowers the Bitcoin (BSV) blockchain to work being a decentralized shared framework with zero outsider focal position. In expansive phrasing, exchanges become brought into the blockchain by hubs when one specific social gathering coordinates a Bitcoin to another. Excavators run a particular programming bundle to record the squares upon the Bitcoin (BSV) blockchain.
Hubs are the establishment of the blockchain. A hub is a digger that joins towards the Bitcoin (BSV) framework to reveal obstructs in addition to process exchanges. Hubs talk with each other by transmitting data inside the conveyed framework with the Bitcoin (BSV) distributed procedure. All system hubs get the arrangements at that point affirm the legitimacy of theirs.
What occurs after?
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
An excavator gathers exchanges from the brain pool, independently hashes them, presently amasses them inside an impede. After the exchanges get hashed, the hashes are organized straight into a Merkle Tree (or perhaps a hash tree).
A Merkle Tree is made by orchestrating the distinctive exchange hashes into sets at that point hashing them by and by. The yield is organized into sets and hashed again then over and again, until "the top piece of the tree" is secured. The zenith of the tree is known as a root hash or perhaps Merkle root. Its one hash that presents the entirety of the earlier blends utilized in its age.
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
The square's coming up next: is controlled by header
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
Mining a square is troublesome in light of the fact that the SHA 256 hash of a square's header ought to be not exactly or maybe equivalent to the objective with the square to be recognized by the framework. Diggers consistently hash the square header in, by emphasizing through the nonce until one inside the framework excavator makes a legitimate block hash.
At the point when found, the originator hub is going to communicate the square on the Bitcoin people group. Different hubs look at to discover if the hash is certifiable and, hence, tack the square into a duplicate of theirs of the blockchain. Therefore, they've up record after that begin dealing with mining another square.
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
Blockchain Rewards
The underlying advance in blockchain mining is including a coinbase exchange, e.g., an unmistakable sort of bitcoin exchange that can simply be created by a digger. This exchange doesn't have any sources of info, and there's an individual comprised of each fresh out of the plastic new impede mined on the Bitcoin (BSV) people group. Any exchange and square rewards expenses got together by the digger are presented this exchange as pay for finding the new square.
Bitcoin support number.
Bitcoin technical support number.
Bitcoin helpline number.
Bitcoin toll free number.
Bitcoin customer care number.
Bitcoin customer service.
bitcoin customer care number ⑧③③~⑤④⓪~⓪ ⑨①⓪
submitted by SpareEbb7035 to u/SpareEbb7035 [link] [comments]

bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!! bitcoin customer support USA.

bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
What are the impediment of Bitcoin as a Transaction Currency?
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
While it was made as a methods for doing electronic, distributed exchanges, the idea isn't versatile at this stage. It relies a great deal upon confirmation of-work, which happens to be a strategy used to affirm that an arrangement came to fruition.
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
The benefit of using this technique is that proprietors on the Bitcoin framework don't need to know or even have faith in each other. Neither do they rely on a last gathering as the fundamental force that has an extreme state over an exchange? The procedure's advantages are accessible for speed, in any case. The Bitcoin framework can just oversee seven exchanges for every second.
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
Considerably more unequivocally, every ten mins, a clump of exchanges (alluded to for discourage of activities, along these lines, "square" chain) is affirmed. The issue, in any case, is the bunch is sufficiently enormous to fit a great deal of exchanges. In the event that, for example, you head over Starbucks, and you make a purchase with Bitcoin, in the most ideal situation, your espresso purchase is put into the following cluster. It's checked under ten minutes if Starbucks is sufficient just to remember one confirmation (there are chances associated with just tolerating one affirmation, however we won't get into that in this occurrence).
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
On the other side, if there's a broad rundown of exchanges in front of you, your coffee exchange probably won't get by into that next group. What winds up happening would be that your buy gets lined set up for another shipment. The line which the exchange is persistently holding up in is known as the mempool. Presently you've to hold up an extra ten minutes after the earlier cluster of exchanges is finished; i.e., you've to wait for as much as twenty minutes. And still, at the end of the day, there's just no assurance. Maybe, at this point, you discover the point and unquestionably will see unequivocally how troubling it will become to buy a mug of coffee with Bitcoin.
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
On the off chance that you exchange on each brought together trade, in spite of the fact that, you could be imagining that Bitcoin speeds are close moment that is a deception. On brought together trades, all the bitcoin is kept in one area. The Bitcoin of yours and mine are aggregate. The trade deals with a database that gives and takes away a history on the Bitcoin you own, subject to each exchange. That is the explanation. Bitcoin maximalists contend that you don't genuinely have your Bitcoin except if it is in your wallet; on the off chance that it lays on a trade, you're represented by chance. The exchange may vanish one day with the entirety of your coins, or perhaps only level out decline to furnish you with the coins you purchased.
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
As a retail establishment of worth, Bitcoin has a few great properties. In the first place, it could be had and effectively put away. In contrast to gold, Bitcoin might be put away for a USB stick, regardless of the amount you have. Gold occupies genuine physical room, and holding extensive measures of it can get obvious. Bitcoin likewise offers a fixed cost. Altogether, there'll be close to twenty-one million Bitcoin promptly accessible to the world.
Think about Bitcoin exchange
How Are BITCOIN TRANSACTIONS Processed?
The Bitcoin (BSV) blockchain supports an open record that will keep a background marked by the majority of the exchanges that occurred. Each hub on the framework has a total message of the bookkeeping. Mining will be where extra exchanges between individuals are checked and placed into the Bitcoin (BSV) open record and the way the blockchain is made sure about. Along these lines, blockchain mining will be where fresh out of the box new Bitcoin (BSV) coins are printed and furthermore brought into the current flowing flexibly.
How Does Mining Work?
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
Mining is a fundamental segment that empowers the Bitcoin (BSV) blockchain to work being a decentralized shared framework with zero outsider focal position. In expansive phrasing, exchanges become brought into the blockchain by hubs when one specific social gathering coordinates a Bitcoin to another. Excavators run a particular programming bundle to record the squares upon the Bitcoin (BSV) blockchain.
Hubs are the establishment of the blockchain. A hub is a digger that joins towards the Bitcoin (BSV) framework to reveal obstructs in addition to process exchanges. Hubs talk with each other by transmitting data inside the conveyed framework with the Bitcoin (BSV) distributed procedure. All system hubs get the arrangements at that point affirm the legitimacy of theirs.
What occurs after?
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
An excavator gathers exchanges from the brain pool, independently hashes them, presently amasses them inside an impede. After the exchanges get hashed, the hashes are organized straight into a Merkle Tree (or perhaps a hash tree).
A Merkle Tree is made by orchestrating the distinctive exchange hashes into sets at that point hashing them by and by. The yield is organized into sets and hashed again then over and again, until "the top piece of the tree" is secured. The zenith of the tree is known as a root hash or perhaps Merkle root. Its one hash that presents the entirety of the earlier blends utilized in its age.
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
The square's coming up next: is controlled by header
Mining a square is troublesome in light of the fact that the SHA 256 hash of a square's header ought to be not exactly or maybe equivalent to the objective with the square to be recognized by the framework. Diggers consistently hash the square header in, by emphasizing through the nonce until one inside the framework excavator makes a legitimate block hash.
At the point when found, the originator hub is going to communicate the square on the Bitcoin people group. Different hubs look at to discover if the hash is certifiable and, hence, tack the square into a duplicate of theirs of the blockchain. Therefore, they've up record after that begin dealing with mining another square.
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
Blockchain Rewards
The underlying advance in blockchain mining is including a coinbase exchange, e.g., an unmistakable sort of bitcoin exchange that can simply be created by a digger. This exchange doesn't have any sources of info, and there's an individual comprised of each fresh out of the plastic new impede mined on the Bitcoin (BSV) people group. Any exchange and square rewards expenses got together by the digger are presented this exchange as pay for finding the new square.
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
Bitcoin support number.
Bitcoin technical support number.
Bitcoin helpline number.
Bitcoin toll free number.
Bitcoin customer care number.
Bitcoin customer service.
bitcoin support number !!⑧③③!!⑤④⓪!!⓪⑨①⓪!!
submitted by CarryAdmirable to u/CarryAdmirable [link] [comments]

What Is Proof of Work (PoW)?

What Is Proof of Work (PoW)?
Contents
https://preview.redd.it/6xrtu2r56v151.png?width=1920&format=png&auto=webp&s=21a0175a00217614738e88b6c9d47fd07e0ae305
Introduction
Proof of Work (commonly abbreviated to PoW) is a mechanism for preventing double-spends. Most major cryptocurrencies use this as their consensus algorithm. That’s just what we call a method for securing the cryptocurrency’s ledger.
Proof of Work was the first consensus algorithm to surface, and, to date, remains the dominant one. It was introduced by Satoshi Nakamoto in the 2008 Bitcoin white paper, but the technology itself was conceived long before then.
Adam Back’s HashCash is an early example of a Proof of Work algorithm in the pre-cryptocurrency days. By requiring senders to perform a small amount of computing before sending an email, receivers could mitigate spam. This computation would cost virtually nothing to a legitimate sender, but quickly add up for someone sending emails en masse.

What is a double-spend?

A double-spend occurs when the same funds are spent more than once. The term is used almost exclusively in the context of digital money — after all, you’d have a hard time spending the same physical cash twice. When you pay for a coffee today, you hand cash over to a cashier who probably locks it in a register. You can’t go to the coffee shop across the road and pay for another coffee with the same bill.
In digital cash schemes, there’s the possibility that you could. You’ve surely duplicated a computer file before — you just copy and paste it. You can email the same file to ten, twenty, fifty people.
Since digital money is just data, you need to prevent people from copying and spending the same units in different places. Otherwise, your currency will collapse in no time.
For a more in-depth look at double-spending, check out Double Spending Explained.

Why is Proof of Work necessary?

If you’ve read our guide to blockchain technology, you’ll know that users broadcast transactions to the network. Those transactions aren’t immediately considered valid, though. That only happens when they get added to the blockchain.
The blockchain is a big database that every user can see, so they can check if funds have been spent before. Picture it like this: you and three friends have a notepad. Anytime one of you wants to make a transfer of whatever units you’re using, you write it down — Alice pays Bob five units, Bob pays Carol two units, etc.
There’s another intricacy here — each time you make a transaction, you refer to the transaction where the funds came from. So, if Bob was paying Carol with two units, the entry would actually look like the following: Bob pays Carol two units from this earlier transaction with Alice.
Now, we have a way to track the units. If Bob tries to make another transaction using the same units he just sent to Carol, everyone will know immediately. The group won’t allow the transaction to be added to the notepad.
Now, this might work well in a small group. Everyone knows each other, so they’ll probably agree on which of the friends should add transactions to the notepad. What if we want a group of 10,000 participants? The notepad idea doesn’t scale well, because nobody wants to trust a stranger to manage it.
This is where Proof of Work comes in. It ensures that users aren’t spending money that they don’t have the right to spend. By using a combination of game theory and cryptography, a PoW algorithm enables anyone to update the blockchain according to the rules of the system.

How does PoW work?

Our notepad above is the blockchain. But we don’t add transactions one by one — instead, we lump them into blocks. We announce the transactions to the network, then users creating a block will include them in a candidate block. The transactions will only be considered valid once their candidate block becomes a confirmed block, meaning that it has been added to the blockchain.
Appending a block isn’t cheap, however. Proof of Work requires that a miner (the user creating the block) uses up some of their own resources for the privilege. That resource is computing power, which is used to hash the block’s data until a solution to a puzzle is found.
Hashing the block’s data means that you pass it through a hashing function to generate a block hash. The block hash works like a “fingerprint” — it’s an identity for your input data and is unique to each block.
It’s virtually impossible to reverse a block hash to get the input data. Knowing an input, however, it’s trivial for you to confirm that the hash is correct. You just have to submit the input through the function and check if the output is the same.
In Proof of Work, you must provide data whose hash matches certain conditions. But you don’t know how to get there. Your only option is to pass your data through a hash function and to check if it matches the conditions. If it doesn’t, you’ll have to change your data slightly to get a different hash. Changing even one character in your data will result in a totally different result, so there’s no way of predicting what an output might be.
As a result, if you want to create a block, you’re playing a guessing game. You typically take information on all of the transactions that you want to add and some other important data, then hash it all together. But since your dataset won’t change, you need to add a piece of information that is variable. Otherwise, you would always get the same hash as output. This variable data is what we call a nonce. It’s a number that you’ll change with every attempt, so you’re getting a different hash every time. And this is what we call mining.
Summing up, mining is the process of gathering blockchain data and hashing it along with a nonce until you find a particular hash. If you find a hash that satisfies the conditions set out by the protocol, you get the right to broadcast the new block to the network. At this point, the other participants of the network update their blockchains to include the new block.
For major cryptocurrencies today, the conditions are incredibly challenging to satisfy. The higher the hash rate on the network, the more difficult it is to find a valid hash. This is done to ensure that blocks aren’t found too quickly.
As you can imagine, trying to guess massive amounts of hashes can be costly on your computer. You’re wasting computational cycles and electricity. But the protocol will reward you with cryptocurrency if you find a valid hash.
Let’s recap what we know so far:
  • It’s expensive for you to mine.
  • You’re rewarded if you produce a valid block.
  • Knowing an input, a user can easily check its hash — non-mining users can verify that a block is valid without expending much computational power.
So far, so good. But what if you try to cheat? What’s to stop you from putting a bunch of fraudulent transactions into the block and producing a valid hash?
That’s where public-key cryptography comes in. We won’t go into depth in this article, but check out What is Public-Key Cryptography? for a comprehensive look at it. In short, we use some neat cryptographic tricks that allow any user to verify whether someone has a right to move the funds they’re attempting to spend.
When you create a transaction, you sign it. Anyone on the network can compare your signature with your public key, and check whether they match. They’ll also check if you can actually spend your funds and that the sum of your inputs is higher than the sum of your outputs (i.e., that you’re not spending more than you have).
Any block that includes an invalid transaction will be automatically rejected by the network. It’s expensive for you to even attempt to cheat. You’ll waste your own resources without any reward.
Therein lies the beauty of Proof of Work: it makes it expensive to cheat, but profitable to act honestly. Any rational miner will be seeking ROI, so they can be expected to behave in a way that guarantees revenue.

Proof of Work vs. Proof of Stake

There are many consensus algorithms, but one of the most highly-anticipated ones is Proof of Stake (PoS). The concept dates back to 2011, and has been implemented in some smaller protocols. But it has yet to see adoption in any of the big blockchains.
In Proof of Stake systems, miners are replaced with validators. There’s no mining involved and no race to guess hashes. Instead, users are randomly selected — if they’re picked, they must propose (or “forge”) a block. If the block is valid, they’ll receive a reward made up of the fees from the block’s transactions.
Not just any user can be selected, though — the protocol chooses them based on a number of factors. To be eligible, participants must lock up a stake, which is a predetermined amount of the blockchain’s native currency. The stake works like bail: just as defendants put up a large sum of money to disincentivize them from skipping trial, validators lock up a stake to disincentivize cheating. If they act dishonestly, their stake (or a portion of it) will be taken.
Proof of Stake does have some benefits over Proof of Work. The most notable one is the smaller carbon footprint — since there’s no need for high-powered mining farms in PoS, the electricity consumed is only a fraction of that consumed in PoW.
That said, it has nowhere near the track record of PoW. Although it could be perceived as wasteful, mining is the only consensus algorithm that’s proven itself at scale. In just over a decade, it has secured trillions of dollars worth of transactions. To say with certainty whether PoS can rival its security, staking needs to be properly tested in the wild.

Closing thoughts

Proof of Work was the original solution to the double-spend problem and has proven to be reliable and secure. Bitcoin proved that we don’t need centralized entities to prevent the same funds from being spent twice. With clever use of cryptography, hash functions, and game theory, participants in a decentralized environment can agree on the state of a financial database.
submitted by D-platform to u/D-platform [link] [comments]

12-13 15:04 - 'Read this went the opposite way' (self.Bitcoin) by /u/fukya40 removed from /r/Bitcoin within 38-48min

'''
// Copyright (c) 2008 Satoshi Nakamoto // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT // SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR // OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE.
class COutPoint; class CInPoint; class CDiskTxPos; class CCoinBase; class CTxIn; class CTxOut; class CTransaction; class CBlock; class CBlockIndex; class CWalletTx; class CKeyItem;
static const unsigned int MAX_SIZE = 0x02000000; static const int64 COIN = 1000000; static const int64 CENT = 10000; static const int64 TRANSACTIONFEE = 1 * CENT; /// change this to a user options setting, optional fee can be zero ///static const unsigned int MINPROOFOFWORK = 40; /// need to decide the right difficulty to start with static const unsigned int MINPROOFOFWORK = 20; /// ridiculously easy for testing
extern map mapBlockIndex; extern const uint256 hashGenesisBlock; extern CBlockIndex* pindexGenesisBlock; extern int nBestHeight; extern CBlockIndex* pindexBest; extern unsigned int nTransactionsUpdated; extern int fGenerateBitcoins;
FILE* OpenBlockFile(unsigned int nFile, unsigned int nBlockPos, const char* pszMode="rb"); FILE* AppendBlockFile(unsigned int& nFileRet); bool AddKey(const CKey& key); vector GenerateNewKey(); bool AddToWallet(const CWalletTx& wtxIn); void ReacceptWalletTransactions(); void RelayWalletTransactions(); bool LoadBlockIndex(bool fAllowNew=true); bool BitcoinMiner(); bool ProcessMessages(CNode* pfrom); bool ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv); bool SendMessages(CNode* pto); int64 CountMoney(); bool CreateTransaction(CScript scriptPubKey, int64 nValue, CWalletTx& txNew); bool SendMoney(CScript scriptPubKey, int64 nValue, CWalletTx& wtxNew);
class CDiskTxPos { public: unsigned int nFile; unsigned int nBlockPos; unsigned int nTxPos;
CDiskTxPos() { SetNull(); }
CDiskTxPos(unsigned int nFileIn, unsigned int nBlockPosIn, unsigned int nTxPosIn) { nFile = nFileIn; nBlockPos = nBlockPosIn; nTxPos = nTxPosIn; }
IMPLEMENT_SERIALIZE( READWRITE(FLATDATA(*this)); ) void SetNull() { nFile = -1; nBlockPos = 0; nTxPos = 0; } bool IsNull() const { return (nFile == -1); }
friend bool operator==(const CDiskTxPos& a, const CDiskTxPos& b) { return (a.nFile == b.nFile && a.nBlockPos == b.nBlockPos && a.nTxPos == b.nTxPos); }
friend bool operator!=(const CDiskTxPos& a, const CDiskTxPos& b) { return !(a == b); }
void print() const { if (IsNull()) printf("null"); else printf("(nFile=%d, nBlockPos=%d, nTxPos=%d)", nFile, nBlockPos, nTxPos); } };
class CInPoint { public: CTransaction* ptx; unsigned int n;
CInPoint() { SetNull(); } CInPoint(CTransaction* ptxIn, unsigned int nIn) { ptx = ptxIn; n = nIn; } void SetNull() { ptx = NULL; n = -1; } bool IsNull() const { return (ptx == NULL && n == -1); } };
class COutPoint { public: uint256 hash; unsigned int n;
COutPoint() { SetNull(); } COutPoint(uint256 hashIn, unsigned int nIn) { hash = hashIn; n = nIn; } IMPLEMENT_SERIALIZE( READWRITE(FLATDATA(*this)); ) void SetNull() { hash = 0; n = -1; } bool IsNull() const { return (hash == 0 && n == -1); }
friend bool operator<(const COutPoint& a, const COutPoint& b) { return (a.hash < b.hash || (a.hash == b.hash && a.n < b.n)); }
friend bool operator==(const COutPoint& a, const COutPoint& b) { return (a.hash == b.hash && a.n == b.n); }
friend bool operator!=(const COutPoint& a, const COutPoint& b) { return !(a == b); }
void print() const { printf("COutPoint(%s, %d)", hash.ToString().substr(0,6).c_str(), n); } };
// // An input of a transaction. It contains the location of the previous // transaction's output that it claims and a signature that matches the // output's public key. // class CTxIn { public: COutPoint prevout; CScript scriptSig;
CTxIn() { }
CTxIn(COutPoint prevoutIn, CScript scriptSigIn) { prevout = prevoutIn; scriptSig = scriptSigIn; }
CTxIn(uint256 hashPrevTx, unsigned int nOut, CScript scriptSigIn) { prevout = COutPoint(hashPrevTx, nOut); scriptSig = scriptSigIn; }
IMPLEMENT_SERIALIZE ( READWRITE(prevout); READWRITE(scriptSig); )
bool IsPrevInMainChain() const { return CTxDB("r").ContainsTx(prevout.hash); }
friend bool operator==(const CTxIn& a, const CTxIn& b) { return (a.prevout == b.prevout && a.scriptSig == b.scriptSig); }
friend bool operator!=(const CTxIn& a, const CTxIn& b) { return !(a == b); }
void print() const { printf("CTxIn("); prevout.print(); if (prevout.IsNull()) { printf(", coinbase %s)\n", HexStr(scriptSig.begin(), scriptSig.end(), false).c_str()); } else { if (scriptSig.size() >= 6) printf(", scriptSig=%02x%02x", scriptSig[4], scriptSig[5]); printf(")\n"); } }
bool IsMine() const; int64 GetDebit() const; };
// // An output of a transaction. It contains the public key that the next input // must be able to sign with to claim it. // class CTxOut { public: int64 nValue; unsigned int nSequence; CScript scriptPubKey;
// disk only CDiskTxPos posNext; //// so far this is only used as a flag, nothing uses the location
public: CTxOut() { nValue = 0; nSequence = UINT_MAX; }
CTxOut(int64 nValueIn, CScript scriptPubKeyIn, int nSequenceIn=UINT_MAX) { nValue = nValueIn; scriptPubKey = scriptPubKeyIn; nSequence = nSequenceIn; }
IMPLEMENT_SERIALIZE ( READWRITE(nValue); READWRITE(nSequence); READWRITE(scriptPubKey); if (nType & SER_DISK) READWRITE(posNext); )
uint256 GetHash() const { return SerializeHash(*this); }
bool IsFinal() const { return (nSequence == UINT_MAX); }
bool IsMine() const { return ::IsMine(scriptPubKey); }
int64 GetCredit() const { if (IsMine()) return nValue; return 0; }
friend bool operator==(const CTxOut& a, const CTxOut& b) { return (a.nValue == b.nValue && a.nSequence == b.nSequence && a.scriptPubKey == b.scriptPubKey); }
friend bool operator!=(const CTxOut& a, const CTxOut& b) { return !(a == b); }
void print() const { if (scriptPubKey.size() >= 6) printf("CTxOut(nValue=%I64d, nSequence=%u, scriptPubKey=%02x%02x, posNext=", nValue, nSequence, scriptPubKey[4], scriptPubKey[5]); posNext.print(); printf(")\n"); } };
// // The basic transaction that is broadcasted on the network and contained in // blocks. A transaction can contain multiple inputs and outputs. // class CTransaction { public: vector vin; vector vout; unsigned int nLockTime;
CTransaction() { SetNull(); }
IMPLEMENT_SERIALIZE ( if (!(nType & SER_GETHASH)) READWRITE(nVersion);
// Set version on stream for writing back same version if (fRead && s.nVersion == -1) s.nVersion = nVersion;
READWRITE(vin); READWRITE(vout); READWRITE(nLockTime); )
void SetNull() { vin.clear(); vout.clear(); nLockTime = 0; }
bool IsNull() const { return (vin.empty() && vout.empty()); }
uint256 GetHash() const { return SerializeHash(*this); }
bool AllPrevInMainChain() const { foreach(const CTxIn& txin, vin) if (!txin.IsPrevInMainChain()) return false; return true; }
bool IsFinal() const { if (nLockTime == 0) return true; if (nLockTime < GetAdjustedTime()) return true; foreach(const CTxOut& txout, vout) if (!txout.IsFinal()) return false; return true; }
bool IsUpdate(const CTransaction& b) const { if (vin.size() != b.vin.size() || vout.size() != b.vout.size()) return false; for (int i = 0; i < vin.size(); i++) if (vin[i].prevout != b.vin[i].prevout) return false;
bool fNewer = false; unsigned int nLowest = UINT_MAX; for (int i = 0; i < vout.size(); i++) { if (vout[i].nSequence != b.vout[i].nSequence) { if (vout[i].nSequence <= nLowest) { fNewer = false; nLowest = vout[i].nSequence; } if (b.vout[i].nSequence < nLowest) { fNewer = true; nLowest = b.vout[i].nSequence; } } } return fNewer; }
bool IsCoinBase() const { return (vin.size() == 1 && vin[0].prevout.IsNull()); }
bool CheckTransaction() const { // Basic checks that don't depend on any context if (vin.empty() || vout.empty()) return false;
// Check for negative values int64 nValueOut = 0; foreach(const CTxOut& txout, vout) { if (txout.nValue < 0) return false; nValueOut += txout.nValue; }
if (IsCoinBase()) { if (vin[0].scriptSig.size() > 100) return false; } else { foreach(const CTxIn& txin, vin) if (txin.prevout.IsNull()) return false; }
return true; }
bool IsMine() const { foreach(const CTxOut& txout, vout) if (txout.IsMine()) return true; return false; }
int64 GetDebit() const { int64 nDebit = 0; foreach(const CTxIn& txin, vin) nDebit += txin.GetDebit(); return nDebit; }
int64 GetCredit() const { int64 nCredit = 0; foreach(const CTxOut& txout, vout) nCredit += txout.GetCredit(); return nCredit; }
int64 GetValueOut() const { int64 nValueOut = 0; foreach(const CTxOut& txout, vout) { if (txout.nValue < 0) throw runtime_error("CTransaction::GetValueOut() : negative value"); nValueOut += txout.nValue; } return nValueOut; }
bool ReadFromDisk(CDiskTxPos pos, FILE** pfileRet=NULL) { CAutoFile filein = OpenBlockFile(pos.nFile, 0, pfileRet ? "rb+" : "rb"); if (!filein) return false;
// Read transaction if (fseek(filein, pos.nTxPos, SEEK_SET) != 0) return false; filein >> *this;
// Return file pointer if (pfileRet) { if (fseek(filein, pos.nTxPos, SEEK_SET) != 0) return false; *pfileRet = filein.release(); } return true; }
friend bool operator==(const CTransaction& a, const CTransaction& b) { return (a.vin == b.vin && a.vout == b.vout && a.nLockTime == b.nLockTime); }
friend bool operator!=(const CTransaction& a, const CTransaction& b) { return !(a == b); }
void print() const { printf("CTransaction(vin.size=%d, vout.size=%d, nLockTime=%d)\n", vin.size(), vout.size(), nLockTime); for (int i = 0; i < vin.size(); i++) { printf(" "); vin[i].print(); } for (int i = 0; i < vout.size(); i++) { printf(" "); vout[i].print(); } }
bool TestDisconnectInputs(CTxDB& txdb, map& mapTestPool) { return DisconnectInputs(txdb, mapTestPool, true); }
bool TestConnectInputs(CTxDB& txdb, map& mapTestPool, bool fMemoryTx, bool fIgnoreDiskConflicts, int64& nFees) { return ConnectInputs(txdb, mapTestPool, CDiskTxPos(1, 1, 1), 0, true, fMemoryTx, fIgnoreDiskConflicts, nFees); }
bool DisconnectInputs(CTxDB& txdb) { static map mapTestPool; return DisconnectInputs(txdb, mapTestPool, false); }
bool ConnectInputs(CTxDB& txdb, CDiskTxPos posThisTx, int nHeight) { static map mapTestPool; int64 nFees; return ConnectInputs(txdb, mapTestPool, posThisTx, nHeight, false, false, false, nFees); }
private: bool DisconnectInputs(CTxDB& txdb, map& mapTestPool, bool fTest); bool ConnectInputs(CTxDB& txdb, map& mapTestPool, CDiskTxPos posThisTx, int nHeight, bool fTest, bool fMemoryTx, bool fIgnoreDiskConflicts, int64& nFees);
public: bool AcceptTransaction(CTxDB& txdb, bool fCheckInputs=true); bool AcceptTransaction() { CTxDB txdb("r"); return AcceptTransaction(txdb); } bool ClientConnectInputs(); };
// // A transaction with a merkle branch linking it to the timechain // class CMerkleTx : public CTransaction { public: uint256 hashBlock; vector vMerkleBranch; int nIndex;
CMerkleTx() { Init(); }
CMerkleTx(const CTransaction& txIn) : CTransaction(txIn) { Init(); }
void Init() { hashBlock = 0; nIndex = -1; }
IMPLEMENT_SERIALIZE ( nSerSize += SerReadWrite(s, (CTransaction)this, nType, nVersion, ser_action); if (!(nType & SER_GETHASH)) READWRITE(nVersion); READWRITE(hashBlock); READWRITE(vMerkleBranch); READWRITE(nIndex); )
int SetMerkleBranch(); int IsInMainChain() const; bool AcceptTransaction(CTxDB& txdb, bool fCheckInputs=true); bool AcceptTransaction() { CTxDB txdb("r"); return AcceptTransaction(txdb); } };
// // A transaction with a bunch of additional info that only the owner cares // about. It includes any unrecorded transactions needed to link it back // to the timechain. // class CWalletTx : public CMerkleTx { public: vector vtxPrev; map mapValue; vector > vOrderForm; unsigned int nTime; char fFromMe; char fSpent;
//// probably need to sign the order info so know it came from payer
CWalletTx() { Init(); }
CWalletTx(const CMerkleTx& txIn) : CMerkleTx(txIn) { Init(); }
CWalletTx(const CTransaction& txIn) : CMerkleTx(txIn) { Init(); }
void Init() { nTime = 0; fFromMe = false; fSpent = false; }
IMPLEMENT_SERIALIZE ( /// would be nice for it to return the version number it reads, maybe use a reference nSerSize += SerReadWrite(s, (CMerkleTx)this, nType, nVersion, ser_action); if (!(nType & SER_GETHASH)) READWRITE(nVersion); READWRITE(vtxPrev); READWRITE(mapValue); READWRITE(vOrderForm); READWRITE(nTime); READWRITE(fFromMe); READWRITE(fSpent); )
bool WriteToDisk() { return CWalletDB().WriteTx(GetHash(), *this); }
void AddSupportingTransactions(CTxDB& txdb); void AddSupportingTransactions() { CTxDB txdb("r"); AddSupportingTransactions(txdb); }
bool AcceptWalletTransaction(CTxDB& txdb, bool fCheckInputs=true); bool AcceptWalletTransaction() { CTxDB txdb("r"); return AcceptWalletTransaction(txdb); }
void RelayWalletTransaction(CTxDB& txdb); void RelayWalletTransaction() { CTxDB txdb("r"); RelayWalletTransaction(txdb); } };
// // Nodes collect new transactions into a block, hash them into a hash tree, // and scan through nonce values to make the block's hash satisfy proof-of-work // requirements. When they solve the proof-of-work, they broadcast the block // to everyone and the block is added to the timechain. The first transaction // in the block is a special one that creates a new coin owned by the creator // of the block. // // Blocks are appended to blk0001.dat files on disk. Their location on disk // is indexed by CBlockIndex objects in memory. // class CBlock { public: // header uint256 hashPrevBlock; uint256 hashMerkleRoot; unsigned int nTime; unsigned int nBits; unsigned int nNonce;
// network and disk vector vtx;
// memory only mutable vector vMerkleTree;
CBlock() { SetNull(); }
IMPLEMENT_SERIALIZE ( if (!(nType & SER_GETHASH)) READWRITE(nVersion); READWRITE(hashPrevBlock); READWRITE(hashMerkleRoot); READWRITE(nTime); READWRITE(nBits); READWRITE(nNonce);
// ConnectBlock depends on vtx being last so it can calculate offset if (!(nType & (SER_GETHASH|SER_BLOCKHEADERONLY))) READWRITE(vtx); else if (fRead) const_cast(this)->vtx.clear(); )
void SetNull() { hashPrevBlock = 0; hashMerkleRoot = 0; nTime = 0; nBits = 0; nNonce = 0; vtx.clear(); vMerkleTree.clear(); }
bool IsNull() const { return (nBits == 0); }
uint256 GetHash() const { return Hash(BEGIN(hashPrevBlock), END(nNonce)); }
uint256 BuildMerkleTree() const { vMerkleTree.clear(); foreach(const CTransaction& tx, vtx) vMerkleTree.push_back(tx.GetHash()); int j = 0; for (int nSize = vtx.size(); nSize > 1; nSize = (nSize + 1) / 2) { for (int i = 0; i < nSize; i += 2) { int i2 = min(i+1, nSize-1); vMerkleTree.push_back(Hash(BEGIN(vMerkleTree[j+i]), END(vMerkleTree[j+i]), BEGIN(vMerkleTree[j+i2]), END(vMerkleTree[j+i2]))); } j += nSize; } return (vMerkleTree.empty() ? 0 : vMerkleTree.back()); }
vector GetMerkleBranch(int nIndex) const { if (vMerkleTree.empty()) BuildMerkleTree(); vector vMerkleBranch; int j = 0; for (int nSize = vtx.size(); nSize > 1; nSize = (nSize + 1) / 2) { int i = min(nIndex1, nSize-1); vMerkleBranch.push_back(vMerkleTree[j+i]); nIndex >>= 1; j += nSize; } return vMerkleBranch; }
static uint256 CheckMerkleBranch(uint256 hash, const vector& vMerkleBranch, int nIndex) { foreach(const uint256& otherside, vMerkleBranch) { if (nIndex & 1) hash = Hash(BEGIN(otherside), END(otherside), BEGIN(hash), END(hash)); else hash = Hash(BEGIN(hash), END(hash), BEGIN(otherside), END(otherside)); nIndex >>= 1; } return hash; }
bool WriteToDisk(bool fWriteTransactions, unsigned int& nFileRet, unsigned int& nBlockPosRet) { // Open history file to append CAutoFile fileout = AppendBlockFile(nFileRet); if (!fileout) return false; if (!fWriteTransactions) fileout.nType |= SER_BLOCKHEADERONLY;
// Write index header unsigned int nSize = fileout.GetSerializeSize(*this); fileout << FLATDATA(pchMessageStart) << nSize;
// Write block nBlockPosRet = ftell(fileout); if (nBlockPosRet == -1) return false; fileout << *this;
return true; }
bool ReadFromDisk(unsigned int nFile, unsigned int nBlockPos, bool fReadTransactions) { SetNull();
// Open history file to read CAutoFile filein = OpenBlockFile(nFile, nBlockPos, "rb"); if (!filein) return false; if (!fReadTransactions) filein.nType |= SER_BLOCKHEADERONLY;
// Read block filein >> *this;
// Check the header if (nBits < MINPROOFOFWORK || GetHash() > (~uint256(0) >> nBits)) return error("CBlock::ReadFromDisk : errors in block header");
return true; }
void print() const { printf("CBlock(hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%u, nNonce=%u, vtx=%d)\n", hashPrevBlock.ToString().substr(0,6).c_str(), hashMerkleRoot.ToString().substr(0,6).c_str(), nTime, nBits, nNonce, vtx.size()); for (int i = 0; i < vtx.size(); i++) { printf(" "); vtx[i].print(); } printf(" vMerkleTree: "); for (int i = 0; i < vMerkleTree.size(); i++) printf("%s ", vMerkleTree[i].ToString().substr(0,6).c_str()); printf("\n"); }
bool ReadFromDisk(const CBlockIndex* blockindex, bool fReadTransactions); bool TestDisconnectBlock(CTxDB& txdb, map& mapTestPool); bool TestConnectBlock(CTxDB& txdb, map& mapTestPool); bool DisconnectBlock(); bool ConnectBlock(unsigned int nFile, unsigned int nBlockPos, int nHeight); bool AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos, bool fWriteDisk); bool CheckBlock() const; bool AcceptBlock(); };
// // The timechain is a tree shaped structure starting with the // genesis block at the root, with each block potentially having multiple // candidates to be the next block. pprev and pnext link a path through the // main/longest chain. A blockindex may have multiple pprev pointing back // to it, but pnext will only point forward to the longest branch, or will // be null if the block is not part of the longest chain. // class CBlockIndex { public: CBlockIndex* pprev; CBlockIndex* pnext; unsigned int nFile; unsigned int nBlockPos; int nHeight;
CBlockIndex() { pprev = NULL; pnext = NULL; nFile = 0; nBlockPos = 0; nHeight = 0; }
CBlockIndex(unsigned int nFileIn, unsigned int nBlockPosIn) { pprev = NULL; pnext = NULL; nFile = nFileIn; nBlockPos = nBlockPosIn; nHeight = 0; }
bool IsInMainChain() const { return (pnext || this == pindexBest); }
bool EraseBlockFromDisk() { // Open history file CAutoFile fileout = OpenBlockFile(nFile, nBlockPos, "rb+"); if (!fileout) return false;
// Overwrite with empty null block CBlock block; block.SetNull(); fileout << block;
return true; }
bool TestDisconnectBlock(CTxDB& txdb, map& mapTestPool) { CBlock block; if (!block.ReadFromDisk(nFile, nBlockPos, true)) return false; return block.TestDisconnectBlock(txdb, mapTestPool); }
bool TestConnectBlock(CTxDB& txdb, map& mapTestPool) { CBlock block; if (!block.ReadFromDisk(nFile, nBlockPos, true)) return false; return block.TestConnectBlock(txdb, mapTestPool); }
bool DisconnectBlock() { CBlock block; if (!block.ReadFromDisk(nFile, nBlockPos, true)) return false; return block.DisconnectBlock(); }
bool ConnectBlock() { CBlock block; if (!block.ReadFromDisk(nFile, nBlockPos, true)) return false; return block.ConnectBlock(nFile, nBlockPos, nHeight); }
void print() const { printf("CBlockIndex(nprev=%08x, pnext=%08x, nFile=%d, nBlockPos=%d, nHeight=%d)\n", pprev, pnext, nFile, nBlockPos, nHeight); } };
void PrintTimechain();
// // Describes a place in the timechain to another node such that if the // other node doesn't have the same branch, it can find a recent common trunk. // The further back it is, the further before the branch point it may be. // class CBlockLocator { protected: vector vHave; public:
CBlockLocator() { }
explicit CBlockLocator(const CBlockIndex* pindex) { Set(pindex); }
explicit CBlockLocator(uint256 hashBlock) { map::iterator mi = mapBlockIndex.find(hashBlock); if (mi != mapBlockIndex.end()) Set((*mi).second); }
IMPLEMENT_SERIALIZE ( if (!(nType & SER_GETHASH)) READWRITE(nVersion); READWRITE(vHave); )
void Set(const CBlockIndex* pindex) { vHave.clear(); int nStep = 1; while (pindex) { CBlock block; block.ReadFromDisk(pindex, false); vHave.push_back(block.GetHash());
// Exponentially larger steps back for (int i = 0; pindex && i < nStep; i++) pindex = pindex->pprev; if (vHave.size() > 10) nStep *= 2; } }
CBlockIndex* GetBlockIndex() { // Find the first block the caller has in the main chain foreach(const uint256& hash, vHave) { map::iterator mi = mapBlockIndex.find(hash); if (mi != mapBlockIndex.end()) { CBlockIndex* pindex = (*mi).second; if (pindex->IsInMainChain()) return pindex; } } return pindexGenesisBlock; }
uint256 GetBlockHash() { // Find the first block the caller has in the main chain foreach(const uint256& hash, vHave) { map::iterator mi = mapBlockIndex.find(hash); if (mi != mapBlockIndex.end()) { CBlockIndex* pindex = (*mi).second; if (pindex->IsInMainChain()) return hash; } } return hashGenesisBlock; }
int GetHeight() { CBlockIndex* pindex = GetBlockIndex(); if (!pindex) return 0; return pindex->nHeight; } };
extern map mapTransactions; extern map mapWallet; extern vector > vWalletUpdated; extern CCriticalSection cs_mapWallet; extern map, CPrivKey> mapKeys; extern map > mapPubKeys; extern CCriticalSection cs_mapKeys; extern CKey keyUser;
'''
Read this went the opposite way
Go1dfish undelete link
unreddit undelete link
Author: fukya40
submitted by removalbot to removalbot [link] [comments]

block confirmation rules

First time, long time here...I love bitcoin. I used to mine around 2013 on my gtx480, earned enough to play some satoshi dice every couple days, just to play until i lost it all. honestly, it was fun at the time. One day I had enough and just zipped it into password-i-can-no-longer-remember file and the rest is history. my latest foray into bitcoin has since focused on the keeping-them-secure side of things. (love that trezor). Anyway, here's the question-
How would one manually calculate the hash-- using a sha-256 calculator, or something of that ilk -- in order to confirm the work of the latest block?
My understanding is that the header with all the transactions and such is hashed with a nonce in order to get a hashed value under a certain amount of zero's, depending on network difficulty. Therefore, all anyone needs to do is compute the the header hash for themselves and confirm the hash number (along with the obvious other rules of ensuring all TX's have enough balance, coinbase fee is per protocol, etc.)
This all could be nonsense, I have zero programming knowledge.
submitted by jabdrw15a to Bitcoin [link] [comments]

Bitcoin is even bulletproof against time-travelers

Noone can go back in time and bring a lot of coins to or from future.
This is somewhat awesome..
submitted by halloweenlv to Bitcoin [link] [comments]

Searching for the Unicorn Cryptocurrency

Searching for the Unicorn Cryptocurrency
For someone first starting out as a cryptocurrency investor, finding a trustworthy manual for screening a cryptocurrency’s merits is nonexistent as we are still in the early, Wild West days of the cryptocurrency market. One would need to become deeply familiar with the inner workings of blockchain to be able to perform the bare minimum due diligence.
One might believe, over time, that finding the perfect cryptocurrency may be nothing short of futile. If a cryptocurrency purports infinite scalability, then it is probably either lightweight with limited features or it is highly centralized among a limited number of nodes that perform consensus services especially Proof of Stake or Delegated Proof of Stake. Similarly, a cryptocurrency that purports comprehensive privacy may have technical obstacles to overcome if it aims to expand its applications such as in smart contracts. The bottom line is that it is extremely difficult for a cryptocurrency to have all important features jam-packed into itself.
The cryptocurrency space is stuck in the era of the “dial-up internet” in a manner of speaking. Currently blockchain can’t scale – not without certain tradeoffs – and it hasn’t fully resolved certain intractable issues such as user-unfriendly long addresses and how the blockchain size is forever increasing to name two.
In other words, we haven’t found the ultimate cryptocurrency. That is, we haven’t found the mystical unicorn cryptocurrency that ushers the era of decentralization while eschewing all the limitations of traditional blockchain systems.
“But wait – what about Ethereum once it implements sharding?”
“Wouldn’t IOTA be able to scale infinitely with smart contracts through its Qubic offering?”
“Isn’t Dash capable of having privacy, smart contracts, and instantaneous transactions?”
Those thoughts and comments may come from cryptocurrency investors who have done their research. It is natural for the informed investors to invest in projects that are believed to bring cutting edge technological transformation to blockchain. Sooner or later, the sinking realization will hit that any variation of the current blockchain technology will always likely have certain limitations.
Let us pretend that there indeed exists a unicorn cryptocurrency somewhere that may or may not be here yet. What would it look like, exactly? Let us set the 5 criteria of the unicorn cryptocurrency:
Unicorn Criteria
(1) Perfectly solves the blockchain trilemma:
o Infinite scalability
o Full security
o Full decentralization
(2) Zero or minimal transaction fee
(3) Full privacy
(4) Full smart contract capabilities
(5) Fair distribution and fair governance
For each of the above 5 criteria, there would not be any middle ground. For example, a cryptocurrency with just an in-protocol mixer would not be considered as having full privacy. As another example, an Initial Coin Offering (ICO) may possibly violate criterion (5) since with an ICO the distribution and governance are often heavily favored towards an oligarchy – this in turn would defy the spirit of decentralization that Bitcoin was found on.
There is no cryptocurrency currently that fits the above profile of the unicorn cryptocurrency. Let us examine an arbitrary list of highly hyped cryptocurrencies that meet the above list at least partially. The following list is by no means comprehensive but may be a sufficient sampling of various blockchain implementations:
Bitcoin (BTC)
Bitcoin is the very first and the best known cryptocurrency that started it all. While Bitcoin is generally considered extremely secure, it suffers from mining centralization to a degree. Bitcoin is not anonymous, lacks smart contracts, and most worrisomely, can only do about 7 transactions per seconds (TPS). Bitcoin is not the unicorn notwithstanding all the Bitcoin maximalists.
Ethereum (ETH)
Ethereum is widely considered the gold standard of smart contracts aside from its scalability problem. Sharding as part of Casper’s release is generally considered to be the solution to Ethereum’s scalability problem.
The goal of sharding is to split up validating responsibilities among various groups or shards. Ethereum’s sharding comes down to duplicating the existing blockchain architecture and sharing a token. This does not solve the core issue and simply kicks the can further down the road. After all, full nodes still need to exist one way or another.
Ethereum’s blockchain size problem is also an issue as will be explained more later in this article.
As a result, Ethereum is not the unicorn due to its incomplete approach to scalability and, to a degree, security.
Dash
Dash’s masternodes are widely considered to be centralized due to their high funding requirements, and there are accounts of a pre-mine in the beginning. Dash is not the unicorn due to its questionable decentralization.
Nano
Nano boasts rightfully for its instant, free transactions. But it lacks smart contracts and privacy, and it may be exposed to well orchestrated DDOS attacks. Therefore, it goes without saying that Nano is not the unicorn.
EOS
While EOS claims to execute millions of transactions per seconds, a quick glance reveals centralized parameters with 21 nodes and a questionable governance system. Therefore, EOS fails to achieve the unicorn status.
Monero (XMR)
One of the best known and respected privacy coins, Monero lacks smart contracts and may fall short of infinite scalability due to CryptoNote’s design. The unicorn rank is out of Monero’s reach.
IOTA
IOTA’s scalability is based on the number of transactions the network processes, and so its supposedly infinite scalability would fluctuate and is subject to the whims of the underlying transactions. While IOTA’s scalability approach is innovative and may work in the long term, it should be reminded that the unicorn cryptocurrency has no middle ground. The unicorn cryptocurrency would be expected to scale infinitely on a consistent basis from the beginning.
In addition, IOTA’s Masked Authenticated Messaging (MAM) feature does not bring privacy to the masses in a highly convenient manner. Consequently, the unicorn is not found with IOTA.

PascalCoin as a Candidate for the Unicorn Cryptocurrency
Please allow me to present a candidate for the cryptocurrency unicorn: PascalCoin.
According to the website, PascalCoin claims the following:
“PascalCoin is an instant, zero-fee, infinitely scalable, and decentralized cryptocurrency with advanced privacy and smart contract capabilities. Enabled by the SafeBox technology to become the world’s first blockchain independent of historical operations, PascalCoin possesses unlimited potential.”
The above summary is a mouthful to be sure, but let’s take a deep dive on how PascalCoin innovates with the SafeBox and more. Before we do this, I encourage you to first become acquainted with PascalCoin by watching the following video introduction:
https://www.youtube.com/watch?time_continue=4&v=F25UU-0W9Dk
The rest of this section will be split into 10 parts in order to illustrate most of the notable features of PascalCoin. Naturally, let’s start off with the SafeBox.
Part #1: The SafeBox
Unlike traditional UTXO-based cryptocurrencies in which the blockchain records the specifics of each transaction (address, sender address, amount of funds transferred, etc.), the blockchain in PascalCoin is only used to mutate the SafeBox. The SafeBox is a separate but equivalent cryptographic data structure that snapshots account balances. PascalCoin’s blockchain is comparable to a machine that feeds the most important data – namely, the state of an account – into the SafeBox. Any node can still independently compute and verify the cumulative Proof-of-Work required to construct the SafeBox.
The PascalCoin whitepaper elegantly highlights the unique historical independence that the SafeBox possesses:
“While there are approaches that cryptocurrencies could use such as pruning, warp-sync, "finality checkpoints", UTXO-snapshotting, etc, there is a fundamental difference with PascalCoin. Their new nodes can only prove they are on most-work-chain using the infinite history whereas in PascalCoin, new nodes can prove they are on the most-work chain without the infinite history.”
Some cryptocurrency old-timers might instinctively balk at the idea of full nodes eschewing the entire history for security, but such a reaction would showcase a lack of understanding on what the SafeBox really does.
A concrete example would go a long way to best illustrate what the SafeBox does. Let’s say I input the following operations in my calculator:
5 * 5 – 10 / 2 + 5
It does not take a genius to calculate the answer, 25. Now, the expression “5 \ 5 – 10 / 2 + 5”* would be forever imbued on a traditional blockchain’s history. But the SafeBox begs to differ. It says that the expression “5 \ 5 – 10 / 2 + 5”* should instead be simply “25” so as preserve simplicity, time, and space. In other words, the SafeBox simply preserves the account balance.
But some might still be unsatisfied and claim that if one cannot trace the series of operations (transactions) that lead to the final number (balance) of 25, the blockchain is inherently insecure.
Here are four important security aspects of the SafeBox that some people fail to realize:
(1) SafeBox Follows the Longest Chain of Proof-of-Work
The SafeBox mutates itself per 100 blocks. Each new SafeBox mutation must reference both to the previous SafeBox mutation and the preceding 100 blocks in order to be valid, and the resultant hash of the new mutated SafeBox must then be referenced by each of the new subsequent blocks, and the process repeats itself forever.
The fact that each new SafeBox mutation must reference to the previous SafeBox mutation is comparable to relying on the entire history. This is because the previous SafeBox mutation encapsulates the result of cumulative entire history except for the 100 blocks which is why each new SafeBox mutation requires both the previous SafeBox mutation and the preceding 100 blocks.
So in a sense, there is a single interconnected chain of inflows and outflows, supported by Byzantine Proof-of-Work consensus, instead of the entire history of transactions.
More concretely, the SafeBox follows the path of the longest chain of Proof-of-Work simply by design, and is thus cryptographically equivalent to the entire history even without tracing specific operations in the past. If the chain is rolled back with a 51% attack, only the attacker’s own account(s) in the SafeBox can be manipulated as is explained in the next part.
(2) A 51% Attack on PascalCoin Functions the Same as Others
A 51% attack on PascalCoin would work in a similar way as with other Proof-of-Work cryptocurrencies. An attacker cannot modify a transaction in the past without affecting the current SafeBox hash which is accepted by all honest nodes.
Someone might claim that if you roll back all the current blocks plus the 100 blocks prior to the SafeBox’s mutation, one could create a forged SafeBox with different balances for all accounts. This would be incorrect as one would be able to manipulate only his or her own account(s) in the SafeBox with a 51% attack – just as is the case with other UTXO cryptocurrencies. The SafeBox stores the balances of all accounts which are in turn irreversibly linked only to their respective owners’ private keys.
(3) One Could Preserve the Entire History of the PascalCoin Blockchain
No blockchain data in PascalCoin is ever deleted even in the presence of the SafeBox. Since the SafeBox is cryptographically equivalent to a full node with the entire history as explained above, PascalCoin full nodes are not expected to contain infinite history. But for whatever reason(s) one may have, one could still keep all the PascalCoin blockchain history as well along with the SafeBox as an option even though it would be redundant.
Without storing the entire history of the PascalCoin blockchain, you can still trace the specific operations of the 100 blocks prior to when the SafeBox absorbs and reflects the net result (a single balance for each account) from those 100 blocks. But if you’re interested in tracing operations over a longer period in the past – as redundant as that may be – you’d have the option to do so by storing the entire history of the PascalCoin blockchain.
(4) The SafeBox is Equivalent to the Entire Blockchain History
Some skeptics may ask this question: “What if the SafeBox is forever lost? How would you be able to verify your accounts?” Asking this question is tantamount to asking to what would happen to Bitcoin if all of its entire history was erased. The result would be chaos, of course, but the SafeBox is still in line with the general security model of a traditional blockchain with respect to black swans.
Now that we know the security of the SafeBox is not compromised, what are the implications of this new blockchain paradigm? A colorful illustration as follows still wouldn’t do justice to the subtle revolution that the SafeBox ushers. The automobiles we see on the street are the cookie-and-butter representation of traditional blockchain systems. The SafeBox, on the other hand, supercharges those traditional cars to become the Transformers from Michael Bay’s films.
The SafeBox is an entirely different blockchain architecture that is impressive in its simplicity and ingenuity. The SafeBox’s design is only the opening act for PascalCoin’s vast nuclear arsenal. If the above was all that PascalCoin offers, it still wouldn’t come close to achieving the unicorn status but luckily, we have just scratched the surface. Please keep on reading on if you want to learn how PascalCoin is going to shatter the cryptocurrency industry into pieces. Buckle down as this is going to be a long read as we explore further about the SafeBox’s implications.
Part #2: 0-Confirmation Transactions
To begin, 0-confirmation transactions are secure in PascalCoin thanks to the SafeBox.
The following paraphrases an explanation of PascalCoin’s 0-confirmations from the whitepaper:
“Since PascalCoin is not a UTXO-based currency but rather a State-based currency thanks to the SafeBox, the security guarantee of 0-confirmation transactions are much stronger than in UTXO-based currencies. For example, in Bitcoin if a merchant accepts a 0-confirmation transaction for a coffee, the buyer can simply roll that transaction back after receiving the coffee but before the transaction is confirmed in a block. The way the buyer does this is by re-spending those UTXOs to himself in a new transaction (with a higher fee) thus invalidating them for the merchant. In PascalCoin, this is virtually impossible since the buyer's transaction to the merchant is simply a delta-operation to debit/credit a quantity from/to accounts respectively. The buyer is unable to erase or pre-empt this two-sided, debit/credit-based transaction from the network’s pending pool until it either enters a block for confirmation or is discarded with respect to both sender and receiver ends. If the buyer tries to double-spend the coffee funds after receiving the coffee but before they clear, the double-spend transaction will not propagate the network since nodes cannot propagate a double-spending transaction thanks to the debit/credit nature of the transaction. A UTXO-based transaction is initially one-sided before confirmation and therefore is more exposed to one-sided malicious schemes of double spending.”
Phew, that explanation was technical but it had to be done. In summary, PascalCoin possesses the only secure 0-confirmation transactions in the cryptocurrency industry, and it goes without saying that this means PascalCoin is extremely fast. In fact, PascalCoin is capable of 72,000 TPS even prior to any additional extensive optimizations down the road. In other words, PascalCoin is as instant as it gets and gives Nano a run for its money.
Part #3: Zero Fee
Let’s circle back to our discussion of PascalCoin’s 0-confirmation capability. Here’s a little fun magical twist to PascalCoin’s 0-confirmation magic: 0-confirmation transactions are zero-fee. As in you don’t pay a single cent in fee for each 0-confirmation! There is just a tiny downside: if you create a second transaction in a 5-minute block window then you’d need to pay a minimal fee. Imagine using Nano but with a significantly stronger anti-DDOS protection for spam! But there shouldn’t be any complaint as this fee would amount to 0.0001 Pascal or $0.00002 based on the current price of a Pascal at the time of this writing.
So, how come the fee for blazingly fast transactions is nonexistent? This is where the magic of the SafeBox arises in three ways:
(1) PascalCoin possesses the secure 0-confirmation feature as discussed above that enables this speed.
(2) There is no fee bidding competition of transaction priority typical in UTXO cryptocurrencies since, once again, PascalCoin operates on secure 0-confirmations.
(3) There is no fee incentive needed to run full nodes on behalf of the network’s security beyond the consensus rewards.
Part #4: Blockchain Size
Let’s expand more on the third point above, using Ethereum as an example. Since Ethereum’s launch in 2015, its full blockchain size is currently around 2 TB, give or take, but let’s just say its blockchain size is 100 GB for now to avoid offending the Ethereum elitists who insist there are different types of full nodes that are lighter. Whoever runs Ethereum’s full nodes would expect storage fees on top of the typical consensus fees as it takes significant resources to shoulder Ethereum’s full blockchain size and in turn secure the network. What if I told you that PascalCoin’s full blockchain size will never exceed few GBs after thousands of years? That is just what the SafeBox enables PascalCoin to do so. It is estimated that by 2072, PascalCoin’s full nodes will only be 6 GB which is low enough not to warrant any fee incentives for hosting full nodes. Remember, the SafeBox is an ultra-light cryptographic data structure that is cryptographically equivalent to a blockchain with the entire transaction history. In other words, the SafeBox is a compact spreadsheet of all account balances that functions as PascalCoin’s full node!
Not only does the SafeBox’s infinitesimal memory size helps to reduce transaction fees by phasing out any storage fees, but it also paves the way for true decentralization. It would be trivial for every PascalCoin user to opt a full node in the form of a wallet. This is extreme decentralization at its finest since the majority of users of other cryptocurrencies ditch full nodes due to their burdensome sizes. It is naïve to believe that storage costs would reduce enough to the point where hosting full nodes are trivial. Take a look at the following chart outlining the trend of storage cost.

* https://www.backblaze.com/blog/hard-drive-cost-per-gigabyte/
As we can see, storage costs continue to decrease but the descent is slowing down as is the norm with technological improvements. In the meantime, blockchain sizes of other cryptocurrencies are increasing linearly or, in the case of smart contract engines like Ethereum, parabolically. Imagine a cryptocurrency smart contract engine like Ethereum garnering worldwide adoption; how do you think Ethereum’s size would look like in the far future based on the following chart?


https://i.redd.it/k57nimdjmo621.png

Ethereum’s future blockchain size is not looking pretty in terms of sustainable security. Sharding is not a fix for this issue since there still needs to be full nodes but that is a different topic for another time.
It is astonishing that the cryptocurrency community as a whole has passively accepted this forever-expanding-blockchain-size problem as an inescapable fate.
PascalCoin is the only cryptocurrency that has fully escaped the death vortex of forever expanding blockchain size. Its blockchain size wouldn’t exceed 10 GB even after many hundreds of years of worldwide adoption. Ethereum’s blockchain size after hundreds of years of worldwide adoption would make fine comedy.
Part #5: Simple, Short, and Ordinal Addresses
Remember how the SafeBox works by snapshotting all account balances? As it turns out, the account address system is almost as cool as the SafeBox itself.
Imagine yourself in this situation: on a very hot and sunny day, you’re wandering down the street across from your house and ran into a lemonade stand – the old-fashioned kind without any QR code or credit card terminal. The kid across you is selling a lemonade cup for 1 Pascal with a poster outlining the payment address as 5471-55. You flip out your phone and click “Send” with 1 Pascal to the address 5471-55; viola, exactly one second later you’re drinking your lemonade without paying a cent for the transaction fee!
The last thing one wants to do is to figure out how to copy/paste to, say, the following address 1BoatSLRHtKNngkdXEeobR76b53LETtpyT on the spot wouldn’t it? Gone are the obnoxiously long addresses that plague all cryptocurrencies. The days of those unreadable addresses will be long gone – it has to be if blockchain is to innovate itself for the general public. EOS has a similar feature for readable addresses but in a very limited manner in comparison, and nicknames attached to addresses in GUIs don’t count since blockchain-wide compatibility wouldn’t hold.
Not only does PascalCoin has the neat feature of having addresses (called PASAs) that amount to up to 6 or 7 digits, but PascalCoin can also incorporate in-protocol address naming as opposed to GUI address nicknames. Suppose I want to order something from Amazon using Pascal; I simply search the word “Amazon” then the corresponding account number shows up. Pretty neat, right?
The astute reader may gather that PascalCoin’s address system makes it necessary to commoditize addresses, and he/she would be correct. Some view this as a weakness; part #10 later in this segment addresses this incorrect perception.
Part #6: Privacy
As if the above wasn’t enough, here’s another secret that PascalCoin has: it is a full-blown privacy coin. It uses two separate foundations to achieve comprehensive anonymity: in-protocol mixer for transfer amounts and zn-SNARKs for private balances. The former has been implemented and the latter is on the roadmap. Both the 0-confirmation transaction and the negligible transaction fee would make PascalCoin the most scalable privacy coin of any other cryptocurrencies pending the zk-SNARKs implementation.
Part #7: Smart Contracts
Next, PascalCoin will take smart contracts to the next level with a layer-2 overlay consensus system that pioneers sidechains and other smart contract implementations.
In formal terms, this layer-2 architecture will facilitate the transfer of data between PASAs which in turn allows clean enveloping of layer-2 protocols inside layer-1 much in the same way that HTTP lives inside TCP.
To summarize:
· The layer-2 consensus method is separate from the layer-1 Proof-of-Work. This layer-2 consensus method is independent and flexible. A sidechain – based on a single encompassing PASA – could apply Proof-of-Stake (POS), Delegated Proof-of-Stake (DPOS), or Directed Acyclic Graph (DAG) as the consensus system of its choice.
· Such a layer-2 smart contract platform can be written in any languages.
· Layer-2 sidechains will also provide very strong anonymity since funds are all pooled and keys are not used to unlock them.
· This layer-2 architecture is ingenious in which the computation is separate from layer-2 consensus, in effect removing any bottleneck.
· Horizontal scaling exists in this paradigm as there is no interdependence between smart contracts and states are not managed by slow sidechains.
· Speed and scalability are fully independent of PascalCoin.
One would be able to run the entire global financial system on PascalCoin’s infinitely scalable smart contract platform and it would still scale infinitely. In fact, this layer-2 architecture would be exponentially faster than Ethereum even after its sharding is implemented.
All this is the main focus of PascalCoin’s upcoming version 5 in 2019. A whitepaper add-on for this major upgrade will be released in early 2019.
Part #8: RandomHash Algorithm
Surely there must be some tradeoffs to PascalCoin’s impressive capabilities, you might be asking yourself. One might bring up the fact that PascalCoin’s layer-1 is based on Proof-of-Work and is thus susceptible to mining centralization. This would be a fallacy as PascalCoin has pioneered the very first true ASIC, GPU, and dual-mining resistant algorithm known as RandomHash that obliterates anything that is not CPU based and gives all the power back to solo miners.
Here is the official description of RandomHash:
“RandomHash is a high-level cryptographic hash algorithm that combines other well-known hash primitives in a highly serial manner. The distinguishing feature is that calculations for a nonce are dependent on partial calculations of other nonces, selected at random. This allows a serial hasher (CPU) to re-use these partial calculations in subsequent mining saving 50% or more of the work-load. Parallel hashers (GPU) cannot benefit from this optimization since the optimal nonce-set cannot be pre-calculated as it is determined on-the-fly. As a result, parallel hashers (GPU) are required to perform the full workload for every nonce. Also, the algorithm results in 10x memory bloat for a parallel implementation. In addition to its serial nature, it is branch-heavy and recursive making in optimal for CPU-only mining.”
One might be understandably skeptical of any Proof-of-Work algorithm that solves ASIC and GPU centralization once for all because there have been countless proposals being thrown around for various algorithms since the dawn of Bitcoin. Is RandomHash truly the ASIC & GPU killer that it claims to be?
Herman Schoenfeld, the inventor behind RandomHash, described his algorithm in the following:
“RandomHash offers endless ASIC-design breaking surface due to its use of recursion, hash algo selection, memory hardness and random number generation.
For example, changing how round hash selection is made and/or random number generator algo and/or checksum algo and/or their sequencing will totally break an ASIC design. Conceptually if you can significantly change the structure of the output assembly whilst keeping the high-level algorithm as invariant as possible, the ASIC design will necessarily require proportional restructuring. This results from the fact that ASIC designs mirror the ASM of the algorithm rather than the algorithm itself.”
Polyminer1 (pseudonym), one of the members of the PascalCoin core team who developed RHMiner (official software for mining RandomHash), claimed as follows:
“The design of RandomHash is, to my experience, a genuine innovation. I’ve been 30 years in the field. I’ve rarely been surprised by anything. RandomHash was one of my rare surprises. It’s elegant, simple, and achieves resistance in all fronts.”
PascalCoin may have been the first party to achieve the race of what could possibly be described as the “God algorithm” for Proof-of-Work cryptocurrencies. Look no further than one of Monero’s core developers since 2015, Howard Chu. In September 2018, Howard declared that he has found a solution, called RandomJS, to permanently keep ASICs off the network without repetitive algorithm changes. This solution actually closely mirrors RandomHash’s algorithm. Discussing about his algorithm, Howard asserted that “RandomJS is coming at the problem from a direction that nobody else is.”
Link to Howard Chu’s article on RandomJS:
https://www.coindesk.com/one-musicians-creative-solution-to-drive-asics-off-monero
Yet when Herman was asked about Howard’s approach, he responded:
“Yes, looks like it may work although using Javascript was a bit much. They should’ve just used an assembly subset and generated random ASM programs. In a way, RandomHash does this with its repeated use of random mem-transforms during expansion phase.”
In the end, PascalCoin may have successfully implemented the most revolutionary Proof-of-Work algorithm, one that eclipses Howard’s burgeoning vision, to date that almost nobody knows about. To learn more about RandomHash, refer to the following resources:
RandomHash whitepaper:
https://www.pascalcoin.org/storage/whitepapers/RandomHash_Whitepaper.pdf
Technical proposal for RandomHash:
https://github.com/PascalCoin/PascalCoin/blob/mastePIP/PIP-0009.md
Someone might claim that PascalCoin still suffers from mining centralization after RandomHash, and this is somewhat misleading as will be explained in part #10.
Part #9: Fair Distribution and Governance
Not only does PascalCoin rest on superior technology, but it also has its roots in the correct philosophy of decentralized distribution and governance. There was no ICO or pre-mine, and the developer fund exists as a percentage of mining rewards as voted by the community. This developer fund is 100% governed by a decentralized autonomous organization – currently facilitated by the PascalCoin Foundation – that will eventually be transformed into an autonomous smart contract platform. Not only is the developer fund voted upon by the community, but PascalCoin’s development roadmap is also voted upon the community via the Protocol Improvement Proposals (PIPs).
This decentralized governance also serves an important benefit as a powerful deterrent to unseemly fork wars that befall many cryptocurrencies.
Part #10: Common Misconceptions of PascalCoin
“The branding is terrible”
PascalCoin is currently working very hard on its image and is preparing for several branding and marketing initiatives in the short term. For example, two of the core developers of the PascalCoin recently interviewed with the Fox Business Network. A YouTube replay of this interview will be heavily promoted.
Some people object to the name PascalCoin. First, it’s worth noting that PascalCoin is the name of the project while Pascal is the name of the underlying currency. Secondly, Google and YouTube received excessive criticisms back then in the beginning with their name choices. Look at where those companies are nowadays – surely a somewhat similar situation faces PascalCoin until the name’s familiarity percolates into the public.
“The wallet GUI is terrible”
As the team is run by a small yet extremely dedicated developers, multiple priorities can be challenging to juggle. The lack of funding through an ICO or a pre-mine also makes it challenging to accelerate development. The top priority of the core developers is to continue developing full-time on the groundbreaking technology that PascalCoin offers. In the meantime, an updated and user-friendly wallet GUI has been worked upon for some time and will be released in due time. Rome wasn’t built in one day.
“One would need to purchase a PASA in the first place”
This is a complicated topic since PASAs need to be commoditized by the SafeBox’s design, meaning that PASAs cannot be obtained at no charge to prevent systematic abuse. This raises two seemingly valid concerns:
· As a chicken and egg problem, how would one purchase a PASA using Pascal in the first place if one cannot obtain Pascal without a PASA?
· How would the price of PASAs stay low and affordable in the face of significant demand?
With regards to the chicken and egg problem, there are many ways – some finished and some unfinished – to obtain your first PASA as explained on the “Get Started” page on the PascalCoin website:
https://www.pascalcoin.org/get_started
More importantly, however, is the fact that there are few methods that can get your first PASA for free. The team will also release another method soon in which you could obtain your first PASA for free via a single SMS message. This would probably become by far the simplest and the easiest way to obtain your first PASA for free. There will be more new ways to easily obtain your first PASA for free down the road.
What about ensuring the PASA market at large remains inexpensive and affordable following your first (and probably free) PASA acquisition? This would be achieved in two ways:
· Decentralized governance of the PASA economics per the explanation in the FAQ section on the bottom of the PascalCoin website (https://www.pascalcoin.org/)
· Unlimited and free pseudo-PASAs based on layer-2 in the next version release.
“PascalCoin is still centralized after the release of RandomHash”
Did the implementation of RandomHash from version 4 live up to its promise?
The official goals of RandomHash were as follow:
(1) Implement a GPU & ASIC resistant hash algorithm
(2) Eliminate dual mining
The two goals above were achieved by every possible measure.
Yet a mining pool, Nanopool, was able to regain its hash majority after a significant but a temporary dip.
The official conclusion is that, from a probabilistic viewpoint, solo miners are more profitable than pool miners. However, pool mining is enticing for solo miners who 1) have limited hardware as it ensures a steady income instead of highly profitable but probabilistic income via solo mining, and 2) who prefer convenient software and/or GUI.
What is the next step, then? While the barrier of entry for solo miners has successfully been put down, additional work needs to be done. The PascalCoin team and the community are earnestly investigating additional steps to improve mining decentralization with respect to pool mining specifically to add on top of RandomHash’s successful elimination of GPU, ASIC, and dual-mining dominance.
It is likely that the PascalCoin community will promote the following two initiatives in the near future:
(1) Establish a community-driven, nonprofit mining pool with attractive incentives.
(2) Optimize RHMiner, PascalCoin’s official solo mining software, for performance upgrades.
A single pool dominance is likely short lived once more options emerge for individual CPU miners who want to avoid solo mining for whatever reason(s).
Let us use Bitcoin as an example. Bitcoin mining is dominated by ASICs and mining pools but no single pool is – at the time of this writing – even close on obtaining the hash majority. With CPU solo mining being a feasible option in conjunction with ASIC and GPU mining eradication with RandomHash, the future hash rate distribution of PascalCoin would be far more promising than Bitcoin’s hash rate distribution.
PascalCoin is the Unicorn Cryptocurrency
If you’ve read this far, let’s cut straight to the point: PascalCoin IS the unicorn cryptocurrency.
It is worth noting that PascalCoin is still a young cryptocurrency as it was launched at the end of 2016. This means that many features are still work in progress such as zn-SNARKs, smart contracts, and pool decentralization to name few. However, it appears that all of the unicorn criteria are within PascalCoin’s reach once PascalCoin’s technical roadmap is mostly completed.
Based on this expository on PascalCoin’s technology, there is every reason to believe that PascalCoin is the unicorn cryptocurrency. PascalCoin also solves two fundamental blockchain problems beyond the unicorn criteria that were previously considered unsolvable: blockchain size and simple address system. The SafeBox pushes PascalCoin to the forefront of cryptocurrency zeitgeist since it is a superior solution compared to UTXO, Directed Acyclic Graph (DAG), Block Lattice, Tangle, and any other blockchain innovations.


THE UNICORN

Author: Tyler Swob
submitted by Kosass to CryptoCurrency [link] [comments]

AsicBoost and the strange case of CVE-2017-9230

About CVEs

In the public interest of tracking and remedying cybersecurity vulnerabilities quickly, a public database was created in 2000: the CVE List [1].
CVE stands for Common Vulnerabilities and Exposures. Its database records, known as CVEs, track and record publicly known cybersecurity vulnerabilities. Each recorded vulnerability has a unique ID and lifecycle where it follows certain states.

The AsicBoost controversy

In April 2017, Greg Maxwell published an email [2] on the bitcoin-dev mailing list which described AsicBoost - a patented optimization to the algorithm used in Bitcoin mining - as an attack on the Bitcoin protocol.
There was much contention [3] about whether AsicBoost constituted some kind of harmful exploit, or whether it was merely a technological innovation which enabled more efficient mining hardware (ASICs).
There were allegations, widely reported in media, that the patent served the interest of Bitmain [4]. The purported benefits of exploiting this patent as alleged by Core developers were contemporaneously disputed by other miners [5].

CVE-2017-9230 raised against AsicBoost

On 18 May 2017, Cameron Garnham posted to the bitcoin-dev list [6], urging for getting a CVE assigned to the perceived vulnerability.
On 24 May 2017, this CVE was created as CVE-2017-9230 [7]. It was simultaneously published under Bugtraq ID 'BID 98657' at [8].
The justification in the CVE stated that the AsicBoost method
'violates the security assumptions of (1) the choice of input, outside of the dedicated nonce area, fed into the Proof-of-Work function should not change its difficulty to evaluate and (2) every Proof-of-Work function execution should be independent.'
It seemed a plausible enough reasoning for the CVE to be assigned. It was entered in the list of Bitcoin-related CVE's at [9]. Detailed information on this particular CVE is still missing/incomplete on the wiki page, a year after the CVE was raised.

What happened since the CVE was raised

If you've followed along, you've learned that the CVE was raised to counter the exploitation of the AsicBoost method by miners.
Since then, however, a Core developer, BtcDrak, has been involved in the founding of a mining company, Halong Mining. Several online sources state his (part?) ownership of this company.
BtcDrak has put forward a proposal [10] which would enable the use of AsicBoost within the Bitcoin Core software (the dominant client software on the BTC network).
This proposal appears to directly contradict the CVE claims of how AsicBoost violates "security assumptions" of Bitcoin, and indeed does not address how it mitigates them, nor is CVE-2017-9230 referenced in any of its related documentation.
While the proposal's specification [11] and implementation [12] have not yet been formally accepted, the situation is that Halong has shipped mining equipment which is now actively employing AsicBoost [13,14] on the Bitcoin (BTC) network. There is even a website showing the blocks where AsicBoost was used [15].

Conflict of interest

There a clear conflict of interest in the actions of the Core developer BtcDrak. His actions as a Core developer appear to be furthering his company's interests and competitive advantage in the mining industry by exploiting a vulnerability of which he must have been keenly aware, having participated on the same bitcoin-dev mailing list where it was discussed.
The CVE was vociferously used to paint Bitmain as culpable for delaying Segwit (Bitmain was accused of using AsicBoost and blocking Segwit activation for their own profit motive - claims that Bitmain has publicly denied strongly and which were never substantiated).
One might have expected a similar outcry against Halong's proven and announced use of AsicBoost, but the parties that had previously condemned Bitmain remained mostly silent. Only an anonymous non-developer, Cobra-Bitcoin, co-owner of the bitcoin.org domain, spoke out on the Github pull request in [11], and Core developer Luke-jr spoke out against the use of the proposal on the Bitcoin network while consensus had not been reached on it [16].
Subsequent discussion on the bitcoin-dev list on this topic since March has been minimal and only concerned with technicalities of stratum protocol changes.

The bigger elephant in the room

It seems logical that either AsicBoost constitutes an exploitable weakness, and thus merits a CVE and measures taken to prevent its use on the Bitcoin network entirely.
Or it is not a problem and the CVE should be invalidated.
The Bitcoin Core project should use its consensus processes to arrive at a coherent decision.

Other problems raised by the use of overt AsicBoost

The Halong implementation uses version rolling of the nversion bits of the header. It reserves a subset of those bits for overt AsicBoost.
These bits are no longer available to BIP9, but there was no update of BIP9 proposed to address this impact.
This is a question of sensible procedures being followed (or not). The author did not find any review comment mentioning the lack of BIP9 specification update, which suggest a lack of thorough review on a proposal which dates back several months.
A minor issue is that the Core implementation warns when a certain proportion of unrecognized version bits are detected. This behavior can be triggered by the AsicBoost method used on the network.
[1] https://cve.mitre.org/about/history.html
[2] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-April/013996.html
[3] https://news.bitcoin.com/developers-clash-exploit-secret-core-organization/
[4] https://archive.is/q2Q4t
[5] https://medium.com/@vcorem/the-real-savings-from-asicboost-to-bitmaintech-ff265c2d305b
[6] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2017-May/014349.html
[7] https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9230
[8] https://www.securityfocus.com/bid/98657
[9] https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_Exposures
[10] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-March/015801.html
[11] https://github.com/bitcoin/bips/pull/661
[12] https://github.com/bitcoin/bitcoin/pull/12633
[13] https://bitcoinmagazine.com/articles/halong-mining-first-bitcoin-mining-hardware-producer-implement-overt-asicboost/
[14] https://bitcoinmagazine.com/articles/slush-pool-now-compatible-asicboost-miners/
[15] https://asicboost.dance
[16] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-March/015802.html
EDITS:
  1. make dates unambiguous, make it clear that [5] disputes the benefits alleged by Core developers
submitted by btcfork to btc [link] [comments]

Let us not forget the original reason we needed the NYA agreement in the first place. Centralization in mining manufacturing has allowed for pools to grow too powerful, granting them the power to veto protocol changes, giving them bargaining powers where there should be none.

SegWit2x through the NYA agreement was a compromise with a group of Chinese mining pools who all march to the beat of the same drum. Antpool, ViaBTC, BTC.TOP, btc.com, CANOE, bitcoin.com are all financially linked or linked through correlated behavior. Antpool, ConnectBTC and btc.com being directly controlled by bitmain, and ViaBTC and Bitmain have a "shared investor relationship". If bitmain is against position A, then all those other pools have historically followed its footsteps. As Jimmy Song explains here the NYA compromise was because only a small minority of individuals with a disproportionate amount of hashrate were against Segwit (Bitmain and subsidiaries listed above), where the rest of the majority of signatories of NYA were pro-segwit. The purpose of the compromise was to prevent a chain split, which would cause damage to the ecosystem and a loss of confidence in bitcoin generally.
At current time of calculation, according to blockchain.info hashrate charts, these pools account for 47.6% of the hashrate. What does it matter if these pools are running a shell game of different subsidiaries or CEO's if they all follow a single individual's orders? 47.6% is enough hashrate right now to preform a 51% attack on the network with mining luck factored in. This statistic alone should demonstrate the enormous threat that Bitmain has placed on the entire bitcoin ecosystem. It has compromised the decentralized model of mining through monopolizing ASIC manufacturing which has lead to a scenario in which bitcoins security model is threatened.
But let us explore the reasoning behind these individuals actions by taking a look at history. First, Bitmain has consistently supported consensus breaking alternative clients by supporting bitcoin classic, supporting Bitcoin Unlimited and its horrifically broken "emergent consensus" algorithm, responding to BIP148 with a UAHF declaration, and then once realizing that BIP148/BIP91 would be successful at activating Segwit without splitting the network Bitmain abandoned its attempt at a "UAHF", and admitted that bitcoin cash is based on the UAHF on their blog post. The very notion of attempting to compromise with an entity to prevent a split that is supporting a split is illogical by nature and a pointless exercise.
Let us not forget that Bitmain was so diametrically opposed to Segwit that it sabatoged Litecoins Segwit Activation period to prevent Segwit from activating on Litecoin. Do these actions sound like a rational actor who has the best interests of bitcoin at heart? Or does this sound like an authoritarian regime that wants to stifle information at any cost to prevent the public from seeing the benefits that SegWit provides?
But the real question must still be asked. Why? Why would Bitmain who is so focused on increasing the blocksize to reduce fee pressure delay a protocol upgrade that both increases blocksize and reduces fee pressure? If miners are financially incentivized to behave in a way in which is economically favorable to bitcoin, then why would they purposefully sabatoge protocol improvements that will increase the long term success survival of bitcoin?
There is plenty of evidence that suggests covert ASICBOOST, a mechanism in which a ASIC miner short cuts bitcoins proof of work process (grinding nonce, transaction ordering) and an innovation that Bitmain holds a patent for in China is the real reason Bitmain originally blocked SegWits activation. It was speculated by Bitcoin Core developer Gregory Maxwell that this covert asicboost technology could earn Bitmain 100 Million dollars a year.
It is notable that Hardfork proposals that Bitmain has supported, such as Bitcoin Classic, Bitcoin Unlimited, Bitcoin ABC/Bcash and now SegWit2x all preserve Bitmains covert asicboost technology while Segwit the soft fork breaks asicboosts effectiveness.
But if that is not enough of a demonstration of rational economic incentives to behave in such a way, then what about irrational reasons such a idelogical positions or pride?
Its no secret that Chinese miners dislike for bitcoin core matured when the Hong Kong agreement was broken. Many miners have consistently rationlized "firing bitcoin core developers" and we even have a direct account from a bitpay employee that said Jihan directly told him that is his purpose is to "get rid of blockstream and core developers". And while the Hong Kong agreement being broken is quite the muddied waters, there is proof in the blockchain that chinese miners were the first to break the terms of the agreement by mining a block with a alternative client. Some bitcoin core developers continued to work on HardFork proposals despite this, offering up public proposals, BIPs and released code to attempt to satisfy the terms of the agreement. Yet only in hindsight did everyone realize that no individual or individuals can force the entire bitcoin network to upgrade. It is only through the slow methodical process of social consensus building that we can get such a large decentralized global network to agree to upgrade the protocol in a safe manner. Yet to this day we still have bitter idelogical wars over this HK agreement "being broken" despite how long ago, and how clear the situation is in hindsight.
When you take into account the historical record of these individuals and businesses actions it clearly demonstrates a pattern of behavior that undermines the long term health of bitcoin. When you analyze their behavior from a rational economic viewpoint, you can clearly see that they are sabatoging the long term health of bitcoin to preserve short term profits.
Considering this information, why would other bitcoin ecosystem businesses "compromise" with such a malicious actor? Let us not forget that these actors were the entire reason we needed to compromise in the first place went ahead and forked the bitcoin network already creating the first bitcoin-shared-history altcoin, Bitcoin ABC. So we compromised with people to prevent the spliting of bitcoin, so that they could go ahead and split bitcoin? What illogical insanity is this? Why would you "stick to your guns" on an agreement that was nullified the moment Bitmain and ViaBTC supported a hardfork outside of the S2X agreement? Doubly questionably is your support when the hardfork is highly contentious and guaranteed to cause a split, damage bitcoin, create chaos and damage global confidence.
A lot of the signatories of the NYA agreement are payment processors and gateway businesses. Their financial health depends upon short term growth of bitcoin to increase business activity and shore up investors capital with revenue from that transactional growth. Their priorities are to ensure short term growth and to appease their investors. But their actions demonstrate a type of cause and effect that often occurs in markets across the world. By redistributing network resource costs to node operators they are simply shuffling costs to the public so that they can benefit in the short term without needing to allocate extra capital.
But these actions do not benefit the health of bitcoin long term. Splitting the network, once again, does not increase confidence in the bitcoin network. It does not foster growth. Increasing the blocksize after segwit already increases the blocksize will not get us any closer to VISA transaction levels from a statistical viewpoint. Increasing the TPS from 3 to 7 when we need to get to 30,000 TPS is quite an illogical decision at face value. Increasing the blocksize on-chain to get to that level would destroy any pretense at decentralization long before we even came close, and without decentralization we have no cenosorship resistence, fungibility. These are fundamental to the value of bitcoin as a network and currency. Polymath and industry wide respected crypto expert Nick Szabo has written extensively on scaling bitcoin and why layer 2 networks are essential.
To all the Signatories of the SegWit2X I ask you - What are you trying to accomplish by splitting bitcoin once again? What consensus building have you done to ensure that bitcoin wont suffer a catastrophic contentious hard fork? As it stands right now I only see a portion of the economic actors in the bitcoin ecosystem supporting S2X. No where near enough to prevent miners from supporting the legacy chain when there will be a large portion of the economy still operating on the legacy chain preserving its value. Where there is money Its going to be extremely difficult to topple the status quo/legacy network and the cards are stacked against you. Without full consensus from the majority of developers, economic actors/nodes, exchanges, payment processors, gateways, wallets....you will only fork yourself from the legacy network and reap destruction and chaos as the legacy chain and S2X battle it out.
If you truly support bitcoin and are dedicated to the long term success of bitcoin and your business, then why would you engage/compromise with demonstratably malicious actors within the bitcoin ecosystem to accomplish a goal that was designed by them to further monopolize/centralize their control, at the destruction of bitcoins security model?
Bitcoin core developers are actually positive on hardforks and want to eventually increase the legacy blocksize, they just wish to do it in a responsible manner that does not put the network at risk like SegWit2x does.
Also, it seems a rational engineering choice to optimize and compress transactions/protocols before increasing the blocksize. Things like SegWit, Schnorr, MAST are all great examples of things Bitcoin Core has done and is doing to increase on-chain scaling technology to the long term benefit of bitcoin.
The fate of bitcoin will be determined by users who choose when how and where they transact. If businesses attempt to force them on the S2X chain they will abandon those businesses to use a servicor that does not attempt through coercion to force them upon a specific forked network.
Finally, without replay protection there can be no clean split and no free market mechanism to determine the winner. I understand that this is purposefully designed this way, to force a war between the legacy chain and S2X, but if you stand for everything bitcoin stands for, then you as central actors will not try to force people onto your chain. Instead, you should allow the market to decide which chain is more valuable.
If you will not abandon this poisonous hardfork pill then please advocate/lobby to add default replay protection to the btc1 codebase. You cannot claim Free Market principals and then on the other side of your mouth collude with central actors to force protocol changes upon users. Either you believe in bitcoin, or you are here to join the miners in their poorly disguised behaviors to monopolize, subvert and sabatoge bitcoin.
submitted by Cryptolution to Bitcoin [link] [comments]

My conception of the ideal functional programming database

There is nothing more annoying than databases. Every DB nowadays - relational or not - is based on some kind of pre-determined data structure (tables, documents, key/val stores, whatever) plus some methods to mutate their data. They're the functional programmer's worst nightmare and one of the few "imperative" things that still impregnate Haskell programs. I wonder if there isn't, on this human world, a single functional-oriented DB.
I'm thinking of an app-centric, append-only-log database. That is, rather than having tables or documents with operations that mutate the database state - like all DBs nowadays do, and which is completely non-functional - it would merely store an immutable history of transactions. You would then derive the app state from a reducer. Let me explain with an example. Suppose we're programming a collective TODO-list application. In order to create a DB, all you need is the specification of your app and a data path:

Local database

import MyDreamDB data Action = NewTask { user :: String, task :: String, deadline :: Date } deriving Serialize data State = State [String] deriving Serialize todoApp :: App todoApp = App { init = State [], next = \ (NewTask user task deadline) tasks -> (user ++ " must do " ++ task ++ " before " ++ show deadline ++ ".") : tasks} app <- localDB "./todos" todoApp :: App Action State 
If the DB isn't created, it creates it. Otherwise, it uses the existing info. And... that is it! app now contains an object that works exactly like a Haskell value. Of course, the whole DB isn't loaded in memory; whether it is on memory or disk, that is up to the DB engine.

Insert / remove

You insert/remove data by merely appending transactions.
append db $ NewTask "SrPeixinho" "Post my dream DB on /haskell" append db $ NewTask "SrPeixinho" "Shave my beard" append db $ NewTask "SrPeixinho" "Buy that gift" 
Those will append new items to the list of tasks because it is defined like so, but they could remove, patch, or do anything you want with the DB state.

Queries

Just use plain Haskell. For example, suppose that you want to get all tasks containing the word post:
postTasks = filter (elem "post" . words) app 
And that is it.

Migrations

If only State changes, you need to do nothing. For example, suppose you store tasks as a tuple (user, task, deadline) instead of a description, as I did previously. Then, go ahead and change State and next:
data State = State [(String, String, Date)] next = \ (NewTask user task deadline) -> (user, task, deadline) 
The next time you load the DB, the engine notices the change and automagically re-computes the final state based on the log of transactions.
If Action changes - for example, you decide to store deadline as integers - you just map the old transaction type to the new one.
main = do migrate "./todos" $ \ (NewTask user task deadline) -> (NewTask user task (toInteger deadline)) 

Indexing

Suppose you're too often querying the amount of tasks of a given user, and that became a bottleneck. To index it, you just update State and next to include the index structure explicitly.
data State = State { tasks :: [String], userTaskCount :: Map String Int} next (NewTask user task deadline) (State tasks count) = State tasks' count' where tasks' = (user, task, deadline) : tasks count' = updateWithDefault 0 (+ 1) user count 
Like with migrations, DB realizes the change and updates the final state. Then you can get the count of any user in O(1):
lookup "SrPeixinho" . userTaskCount $ todos 
Any arbitrary indexing could be performed that way. No DBs, no queries. So easy!

Replication, communication, online Apps

There is one thing more annoying than databases. Communication. Sockets, APIs, HTTP. All of those are required by nowadays real-time applications and are all a pain in the ass. Suppose I gave you the task of making a real-time online site for our Todo app. How would you do it? Probably, create a RESTful API with tons methods, then a front-end application in JavaScript/React, then make Ajax requests to pool the tasks, then a new websocket api because the poolinng was too slow and... STOP! You clearly live in the past. With MyDreamDB, this is what you would do:
main = do app <- globalDB "./todos" todoApp :: App Action State renderApp $ "
" ++ show app ++ "
" $ ghcjs myApp.hs -o myApp.html $ swarm up myApp.html $ chrome "bzz:/hash_of_my_app"
See it? By changing one word - from localDB to globalDB - app is online, connected to a network of processes distributed through the whole internet, running the same app, all synchronized with the App's state. Moreover, by adding another line - a State -> HTML call - I gave a view to our app. Then I compiled that file to HTML, hosted it in a decentralized storage (swarm), and opened it on Chrome. What you see on the screen is a real-time TODO-list of countless people in the world. Yes!
No, no, wait - you didn't even provide an IP or anything. How would the DB know how to find processes running the same App?
It hashes the specification of your APP, contacts a select number of IPs to find other processes running it and then joins a network of nodes running that app.
But if the DB is public, anyone can join my