Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: integrations for updating the contract code and config #807

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

ChaoticTempest
Copy link
Member

No description provided.

DavidM-D
DavidM-D previously approved these changes Aug 8, 2024
Copy link
Contributor

@DavidM-D DavidM-D left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice test

volovyks
volovyks previously approved these changes Aug 8, 2024

// Perform update to the contract and see that the nodes are still properly running and picking
// up the new contract by first upgrading the contract, then trying to generate a new signature.
let id = ctx.propose_update_contract_default().await;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we should check for contract hash and ensure it changed to the one we were proposing. Signature production can work with the old one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checking whether or not these values have been changed should just be reserved for the unit tests which we test against already. Integration tests are more about if the change makes it so that the nodes aren't running anymore. That being said, this test doesn't really do that quite yet. We should eventually add something like an invalid contract upgrade and see whether or not the nodes behave as expected

actions::single_payload_signature_production(&ctx, &state).await?;

// Now do a config update and see if that also updates the same:
let id = ctx.propose_update(ProposeUpdateArgs {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with config. We should propose something new, then fetch the config and compere it to what we proposed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing I said in the previous comment, but we should see if introducing interesting configs would mess up the nodes or not like high concurrent introduction and concurrent generation

@ChaoticTempest ChaoticTempest dismissed stale reviews from volovyks and DavidM-D via 4b914e9 August 8, 2024 10:48
@ChaoticTempest ChaoticTempest merged commit d1bfb5f into develop Aug 8, 2024
3 checks passed
@ChaoticTempest ChaoticTempest deleted the phuong/test/updates-integration branch August 8, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants