feat: comprehensive overhaul of events for traceability of funds
- There's a lack of a comprehensive correlation-id off which, funds can be tracked in their movement across are protocol for a given Commitment.
- This PR introduces the use of commitment digest, as such a correlation ID to associate the waterfall like spitting of funds across multiple actors in the progression of the preconfirmation commitment lifecycle.
- Adds check for decay calculation in e2e testing
how do we know all of these events will work as intended? Is there a way to test that the event will be triggered successfully with the intended output before committing all of these changes?
We should also evaluate how this affects gas costs for the transactions. Need to check gas used from the actual transactions before and after the change.
Gas cost for events should be pretty minimal compared to storage https://www.rareskills.io/post/ethereum-events#:~:text=Gas%20cost%20to%20emit%20Solidity%20event&text=The%20formula%20for%20how%20much,paid%20for%20each%20indexed%20parameter.
how do we know all of these events will work as intended? Is there a way to test that the event will be triggered successfully with the intended output before committing all of these changes?
To test the emittance of events, we use https://book.getfoundry.sh/cheatcodes/expect-emit in our foundry tests. Agreed we should add tests to this PR that use expectEmit