Closed franckc closed 6 years ago
@DanielVF @sparrowDom FYI in case you have an idea. This is not blocking for the release...
Checked and https://dapp.originprotocol.com/#/listing/1-000-10 is in "pending" state. Meaning a buyer made an offer but the sale was not finalized yet. So my hunch about Offer data deleted from blockchain is probably not correct.
Using Remix on mainnet, I can confirm that the single offer for listing 10 is not deleted:
The offer status is 1, so it's in the "created" state.
One easy way to get this error is to have an offer without an arbitrator or affiliate set, or to not have the arbitrator or affiliate set for the listener.
See code here:
Given that the offer appears to have this data, do we know if the listener has the arbitrator and affiliate set?
I'm going to dig deeper on this one - the listener is definitely not picking up that offer, while seeming to pick up other offers.
I took a look and was able to reproduce in my local environment, using this command:
node listener/listener.js --web3-url=https://mainnet.infura.io/emIXjs9eDuy57IlTYsIP --ipfs-url=https://ipfs.originprotocol.com --continue-file=continue
My continue file was set to:
{ "lastLogBlock": 6440925 }
Daniel's hunch was correct... The issue is with an offer that does not have an arbitrator set. I assume it happened on early mainnet listings when the arbitrator account wasn't set in configs...
I wish we would throw validation specific exception in the marketplace code vs the generic "throw new Error". Currently there is no way to differentiate between the types of errors to decide if worth retrying or if we should skip indexing the data... I'm leaning towards updating the listener to have the following behavior:
I noticed this error in the event-listener logs on the Mainnet (but it is not mainnet specific, I also saw it on Testnet):
The reference to "toLowerCase" makes me guess that it is related to a place in the code where we lower case addresses before comparing them. And the address is undefined, maybe because the transaction was finalized and as such the Offer data deleted in the blockchain ?
Need some investigation...