-
Notifications
You must be signed in to change notification settings - Fork 45
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
fix: log unknown actor type without returning error #1169
Conversation
lens/util/repo.go
Outdated
@@ -185,7 +185,8 @@ func MethodAndParamsForMessage(m *types.Message, destCode cid.Cid) (string, stri | |||
|
|||
params, method, err := ParseParams(m.Params, m.Method, destCode) | |||
if method == "Unknown" { | |||
return "", "", fmt.Errorf("unknown method for actor type %s: %d", destCode.String(), int64(m.Method)) |
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'm not sure this is the correct behavior if a method is unknown. I don't think we can write empty strings to models that expect a method name. One option would be to remove returning the name of the method being called here, and instead post process tables needing a method name string. cc @birdychang
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.
Why not just put ‘unknown’ as the method name?
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 always post process later. Also, don’t we wanna deprecate parsed messages? I don’t really care about the model. Let’s make it work first.
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.
Or just store the method code as the method name here. There’s should be separate columns in case it fails to lookup the name.
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.
Store the method in string format.
Don't error on unknown method numbers for FEVM.
Due to the previous fix, it will return the
Unknown
method, then cause the error inparsed_message
. Therefore, we can use the same logic asvm_message
: logging the error without returning error.