-
Notifications
You must be signed in to change notification settings - Fork 85
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
Tb/test marketplace upgrade #1880
Conversation
sequencer/src/api.rs
Outdated
if cf != chain_config_upgrade && height as u64 > stop_voting_view { | ||
panic!("failed to upgrade chain config"); | ||
// Fail test if we've waited long enough | ||
if height as u64 > stop_voting_view { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be inside the if statement if cf != chain_config_upgrade
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think If we exceed the number of configured views, we should fail the test. If chain_config gets upgraded after that number, still a failure. No?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this is an accurate way to determine that chain config upgraded after that block height. The api call may take some time ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the other hand I'm thinking we should avoid writing such mind bending tests. I think part of the reason we didn't catch the bug in the test is that it was so hard to understand. So maybe we can think of going in a different direction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I think I should have added more comments to this test
565bb5a
to
46a6228
Compare
Test would never fail
panic if we exceed `stop_voting_view`
as it was height test was unreachable (except the case where chain config had been updated). also added some comments.
sleep between iterations
Should be dropped automatically at the end of the test.
e1e87ef
to
4f90ecf
Compare
[[upgrade]] | ||
version = "0.3" | ||
start_proposing_view = 1 | ||
stop_proposing_view = 10 | ||
|
||
[upgrade.marketplace] | ||
[upgrade.marketplace.chain_config] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
marketplace genesis upgrade
superseded by #1927 |
Test marketplace upgrade