Skip to content

Conversation

@alexcos20
Copy link
Member

@alexcos20 alexcos20 commented Feb 7, 2024

If either datatokenAddress or nftAddress are malformed in the encrypted files string

(example:

b'{"datatokenAddress":"0x0","nftAddress":"0x0","files":[{"type":"url","url":"https://github.com/......0Safety%20Traffic%20Accident%20Analysis%2028eaf51fb56f4fbe80cb1ac0e552d384.pdf","method":"GET"}]}'

,provider fails with:

2024-02-07 05:59:01 provider-59c9fdb476-fl7pt ocean_provider.utils.util[12] ERROR Provider polygon: Error decrypting service files <class 'ocean_provider.utils.services.Service'>: Unknown format 0x0, attempted to normalize to 0x0
2024-02-07 05:59:01 provider-59c9fdb476-fl7pt ocean_provider.routes.consume[18] ERROR Provider polygon: Unable to get dataset files

Why? cause this is where it fails: https://github.com/oceanprotocol/provider/blob/main/ocean_provider/utils/util.py#L58
Because Web3.toChecksumAddress complains about unknown format "0x0"..

Obviously, this will fail the validation, but it will give you a clue why it failed
This PR adds more detailed logs

PS: This also updates .github/workflows/pytest.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants