-
Notifications
You must be signed in to change notification settings - Fork 147
Closed
Labels
Description
At the moment, when actor debugging is enabled logs are written to stdout. Instead, we should record them in the execution trace inside of the call manager. I.e., each log becomes an ExecutionEvent:
Lines 21 to 40 in ed6d34a
| pub enum ExecutionEvent { | |
| GasCharge(GasCharge), | |
| /// Emitted on each send call regardless whether we actually end up invoking the | |
| /// actor or not (e.g. if we don't have enough gas or if the actor does not exist) | |
| Call { | |
| from: ActorID, | |
| to: Address, | |
| method: MethodNum, | |
| params: Option<IpldBlock>, | |
| value: TokenAmount, | |
| gas_limit: u64, | |
| read_only: bool, | |
| }, | |
| CallReturn(ExitCode, Option<IpldBlock>), | |
| CallError(SyscallError), | |
| /// Emitted every time an actor is successfully invoked. | |
| InvokeActor { | |
| id: ActorID, | |
| state: ActorState, | |
| }, |
If we do this, it should become much easier to debug actors from clients. Instead of having to:
- Restart the client with some env var enabled.
- Read stdout/stderr.
We can invoke the FVM with debug tracing enabled and return the serialized logs over RPC.