feat: disable verifiers
Changes
This pr introduces proving systems or verifiers blacklisting through a new bitmap field in the ServiceManager contract. The batcher and operator, before doing a verification, they make sure that the proving system is indeed whitelisted by calling isVerifierValid function in the ServiceManager contract.
Test You can test this following these steps:
- Set up and run all the different components (anvil, aggregator, operator and batcher)
- In another terminal run
make batcher_send_burst_groth16just to keep generating new proofs and avoid problems trying to submit repeated batches. - To update the blacklisted verifiers bitmap you can use the following makefile target that sends a transaction to the service manager with the function signature
disableVerifier(uint8). TheVERIFIER_ID=3variable will disable the SP1 verifier:
make verifier_disable_devnet VERIFIER_ID=3
- Try to send a sp1 proof that it should be rejected by the batcher:
make batcher_send_sp1_task. - Whitelist the verifier doing:
make verifier_enable_devnet VERIFIER_ID=3
- Try to send a sp1 proof and it should be working again:
make batcher_send_sp1_task.
If you want to try and disable all the other verifiers run the same command mentioned above changing the VERIFIER_ID
that is the ID corresponding to the ProvingSystemId enum in the proving_systems.go file, being GnarkPlonkBls12_381 the id 0.
This closes #1082
Changes to gas cost
Generated at commit: 7a20d9cc4b4d2c38adc7e0240d419a62ccf45ba1, compared to commit: 07f682c7f5bab0ef2711f7373ba865d4ef9d5258
🧾 Summary (10% most significant diffs)
| Contract | Method | Avg (+/-) | % |
|---|---|---|---|
| AlignedLayerServiceManager | batchesState | -22 ✅ | -3.13% |
Full diff report 👇
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| AlignedLayerServiceManager | 4,771,213 (+89,416) | batchesState createNewTask receive |
681 (-22) 53,923 (+88) 21,169 (0) |
-3.13% +0.16% 0.00% |
681 (-22) 73,673 (-169) 44,503 (-280) |
-3.13% -0.23% -0.63% |
681 (-22) 74,081 (+100) 45,064 (0) |
-3.13% +0.14% 0.00% |
681 (-22) 74,822 (+37) 45,064 (0) |
-3.13% +0.05% 0.00% |
256 (0) 256 (0) 256 (0) |