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

Inconsistent data in mongo db #649

Open
tomarsachin2271 opened this issue Jun 11, 2024 · 2 comments
Open

Inconsistent data in mongo db #649

tomarsachin2271 opened this issue Jun 11, 2024 · 2 comments
Labels
🐛 Bug Something isn't working 💽 Data Data related tasks

Comments

@tomarsachin2271
Copy link

tomarsachin2271 commented Jun 11, 2024

Cluster : biconomy-sdk-prod
Database: relayer-node-service
Collection: useroperations_137

Inconsistency 1

Query Used in Mongo Shell

db.useroperations_137.count({status: "FAILED", success: "true"})

Results

Screenshot 2024-06-11 at 4 56 41 PM

Expected Outcome

There should not be any records where status is FAILED but success field is marked true.

Inconsistency 2

If a blockchain transaction fails, then there should not be any actualGasCost and actualGasUsed fields in the useroperations_ collection.

Query Used in Mongo Atlas UI

{transactionId: '0x7a7476d2451b17c81de9866efe6aa44a4124ba67ff4062a02718e9b825470074'}

Results

Screenshot 2024-06-11 at 5 11 41 PM

Expected Outcome

If transaction fails, then fields like actualGasCost and actualGasUsed should not be recorded in db, as they refer to the information recieved from UserOperationEvent which was not emitted in this transaction.
Check the tx on explorer

@tomarsachin2271 tomarsachin2271 added 🐛 Bug Something isn't working 💽 Data Data related tasks labels Jun 11, 2024
@tomarsachin2271
Copy link
Author

tomarsachin2271 commented Jun 11, 2024

The inconsistency#2 will result in wrong bundle profit calculations.

@arcticfloyd1984
Copy link
Contributor

Current Findings

I remember this bug now, it was saving the data incorrectly. The lastest entry of this is of a transaction from Jan 2024. Since then we have processed a lot of transactions and no transaction has this issue. It is safe to assume that this won't happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working 💽 Data Data related tasks
Projects
None yet
Development

No branches or pull requests

3 participants