feat: Option to specify custom client address in mk12 deal proposals #700
+26
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
FIDL has introduced client smart contracts for use in Fil+. Instead of assigning DataCap directly to clients, it's now assigned to a smart contract. This provides more control over how the DataCap is used and allows allocators to revoke it from clients without needing to involve RKH. This system is already live on mainnet for DDO.
However, this introduces a challenge: from the perspective of the Market actor, the smart contract is the client. The Market actor will call the smart contract to authenticate the deal, but the contract still needs a way to verify that the actual client (the one using the DataCap) initiated the deal, so it can correctly deduct their allowance.
This PR
This pull request proposes a general solution: a new option that allows specifying the client address in the deal proposal separately from the wallet used to sign it.
This means a client can sign the proposal with their own wallet, but set the
clientAddress
field to point to the smart contract.The change is fully backwards compatible. If the
client-address
option is not provided, the system will default to using the signing wallet address, which is the current behavior.