-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Checklist
- feat: Update Services Pallet weights #780
- [TASK] Add slashing to services pallet #777
- [TASK] Implement a queue for slashing events #775
- [TASK] Implement payment system for creating instances. #773
- [TASK] Slashing and governance #717
- [NOTES] Restaking infrastructure v2 #732
- [TASK] Service requesters must specify assets to secure their instances #774
- [TASK] Separate BlueprintManager from InstanceManager #784
Notes
Service pallet updates / flows
- Selecting the assets backing a service instance and answering questions below
- How will we price selecting assets in a service?
- How will we reward restakers of different assets of a service?
Separating the Blueprint contract from the ServiceInstance contract.
- BlueprintManager.sol - responsible for registration and request hook definition. Responsible for developer settings like payments, incentives, etc.
- InstanceManager.sol - responsible for managing a single specific instance. Should have access to precompile functions which grab metadata of the instance such as restaked assets, operators of the instance, etc.
- Decide if BlueprintManager “knows” about its instances or if it doesn’t need to. Perhaps BlueprintManager.sol deploys InstanceManager.sol upon successful instancing of the service.
- InstanceManager.sol - contains the job calls / verify fns for the system. The runtime IMO should either handle this or the Blueprint manager can delegate through its mappings.
mapping(uint64 => address) public instanceManagers;
function onJobCallResult(
uint64 serviceId,
uint8 job,
uint64 _jobCallId,
bytes calldata participant,
bytes calldata _inputs,
bytes calldata _outputs
) public virtual override onlyFromRootChain {
// Call the instance manager's onJobCallResult function
address instanceManager = instanceManagers[serviceId];
IInstanceManager(instanceManager).onJobCallResult(
serviceId,
job,
_jobCallId,
participant,
_inputs,
_outputs
);
}
function verifyJobCallResult(
uint64 serviceId,
uint8 job,
uint64 jobCallId,
bytes calldata participant,
bytes calldata inputs,
bytes calldata outputs
) public view virtual override onlyFromRootChain returns (bool) {
// Call the instance manager's verifyJobCallResult function
address instanceManager = instanceManagers[serviceId];
return IInstanceManager(instanceManager).verifyJobCallResult(
serviceId,
job,
jobCallId,
participant,
inputs,
outputs
);
}Slashing logic on services pallet (using the extrinsics as you had mentioned)
- Identify security implications of runtime slashing vs precompile slashing. See if we can design a secure precompile for triggering slashing.
- Slashing should happen on the InstanceManager.sol. The Blueprint developer should consider what context needs to be maintained on specific instances and not.
Reactions are currently unavailable
Metadata
Metadata
Labels
No labels
Type
Projects
Status
EPICS 🚀