filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go
https://lotus.filecoin.io/
Other
2.85k stars 1.27k forks source link

Integrate Built-in Actor Logs into Lotus Logging System #11986

Open rjan90 opened 6 months ago

rjan90 commented 6 months ago

Summary: Currently, built-in actor debug logs are not visible by default in the Lotus logs, and there is no straightforward method to enable them through the standard Lotus logging commands. The only workaround is to set the environment variable LOTUS_FVM_DEVELOPER_DEBUG to 1.

We should look at integrating the built-in actor logs into the regular Lotus logging system for a more streamlined debugging experience.

Acceptance Criteria:

  1. Developers should be able to enable built-in actor debug logs using the standard logging commands in Lotus.
  2. The logs should be integrated seamlessly with the existing Lotus logs without requiring additional environment configurations.
Stebalien commented 6 months ago

Logging from the builtin actors means executing messages a second time with logging enabled (ignoring gas limits, I guess?). IMO, we should add some API endpoints like ComputeStateWithLogging, etc.

Stebalien commented 6 months ago

Alternatively, we can focus on making it easier to extract test vectors for messages and tipsets. E.g.:

lotus state extract-vector <message-cid | message-params | tipset>

Basically, it would be nice to be able to execute an existing message and/or a new message and/or an entire tipset and easily extract a test vector that we can play with in the fvm testbench.

rvagg commented 6 months ago

From the sync discussion about this I learned about the tvx tool in the lotus repo. It probably needs some work to bring it up to scratch, and ideally this is the kind of thing you could extract to run in fvm_workbench.