-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Investigate slow BLOCKHASH #5615
Comments
Considering Aleth's implementation where block hashes are copied up front for EVM execution (I'm considering that inefficient, but there was never time to anything about it) the problem might be getting the current block number. Although the timings for |
Looking at the code, I see we look up the hashes the first time Maybe there's a place where we do this call ( |
As @holiman pointed out, the paper Empirically Analyzing Ethereum’s Gas Mechanism analyzed aleth using the "Blockhash refactoring" EIP: ethereum/EIPs#210 From the paper:
I guess we don't know whether standard aleth with BLOCKHASH as an opcode (not a system contract as in EIP 210) is slow or not. We do know the standard BLOCKHASH opcode is slow in geth, though, so its worth checking aleth. |
Any suggestions what kind of benchmarks should be do? |
I suppose reproducing the ones in holiman/vmstats. Some notes from the chat:
|
I did the same thing as Martin here 932fdd9 So far this is what I got for the first 1M blocks: Looks like It's hard to continuously sync even to 2M because of issues in sync (crashes/deadlocks), so not sure how useful further attempts can be. I can also try syncing from the snapshot, to get the stats from the middle of the chain... |
The report https://arxiv.org/pdf/1905.00553.pdf show that
BLOCKHASH
is very slow comparing to its price.This is also confirmed by @holiman's report https://github.com/holiman/vmstats (raw data: https://docs.google.com/spreadsheets/d/1zjF6YWrVxfNoj0fH3WRek-G4Bw0fbbOnRusC0gMtmL0/edit#gid=852228130)
Is
GASPRICE
something we should also investigate?cc @cdetrio
The text was updated successfully, but these errors were encountered: