ArbitrumFoundation / governance-seatbelt

Make governance safer
GNU General Public License v3.0
8 stars 4 forks source link

perf: pending only and other qol improvments #28

Closed gzeoneth closed 7 months ago

gzeoneth commented 8 months ago

Add a new ONLY_RELEVANT envvar to make it only generate reports for relevant (including pending, active, queued, succeeded) proposals.

Also changed the proposal naming scheme so that it is easier to link to the tally page e.g. https://www.tally.xyz/gov/arbitrum/proposal/28300903567340237987946172947371304329455149918972967618773111648600015289785 https://www.tally.xyz/gov/arbitrum/proposal/46905320292877192134536823079608810426433248493109520384601548724615383601450

$ ts-node --experimental-specifier-resolution node index.ts
Your primary provider is connected to networkID 42161
Simulating 2 ArbCore proposals: IDs of 28300903567340237987946172947371304329455149918972967618773111648600015289785, 46905320292877192134536823079608810426433248493109520384601548724615383601450
  Simulating ArbCore proposal 28300903567340237987946172947371304329455149918972967618773111648600015289785 ...
    done
  Simulating ArbCore proposal 46905320292877192134536823079608810426433248493109520384601548724615383601450 ...
    done
Starting proposal checks and report generation...
  Running for proposal ID 28300903567340237987946172947371304329455149918972967618773111648600015289785 ... // tally proposal id
  Running for proposal ID 28300903567340237987946172947371304329455149918972967618773111648600020000001 ... // first withdrawal
  Running for proposal ID 28300903567340237987946172947371304329455149918972967618773111648600020010001 ... // first retryable
  Running for proposal ID 46905320292877192134536823079608810426433248493109520384601548724615383601450 ... // tally proposal id
  Running for proposal ID 46905320292877192134536823079608810426433248493109520384601548724615390000001 ... // first withdrawal
  Running for proposal ID 46905320292877192134536823079608810426433248493109520384601548724615390010001 ... // first retryable
Done!

Also storing the html, pdf, and md report in separate directories:

.
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/pdf
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/pdf/28300903567340237987946172947371304329455149918972967618773111648600015289785.pdf
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/pdf/46905320292877192134536823079608810426433248493109520384601548724615390010001.pdf
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/pdf/46905320292877192134536823079608810426433248493109520384601548724615390000001.pdf
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/pdf/46905320292877192134536823079608810426433248493109520384601548724615383601450.pdf
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/pdf/28300903567340237987946172947371304329455149918972967618773111648600020010001.pdf
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/pdf/28300903567340237987946172947371304329455149918972967618773111648600020000001.pdf
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/html
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/html/46905320292877192134536823079608810426433248493109520384601548724615383601450.html
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/html/28300903567340237987946172947371304329455149918972967618773111648600020000001.html
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/html/28300903567340237987946172947371304329455149918972967618773111648600020010001.html
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/html/46905320292877192134536823079608810426433248493109520384601548724615390000001.html
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/html/46905320292877192134536823079608810426433248493109520384601548724615390010001.html
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/html/28300903567340237987946172947371304329455149918972967618773111648600015289785.html
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/md
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/md/28300903567340237987946172947371304329455149918972967618773111648600020000001.md
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/md/46905320292877192134536823079608810426433248493109520384601548724615383601450.md
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/md/46905320292877192134536823079608810426433248493109520384601548724615390010001.md
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/md/28300903567340237987946172947371304329455149918972967618773111648600015289785.md
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/md/28300903567340237987946172947371304329455149918972967618773111648600020010001.md
./0xf07DeD9dC292157749B6Fd268E37DF6EA38395B9/md/46905320292877192134536823079608810426433248493109520384601548724615390000001.md

46905320292877192134536823079608810426433248493109520384601548724615383601450.md 46905320292877192134536823079608810426433248493109520384601548724615390010001.md 46905320292877192134536823079608810426433248493109520384601548724615390000001.md

28300903567340237987946172947371304329455149918972967618773111648600015289785.md 28300903567340237987946172947371304329455149918972967618773111648600020010001.md 28300903567340237987946172947371304329455149918972967618773111648600020000001.md

Also merged in https://github.com/Uniswap/governance-seatbelt/pull/127 to fix an issue where tenderly return empty state diff