Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

orderbook: Make OrderStore async for use in db adapter #2393

Merged
merged 1 commit into from
Dec 12, 2019

Conversation

dekz
Copy link
Member

@dekz dekz commented Dec 11, 2019

Description

We want to adapt the orderstore to fetch from a local database rather than in-memory for usage with 0x API and AssetSwapper. 0xProject/0x-api#33

As such this change moves a number of OrderStore functions to be async. This is not a directly used class and all of OrderBook functions are already async. As are OrderSet since it calculates orderHash async.

Also fixes an issue in asset-swapper where the gas price estimate from ethgastation is in gwei. All calculations based off of that result in gwei as well. This is results in an underfunded protocolFee when a real gas price is used (8 gwei in wei rather than 8 wei).

TODO

  • Update changelogs

@dekz dekz requested a review from dave4506 December 11, 2019 04:39
@buildsize
Copy link

buildsize bot commented Dec 11, 2019

File name Previous Size New Size Change
init.py 60.25 KB 60.25 KB 0 bytes (0%)
abi_gen_dummy.ts 77.76 KB [deleted]
lib_dummy.ts 7.13 KB [deleted]
test_lib_dummy.ts 10.38 KB [deleted]
environment.pickle 1.61 MB 1.61 MB 0 bytes (0%)
index.doctree 187.37 KB 187.37 KB 0 bytes (0%)
.buildinfo 230 bytes 230 bytes 0 bytes (0%)
genindex.html 5.6 KB 5.6 KB 0 bytes (0%)
index.html 2.52 KB 2.52 KB 0 bytes (0%)
objects.inv 375 bytes 375 bytes 0 bytes (0%)
py-modindex.html 3.07 KB 3.07 KB 0 bytes (0%)
search.html 2.84 KB 2.84 KB 0 bytes (0%)
searchindex.js 6.31 KB 6.31 KB 0 bytes (0%)
index.rst.txt 415 bytes 415 bytes 0 bytes (0%)
alabaster.css 10.92 KB 10.92 KB 0 bytes (0%)
basic.css 11.89 KB 11.89 KB 0 bytes (0%)
custom.css 42 bytes 42 bytes 0 bytes (0%)
doctools.js 9.05 KB 9.05 KB 0 bytes (0%)
documentation_options.js 303 bytes 303 bytes 0 bytes (0%)
file.png 286 bytes 286 bytes 0 bytes (0%)
jquery-[version].js 273.79 KB 273.79 KB 0 bytes (0%)
jquery.js 86.08 KB 86.08 KB 0 bytes (0%)
language_data.js 10.59 KB 10.59 KB 0 bytes (0%)
minus.png 90 bytes 90 bytes 0 bytes (0%)
plus.png 90 bytes 90 bytes 0 bytes (0%)
pygments.css 4.69 KB 4.69 KB 0 bytes (0%)
searchtools.js 15.61 KB 15.61 KB 0 bytes (0%)
underscore-[version].js 34.34 KB 34.34 KB 0 bytes (0%)
underscore.js 11.86 KB 11.86 KB 0 bytes (0%)
contract_addresses.html 16.8 KB 16.8 KB 0 bytes (0%)
contract_artifacts.html 8.24 KB 8.24 KB 0 bytes (0%)
json_schemas.html 12.56 KB 12.56 KB 0 bytes (0%)
order_utils.html 47.16 KB 47.16 KB 0 bytes (0%)
erc20_token.html 93.56 KB 93.56 KB 0 bytes (0%)
exchange.html 718.38 KB 718.38 KB 0 bytes (0%)
tx_params.html 9.41 KB 9.41 KB 0 bytes (0%)
local_message_signer.html 15.08 KB 15.08 KB 0 bytes (0%)
asset_data_utils.html 22.66 KB 22.66 KB 0 bytes (0%)
default_api.html 113.17 KB 113.17 KB 0 bytes (0%)
asset_proxy_owner.html 337.39 KB 337.39 KB 0 bytes (0%)
coordinator.html 128.72 KB 128.72 KB 0 bytes (0%)
coordinator_registry.html 39.59 KB 39.59 KB 0 bytes (0%)
dutch_auction.html 66.13 KB 66.13 KB 0 bytes (0%)
erc20_proxy.html 109.07 KB 109.07 KB 0 bytes (0%)
erc721_proxy.html 109.19 KB 109.19 KB 0 bytes (0%)
erc721_token.html 150.2 KB 150.2 KB 0 bytes (0%)
forwarder.html 124.01 KB 124.01 KB 0 bytes (0%)
i_asset_proxy.html 40.18 KB 40.18 KB 0 bytes (0%)
i_validator.html 27.06 KB 27.06 KB 0 bytes (0%)
i_wallet.html 24.9 KB 24.9 KB 0 bytes (0%)
multi_asset_proxy.html 144.04 KB 144.04 KB 0 bytes (0%)
order_validator.html 107.69 KB 107.69 KB 0 bytes (0%)
weth9.html 132.09 KB 132.09 KB 0 bytes (0%)
zrx_token.html 107.61 KB 107.61 KB 0 bytes (0%)
dev_utils.html 526.89 KB 526.89 KB 0 bytes (0%)
types.html 8.54 KB 8.54 KB 0 bytes (0%)
erc1155_mintable.html 276.51 KB 276.51 KB 0 bytes (0%)
erc1155_proxy.html 130.38 KB 130.38 KB 0 bytes (0%)
static_call_proxy.html 34.04 KB 34.04 KB 0 bytes (0%)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 77.804% when pulling 7c08143 on feature/orderbook-orderstore-async into 6b0f357 on development.

@dekz dekz mentioned this pull request Dec 11, 2019
8 tasks
@dekz dekz requested a review from fragosti December 11, 2019 07:05
@dekz dekz marked this pull request as ready for review December 11, 2019 07:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants