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

Toolbox/precommit stuck #282

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

lanzafame
Copy link
Contributor

No description provided.

Copy link
Contributor

@LexLuthr LexLuthr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make some changes to make this into a generic command. It would be very useful for everyone in multiple scenarios.

}

app := &cli.App{
Name: "toolbox",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably move this to sptool instead of a new CLI. This does what sptool is supposed to but uses filfox instead of chain. I don't see any hard in this. Maybe house it under sptool toolbox

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

return addr, nil
}

var precommitStuckCmd = &cli.Command{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's convert this into a more generic message finder command instead of only precommit.

var precommitStuckCmd = &cli.Command{
Name: "precommit-stuck",
Usage: "Perform db operations to fix issues with precommit messages getting stuck",
Action: func(cctx *cli.Context) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should take a user input about which messages to check for. Doing a blanket try on all would be an issue. In fact, we should get a list of all pending ones. Then check if any of them can be found on filfox (already executed), check if FullNode is part the execution tipset. If it is then we show these messages to user and let me choose to fix the problem for specific ones they want. Or maybe have a flag like --fix-all then in that case fix them all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we should create a pending(stuck)-msg cmd that lists msgs that are stuck. What changes would I need to make to db query to get the different stuck msgs? On the fixing other message type, can you give me an example of what other message/methods may get stuck in the same way as this? Currently, the fixing seems dependent on the precommit msg cid being the thing we are solving around.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the beauty of it. We don't care what task created this message. We only care if any message which does not have return or execution details and can be found in FilFox and has been there for more than 30 epochs (avoid stepping on chain daemon's toes) then we should fix that pending message. Now once we have this list we can ask user to choose which to fix or fix them all.

@LexLuthr
Copy link
Contributor

Once you are done with changes, don't forget to run make gen command to generate/fix everything.

@LexLuthr
Copy link
Contributor

We should add some warning telling that this tool only works for mainnet unless we want to add calibnet API as well.

@LexLuthr
Copy link
Contributor

@lanzafame Hey! Any progress on the remaining changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants