maci icon indicating copy to clipboard operation
maci copied to clipboard

core: preserve fetched logs

Open baumstern opened this issue 1 year ago • 2 comments

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 avatar Dec 14 '23 03:12 baumstern

@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

baumstern avatar Dec 14 '23 03:12 baumstern

@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

ctrlc03 avatar Dec 14 '23 13:12 ctrlc03