aligned_layer icon indicating copy to clipboard operation
aligned_layer copied to clipboard

feat: add more event emissions

Open NicolasRampoldi opened this issue 1 year ago • 1 comments

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.

NicolasRampoldi avatar Aug 22 '24 15:08 NicolasRampoldi

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)

github-actions[bot] avatar Aug 22 '24 15:08 github-actions[bot]

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

entropidelic avatar Aug 22 '24 21:08 entropidelic

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.

taturosati avatar Aug 23 '24 19:08 taturosati