Add testnet governance deployment and testing scripts#3870
Add testnet governance deployment and testing scripts#3870alysiahuggins merged 26 commits intomainfrom
Conversation
…nts to avoid RPC rate limiting, added --ledger flag in the test scripts, added timelock cancellation check
…mproved the .env file by referencing the multisig address whre needed
Clarified instructions for updating the ENV_FILE.
| /// | ||
| /// Returns: | ||
| /// - `true` if the check passed, `false` otherwise | ||
| pub async fn retry_until_true<F, Fut>(check_name: &str, mut check_fn: F) -> Result<bool> |
There was a problem hiding this comment.
created this function because when i was i did storage reads of a recently deployed address, the data was not available to be read yet
There was a problem hiding this comment.
/gemini review
There was a problem hiding this comment.
Thank you for the explanation! This retry_until_true helper is indeed a very good solution for handling the eventual consistency issues often encountered when performing storage reads immediately after transactions, especially on public RPC nodes. It significantly improves the robustness of the deployment and verification scripts by accounting for potential RPC latency. Excellent addition!
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces valuable scripts for deploying and testing the complete governance setup on testnets, significantly easing the validation of timelock operations, role management, and ownership transfers. The implementation of a robust retry mechanism for state checks after transactions is a critical improvement, enhancing the reliability of deployments and upgrades, especially on potentially flaky RPC networks. Additionally, allowing empty function values in timelock operations adds necessary flexibility for interacting with parameterless contract functions. Overall, these changes are well-structured and contribute positively to the project's testing and deployment infrastructure.
|
/gemini summary |
Summary of ChangesThis pull request significantly enhances the testnet environment by introducing dedicated scripts for deploying and thoroughly testing the complete governance setup. It streamlines the validation process for critical operations like timelock scheduling and execution, role management, and ownership transfers, ensuring the system behaves as expected before mainnet deployment. The changes also improve the reliability of deployment and verification steps by incorporating retry logic and cooldowns to account for eventual consistency with RPC nodes, making the testing process more robust and less prone to transient failures. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
|
Co-authored-by: Mathis <sveitser@gmail.com>
Co-authored-by: Mathis <sveitser@gmail.com>
sveitser
left a comment
There was a problem hiding this comment.
LGTM. Wasn't fully able to test the flow script but seems like a good addition even if there are some rough edges.
Adds scripts for deploying and testing the complete governance setup on testnets. This makes it much easier to validate timelock operations, role management, and ownership transfers before mainnet.
This PR:
testnet-governance-deploy.sh- deploys all contracts with proper timelock ownership, roles, and governance controls in one gotestnet-governance-flows.sh- tests timelock operations (schedule, execute, cancel) and role managementpause()work without needing--function-values ""This PR does not:
Key places to review:
contracts/rust/deployer/scripts/testnet-governance-deploy.sh- main deployment orchestrationcontracts/rust/deployer/scripts/testnet-governance-flows.sh- testing flowsHow to test this PR:
Follow readme, feel free to test on localhost using
anvilThings tested
Things not tested