So you should be careful of this person, because if you take a photo with him, you may enter prison 😂😂
how the ETH2 deposit contract could have saved 18+ ETH ($ 56,000+) & more with this minor optimization trick on sparse merkle trees, and on SSTORE2
some context: an incremental Merkle Tree (MT) is a MT of fixed depth where each leaf starts as a Zero value.
the non-zero values are added from the left-most to the right-most leaf, one by one.
a well-known optimization is to pre-compute & the store Zero hashes
all subtrees to the right of the newest member consist of Merkle subtrees with all zero leaves)
notice below for a tree (h=5); the proof path for 2e7 is in orange; 13 & 87 (violet) are trees of all zero leaves of height 3 & 4 respectively - we can cache this!
eth2 deposit calculates, & caches this in storage, (SLOAD for lookup, initial storage cost)
github.com/tornadocash/tornado-core/blob/master/contracts/MerkleTreeWithHistory.sol#L125-L159…
(zerosFromStorage^)
tornado cache deposit contract uses a big switch statement, (JUMPI's for lookup, bytecode bloat)
github.com/tornadocash/tornado-core/blob/master/contracts/MerkleTreeWithHistory.sol#L125-L159…
(zerosFromSwitch^)
Some information that focuses on attention
1.Starkware delayed the first token to April 2024;
Jump Trading lost more than 200 million US dollars in the FTX collapse;
President of the French Bank of France: The European Union plans to launch a wholesale CBDC within a few weeks;
Galaxy Digital Mining Supervisor has resigned and founded a consulting service company;
Ledger and Sotheby's cooperation launch a limited edition hardware wallet for collectors;
Former CELSIUS CEO criminal trial date is scheduled to be September 17, 2024;
Foreign media: The scope of Singapore's money laundering survey has expanded, and the seizure amount reaches 2 billion US dollars;
Federal Reserve Mest: The Fed may be close to or reaching the peak of interest rate targets.
In August, Coinbase's stock price plummeted led to a profit of nearly US $ 480 million in traders who were short, which provided a chance to breathe for the short investors of the exchange because the stock had risen more than double this year. IHOR DUSANIWSKY, Managing Director of S3 Partners, said that the coinbase soldiers are still in a serious losses this year. So far this year, from the beginning of the year to the present, the amount of COINBASE (usually called short interest) is still as high as US $ 2 billion.
The US Securities and Exchange Commission (SEC) announced that it accused the former New Jersey State Police officer John A. Desalvo issued fraudulent funds through unregistered Blazar tokens and used it as a "encrypted pension" to the police, firefighters and emergency personnel. Sales, lies, saying that pension plans that can be used to supplement investors. Blazar token is a crypto asset securities he created, but it collapsed in May 2022. SEC also accused Desalvo misappropriation of investor funds, most of which were deposited in personal encryption asset wallets and used to pay for decoration costs.
According to SEC's allegations, from November 2021 to the final collapse, Desalvo raised at least 620,000 US dollars from about 220 investors.
When artificial intelligence is intelligent enough, I am a little scared.