You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deployment of IPC over Filecoin mainnet will be done through Solidity contracts. The following repo (and this internal fork) include the implementation of these actors. The IPC agent should be able to interact seamlessly with Solidity actors the same way that it does with the wasm-based native actors.
Goal
The goal is to implement the SubnetManager that target Solidity contracts, so in the agent we can determine if the subnet is a Solidity or native-based subnet. This will allow users to deploy their own custom subnet actors also written in Solidity (the only option currently available in subnet, deploying native actors is a bit more messy as it requires including the code as part of the builtin actor bundle).
Implementation
Deployment of gateway
The deployment of the gateway will be performed through any of the Solidity frameworks. This is done just once for every subnet. Ideally, if we want to support the Solidity subnet in child subnets we may need to deploy the contract in genesis (or as close as possible to genesis) to provide it with the required funds to mint new funds in the subnet. We have tested the deployment of the gateway with Foundry and hardhat, and while the Limechain team has been using Foundry for the development, hardhat has a better compatibility with Filecoin (Foundry has some unresolved issues that has made deploying the contracts a bit of an overhead).
Deployment of subnet actor
Ideally, for the deployment of the subnet actor I wanted the reference implementation of a subnet actor to be deployable from the agent directly without having to interact with any framework. This may be harder than expected, as the subnet actor requires that several libraries are already deployed and are linked in the bytecode. We may still be able to do this leveraging a factory contract, but worst case scenario, we delegate the deployment of subnet actors to be done through hardhat and foundry (even if the user is looking to deploy the reference subnet actor code, without modifications).
Interaction with Solidity contracts.
For the interaction of solidity contracts (calls and transactions) required to implement the operation of IPC I recommend using Rust ethers crate. I've done some tests with this crate and it has all the features needed for code-gen, type bindings, and interaction with deployed Solidity contracts
Note: For now, we will implement the integration assuming the the Solidity gateway contract will only be deployed in Filecoin mainnet, and child subnets will still use custom builtin bundles including a "native gateway". For subnet actors, we initially assume that in mainnet subnet actors are Solidity-based, and in child subnet wasm-based. That being said, in the near future we want to support the deployment of custom Solidity-based subnet actors in child subnets (although this may require some changes in the internal calls between the subnet actor and the gateway in order for them to target a native FVM builtin actors instead of an FEVM contract
Tasks
Script and docs to deploy the IPC gateway with hardhat/foundry.
Script and docs to deploy the IPC subnet actor with hardhat/foundry.
Evaluate if it is possible to deploy subnet actors through a factory contract or directly through a Rust script.
Implement subnet manager for solidity contracts (this may require bug fixes et. al.).
Test IPC agent integration and spawn a Solidity-based subnet.
Plan future work (interaction of Solidity-based subnet actors with a native wasm-based gateway actor).
The text was updated successfully, but these errors were encountered:
Background
The deployment of IPC over Filecoin mainnet will be done through Solidity contracts. The following repo (and this internal fork) include the implementation of these actors. The IPC agent should be able to interact seamlessly with Solidity actors the same way that it does with the wasm-based native actors.
Goal
The goal is to implement the
SubnetManager
that target Solidity contracts, so in the agent we can determine if the subnet is a Solidity or native-based subnet. This will allow users to deploy their own custom subnet actors also written in Solidity (the only option currently available in subnet, deploying native actors is a bit more messy as it requires including the code as part of the builtin actor bundle).Implementation
Deployment of gateway
The deployment of the gateway will be performed through any of the Solidity frameworks. This is done just once for every subnet. Ideally, if we want to support the Solidity subnet in child subnets we may need to deploy the contract in genesis (or as close as possible to genesis) to provide it with the required funds to mint new funds in the subnet. We have tested the deployment of the gateway with Foundry and hardhat, and while the Limechain team has been using Foundry for the development, hardhat has a better compatibility with Filecoin (Foundry has some unresolved issues that has made deploying the contracts a bit of an overhead).
Deployment of subnet actor
Ideally, for the deployment of the subnet actor I wanted the reference implementation of a subnet actor to be deployable from the agent directly without having to interact with any framework. This may be harder than expected, as the subnet actor requires that several libraries are already deployed and are linked in the bytecode. We may still be able to do this leveraging a factory contract, but worst case scenario, we delegate the deployment of subnet actors to be done through hardhat and foundry (even if the user is looking to deploy the reference subnet actor code, without modifications).
Interaction with Solidity contracts.
For the interaction of solidity contracts (calls and transactions) required to implement the operation of IPC I recommend using Rust ethers crate. I've done some tests with this crate and it has all the features needed for code-gen, type bindings, and interaction with deployed Solidity contracts
Tasks
The text was updated successfully, but these errors were encountered: