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

feat: allow calling InvokeEVM on accounts #1081

Closed
wants to merge 1 commit into from

Conversation

Stebalien
Copy link
Member

Additionally, use the same dispatch mechanism for the universal receiver hook. Given #1076, CBOR encoding should no longer be a compatibility hazard for us.

@Stebalien Stebalien marked this pull request as draft January 19, 2023 20:07
@Stebalien Stebalien force-pushed the steb/invoke-evm-account branch 4 times, most recently from aab0e3c to fad4272 Compare January 19, 2023 20:10
@Stebalien
Copy link
Member Author

Context on:

Given #1076, CBOR encoding should no longer be a compatibility hazard for us.

We can use the codec (CBOR versus DAG_CBOR) to signal to the system whether or not reachability analysis needs to be done. CBOR is a superset of DAG_CBOR, so we're not really giving anything up here.

Additionally, use the same dispatch mechanism for the universal receiver
hook. Given #1076, CBOR encoding should no longer be a compatibility
hazard for us.
@Stebalien Stebalien marked this pull request as ready for review January 19, 2023 21:25
Copy link
Member

@anorth anorth left a comment

Choose a reason for hiding this comment

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

See filecoin-project/FIPs#592 (reply in thread).

How about instead we make the built-in account always succeed for unimplemented methods. This is then open to future innovations that would otherwise require yet more special handing in the built-in account.

}

impl ActorCode for EthAccountActor {
type Methods = Method;
actor_dispatch! {
Constructor => constructor,
AuthenticateMessageExported => authenticate_message,
UniversalReceiverHook => universal_receiver_hook,
UniversalReceiverHook => (),
Copy link
Member

Choose a reason for hiding this comment

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

Will this skip decoding the ignore parameters too (#1066)? 🎉

Could you revert this change in the tests to demonstrate this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Will this skip decoding the ignore parameters too (#1066)? 🎉

Yes.

Could you revert this change in the tests to demonstrate this?

Can do.

Stebalien added a commit that referenced this pull request Jan 20, 2023
This patch introduces a few features:

1. The dispatch macro can now pass the "raw" parameters to a method.
2. The dispatch macro can now have an explicit fallback case.

We then use these features to implement a "raw" fallback for both
account types that simply accepts all method calls greater than the max
FRC0042 number.

Alternative to #1081

Fixes #1076
Stebalien added a commit that referenced this pull request Jan 20, 2023
This patch introduces a few features:

1. The dispatch macro can now pass the "raw" parameters to a method.
2. The dispatch macro can now have an explicit fallback case.

We then use these features to implement a "raw" fallback for both
account types that simply accepts all method calls greater than the max
FRC0042 number.

Alternative to #1081

Fixes #1076
Stebalien added a commit that referenced this pull request Jan 20, 2023
This patch introduces a few features:

1. The dispatch macro can now pass the "raw" parameters to a method.
2. The dispatch macro can now have an explicit fallback case.

We then use these features to implement a "raw" fallback for both
account types that simply accepts all method calls greater than the max
FRC0042 number.

Alternative to #1081

Fixes #1076
@Stebalien
Copy link
Member Author

Superseded by #1086.

@Stebalien Stebalien closed this Jan 24, 2023
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.

2 participants