privacy-scaling-explorations / maci

Minimal Anti-Collusion Infrastructure (MACI)
https://maci.pse.dev/
Other
493 stars 126 forks source link

core: preserve fetched logs #916

Open baumstern opened 6 months ago

baumstern commented 6 months ago

Object

Currently, onchain logs fetched during genMaciState() execution, which track on-chain MaciState changes, are not retained post-use. These logs can be utilized for debugging and auditing in MACI rounds.

Context

          Although, I think we should keep the all the logs in the state machine instance. It should be useful in certain cases like debugging. I will file an issue about this

_Originally posted by @baumstern in https://github.com/privacy-scaling-explorations/maci/pull/866#discussion_r1416002877_

From Discord: @ctrlc03: maybe let's open an issue to think about whether we want to store all the logs to a file? just in case - I know it's something @{Daehyun} from 'maci' brought up which could be useful if smth goes wrong and don't reach the local state generation step (07/12/2023)

baumstern commented 6 months ago

@ctrlc03 any suggestions on how we should tackle this? An idea that just came to my mind is using a CLI command like maci-cli fetchLogs --contract 0x... --output ./logs

ctrlc03 commented 6 months ago

@ctrlc03 any suggestions on how we should tackle this? An idea that just came to my mind is using a CLI command like maci-cli fetchLogs --contract 0x... --output ./logs

yea just add an optional flag to genLocalState - pass as optional param to genMaciStateFromContract and if the param is present simply store all logs to a file