Consensys / linea-arithmetization

19 stars 19 forks source link

Return data for precompiles #747

Closed OlivierBBB closed 1 month ago

OlivierBBB commented 1 month ago

Here's one way to catch the return data of precompiles:

if (opCode.isCall()) {
    isPrecompileCall  = calleeAddress.isPrecompile()   // not sure about the syntax
}
if (isPrecompileCall) {
    frame.setReturnData( [besu's return data] );    // not sure how to get this return data but it should be available through best
}

isPrecompileCall = false;

This leaves open the question of extracting besu's return data (and whether or not it will be available before tracePostOpcode is called.