This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
scenario: Add ability to create multiple orders in a single batch #784
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
albrow
added
the
tech debt
A code quality issue is not urgent but could cause problems down the line if not addressed
label
Apr 8, 2020
jalextowle
approved these changes
Apr 8, 2020
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.
Looks great! Just a couple of nits and a suggestion. Feel free to merge once the nits are addressed.
jalextowle
approved these changes
Apr 8, 2020
fabioberger
approved these changes
Apr 9, 2020
albrow
added a commit
that referenced
this pull request
Apr 20, 2020
* Periodically rerun ordersync instead of running it only once on startup (#764) * Periodically rerun ordersync instead of running it only once on startup * Add a random jitter to ordersync delay * Change ordersyncApproxDelay to 1 hour * Add log message when starting ordersync service * Improve comment clarity * Update ganache addresses (#765) * Update Ganache DevUtils address * Update Ganache snapshot version * Update Dummy ERC1155 contract address * Fix typo * Add a polyfill for WebAssembly.instantateStreaming (#770) * Add a polyfill for WebAssembly.instantateStreaming * Fix linter error * Update changelog * Compare chain id env variable with rpc on startup (#733) * ADDS check that configured chain id matches RPC WIP * FIXES async error channel race condition and clean up code * FIXES remove unnecessary wait group, move chain id fetch into helper * FIXES use ParseBig256 for parsing chain id response from eth_chainId * Fix race condition in core.App.Start * Update changelog Co-authored-by: Alex Browne <stephenalexbrowne@gmail.com> * Add custom order filters documentation (#768) * Add custom order filters docs * Fix nits * Add doc to menu * Improve limitations description * Add example filters * Merge the two example sections * Fully Automate Document Generation (#771) * Automated the documentation update step * Ignored exported fields that shouldn't be documented * Addressed @albrow's review feedback * Revert "Addressed @albrow's review feedback" This reverts commit 75f48c0. * [expirationwatch] Fixes consistency bug (#773) * Fix small bug in expirationwatcher * Add a test to ensure that a "barely expired" order will be pruned * Update CHANGELOG with PR number * Fixes race condition in orderwatcher test (#774) * Improve scenario package (#779) * WIP Improve scenario package * Create orderopts package. Update scenario and ordervalidator to use it * Fix remaining ordervalidator tests * Update most orderwatcher tests * Support setting taker state and enable remaining orderwatcher tests * Fix remaining tests (only MultiAsset disabled) * Uncomment test that depends on on-chain state for a StaticCall order * Fix browser integration test * Remove unneeded ethClient parameter in a few places * Move sleep statement in order_watcher_test.go * Address Alex Towle's feedback * Remove old comment * Revalidate affected orders regardless of ERC721 approval operator (#782) * Increase sleep duration in TestPingPong (#785) * scenario: Add ability to create multiple orders in a single batch (#784) * scenario: Add ability to create multiple orders in a single batch * Fix some typos * Update changelog for PR #782 (#786) * p2p: Don't call HandleMessages if there are no messages to handle (#787) * Add missing regression test for ordersync pagination subprotocol (#788) * Add missing regression test for ordersync pagination subprotocol Also fixes a minor bug where the exponential backoff for ordersync was too long in some circumstances. * Remove some duplicated code in core_test.go * Set versions to 9.3.0 Co-authored-by: Fabio B <me@fabioberger.com> Co-authored-by: Kim Persson <kimpers@users.noreply.github.com> Co-authored-by: Alex Towle <jalextowle@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
tech debt
A code quality issue is not urgent but could cause problems down the line if not addressed
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.
This PR is a follow-up on #779 and adds support for creating more than one order in a single batch via the
NewSignedTestOrdersBatch
function. This is a huge performance optimization because we only set the required balances and allowances once instead of doing it (and waiting for the corresponding transaction to be mined) for each order one at a time. This is not just optimization for the sake of optimization; it will enable important new test cases by making it practical to create hundreds of orders at a time (see #760 for an example of how this limitation has blocked us in the past).