feat: add more event emissions
Description
- This PR addresses the lack of event emissions for operations in our smart contracts.
Events added
AlignedLayerServiceManager
- BatcherBalanceUpdated.
- TaskResponseProcessed.
BatcherPaymentService
- TaskCreated.
- SignerBalanceDecreased.
- BalanceLocked.
- BalanceUnlocked.
- MerkleRootVerified.
- SignatureVerified.
To Test
- Try deployment and normal flow.
Changes to gas cost
Generated at commit: e6e8ae5e59b21d56f2bd7442d6f1635de65f642f, compared to commit: f470f128c59406a35c421db0c5257e230ae05dbc
🧾 Summary (10% most significant diffs)
| Contract | Method | Avg (+/-) | % |
|---|---|---|---|
| AlignedLayerServiceManager | receive | +1,612 ❌ | +3.72% |
Full diff report 👇
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| AlignedLayerServiceManager | 4,405,250 (+46,010) | receive | 44,932 (+1,612) | +3.72% | 44,932 (+1,612) | +3.72% | 44,932 (+1,612) | +3.72% | 44,932 (+1,612) | +3.72% | 256 (0) |
I think we should be careful with the emission of events, they could significantly improve the costs of the transactions. Specially with the SignerBalanceDecreased and SignatureVerified, which will be emitted lots of times in every transaction. Make sure to measure this properly
I think we should be careful with the emission of events, they could significantly improve the costs of the transactions. Specially with the SignerBalanceDecreased and SignatureVerified, which will be emitted lots of times in every transaction. Make sure to measure this properly
I agree, do we have measurements on gas usage with / without events, I assume its a fixed value extra per proof, since we are emitting N SignatureVerified events for N proofs.