-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIP-0062: Fallback Method Handler for the Multisig Actor (#667)
Co-authored-by: raulk <raul.kripalani@gmail.com>
- Loading branch information
Showing
1 changed file
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
fip: "0062" | ||
title: Fallback Method Handler for the Multisig Actor | ||
author: Dimitris Vyzovitis (@vyzo), Raúl Kripalani (@raulk) | ||
discussions-to: https://github.com/filecoin-project/FIPs/discussions/671 | ||
status: Draft | ||
type: Technical Core | ||
created: 2023-03-20 | ||
spec-sections: | ||
- https://spec.filecoin.io/#section-glossary.multisig-actor | ||
requires: FIP-0050 | ||
--- | ||
|
||
# Fallback Method Handler for the Multisig Actor | ||
|
||
## Simple Summary | ||
|
||
Adds a no-op handler for method numbers higher or equal to 2^24 (the first exported method as per [FRC-0042]) to the multisig actor. | ||
This change enables the built-in multisig actor to receive value from EVM runtime actors (i.e. smart contracts), Eth accounts, and placeholders. | ||
It also brings them in line with the equivalent behaviour of account actors, as of [FIP-0050]. | ||
|
||
## Abstract | ||
|
||
We introduce a no-op handler in the built-in multisig actor for calls where `MethodNum >= 2^24`. | ||
Such calls are now no longer rejected, and instead return successfully. | ||
|
||
## Change Motivation | ||
|
||
This change is needed to normalise interactions from EVM runtime actors (i.e. smart contracts), Eth accounts, and placeholders with the multisig actor. | ||
These actors set `MethodNum = FRC-42("InvokeEVM")` by default when performing outbound calls, including simple value transfers. | ||
Refer to [FIP-0054] and [FIP-0055] for background. | ||
|
||
Prior to this FIP, built-in multisig actor would reject such calls, causing the immediate reversal of a value transfer. | ||
|
||
This limitation was first encountered in the wild when deploying a Wrapped FIL (WFIL) token. | ||
While a multisig can hold WFIL tokens, unwrapping them into the native FIL coin causes a value transfer to the multisig, carrying the above method number. | ||
This would be rejected unconditionally. | ||
|
||
This change also brings multisigs in line with the equivalent no-op behaviour implemented for account actors in [FIP-0050]. | ||
|
||
## Specification | ||
|
||
Given: | ||
|
||
``` | ||
pub const FIRST_EXPORTED_METHOD_NUMBER: MethodNum = 1 << 24; | ||
``` | ||
|
||
Augment the built-in multisig actor to handle calls on method numbers higher or equal to `FIRST_EXPORTED_METHOD_NUMBER` by immediately returning exit code 0 (Ok) and no return value, independently of the sender, origin, or call parameters. | ||
|
||
Methods below `FIRST_EXPORTED_METHOD_NUMBER` continue to be handled as-is. | ||
|
||
## Design Rationale | ||
|
||
We adopt the simplest solution possible to achieve the goal. | ||
Precedent exists in the account actor as of network version 18. | ||
|
||
### Payment channels | ||
|
||
A previous version of this FIP included payment channels in scope. | ||
However, this conflicted with their deliberate non-implementation of the Universal Receiver Hook, specified in [FIP-0053], motivated by their inability to manage such tokens if received. | ||
Given the prevalent disuse of the payment channel actor on mainnet, we do not see immediate justification to resolve that conflict, and therefore choose to descope the payment channel implementation in this FIP. | ||
|
||
## Backwards Compatibility | ||
|
||
While this is a change in behaviour and interface, it is strictly expansive and no backwards compatibility issues are expected. | ||
|
||
## Test Cases | ||
|
||
- Send an arbitrary message, with method number equal to the minimum exported method number, which should be accepted returning an empty value. | ||
- Send an arbitrary message, with method number over the minimum exported method number, which should be accepted returning an empty value. | ||
- Send an arbitrary message, with method number below the minimum exported method number, which should be rejected. | ||
|
||
## Security Considerations | ||
|
||
None. | ||
|
||
## Incentive Considerations | ||
|
||
None. | ||
|
||
## Product Considerations | ||
|
||
Improves the interoperability of multisigs actors with Filecoin EVM runtime actors (i.e. smart contracts), Eth accounts, and placeholders. | ||
|
||
## Implementation | ||
|
||
https://github.com/filecoin-project/builtin-actors/pull/1252 | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). | ||
|
||
[FIP-0050]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0050.md | ||
[FIP-0054]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0054.md | ||
[FIP-0055]: https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0055.md | ||
[FRC-0042]: https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0042.md | ||
[FRC-0053]: https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0053.md |