OriginProtocol / origin-bridge

We've moved to a monorepo: https://github.com/OriginProtocol/origin/tree/master/infra/bridge
MIT License
15 stars 7 forks source link

Foreign key constraint error #86

Closed tyleryasaka closed 6 years ago

tyleryasaka commented 6 years ago

We're getting this error:

[2018-06-15 22:34:54,972: ERROR/ForkPoolWorker-2] Task util.tasks.event_listener[69031558-2758-4ee2-bf7b-8e0727120d1e] raised unexpected: IntegrityError('(psycopg2.IntegrityError) insert or update on table "purchase" violates foreign key constraint "purchase_listing_address_fkey"\nDETAIL:  Key (listing_address)=(0x4E205e04A1A8f230702fe51f3AfdCC38aafB0f3C) is not present in table "listing".\n',)

@ambertch says:

it's due to events being scraped out of order (purchase read before listing)

To reproduce:

Alternatively, start the bridge server in our docker container (if you can get it working; it's still a work in progress).

ambertch commented 6 years ago

The bridge server was looking for a previous version of the event signature https://github.com/OriginProtocol/bridge-server/blob/master/util/tasks.py#L58

Pushed an update to the PR!

tomlinton commented 6 years ago

Closing this as origin-bridge will no longer handle indexing.