{"id":18814,"date":"2026-03-30T09:30:33","date_gmt":"2026-03-30T09:30:33","guid":{"rendered":"https:\/\/cryptoted.net\/index.php\/2026\/03\/30\/understanding-serenity-part-i-abstraction\/"},"modified":"2026-03-30T09:30:33","modified_gmt":"2026-03-30T09:30:33","slug":"understanding-serenity-part-i-abstraction","status":"publish","type":"post","link":"https:\/\/cryptoted.net\/index.php\/2026\/03\/30\/understanding-serenity-part-i-abstraction\/","title":{"rendered":"Understanding Serenity, Part I: Abstraction"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"\">\n<p class=\"chakra-text css-gi02ar\"><em class=\"chakra-text css-0\">Special thanks to Gavin Wood for prompting my interest into abstraction improvements, and Martin Becze, Vlad Zamfir and Dominic Williams for ongoing discussions.<\/em><\/p>\n<p class=\"chakra-text css-gi02ar\">For a long time we have been public about our plans to continue improving the Ethereum protocol over time and our long development roadmap, learning from our mistakes that we either did not have the opportunity to fix in time for 1.0 or only realized after the fact. However, the Ethereum protocol development cycle has started up once again, with a Homestead release coming very soon, and us quietly starting to develop proof-of-concepts for the largest milestone that we had placed for ourselves in our <a class=\"chakra-link css-vezwxf\" href=\"https:\/\/blog.ethereum.org\/2015\/03\/03\/ethereum-launch-process\">development roadmap<\/a>: Serenity.<\/p>\n<p class=\"chakra-text css-gi02ar\">Serenity is intended to have two major feature sets: abstraction, a concept that I initially expanded on in <a class=\"chakra-link css-vezwxf\" href=\"https:\/\/blog.ethereum.org\/2015\/07\/05\/on-abstraction\">this blog post here<\/a>, and Casper, our security-deposit-based proof of stake algorithm. Additionally, we are exploring the idea of adding at least the scaffolding that will allow for the smooth deployment over time of <a target=\"_blank\" rel=\"noopener\" class=\"chakra-link css-vezwxf\" href=\"https:\/\/www.youtube.com\/watch?v=-QIt3mKLIYU\">our scalability<\/a> <a class=\"chakra-link css-vezwxf\" href=\"https:\/\/blog.ethereum.org\/2015\/04\/05\/blockchain-scalability-chain-fibers-redux\">proposals<\/a>, and at the same time completely resolve parallelizability concerns <a target=\"_blank\" rel=\"noopener\" class=\"chakra-link css-vezwxf\" href=\"http:\/\/www.multichain.com\/blog\/2015\/11\/smart-contracts-slow-blockchains\/\">brought up here<\/a> &#8211; an instant very large gain for private blockchain instances of Ethereum with nodes being run in massively multi-core dedicated servers, and even the public chain may see a 2-5x improvement in scalability. Over the past few months, research on Casper and formalization of scalability and abstraction (eg. with <a target=\"_blank\" rel=\"noopener\" class=\"chakra-link css-vezwxf\" href=\"https:\/\/github.com\/ethereum\/EIPs\/issues\/28\">EIP 101<\/a>) have been progressing at a rapid pace between myself, Vlad Zamfir, Lucius Greg Meredith and a few others, and now I am happy to announce that the first proof of concept release for Serenity, albeit in a very limited form suitable only for testing, <a target=\"_blank\" rel=\"noopener\" class=\"chakra-link css-vezwxf\" href=\"https:\/\/github.com\/ethereum\/pyethereum\/tree\/serenity\/\">is now available<\/a>.<\/p>\n<p class=\"chakra-text css-gi02ar\">The PoC can be run by going into the <span class=\"chakra-text css-ons8vw\">ethereum<\/span> directory and running <span class=\"chakra-text css-ons8vw\">python test.py<\/span> (<b>make sure to download and install the latest Serpent from <a target=\"_blank\" rel=\"noopener\" class=\"chakra-link css-vezwxf\" href=\"https:\/\/github.com\/ethereum\/serpent\">https:\/\/github.com\/ethereum\/serpent<\/a>, develop branch<\/b>); if the output looks something like this then you are fine:<\/p>\n<div class=\"chakra-stack css-1jx0in4\">\n<pre>vub@vub-ThinkPad-X250 15:01:03 serenity\/ethereum: python test.py\nREVERTING 940534 gas from account 0x0000000000000000000000000000000000000000 to account 0x98c78be58d729dcdc3de9efb3428820990e4e3bf with data 0x\nWarning (file \"casper.se.py\", line 74, char 0): Warning: function return type inconsistent!\nRunning with 13 maximum nodes\nWarning (file \"casper.se.py\", line 74, char 0): Warning: function return type inconsistent!\nWarning (file \"casper.se.py\", line 74, char 0): Warning: function return type inconsistent!\nLength of validation code: 57\nLength of account code: 0\nJoined with index 0\nLength of validation code: 57\nLength of account code: 0\nJoined with index 1\nLength of validation code: 57\n<\/pre>\n<\/div>\n<p class=\"chakra-text css-gi02ar\">This is a simulation of 13 nodes running the Casper+Serenity protocol at a 5-second block time; this is fairly close to the upper limit of what the client can handle at the moment, though note that (i) this is python, and C++ and Go will likely show much higher performance, and (ii) this is all nodes running on one computer at the same time, so in a more &#8220;normal&#8221; environment it means you can expect python Casper to be able to handle at least ~169 nodes (though, on the other hand, we want consensus overhead to be much less than 100% of CPU time, so these two caveats combined do NOT mean that you should expect to see Casper running with thousands of nodes!). If your computer is too slow to handle the 13 nodes, try <span class=\"chakra-text css-ons8vw\">python test.py 10<\/span> to run the simulation with 10 nodes instead (or <span class=\"chakra-text css-ons8vw\">python test.py 7<\/span> for 7 nodes, etc). Of course, research on improving Casper&#8217;s efficiency, though likely at the cost of somewhat slower convergence to finality, is still continuing, and these problems should reduce over time. The <span class=\"chakra-text css-ons8vw\">network.py<\/span> file simulates a basic P2P network interface; future work will involve swapping this out for actual computers running on a real network.<\/p>\n<p class=\"chakra-text css-gi02ar\">The code is split up into several main files as follows:<\/p>\n<ul role=\"list\" class=\"css-1ars4k6\">\n<li class=\"css-0\"><span class=\"chakra-text css-ons8vw\">serenity_blocks.py<\/span> &#8211; the code that describes the block class, the state class and the block and transaction-level transition functions (about 2x simpler than before)<\/li>\n<li class=\"css-0\"><span class=\"chakra-text css-ons8vw\">serenity_transactions.py<\/span> &#8211; the code that describes transactions (about 2x simpler than before)<\/li>\n<li class=\"css-0\"><span class=\"chakra-text css-ons8vw\">casper.se.py<\/span> &#8211; the serpent code for the Casper contract, which incentivizes correct betting<\/li>\n<li class=\"css-0\"><span class=\"chakra-text css-ons8vw\">bet.py<\/span> &#8211; Casper betting strategy and full client implementation<\/li>\n<li class=\"css-0\"><span class=\"chakra-text css-ons8vw\">ecdsa_accounts.py<\/span> &#8211; account code that allows you to replicate the account validation functionality available today in a Serenity context<\/li>\n<li class=\"css-0\"><span class=\"chakra-text css-ons8vw\">test.py<\/span> &#8211; the testing script<\/li>\n<li class=\"css-0\"><span class=\"chakra-text css-ons8vw\">config.py<\/span> &#8211; config parameters<\/li>\n<li class=\"css-0\"><span class=\"chakra-text css-ons8vw\">vm.py<\/span> &#8211; the virtual machine (faster implementation at <span class=\"chakra-text css-ons8vw\">fastvm.py<\/span>)<\/li>\n<li class=\"css-0\"><span class=\"chakra-text css-ons8vw\">network.py<\/span> &#8211; the network simulator<\/li>\n<\/ul>\n<p class=\"chakra-text css-gi02ar\">For this article, we will focus on the abstraction features and so <span class=\"chakra-text css-ons8vw\">serenity_blocks.py<\/span>, <span class=\"chakra-text css-ons8vw\">ecdsa_accounts.py<\/span> and <span class=\"chakra-text css-ons8vw\">serenity_transactions.py<\/span> are most critical; for the next article discussing Casper in Serenity, <span class=\"chakra-text css-ons8vw\">casper.se.py<\/span> and <span class=\"chakra-text css-ons8vw\">bet.py<\/span> will be a primary focus.<\/p>\n<h3 class=\"chakra-heading group css-xuzltg\" id=\"abstraction-and-accounts\" data-group=\"true\"><a class=\"chakra-link css-128fqrf\" aria-label=\"abstraction and accounts permalink\" href=\"#abstraction-and-accounts\"><svg viewbox=\"0 0 24 24\" focusable=\"false\" class=\"chakra-icon css-173jpr1\"><g fill=\"currentColor\"><path d=\"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z\"\/><path d=\"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z\"\/><\/g><\/svg><\/a>Abstraction and Accounts<\/h3>\n<p class=\"chakra-text css-gi02ar\">Currently, there are two types of accounts in Ethereum: externally owned accounts, controlled by a private key, and contracts, controlled by code. For externally owned accounts, we specify a particular digital signature algorithm (secp256k1 ECDSA) and a particular sequence number (aka. nonce) scheme, where every transaction must include a sequence number one higher than the previous, in order to prevent replay attacks. The primary change that we will make in order to increase abstraction is this: rather than having these two distinct types of accounts, we will now have only one &#8211; contracts. There is also a special &#8220;entry point&#8221; account, <span class=\"chakra-text css-ons8vw\">0x0000000000000000000000000000000000000000<\/span>, that <em class=\"chakra-text css-0\">anyone can send from<\/em> by sending a transaction. Hence, instead of the signature+nonce verification logic of accounts being in the protocol, it is now up to the user to put this into a contract that will be securing their own account.<\/p>\n<p class=\"chakra-text css-gi02ar\">The simplest kind of contract that is useful is probably the ECDSA verification contract, which simply provides the exact same functionality that is available right now: transactions pass through only if they have valid signatures and sequence numbers, and the sequence number is incremented by 1 if a transaction succeeds. The code for the contract looks as follows:<\/p>\n<div class=\"chakra-stack css-1jx0in4\">\n<pre># We assume that data takes the following schema:\n# bytes 0-31: v (ECDSA sig)\n# bytes 32-63: r (ECDSA sig)\n# bytes 64-95: s (ECDSA sig)\n# bytes 96-127: sequence number (formerly called \"nonce\")\n# bytes 128-159: gasprice\n# bytes 172-191: to\n# bytes 192-223: value\n# bytes 224+: data\n\n# Get the hash for transaction signing\n~mstore(0, ~txexecgas())\n~calldatacopy(32, 96, ~calldatasize() - 96)\n~mstore(0, ~sha3(0, ~calldatasize() - 64))\n~calldatacopy(32, 0, 96)\n# Call ECRECOVER contract to get the sender\n~call(5000, 1, 0, 0, 128, 0, 32)\n# Check sender correctness; exception if not\nif ~mload(0) != 0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1:\n    ~invalid()\n# Sequence number operations\nwith minusone = ~sub(0, 1):\n    with curseq = self.storage[minusone]:\n        # Check sequence number correctness, exception if not\n        if ~calldataload(96) != curseq:\n            ~invalid()\n        # Increment sequence number\n        self.storage[minusone] = curseq + 1\n# Make the sub-call and discard output\nwith x = ~msize():\n    ~call(msg.gas - 50000, ~calldataload(160), ~calldataload(192), 160, ~calldatasize() - 224, x, 1000)\n    # Pay for gas\n    ~mstore(0, ~calldataload(128))\n    ~mstore(32, (~txexecgas() - msg.gas + 50000))\n    ~call(12000, ETHER, 0, 0, 64, 0, 0)\n    ~return(x, ~msize() - x)\n<\/pre>\n<\/div>\n<p class=\"chakra-text css-gi02ar\">This code would sit as the contract code of the user&#8217;s account; if the user wants to send a transaction, they would send a transaction (from the zero address) to this account, encoding the ECDSA signature, the sequence number, the gasprice, destination address, ether value and the actual transaction data using the encoding specified above in the code. The code checks the signature against the transaction gas limit and the data provided, and then checks the sequence number, and if both are correct it then increments the sequence number, sends the desired message, and then at the end sends a second message to pay for gas (note that miners can statically analyze accounts and refuse to process transactions sending to accounts that do not have gas payment code at the end).<\/p>\n<p class=\"chakra-text css-gi02ar\">An important consequence of this is that Serenity introduces a model where <em class=\"chakra-text css-0\">all transactions (that satisfy basic formatting checks) are valid<\/em>; transactions that are currently &#8220;invalid&#8221; will in Serenity simply have no effect (the <span class=\"chakra-text css-ons8vw\">invalid<\/span> opcode in the code above simply points to an unused opcode, immediately triggering an exit from code execution). This does mean that transaction inclusion in a block is no longer a guarantee that the transaction was actually executed; to substitute for this, every transaction now gets a receipt entry that specifies whether or not it was successfully executed, providing one of three return codes: <strong>0<\/strong> (transaction not executed due to block gas limit), <strong>1<\/strong> (transaction executed but led to error), <strong>2<\/strong> (transaction executed successfully); more detailed information can be provided if the transaction returns data (which is now auto-logged) or creates its own logs.<\/p>\n<p class=\"chakra-text css-gi02ar\">The main very large benefit of this is that it gives users much more freedom to innovate in the area of account policy; possible directions include:<\/p>\n<ul role=\"list\" class=\"css-1ars4k6\">\n<li class=\"css-0\"><strong>Bitcoin-style multisig<\/strong>, where an account expects signatures from multiple public keys at the same time before sending a transaction, rather than accepting signatures one at a time and saving intermediate results in storage<\/li>\n<li class=\"css-0\"><strong>Other elliptic curves<\/strong>, including ed25519<\/li>\n<li class=\"css-0\"><strong>Better integration for more advanced crypto<\/strong>, eg. ring signatures, threshold signatures, ZKPs<\/li>\n<li class=\"css-0\"><strong>More advanced sequence number schemes<\/strong> that allow for higher degrees of parallelization, so that users can send many transactions from one account and have them included more quickly; think a combination of a traditional sequence number and a bitmask. One can also include timestamps or block hashes into the validity check in various clever ways.<\/li>\n<li class=\"css-0\"><strong>UTXO-based token management<\/strong> &#8211; some people dislike the fact that Ethereum uses accounts instead of Bitcoin&#8217;s &#8220;unspent transaction output&#8221; (UTXO) model for managing token ownership, in part for privacy reasons. Now, you can create a system inside Ethereum that actually is UTXO-based, and Serenity no longer explicitly &#8220;privileges&#8221; one over the other.<\/li>\n<li class=\"css-0\"><strong>Innovation in payment schemes<\/strong> &#8211; for some dapps, &#8220;contract pays&#8221; is a better model than &#8220;sender pays&#8221; as senders may not have any ether; now, individual dapps can implement such models, and if they are written in a way that miners can statically analyze and determine that they actually will get paid, then they can immediately accept them (essentially, this provides <a target=\"_blank\" rel=\"noopener\" class=\"chakra-link css-vezwxf\" href=\"http:\/\/www.rootstock.io\/\">what Rootstock is trying to do<\/a> with optional author-pays, but in a much more abstract and flexible way).<\/li>\n<li class=\"css-0\"><strong>Stronger integration for &#8220;ethereum alarm clock&#8221;-style applications<\/strong> &#8211; the verification code for an account doesn&#8217;t have to check for signatures, it could also check for Merkle proofs of receipts, state of other accounts, etc<\/li>\n<\/ul>\n<p class=\"chakra-text css-gi02ar\">In all of these cases, the primary point is that through abstraction all of these other mechanisms become much easier to code as there is no longer a need to create a &#8220;pass-through layer&#8221; to feed the information in through Ethereum&#8217;s default signature scheme; when no application is special, every application is.<\/p>\n<p class=\"chakra-text css-gi02ar\">One particular interesting consequence is that with the current plan for Serenity, Ethereum will be optionally quantum-safe; if you are scared of the NSA having access to a quantum computer, and want to protect your account more securely, you can personally <a target=\"_blank\" rel=\"noopener\" class=\"chakra-link css-vezwxf\" href=\"https:\/\/bitcoinmagazine.com\/articles\/bitcoin-is-not-quantum-safe-and-how-we-can-fix-1375242150\">switch to Lamport signatures<\/a> at any time. Proof of stake further bolsters this, as even if the NSA had a quantum computer and no one else they would not be able to exploit that to implement a 51% attack. The only cryptographic security assumption that will exist at protocol level in Ethereum is collision-resistance of SHA3.<\/p>\n<p class=\"chakra-text css-gi02ar\">As a result of these changes, transactions are also going to become much simpler. Instead of having nine fields, as is the case right now, transactions will only have four fields: destination address, data, start gas and init code. Destination address, data and start gas are the same as they are now; &#8220;init code&#8221; is a field that can optionally contain contract creation code for the address that you are sending to.<\/p>\n<p class=\"chakra-text css-gi02ar\">The reason for the latter mechanic is as follows. One important property that Ethereum currently provides is the ability to send to an account before it exists; you do not need to already have ether in order to create a contract on the blockchain before you can receive ether. To allow this in Serenity, an account&#8217;s address can be determined from the desired initialization code for the account in advance, by using the formula <span class=\"chakra-text css-ons8vw\">sha3(creator + initcode) % 2**160<\/span> where <span class=\"chakra-text css-ons8vw\">creator<\/span> is the account that created the contract (the zero account by default), and <span class=\"chakra-text css-ons8vw\">initcode<\/span> is the initialization code for the contract (the output of running the initcode will become the contract code, just as is the case for CREATEs right now). You can thus generate the initialization code for your contract locally, compute the address, and let others send to that address. Then, once you want to send your first transaction, you include the init code in the transaction, and the init code will be executed automatically and the account created before proceeding to run the actual transaction (you can find this logic implemented <a target=\"_blank\" rel=\"noopener\" class=\"chakra-link css-vezwxf\" href=\"https:\/\/github.com\/ethereum\/pyethereum\/blob\/42a448be003e07db18cd94159a61f3a361aff57e\/ethereum\/serenity_blocks.py#L253\">here<\/a>).<\/p>\n<h3 class=\"chakra-heading group css-xuzltg\" id=\"abstraction-and-blocks\" data-group=\"true\"><a class=\"chakra-link css-128fqrf\" aria-label=\"abstraction and blocks permalink\" href=\"#abstraction-and-blocks\"><svg viewbox=\"0 0 24 24\" focusable=\"false\" class=\"chakra-icon css-173jpr1\"><g fill=\"currentColor\"><path d=\"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z\"\/><path d=\"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z\"\/><\/g><\/svg><\/a>Abstraction and Blocks<\/h3>\n<p class=\"chakra-text css-gi02ar\">Another clean separation that will be implemented in Serenity is the complete separation of blocks (which are now simply packages of transactions), state (ie. current contract storage, code and account balances) and the consensus layer. Consensus incentivization is done inside a contract, and consensus-level objects (eg. PoW, bets) should be included as transactions sent to a &#8220;consensus incentive manager contract&#8221; if one wishes to incentivize them.<\/p>\n<p class=\"chakra-text css-gi02ar\">This should make it much easier to take the Serenity codebase and swap out Casper for any consensus algorithm &#8211; Tendermint, <a target=\"_blank\" rel=\"noopener\" class=\"chakra-link css-vezwxf\" href=\"https:\/\/github.com\/amiller\/HoneyBadgerBFT\">HoneyBadgerBFT<\/a>, <a target=\"_blank\" rel=\"noopener\" class=\"chakra-link css-vezwxf\" href=\"http:\/\/arxiv.org\/abs\/1501.06238\">subjective consensus<\/a> or even plain old proof of work; we welcome research in this direction and aim for maximum flexibility.<\/p>\n<h3 class=\"chakra-heading group css-xuzltg\" id=\"abstraction-and-storage\" data-group=\"true\"><a class=\"chakra-link css-128fqrf\" aria-label=\"abstraction and storage permalink\" href=\"#abstraction-and-storage\"><svg viewbox=\"0 0 24 24\" focusable=\"false\" class=\"chakra-icon css-173jpr1\"><g fill=\"currentColor\"><path d=\"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z\"\/><path d=\"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z\"\/><\/g><\/svg><\/a>Abstraction and Storage<\/h3>\n<p class=\"chakra-text css-gi02ar\">Currently, the &#8220;state&#8221; of the Ethereum system is actually quite complex and includes many parts:<\/p>\n<ul role=\"list\" class=\"css-1ars4k6\">\n<li class=\"css-0\">Balance, code, nonce and storage of accounts<\/li>\n<li class=\"css-0\">Gas limit, difficulty, block number, timestamp<\/li>\n<li class=\"css-0\">The last 256 block hashes<\/li>\n<li class=\"css-0\">During block execution, the transaction index, receipt tree and the current gas used<\/li>\n<\/ul>\n<p class=\"chakra-text css-gi02ar\">These data structures exist in various places, including the block state transition function, the state tree, the block header and previous block headers. In Serenity, this will be simplified greatly: although many of these variables will still exist, they will all be moved to specialized contracts in storage; hence, the ONLY concept of &#8220;state&#8221; that will continue to exist is a tree, which can mathematically be viewed as a mapping <span class=\"chakra-text css-ons8vw\">{address: {key: value} }<\/span>. Accounts will simply be trees; account code will be stored at key <span class=\"chakra-text css-ons8vw\">&#8220;&#8221;<\/span> for each account (not mutable by <span class=\"chakra-text css-ons8vw\">SSTORE<\/span>), balances will be stored in a specialized &#8220;ether contract&#8221; and sequence numbers will be left up to each account to determine how to store. Receipts will also be moved to storage; they will be stored in a &#8220;log contract&#8221; where the contents get overwritten every block.<\/p>\n<p class=\"chakra-text css-gi02ar\">This allows the State object in implementations to be simplified greatly; all that remains is a two-level map of tries. The scalability upgrade may increase this to three levels of tries (shard ID, address, key) but this is not yet determined, and even then the complexity will be substantially smaller than today.<\/p>\n<p class=\"chakra-text css-gi02ar\">Note that the move of ether into a contract does NOT constitute total ether abstraction; in fact, it is arguably not that large a change from the status quo, as opcodes that deal with ether (the <span class=\"chakra-text css-ons8vw\">value<\/span> parameter in <span class=\"chakra-text css-ons8vw\">CALL<\/span>, <span class=\"chakra-text css-ons8vw\">BALANCE<\/span>, etc) still remain for backward-compatibility purposes. Rather, this is simply a reorganization of how data is stored.<\/p>\n<h3 class=\"chakra-heading group css-xuzltg\" id=\"future-plans\" data-group=\"true\"><a class=\"chakra-link css-128fqrf\" aria-label=\"future plans permalink\" href=\"#future-plans\"><svg viewbox=\"0 0 24 24\" focusable=\"false\" class=\"chakra-icon css-173jpr1\"><g fill=\"currentColor\"><path d=\"M10.458,18.374,7.721,21.11a2.853,2.853,0,0,1-3.942,0l-.892-.891a2.787,2.787,0,0,1,0-3.941l5.8-5.8a2.789,2.789,0,0,1,3.942,0l.893.892A1,1,0,0,0,14.94,9.952l-.893-.892a4.791,4.791,0,0,0-6.771,0l-5.8,5.8a4.787,4.787,0,0,0,0,6.77l.892.891a4.785,4.785,0,0,0,6.771,0l2.736-2.735a1,1,0,1,0-1.414-1.415Z\"\/><path d=\"M22.526,2.363l-.892-.892a4.8,4.8,0,0,0-6.77,0l-2.905,2.9a1,1,0,0,0,1.414,1.414l2.9-2.9a2.79,2.79,0,0,1,3.941,0l.893.893a2.786,2.786,0,0,1,0,3.942l-5.8,5.8a2.769,2.769,0,0,1-1.971.817h0a2.766,2.766,0,0,1-1.969-.816,1,1,0,1,0-1.415,1.412,4.751,4.751,0,0,0,3.384,1.4h0a4.752,4.752,0,0,0,3.385-1.4l5.8-5.8a4.786,4.786,0,0,0,0-6.771Z\"\/><\/g><\/svg><\/a>Future Plans<\/h3>\n<p class=\"chakra-text css-gi02ar\">For POC2, the plan is to take abstraction even further. Currently, substantial complexity still remains in the block and transaction-level state transition function (eg. updating receipts, gas limits, the transaction index, block number, stateroots); the goal will be to create an &#8220;entry point&#8221; object for transactions which handles all of this extra &#8220;boilerplate logic&#8221; that needs to be done per transaction, as well as a &#8220;block begins&#8221; and &#8220;block ends&#8221; entry point. A theoretical ultimate goal is to come up with a protocol where there is only one entry point, and the state transition function consists of simply sending a message from the zero address to the entry point containing the block contents as data. The objective here is to reduce the size of the actual <em class=\"chakra-text css-0\">consensus-critical client implementation<\/em> as much as possible, pushing a maximum possible amount of logic directly into Ethereum code itself; this ensures that Ethereum&#8217;s multi-client model can continue even with an aggressive development regime that is willing to accept hard forks and some degree of new complexity in order to achieve our goals of transaction speed and scalability without requiring an extremely large amount of ongoing development effort and security auditing.<\/p>\n<p class=\"chakra-text css-gi02ar\">In the longer term, I intend to continue producing proof-of-concepts in python, while the Casper team works together on improving the efficiency and proving the safety and correctness of the protocol; at some point, the protocol will be mature enough to handle a public testnet of some form, possibly (but not certainly) with real value on-chain in order to provide stronger incentives for people to try to &#8220;hack&#8221; Casper they way that we inevitably expect that they will once the main chain goes live. This is only an initial step, although a very important one as it marks the first time when the research behind proof of stake and abstraction is finally moving from words, math on whiteboards and blog posts into a working implementation written in code.<\/p>\n<p class=\"chakra-text css-gi02ar\">The next part of this series will discuss the other flagship feature of Serenity, the Casper consensus algorithm.<\/p>\n<\/div>\n<p><br \/>\n<br \/><a href=\"https:\/\/blog.ethereum.org\/en\/2015\/12\/24\/understanding-serenity-part-i-abstraction\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Special thanks to Gavin Wood for prompting my interest into abstraction improvements, and Martin Becze, Vlad Zamfir and Dominic Williams for ongoing discussions. For a long time we have been public about our plans to continue improving the Ethereum protocol over time and our long development roadmap, learning from our mistakes that we either did [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":18498,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"tdm_status":"","tdm_grid_status":"","footnotes":""},"categories":[24],"tags":[],"kronos_expire_date":[],"class_list":["post-18814","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ethereum"],"_links":{"self":[{"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/posts\/18814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/comments?post=18814"}],"version-history":[{"count":0,"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/posts\/18814\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/media\/18498"}],"wp:attachment":[{"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/media?parent=18814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/categories?post=18814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/tags?post=18814"},{"taxonomy":"kronos_expire_date","embeddable":true,"href":"https:\/\/cryptoted.net\/index.php\/wp-json\/wp\/v2\/kronos_expire_date?post=18814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}