-
Notifications
You must be signed in to change notification settings - Fork 37
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: adds tests and fixes to home contract #38
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
luketchang
added
solidity ♦️
Solidity dev work required
bug
Something isn't working
testing
Unit, integrations, and e2e testing
labels
Feb 3, 2021
anna-carroll
previously approved these changes
Feb 3, 2021
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.
lookin goood 🤠
prestwich
suggested changes
Feb 3, 2021
prestwich
suggested changes
Feb 3, 2021
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.
1 small layout request
… visiting _q.last
…ith non-existent new root
…root rather than both current and new root
…w updater creation uses async static fromSigner
luketchang
force-pushed
the
luke/home-tests
branch
from
February 3, 2021 23:55
3ca576b
to
ffa4dd5
Compare
10 tasks
prestwich
approved these changes
Feb 4, 2021
prestwich
pushed a commit
that referenced
this pull request
Feb 7, 2021
* lint: run prettier on js tests and scripts * tests: add 100% test coverage for the queue contract * test: adds halt on failed state and in progress test on accepting updates * fix: Updater.signUpdate now hashes message with Ethereum prefix before signing * fix: fixed off-by-one error in queue contains() where for loop wasn't visiting _q.last * fix: fix equality logic for double update check in Common.sol * feature: adds tests for skipping current root and submitting update with non-existent new root * test: adds test that ensures rejection of updates from fake updater * test: adds double update test * refactor: adds enqueueMessageAndSuggestUpdate helper function to shorten tests * test: adds test for suggested updates * refactor: changes doubleUpdate function to take single oldRoot rather than array * refactor: Home test helper function enqueues message and returns its root rather than both current and new root * refactor: moved queueContains and queueEnd from TestHome to QueueManager contract * refactor: moves signer and updater initialization to before block, now updater creation uses async static fromSigner Co-authored-by: James Prestwich <prestwich@clabs.co>
luketchang
added a commit
that referenced
this pull request
Feb 8, 2021
* lint: run prettier on js tests and scripts * tests: add 100% test coverage for the queue contract * test: adds halt on failed state and in progress test on accepting updates * fix: Updater.signUpdate now hashes message with Ethereum prefix before signing * fix: fixed off-by-one error in queue contains() where for loop wasn't visiting _q.last * fix: fix equality logic for double update check in Common.sol * feature: adds tests for skipping current root and submitting update with non-existent new root * test: adds test that ensures rejection of updates from fake updater * test: adds double update test * refactor: adds enqueueMessageAndSuggestUpdate helper function to shorten tests * test: adds test for suggested updates * refactor: changes doubleUpdate function to take single oldRoot rather than array * refactor: Home test helper function enqueues message and returns its root rather than both current and new root * refactor: moved queueContains and queueEnd from TestHome to QueueManager contract * refactor: moves signer and updater initialization to before block, now updater creation uses async static fromSigner Co-authored-by: James Prestwich <prestwich@clabs.co>
luketchang
added a commit
that referenced
this pull request
Feb 8, 2021
* lint: run prettier on js tests and scripts * tests: add 100% test coverage for the queue contract * test: adds halt on failed state and in progress test on accepting updates * fix: Updater.signUpdate now hashes message with Ethereum prefix before signing * fix: fixed off-by-one error in queue contains() where for loop wasn't visiting _q.last * fix: fix equality logic for double update check in Common.sol * feature: adds tests for skipping current root and submitting update with non-existent new root * test: adds test that ensures rejection of updates from fake updater * test: adds double update test * refactor: adds enqueueMessageAndSuggestUpdate helper function to shorten tests * test: adds test for suggested updates * refactor: changes doubleUpdate function to take single oldRoot rather than array * refactor: Home test helper function enqueues message and returns its root rather than both current and new root * refactor: moved queueContains and queueEnd from TestHome to QueueManager contract * refactor: moves signer and updater initialization to before block, now updater creation uses async static fromSigner Co-authored-by: James Prestwich <prestwich@clabs.co>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
solidity ♦️
Solidity dev work required
testing
Unit, integrations, and e2e testing
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently covers the following:
TODO:
Questions:
current
is ever updated tonewRoot
; this is mistake?double updates
in particular warrant their own fraud proof function?Related to #15