oceanprotocol / pm

Zenhub needs each issue associated with one repo. This repo is a workaround, to mark issues that span >1 repos.
4 stars 0 forks source link

Refactor DT Order handling #85

Closed alexcos20 closed 2 years ago

alexcos20 commented 3 years ago

Description:

When backend components are handling orders, right now they are using only the orderID (transferTxId) and provider(using ocean.py) scans the blockchain in the past (from the contracts deployment block). This is very inefficient (on ETH) and a blocker soon (https://blog.ethereum.org/2021/03/03/geth-v1-10-0/ - chapter "Transaction unindexing" )

(https://github.com/oceanprotocol/provider/blob/ae2abcd818fceadeb0e098180aa269b260faf37b/ocean_provider/util.py#L217 and https://github.com/oceanprotocol/ocean.py/blob/94131c50d1b478e22f6567f2afbe01ca38c07e6e/ocean_lib/models/data_token.py#L212)

Changes requested:

Every orderID(transferTxId) should be optionally send along with blockNo. When doing verify_order_tx:

Repos affected: ocean.py -> provider and ocean.js

Provider:

Frontend can use the graph to get previous valid orders, which will include both txId and blockNo

alexcos20 commented 3 years ago

re-opening this

trentmc commented 2 years ago

I believe this this issue is obsolete. If not, please reopen if you think it should be. @alexcos20