Consensys / linea-tracer

Part of the Linea stack responsible for extracting data from the execution of an EVM client in order to construct large matrices called execution traces.
https://linea.build
Other
35 stars 22 forks source link

error range 6690-6699 #1061

Closed FlorianHuc closed 1 month ago

FlorianHuc commented 2 months ago

Ranges

6690-6699

Issue

Failed to fetch or parse JSON data for block range =6690-6699: 'result' Data received before error for block range =6690-6699: {'jsonrpc': '2.0', 'id': 1, 'error': {'code': -32603, 'message': 'Plugin internal error', 'data': 'Exceptions triggered while tracing:\n - null\n'}}

FlorianHuc commented 2 months ago

java.lang.IllegalArgumentException: null at com.google.common.base.Preconditions.checkArgument(Preconditions.java:129) ~[guava-33.0.0-jre.jar:?] at net.consensys.linea.zktracer.module.hub.section.halt.ReturnSection.(ReturnSection.java:145) ~[?:?] at net.consensys.linea.zktracer.module.hub.Hub.traceOpcode(Hub.java:1032) ~[?:?] at net.consensys.linea.zktracer.module.hub.Hub.processStateExec(Hub.java:958) ~[?:?] at net.consensys.linea.zktracer.module.hub.Hub.tracePreExecution(Hub.java:731) ~[?:?] at net.consensys.linea.zktracer.ZkTracer.tracePreExecution(ZkTracer.java:258) ~[?:?] at org.hyperledger.besu.evm.EVM.runToHalt(EVM.java:207) ~[besu-evm-24.8-develop-915fcb01.jar:24.8-develop-915fcb01] at org.hyperledger.besu.evm.processor.AbstractMessageProcessor.codeExecute(AbstractMessageProcessor.java:175) ~[besu-evm-24.8-develop-915fcb01.jar:24.8-develop-915fcb01] at org.hyperledger.besu.evm.processor.AbstractMessageProcessor.process(AbstractMessageProcessor.java:198) ~[besu-evm-24.8-develop-915fcb01.jar:24.8-develop-915fcb01] at org.hyperledger.besu.ethereum.mainnet.MainnetTransactionProcessor.process(MainnetTransactionProcessor.java:607) ~[besu-core-24.8-develop-915fcb01.jar:24.8-develop-915fcb01] at org.hyperledger.besu.ethereum.mainnet.MainnetTransactionProcessor.processTransaction(MainnetTransactionProcessor.java:457) ~[besu-core-24.8-develop-915fcb01.jar:24.8-develop-915fcb01] at org.hyperledger.besu.ethereum.mainnet.MainnetTransactionProcessor.processTransaction(MainnetTransactionProcessor.java:229) ~[besu-core-24.8-develop-915fcb01.jar:24.8-develop-915fcb01] at org.hyperledger.besu.services.TraceServiceImpl.lambda$trace$6(TraceServiceImpl.java:214) ~[besu-24.8-develop-915fcb01.jar:24.8-develop-915fcb01] at java.base/java.util.ArrayList.forEach(ArrayList.java:1597) ~[?:?] at org.hyperledger.besu.services.TraceServiceImpl.trace(TraceServiceImpl.java:200) ~[besu-24.8-develop-915fcb01.jar:24.8-develop-915fcb01]

lorenzogentile404 commented 2 months ago

Several exceptions raised:

java.lang.IllegalArgumentException
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:129)
    at net.consensys.linea.zktracer.module.hub.section.call.CallSection.resolvePostTransaction(CallSection.java:438)

(this is recurrent)

java.lang.IllegalArgumentException
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:129)
    at net.consensys.linea.zktracer.module.hub.section.halt.ReturnSection.<init>(ReturnSection.java:145)
java.lang.IllegalArgumentException
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:129)
    at net.consensys.linea.zktracer.module.hub.Hub.exitDeploymentFromDeploymentInfoPointOfView(Hub.java:714)
lorenzogentile404 commented 2 months ago

Precondition failing:

Screenshot 2024-09-02 at 23 06 42

OlivierBBB commented 1 month ago

All data collected below was collected at the start of the traceOpcode method of the Hub.java class.

First, uneventful, BLOCKHASH

transaction = 31
stamp = 59788
depth = 1
remainingGas = 93932

BLOCKHASH argument = 0x102d = 4141

Note. The argument is out of range so BLOCKHASH puts 0x00 on the stack.

Second, messed up, BLOCKHASH

Findings. Transaction = 31 seems to break down on a BLOCKHASH opcode

transaction = 31
stamp = 59843
depth = 1
remainingGas = 93714

BLOCKHASH argument = 0x192d = 6445

The very next opcode (if you create an unconditional breakpoint at the beginning of traceOpcode) happens in transaction 32. We do not traverse any of the following

OlivierBBB commented 1 month ago

⏫ @DavePearce and @letypequividelespoubelles ⏫

I'm wondering if this could be related to the capture mechanism.

letypequividelespoubelles commented 1 month ago

We just need to redeploy the last release on the shadow node, the release currently deployed misses the blockhash capture mechanism.

letypequividelespoubelles commented 1 month ago

we now trigger the return issue in the replayed file

letypequividelespoubelles commented 1 month ago

image test is passing with 0.5.3-beta : image