Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect event validation for download/compute #617

Closed
alexcos20 opened this issue Mar 14, 2023 · 0 comments · Fixed by #632
Closed

Incorrect event validation for download/compute #617

alexcos20 opened this issue Mar 14, 2023 · 0 comments · Fixed by #632
Assignees
Labels
Priority: Critical Type: Bug Something isn't working

Comments

@alexcos20
Copy link
Member

alexcos20 commented Mar 14, 2023

Looking in function https://github.com/oceanprotocol/provider/blob/main/ocean_provider/utils/datatoken.py#L43 , saw a couple of critical bugs.

For instance:

provider_fee_event_logs = datatoken_contract.events.ProviderFee().processReceipt(
        tx_receipt, errors=DISCARD
    )

    provider_fee_order_log = (
        provider_fee_event_logs[0] if provider_fee_event_logs else None
    )

This means that if we have more than one startOrder in a single tx, providerFee will either be wrongly accepted or call will fail
This is also valid for:

order_log = event_logs[0] if event_logs else None

This needs to be fixed asap.

Why:

Also, other teams are trying to optimize no of txs, so they will likely combine multiple orders/buy/etc in one single tx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Critical Type: Bug Something isn't working
Projects
None yet
2 participants