-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: main
Are you sure you want to change the base?
Toolbox/precommit stuck #282
Conversation
There was a problem hiding this 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.
cmd/toolbox/main.go
Outdated
} | ||
|
||
app := &cli.App{ | ||
Name: "toolbox", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
cmd/toolbox/main.go
Outdated
return addr, nil | ||
} | ||
|
||
var precommitStuckCmd = &cli.Command{ |
There was a problem hiding this comment.
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.
cmd/toolbox/main.go
Outdated
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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Once you are done with changes, don't forget to run |
We should add some warning telling that this tool only works for mainnet unless we want to add calibnet API as well. |
@lanzafame Hey! Any progress on the remaining changes? |
No description provided.