2.9 C
New York
Sunday, March 9, 2025
HomeIndustry NewsExploiting eth_call for optimization purposes

Exploiting eth_call for optimization purposes

Date:

Related stories

SEC Closes Investigation Into Yuga Labs’ NFTs After Three Years

18Yuga Labs announced that the U.S. Securities and Exchange...

Memecoins crash – Analyzing impact of token launches falling to pre-mania levels

The SEC’s ruling that memecoins are not securities was...

The European Market for Peripherally Inserted Central Catheter (PICC)

Peripherally inserted central catheters (PICCs) have a wide range...

USGS: Aggregate production down 6 percent in 2024

Aggregate production was down 6 percent nationwide in 2024,...

Is Bitcoin’s Bull Run Over?

Bitcoin (BTC) has been the dominant force in the...

The Good News

The good news is that eth_call is highly flexible and allows us to execute EVM bytecode directly on the blockchain. This means we can achieve the same result without needing a pre-deployed contract by executing the following:

curl -X POST --data '[
 {"jsonrpc":"2.0","method":"eth_call",
 "params":[{"data": "0x4260005260206000f3"},"0xa95aab"],
 "id":11098795},
 
 {"jsonrpc":"2.0","method":"eth_call",
 "params":[{"data": "0x4260005260206000f3"},"0xa95aac"],
 "id":11098796},
 
 {"jsonrpc":"2.0","method":"eth_call",
 "params":[{"data": "0x4260005260206000f3"},"0xa95aad"],
 "id":11098797},
 
 {"jsonrpc":"2.0","method":"eth_call",
 "params":[{"data": "0x4260005260206000f3"},"0xa95aae"],
 "id":11098798},
 
 {"jsonrpc":"2.0","method":"eth_call",
 "params":[{"data": "0x4260005260206000f3"},"0xa95aaf"],
 "id":11098799}
 ]'  https://node-rpc:8545/`

(This exactly: curl -X POST --data '[{"jsonrpc":"2.0","method":"eth_call","params":[{"data": "0x4260005260206000f3"},"0xa95aab"],"id":11098795},{"jsonrpc":"2.0","method":"eth_call","params":[{"data": "0x4260005260206000f3"},"0xa95aac"],"id":11098796},{"jsonrpc":"2.0","method":"eth_call","params":[{"data": "0x4260005260206000f3"},"0xa95aad"],"id":11098797},{"jsonrpc":"2.0","method":"eth_call","params":[{"data": "0x4260005260206000f3"},"0xa95aae"],"id":11098798},{"jsonrpc":"2.0","method":"eth_call","params":[{"data": "0x4260005260206000f3"},"0xa95aaf"],"id":11098799}]' https://ethereum-rpc.publicnode.com )

The response:

[{"jsonrpc":"2.0","id":11098795,"result":
"0x000000000000000000000000000000000000000000000000000000005f9004b9"},
{"jsonrpc":"2.0","id":11098796,"result":
"0x000000000000000000000000000000000000000000000000000000005f9004c7"},
{"jsonrpc":"2.0","id":11098797,"result":
"0x000000000000000000000000000000000000000000000000000000005f9004c9"},
{"jsonrpc":"2.0","id":11098798,"result":
"0x000000000000000000000000000000000000000000000000000000005f9004d5"},
{"jsonrpc":"2.0","id":11098799,"result":
"0x000000000000000000000000000000000000000000000000000000005f9004d8"}
]

Where we can clearly see the timestamp of each of the requested blocks:

...
11098797 -> 0x05f9004c9 -> 2020-10-21T09:52:21.000Z
11098798 -> 0x05f9004d5 -> 2020-10-21T09:52:09.000Z
..

Source link

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories