You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently CI runs all proposals for every governor, even if that proposal was executed years ago. This is inefficient and often results in failed runs due to rate limits and other issues. It also means CI takes ~3 hours to run when it should only take a few minutes.
Define the cache file, it's called ./proposal-states.json. It stores a simple map from proposal ID to the integer representing the current proposal state
During the simulation loop, lookup the proposal ID in the cache file to check if the state is a terminal state. If not, simulate the proposal, otherwise skip simulation.
Save off the new reports to ./reports folder
We can do something very similar, but since we support multiple governors we need one main tweak: Our cache file cannot just map from proposal ID to state, but instead must map from Governor address to proposal ID to state.
Since the cached reports live in the reports folder, they'll automatically be uploaded to workflow artifacts. Additionally, by removing the reports folder from the gitignore, reports can be easily hyperlinked to.
However, users must be careful never to manually commit changes to the report folder, as this should only be done by CI. It's worth seeing how the bgd-labs fork manages this. One potential solution is always running all simulations e.g. once per day to restore any accidentally overwritten proposals (this has the added benefit of retroactively updating reports when report structure changes, e.g. new formats or checks).
Similarly, we should probably save reports generated from local simulation to a different folder that can stay gitignored, such as local-reports
The text was updated successfully, but these errors were encountered:
Currently CI runs all proposals for every governor, even if that proposal was executed years ago. This is inefficient and often results in failed runs due to rate limits and other issues. It also means CI takes ~3 hours to run when it should only take a few minutes.
Instead, filter proposals to make sure they're not yet finalized before running the simulations. The https://github.com/bgd-labs/seatbelt-for-ghosts fork has implemented this as follows:
./proposal-states.json
. It stores a simple map from proposal ID to the integer representing the current proposal state./reports
folderWe can do something very similar, but since we support multiple governors we need one main tweak: Our cache file cannot just map from proposal ID to state, but instead must map from Governor address to proposal ID to state.
Since the cached reports live in the
reports
folder, they'll automatically be uploaded to workflow artifacts. Additionally, by removing thereports
folder from the gitignore, reports can be easily hyperlinked to.However, users must be careful never to manually commit changes to the
report
folder, as this should only be done by CI. It's worth seeing how the bgd-labs fork manages this. One potential solution is always running all simulations e.g. once per day to restore any accidentally overwritten proposals (this has the added benefit of retroactively updating reports when report structure changes, e.g. new formats or checks).Similarly, we should probably save reports generated from local simulation to a different folder that can stay gitignored, such as
local-reports
The text was updated successfully, but these errors were encountered: