Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace LOTUS_FVM_DEVELOPER_DEBUG with a --debug-log flags #12771

Open
Stebalien opened this issue Dec 10, 2024 · 0 comments
Open

Replace LOTUS_FVM_DEVELOPER_DEBUG with a --debug-log flags #12771

Stebalien opened this issue Dec 10, 2024 · 0 comments

Comments

@Stebalien
Copy link
Member

Specifically:

  1. Add --debug-log flags to lotus state compute-state, lotus state exec-trace, lotus state replay, and lotus state call.
  2. Remove the LOTUS_FVM_DEVELOPER_DEBUG environment variable.

When these flags are specified, we should run the FVM in dual-execution mode as we currently do when LOTUS_FVM_DEVELOPER_DEBUG. Additionally, now that the actor logs have been moved into the trace, we can return the actor logs as a part of the command output instead of writing them to stdout.

However, there are two wrinkles we need to tackle before someone can take this:

  1. Dual execution doubles the execution cost, so we only want to do this when requested by the user. Unfortunately, we don't have a great way to tell commands like StateCompute about this. We'll need to consider how we want to pass information like this over the RPC API.
  2. We still want accurate gas traces we'll end up with two traces: one with accurate gas usage and one with debug logs. Ideally we'd merge them and copy all the debug logs from the "debug" trace into the "real" trace. However, the debug trace can go off and do completely different things (it generally shouldn't, but it might in a few cases) so we'll need to be careful about how we write the merge algorithm.

Depends on filecoin-project/filecoin-ffi#510.

@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📌 Triage
Development

No branches or pull requests

1 participant