Been running the simulator locally while testing a few contracts and ran into the same issue repeatedly.
When a request fails, the RPC response just returns Transaction failed with no context. At that point you have to start digging through container logs to figure out what actually happened, and even then it’s not obvious because there’s nothing linking those logs back to the original request.
In practice:
- you can’t tell where the failure came from (execution vs consensus vs model output)
- logs are spread across services with no correlation
- tracing a single request end-to-end is manual
It slows things down quite a bit when you’re iterating.
Suggestion
Two small things would make this a lot easier to work with during local dev:
Debug flag
- env-based (e.g. GENLAYER_DEBUG=1)
- when enabled, return actual error message in RPC response (and stack if needed)
- log a bit more context around request lifecycle
Request ID
- generate a requestId per incoming request
- include it in logs
- return it in the response when debug is on
Something along these lines:
json id="0v5x4j" { "error": "Transaction failed", "details": { "message": "..." }, "meta": { "requestId": "abc123" } }
That way you can at least match a failing response to the logs that produced it without guessing.
PR
Put together a minimal version of this in the JSON-RPC layer, all behind a flag so it doesn’t affect default behavior:
If there’s already a better way you’re handling this internally, I’m probably missing it. Otherwise this should be a small win for local debugging without touching core flow.
Been running the simulator locally while testing a few contracts and ran into the same issue repeatedly.
When a request fails, the RPC response just returns Transaction failed with no context. At that point you have to start digging through container logs to figure out what actually happened, and even then it’s not obvious because there’s nothing linking those logs back to the original request.
In practice:
It slows things down quite a bit when you’re iterating.
Suggestion
Two small things would make this a lot easier to work with during local dev:
Debug flag
Request ID
Something along these lines:
json id="0v5x4j" { "error": "Transaction failed", "details": { "message": "..." }, "meta": { "requestId": "abc123" } }
That way you can at least match a failing response to the logs that produced it without guessing.
PR
Put together a minimal version of this in the JSON-RPC layer, all behind a flag so it doesn’t affect default behavior:
If there’s already a better way you’re handling this internally, I’m probably missing it. Otherwise this should be a small win for local debugging without touching core flow.