-
Notifications
You must be signed in to change notification settings - Fork 13
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
Staking workflow e2e test #49
Conversation
a787db6
to
e259e83
Compare
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.
Can we move these tests to a separate repo? They can be submodules instead
I intentionally want them to be with the deployment scripts so when we update deployments we do not forget to add tests. They should be collocated with the code that they test. |
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.
adding tests to this repo is likely to cause problems for cannon deployer web ui due to the weight of including unnecessary files in the checkout. If you want to ensure that people are thinking abou tthe tests/adding new tests as necessary as you say, then please add a git hook which verifies that the git submodule is checked out, and if it isnt, block the commit with a error saying to sync submodules. also, you could probably use that opporitunity to remind the user to add tests assuming things are all good
(more non-blocking feedback to follow in isolated comment)
i am not in support of the inclusion of these tests in our workflow for the following reasons:
as a solution, i think we should consider implementing something more like shadow forking. basically, every time a user intracts with our system, we attempt to run the same transaction on a fork. if the transation fails, that gets added to a report. This gives an excellent picture of what a chance is likely to have in terms of impact on actual transactions on mainnet. This type of system would definitely catch the case of liquidation due to incorrect c-ratio. |
I believe this counters all the points @dbeal-eth and I do believe this PR should be merged. |
Ok, but the actual test that is being performed, regardless of the environment it is performed, is the same. Why don't we instead update our existing tests to work for this on the v3 repo?
Previous comment. The actual tests are the same as the ones performed on the protocol code deploy, just not on live chain/fork.
I'm also concerned about tests failing because the spec changed (as intended)
Yes I agree. So we do shadow deployment before the deployment as you say and we gain the insight.
Every line of code that we have to maintain is a burden
Not possible because of the way git protocol works. We can't work by diff no matter what we do
I have countered your counters I believe |
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 would say that these are great smoke tests to have. This covers create account, deposit, delegate, undelegate and withdraw, if that doesn't work something is most likely wrong. I would say mint and borrow should be part of these core tests too.
Then probably we'd want to add some smoke tests for spot and perps too.
I guess the tricky thing is when we expect the networks to differ, eg. |
It will not be a challenge as if networks is different we jsut have a separate tests. Tests are not supposed to be abstract and complicated. Copypaste would be the way. |
Don't want to be a blocker but my thoughts on this issue have not changed
optimism goerli is temporarily disabled until we figure out what is wrong with it. |
accountTimeoutWithdraw
configaccountTimeoutWithdraw
to 0)Some extra notes on implementation and further work
evm_snapshot
/evm_revert
).3
)2
and also give us understanding if tests are going to fail AFTER deploying.3
)