[HN Gopher] Evolution of the Ethereum proof-of-stake consensus p... ___________________________________________________________________ Evolution of the Ethereum proof-of-stake consensus protocol Author : bpierre Score : 94 points Date : 2022-12-24 17:39 UTC (5 hours ago) (HTM) web link (github.com) (TXT) w3m dump (github.com) | eloff wrote: | How difficult would it be to stake Ethereum, supposing you could | afford a multiple of 32 eth? | | I know you can join cooperatives for this purpose, but then it's | not your crypto anymore and this space is filled with thieves and | con artists. | | It's something I've been kicking around as an idea for a while as | part of a diversified portfolio, if eth drops to a point where I | could afford 32. | | I'm extremely skeptical of cryptocurrencies, but eth is the best | of them and the network transaction volume is supposedly in the | neighborhood with Visa ( something I find hard to believe.) | yokem55 wrote: | If you are interested in running what is referred to as a | 'solo' validator, it isn't that difficult if you already have | some linux sysadmin experience. There are several good guides | around setting up the physical hardware, the node software, | generating the validator key(s), making the staking deposit and | then running the validator.[1][2][3] | | Then there is a very helpful community called EthStaker - they | have a subreddit at r/ethstaker and a discord (invite should be | available in the subreddit). | | If you want something a little more automated, Dappnode is a | well regarded web based front-end and the Rocketpool node stack | makes things very easy to be an operator for their pool using a | TUI. | | There are a lot of options, with a wide range of requirement | and capabilities. | | [1]https://www.coincashew.com/coins/overview-eth/guide-or- | how-t... [2]https://someresat.medium.com/ [3]https://eth- | docker.net/ | nibbleshifter wrote: | In practice: pretty simple. You can do it at home if you have | decently reliable internet and power. | | You don't need five nines of uptime, you need like, two. | | You don't get subject to slashing for your node going offline, | you only get slashed if your node is doing shit out of | consensus like actively cooperating in double spends. | hbrn wrote: | It doesn't seem to be that hard, but keep in mind that staking | requires you to be actively validating. There are major | penalties for screwing up (attacking the network), and minor | penalties even for going offline. You still need hardware, | network, and electricity to run the validator. | cmckn wrote: | > the network transaction volume is supposedly in the | neighborhood with Visa ( something I find hard to believe.) | | I think the PR line is that PoS ETH can "scale to 100,000 TPS", | but it's currently pushing 15-30 [1]. Visa does much more, | though various figures are reported from 1,750 to 24,000. So, | grains of salt and all that. | | [1] https://etherscan.io/ | DennisP wrote: | It's a little more complicated than that. | | For one, Visa just does funds transfers. If Ethereum just | transferred ETH, it could do 700 tx/sec, based on the gas | limit per block divided by the 20K gas for a simple ETH | transfer. A lot of Ethereum transactions are more complex and | use more gas. | | Second, second-layer "rollups" already support transaction | rates up to a couple thousand per second, without losing | base-layer security guarantees. Essentially they compress the | transactions on chain. (Actual traffic is much lower than | that, so far.) | | The longer-term plan is to move to rollups in a big way, and | add a form of data sharding to multiply the on-chain data | storage. That's where the 100K/sec comes from. | dmitriid wrote: | > If Ethereum just transferred ETH, it could do 700 tx/sec | | So... Still an order of magnitude less than Visa. | | > A lot of Ethereum transactions are more complex and use | more gas. | | How complex are they, are they a significant number, and | dies this explain the abysmal transaction rates? | | Visa aside, on Singles Day AliPay does 1 to 1.5 _billion_ | transactions in _one day_. | | Okay. AliPay is an outlier. Klarna does about 2 million | transactions per day, an average of 23 per second (it's | significantly higher during peak hours, and lower during | off-peak hours. Source: worked at Klarna). The transaction | includes: client lookup (a complicated affair that differs | from country to country and session to session), credit | score calculation, order set up, payment (out of a several | dozen different options) set up... all while conforming to | banking and local regulations across 45 countries. Anything | in eth anywhere close to that complexity-wise? | | > Second, second-layer "rollups" already support | transaction rates up to a couple thousand per second | | So layer 2 batches transaction into a batch that then gets | batched on layer 1 into a bugger batch that is then written | in one go to the blockchain. | | Congrats, you've reinvented batch processing. | pa7x1 wrote: | Ethereum runs the EVM, which is a Turing complete | execution environment. It can run things of arbitrary | complexity. | | > Congrats, you've reinvented batch processing. | | This is an extreme over-simplification of zero knowledge | proofs. You would do well in digging deeper what is being | achieved instead of dismissing it without any | understanding. | rafale wrote: | You are not making an effort to appreciate the opposite | point if view. An order of magnitude for a young, | decentralized, trustless and permissionless network is | quite an engineering feat. | | How complex? -> Turing complete. Also there is more to | L2s than batching. Their aim is to maintain the security | guarantees of the L1 without sacrificing availability. | Plus, Zk proofs and merkle trees allow for great data | compression in the rollup. | lekevicius wrote: | You are right, but a better place to follow progress is | https://ethtps.info/. It shows TPS across all layer-2s. | | Current network demand doesn't really require them, but after | EIP-4844, "100 000 TPS" should be possible. | patriksvensson wrote: | Correct, the plan is to scale to that level but currently is | not doing that. The current L1 (Ethereum Mainnet) + L2 | combined TPS can be seen here https://ethtps.info/ | | Important to note that Ethereum embraces the idea that L2's | will provide a lot of the scale and L1 will remain the base, | main layer of security. So the goal isn't for L1 to scale | massively, but to be able to support a healthy ecosystem of | secure L2's which scale in different ways! | patriksvensson wrote: | I suggest checking the /r/ethstaker/ | (https://www.reddit.com/r/ethstaker/) community if you are | interested in staking. I've been staking from genesis block and | has required very little upkeep. Dive in! | robocat wrote: | Over many years, the 32 ETH limit really screws everyone in the | world who can't afford to stake $40k USD. | | Choices are: use custodial staking (share your keys with | custodian - risky), use non-custodial staking (keeps your keys | private but has costs e.g. Lido charges 10% of your staking | rewards), use an L2 coin (risks), use a financial proxy for | Etherium (ugggh). | | I guess running your own node means you can't use a cold | wallet, so security costs/risks are high? | yokem55 wrote: | > Choices are: use custodial staking (share your keys with | custodian - risky), use non-custodial staking (keeps your | keys private but has costs e.g. Lido charges 10% of your | staking rewards), use an L2 coin (risks), use a financial | proxy for Etherium (ugggh). | | Rocketpool is non-custodial, allows you to run your own node | with about 17.6 eth (16 eth + 1.6 eth worth of their token), | and then earn a commission from the folks contributing the | other 16 eth and not running a node. There is a decent amount | of smart contract risk and risk around the value of the | token, but it is a generally working protocol. | | > I guess running your own node means you can't use a cold | wallet, so security costs/risks are high? | | To answer the security concern - The staking keys can only be | used for validation activities, and can't be used to spend | the funds. When depositing the stake, you can specify a | normal ethereum address where withdrawn funds will go to, and | that address can be controlled with a hardware or cold paper | wallet/signer. The worst an attacker who compromised your | node and took your staking keys could do is get you slashed | (a little more then a 1 eth penalty in normal circumstances), | which would be of no benefit to them. | robocat wrote: | > The worst an attacker who compromised your node and took | your staking keys could do is get you slashed | | Or maybe do some of the "Byzantine validator" attacks in | the paper? | | Thank you for the staking keys info - I find it difficult | to grok crypto systems. | DennisP wrote: | They do hope to lower the 32 ETH limit, but it's a scaling | challenge on the number of stakers. | krupan wrote: | The real problem right now is you can't unstake any eth you | have staked. The developers promise it's coming soon, but | personally I wouldn't stake any until then. | latchkey wrote: | It is in testnet now. | | Given that they successfully transitioned an entire consensus | change and things didn't implode (yet), I'm feeling a bit | more optimistic that they can do withdrawals. | pa7x1 wrote: | https://withdrawalsdevnet1.ethpandaops.io/ | | Testnets already happening. Q1 2023 on the table. | [deleted] | anonymousDan wrote: | Apart from the solid advice below, I would probably suggest | practicing cor a while on a testnet to see can you meet the | required availability requirements. | krupan wrote: | Remember that Visa transactions are not equal to | Bitcoin/Ethereum transactions. A visa transaction is just a | promise of payment at some future date, probably. That's why | they can have such a high rate. Bitcoin and Ethereum | transactions are settled cash in your wallet. Apples and | oranges. | | Bitcoin has the lightning network based on Bitcoin smart | contracts that can do Visa-like rates of Visa-like | transactions. I don't know if Ethereum has anything like that. | DennisP wrote: | Ethereum does have a Lightning-style network, but everybody | sorta lost interest when rollups were invented. | [deleted] | blue_rog wrote: | Nitpick: | | Why do the first two images after the LMD-Ghost section [1] look | like they were made on an iPad? All the other images are made | using proper tools. I didn't realize that the letter in the first | image was a V because it looked like a N. Feels slightly | inconsistent. | | [1] - https://github.com/ethereum/pos-evolution/blob/master/pos- | ev... | dsco wrote: | Look at that, crypto _is_ beautiful computer science after all, | and not what the unoriginally critical HN crowd would like you to | believe. | tromp wrote: | If you want to see beauty, look at a blockchain that focusses | on elegance and simplicity. | rvz wrote: | > and not what the unoriginally critical HN crowd would like | you to believe. | | Of course. Just don't listen to the extreme ones, who continue | to screech and parrot the same old absolutist takes over and | over again to the media for engagement farming. | | The truth is crypto is here to stay, but not all of them are | going to survive. Only a few projects and cryptocurrencies will | still be around longer than others and both crypto maximalists | and anti-crypto absolutists are going to end up compromising in | the end. | stiltzkin wrote: | You would be surprised how developed is Monero. | andy_xor_andrew wrote: | This is a really thorough and understandable explanation. Helped | me fill in lots of gaps I had. | | One thought it does raise in my mind, though - this is | _complicated_. | | Bitcoin is simple. The rules are simple. Simple is really good | when it comes to securing a currency. | | This, in comparison... I mean, oof. I get the high-level "proof | of stake" idea, which (in my mind) has a similar mental | complexity to Bitcoin's. But all the algorithms that need to work | to _support_ it... it introduces the idea in my mind that | _somewhere_ in one of those algorithms is a small oversight. Even | if that 's not the case, the thought is there. | | My opinions on proof-of-stake hasn't changed (seems much better | than PoW in real-world use for so many reasons) but it does seem | to erode the beautiful simplicity of proof-of-work. | tromp wrote: | > Bitcoin is simple. The rules are simple. | | Compared to the likes of Ethereum, Bitcoin is super simple. | Compared to others, it's still somewhat complicated. | | While the use of PoW for consensus is super simple (most | cumulative difficulty wins), Bitcoin script is a huge source of | complexity in itself, with tons of warts. As it turns out, you | don't need script to do payments, multi-signatures, atomic | swaps, discreet log contracts, bidirectional payment channels | etc., i.e. nearly all of the functionality that script is used | for. All those can be done with so-called script-less scripts | [1], which is mostly creative use of Schnorr signatures. | | Bitcoin's emission is not that simple either with the reward | halvings every 4 years. A fixed block subsidy (i.e. pure linear | emission) is not only simpler, but arguably fairer too, | avoiding a concentration of wealth on early miners/adopters, | and leaving later generations more than mere crumbs. | | [1] https://suredbits.com/schnorr-applications-scriptless- | script... | bawolff wrote: | > Bitcoin script is a huge source of complexity in itself, | with tons of warts. | | It might add a lot of implementation complexity, but in terms | of conceptual complexity, it's pretty easy to understand at a | high level. | | I also don't find bitcoin halving complex to understand | either. Whether its good is a separate question. | xiphias2 wrote: | Actually the implementation of the script language is super | simple, just a few hundred lines of code (EvalScript | function in https://github.com/bitcoin/bitcoin/blob/master/ | src/script/in... ). | | I think it's quite well written and worth a look. | nkuttler wrote: | > A fixed block subsidy (i.e. pure linear emission) is not | only simpler, but arguably fairer too, avoiding a | concentration of wealth on early miners/adopters, and leaving | later generations more than mere crumbs | | Yet Ethereum had a premine of around 60M, roughly half of all | existing coins today. Later emission seems negligible | regarding fairness. | tromp wrote: | Pure linear emission implies starting from zero. I agree | coins with pre-mines limit fairness from the outset. | | In terms of fairness of coin distribution, 100% PoS < | Ethereum < Bitcoin < Pure Linear Emission. | | PoS effectively ends the distribution of new coins, with | everybody able to stake to just preserve their share of the | pie. | krupan wrote: | The complication is a huge red flag for me. Enormous. Red. | Flag. What are we missing in all that complexity? What perverse | incentives and unintended consequences are hiding in all that? | | Also, you can't even unstake your eth. The developers promise | it's coming soon, but right now, you can't. | tromp wrote: | Sadly, there are very blockchains that focus on simplicity. | Most seem to think that more features is better. | leashless wrote: | The Avalanche PoS mechanism is a lot more straight forwards. I | prefer its aesthetics. | lekevicius wrote: | I'm curious! What are its trade-offs? | tylersmith wrote: | The primary one is that in the presence of byzantine faults | it goes for consistency over availability, however the | Avalanche ecosystem generally prefers that choice. | gukov wrote: | Bitcoin is Notepad, Ethereum is becoming MS Word. | louloulou wrote: | Bitcoin is a money, Ethereum is becoming a Rube Goldberg | machine to obfuscate the fact that it was issued as a | security - where the issuers were paid WITH MONEY. | jrm4 wrote: | Yup. I've always said that Bitcoin is the grey brick | cellphone or the Model T; the famous proof-of-concept that | nonetheless ends up getting overtaken by better tech. | jrm4 wrote: | This seems like it would be _extremely_ simple for tech folks | to understand. | | Strikes me as strongly analogous as to why each of us doesn't | run our own email server? Which is, when email was first | invented, may have not seemed like a bad idea, but in terms of | scale something like federation works better? | heinrich5991 wrote: | Permalink: https://github.com/ethereum/pos- | evolution/blob/c51c4cee300e6... | 2Gkashmiri wrote: | how do you get started with "smart contracts"? all the | "tutorials" always end creating your own crypto and that's it.... | | i need something basic, like alice and bob contract to sell 100 | watermelons for 1 BTC and sarah is the arbitrator in case they | have a problem... something like this. | | or a smart contract to validate a sale of a house for 2 BTC. | | or a partnership deed for a business between alice and bob with 3 | clauses | saurik wrote: | https://cryptozombies.io/ ? | bmelton wrote: | For Solidity-based tokens, learn Solidity to be able to know | the syntax for creating your contract. | | After developing the contract, use something like Truffle Suite | to validate that the contract is good, and add a testing suite | around it.[1] | | Find a test net for the coin that you're developing for and | create an account. Generally testnets will allow you to have | "play money" to work with. This will allow you to learn how to | deploy your contract to the testnet (which is functionally | identical to mainnet) | | Deploy it there, test it further. Write apps around it with | tools like web3.js or eth.js as appropriate. | | Buy some currency for the applicable mainnet and deploy your | contract to mainnet just as you did with testnet, only this | time it'll cost actual currency to deploy -- this will vary | wildly by network and token and such. | | This guy's videos are pretty helpful: | https://www.dappuniversity.com/articles/the-ultimate-ethereu... | | Different tokens have different protocols and such. The above | works for Eth and Eth-based tokens. Cardano is Haskell-based, | and refers to smart contracts as programs, and the process is | wildly different. Some other tokens use Rust, or other | languages, but the BASIC outline I've laid out is basically the | same no matter which (except for Cardano, which may be the | same, I have no idea.) | | [1] - https://trufflesuite.com/ | sschueller wrote: | Anything that connects to the physical world makes little sense | at the moment as it defeats the purpose of such a smart | contract. | | What you can do is anything that is related to moving ETH or | ERC tokens/NFTs between addresses. | | So an example that you see often is a Kickstarter type | contract. This contract collects ETH from many sources over a | period of time but will only pay out to the payout address if | the minimum is reached in that time period. Otherwise all the | funds are returned. This contract is fully autonomous and can | be validated to do what it is supposed to do. You don't have to | trust a single company like Kickstarter to follow the rules or | not cancled your compain. The project being a scam or not | compleeting is another story. | | So in other words what you can do in a smart contract are | financial constructs that are zero trust. | | The reason many scams happen is also in part that people are | not checking that the contracts are solid and prevent rug pulls | etc. | cortesoft wrote: | I don't understand the benefit of that... in the end, you | have to trust the person you are sending the coins to to do | what they say the will. This is true regardless of the smart | contract. The only thing the smart contract does is guarantee | that at least other people are also getting scammed. | | Come to think of it, though, it doesn't even guarantee that. | The person who created the contract and will get the funds if | the minimum is reached could always just send ETH from one of | their other own accounts to trigger the threshold. | dmitriid wrote: | > that people are not checking that the contracts are solid | | Ah yes. It's the people's fault that they don't check code in | esoteric programming languages running on esoteric VMs using | made up words for everything. | boomerango wrote: | If you are interested in learning more about the space, look | into Chainlink oracles. | fwip wrote: | > Anything that connects to the physical world makes little | sense at the moment as it defeats the purpose of such a smart | contract. | | Which is why they're useless except for implementing | complicated financial schemes. Which, in practice, are mostly | scams. | leashless wrote: | This is not true. Let me quote the UK's Head of Civil | Justice: | | 6. The theory is to dispel the myth that blockchain is a | fringe technology used only by those wanting to risk their | livelihoods or possibly make their fortunes on volatile | cryptoassets like Bitcoin. | | 7. The blockchain is now at a stage in its development | equivalent to where the internet was in or around 1995. The | internet was unstoppable in 1995 and blockchain technology is | unstoppable now. It will become ubiquitous in all major | industrial and financial sectors, simply because it allows | for the immutable recording of data, thereby reducing | friction in commercial and consumer transactions and | obliterating the scope for dispute as to what has occurred. | | 8. As the Master of the Rolls and Head of Civil Justice in | England and Wales, I hold an office that pre-dates modern | trade in derivatives and reinsurance, even steam engines, | powered flight, and certainly the internet. I am particularly | and obviously concerned about the reputation and development | of English law and the jurisdiction of England and Wales. | | 9. Many people do not realise that English law governs | trading in EUR600 trillion of OTC derivatives annually, in | EUR11.6 trillion in metals trading, in PS250 billion in M&A | deals, and in PS80 billion in insurance contracts every year | - just to take a few examples. My hope is that English law | will prove to be the law of choice for borderless blockchain | technology as its take up grows exponentially in the months | and years to come. | | https://www.judiciary.uk/wp- | content/uploads/2022/02/Speech-M... | shkkmo wrote: | This seems like a non-sequitor. It is not clear what you | are disagreeing with or what point you are trying to make | with that quote, besides that a top UK lawyer is pro- | crypto. | dinkumthinkum wrote: | I don't think this makes the case that you are claiming. | Smart contracts are not the equivalent legal contracts, | it's a very good word. As for #6, I think people are more | interested in more complicated rug-pulls involving NFTs | then just trading BTC. | charcircuit wrote: | Start here https://remix.ethereum.org. This IDE lets you test | smrt contracts in an emulator. You can get a quick overview of | solidity here https://learnxinyminutes.com/docs/solidity/ and | the docs are here https://docs.soliditylang.org/en/latest/ | | >alice and bob contract to sell 100 watermelons for 1 BTC and | sarah is the arbitrator in case they have a problem... | something like this | | You create an owner variable that is used to show who can | withdraw from the smart contract and is set to 0 at the start. | You add 2 methods. The first is a method that is only usable by | Sarah that lets her change the owner variable. The second is a | withdraw function that is only usable by the owner. You can | even enforce that the owner can only be set to Alice or Bob if | you want. | | Bob deposits 1 wrapped BTC. If Alice gives him the watermolens | Sarah sets Alice as the owner. If Alice doesn't Sarah sets Bob | as the owner. | | >a smart contract to validate a sale of a house for 2 BTC. | | You don't need a smart contract for that. Every transaction | already gets validated by the network. | | >a partnership deed for a business between alice and bob with 3 | clauses | | This depends on the clauses but you would put all the company | assets into the smart contract and then write methods that let | you spend those assets while not violating those clauses. | throwaway98797 wrote: | give crypto zombies a try: | | https://cryptozombies.io/ | Arnavion wrote: | I only have a surface-level understanding of smart contracts, | but you'd need an oracle for the off-chain validation part of | the three situations you mentioned, and | https://ethereum.org/en/developers/docs/oracles/ seems to have | some contract examples. | yieldcrv wrote: | hm creating your own crypto token is a smart contract, its just | a standardized set of classes, modify the classes and see what | happens | | anyway try scaffoldeth.io | | you compile the tutorial website first and then build a bunch | of common smart contract scaffolding | | note this is the EVM ecosystem so it would be impossible to | conflate example in pure BTC, smart contracts are playing | catchup in BTC ecosystem. There are a couple competing attempts | there, very little scaffolding. There are many orders of | magnitude more activity in the EVM ecosystem than there are in | bitcoin ecosystem/UXTO model smart contracts. | montenegrohugo wrote: | What's the hangup with normal tutorials? There's a plethora of | tutorials online. | | People recommend ethernauts[1] and cryptozombies[2], but I | found those quite slow when I was learning. Most useful for me | was reading existing implementations of smart contracts, and | learning from there. | | M1guelpf wrote these a while ago, might be helpful examples: | https://github.com/m1guelpf/lil-web3 | | happy to chat if you need help | | [1] https://ethernaut.openzeppelin.com/ | | [2] https://cryptozombies.io | golgappa wrote: | [flagged] | [deleted] ___________________________________________________________________ (page generated 2022-12-24 23:00 UTC)