How to Predict the Impact of EVM Upgrades

This document serves as an accompaniment to my talk at ETHTaipei and Web3FC, you can find my slides and some useful resources below. If you have any questions you can message me at https://twitter.com/_trvalentine.

Slides are available here, or click on the image below.

Update

Both talks are now available online in-case you missed them:

Self Destruct Removal (EIP-4758, EIP-6780)

Top Re-Initialisers (Number of Unique Bytecodes)

address Redeploys Distinct Bytecodes
0x000000035B35CB0C4F23CF027176F9381DAC4BF3 35 33
0x0000000000007F150BD6F54C40A34D7C3D5E9F56 37 31
0x00000000003B3CC22AF3AE1EAC0440BCEE416B40 27 27
0x000000005736775FEB0C8568E7DEE77222A26880 22 20
0x00000000000A47B1298F18CF67DE547BBE0D723F 18 18
0x429CF888DAE41D589D57F6DC685707BEC755FE63 17 17
0x007933790A4F00000099E9001629D9FE7775B800 17 16
0xD1742B3C4FBB096990C8950FA635AEC75B30781A 16 16
0x0B8A49D816CC709B6EADB09498030AE3416B66DC 15 15
0x00000000A991C429EE2EC6DF19D40FE0C80088B8 14 14

Top Re-Deployers (Total Deployments to Address)

Address Redeployments
0xBA4AC7AADFA00003A20C954E077D5C81994C8ECE 848
0x9C14D5CB81D576E97874B593BFFDEE670347BFD6 843
0xA46EC029DF976770A75B2CE42FD4276DDC26A961 818
0x08BD3B769FFD7992E1D14101A2235EEFF7232C57 817
0x3E2D8EABD99BC994D2AB4A804C6F804120AF123E 723
0x472875A6FDE6CC05B53E58F7E7064D5ADD45C4BF 718
0x8A454242940937C95DFFB7B038FE27B61817F036 497
0x19486D3A1DA8CFEB4CD19C9C4FE5624A6587673C 496
0x43ADCA66AC4D4037E4B5403BBE76FB25F33016C7 488
0x13B147B22C03DB16984696A8162DE019EA12A03D 487

WETH totalSupply vs Actual totalSupply

This is the query I ran against our database (if you’re interested in this kinda stuff you might like our transaction monitoring solution)

select (select sum(value)
        from token_balance
        where token_address = '\xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2') as total_weth,
       (select value
        from token_balance
        where owner_address = '\xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
          and token_address = '\xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee') as weth_eth_balance

This information is constantly changing but at the time I ran it:

total_weth weth_eth_balance
3133609961024924159661725 3131684096394379335977562

Transaction/Receipt Root Serialisation (EIP-6404, EIP-6466)

Finding RLP Decoding in TAC

This is the actual query we ran over our database of decompiled TAC code. If you get something in the right format you can actually use regex.

select md5_bytecode
from decompiled_code
where tac_level similar to
      '%\s+[a-zA-Z0-9_:]* = (G|L)T (([a-zA-Z0-9_]*(\([a-zA-Z0-9_]*\))?, [a-zA-Z0-9_]*\((0x7f|0x80|0x81)\))\n|([a-zA-Z0-9_]*\((0x7f|0x80|0x81)\)), [a-zA-Z0-9_]*(\([a-zA-Z0-9_]*\))?)%'
  and tac_level similar to
      '%\s+[a-zA-Z0-9_:]* = (G|L)T (([a-zA-Z0-9_]*(\([a-zA-Z0-9_]*\))?, [a-zA-Z0-9_]*\((0xb7|0xb8|0xb9)\))\n|([a-zA-Z0-9_]*\((0xb7|0xb8|0xb9)\)), [a-zA-Z0-9_]*(\([a-zA-Z0-9_]*\))?)%'
  and tac_level similar to
      '%\s+[a-zA-Z0-9_:]* = (G|L)T (([a-zA-Z0-9_]*(\([a-zA-Z0-9_]*\))?, [a-zA-Z0-9_]*\((0xbf|0xc0|0xc1)\))\n|([a-zA-Z0-9_]*\((0xbf|0xc0|0xc1)\)), [a-zA-Z0-9_]*(\([a-zA-Z0-9_]*\))?)%'
  and tac_level similar to
      '%\s+[a-zA-Z0-9_:]* = (G|L)T (([a-zA-Z0-9_]*(\([a-zA-Z0-9_]*\))?, [a-zA-Z0-9_]*\((0xf7|0xf8|0xf9)\))\n|([a-zA-Z0-9_]*\((0xf7|0xf8|0xf9)\)), [a-zA-Z0-9_]*(\([a-zA-Z0-9_]*\))?)%'

To explain whats going on we’re looking for comparison operations. We look for both > and <. You might also notice that we use more constants that just the RLP constants, actually what we look for is each RLP constant ±1 to account for < vs <= and > vs >=. We also check for the symmetry, so x <op> y vs y <op> x.

It can be written out more clearly as:

<variable> = (GT)|(LT) <variable> <variable>(±<constant>)
<variable> = (GT)|(LT) <variable>(±<constant>) <variable>

The Verge

The verge plays a role in both these studies, the self-destruct one more directly since it is being removed because of it. The roots study is also a result of the verge since the move to SSZ is motivated by its Merkle-ization properties (amongst others) which will help empower light clients.

Roadmap courtesy of Vitalik, check his Twitter for an updated one:

Verge roadmap

https://notes.ethereum.org/@vbuterin/verkle_tree_eip#Access-events-for-account-headers