Skip to content

Fix: Implement ABI Method Num to Actor Method name correctly#299

Merged
ziscky merged 28 commits into
devfrom
fix/method-name-extraction
Mar 11, 2025
Merged

Fix: Implement ABI Method Num to Actor Method name correctly#299
ziscky merged 28 commits into
devfrom
fix/method-name-extraction

Conversation

@ziscky
Copy link
Copy Markdown
Contributor

@ziscky ziscky commented Mar 4, 2025

Version-Aware Actor Method Resolution

This PR deprecates GetMethodName(abi.MethodNum) due to its reliance on a specific builtin-actors version, causing inaccurate results for varying actor versions. Instead, V2 actors now provide Methods(network, height, abi.MethodNum...), which dynamically retrieves method metadata from the correct actor version based on network and height. This ensures accurate method resolution across all actor versions.

🔗 zboto Link

@ziscky ziscky marked this pull request as ready for review March 4, 2025 18:16
Comment thread parser/v2/parser.go Outdated
@ziscky ziscky requested a review from JulianToledano March 5, 2025 07:37
Copy link
Copy Markdown
Contributor

@JulianToledano JulianToledano left a comment

Choose a reason for hiding this comment

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

LGTM! just a couple of comments!

Comment thread actors/v2/tools.go Outdated
Comment thread actors/v2/tools.go Outdated
Copy link
Copy Markdown
Member

@emmanuelm41 emmanuelm41 left a comment

Choose a reason for hiding this comment

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

What a PR!!!!

Copy link
Copy Markdown
Contributor

@lucaslopezf lucaslopezf left a comment

Choose a reason for hiding this comment

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

I love it!!! Let's remove the debug lines (prinln) and as important only one comment (the one that we can have error in runtime, the other comments are mostly for later consideration)

Comment thread actors/v2/actors.go Outdated
Comment thread actors/v2/market/market.go Outdated
Comment thread actors/v2/paymentChannel/paymentChannel.go Outdated
Comment thread parser/v2/parser.go Outdated
@ziscky ziscky merged commit 7dabf77 into dev Mar 11, 2025
@ziscky ziscky deleted the fix/method-name-extraction branch March 11, 2025 14:05
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.

4 participants