Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

scenario: Add ability to create multiple orders in a single batch #784

Merged
merged 2 commits into from
Apr 9, 2020

Conversation

albrow
Copy link
Contributor

@albrow albrow commented Apr 8, 2020

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).

@albrow 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
Copy link
Contributor

@jalextowle jalextowle left a 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.

integration-tests/rpc_integration_test.go Show resolved Hide resolved
scenario/scenario.go Outdated Show resolved Hide resolved
scenario/scenario.go Outdated Show resolved Hide resolved
@albrow albrow requested a review from jalextowle April 8, 2020 23:46
@albrow albrow merged commit e624a0f into development Apr 9, 2020
@albrow albrow deleted the feature/scenario-batch-order-creation branch April 9, 2020 19:00
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants