rust-teos icon indicating copy to clipboard operation
rust-teos copied to clipboard

Add optional boundaries to getregistrationreceipt

Open ShubhamBhut opened this issue 2 years ago • 6 comments

fixes #97

@mariocynicys @sr-gi can you pls have a look at this ? I am actually pretty new to rust.

ShubhamBhut avatar Mar 04 '23 05:03 ShubhamBhut

Hey @sr-gi, Sincere apologies for the formatting mistakes. I believe this commit should solve everything; except I couldn't think of any new & better name for the updated methods.

ShubhamBhut avatar Mar 22 '23 15:03 ShubhamBhut

There's something I just realized while manually testing this.

IIRC if two subscriptions overlapped, the user was only supposed to be storing the latest receipt. However, I just tested this and two receipts were returned where receipt_a ranged Ta-Tb, and receipt_b ranged Ta-Tc with c>b.

Does this ring a bell @mariocynicys?

No worries @ShubhamBhut, this is not due to your PR, but we may have forgotten to remove some data in an older PR.

sr-gi avatar Mar 23 '23 11:03 sr-gi

IIRC if two subscriptions overlapped, the user was only supposed to be storing the latest receipt. However, I just tested this and two receipts were returned where receipt_a ranged Ta-Tb, and receipt_b ranged Ta-Tc with c>b.

Revising this, we made the merger on the tower side and not the client side. The client side though gets it's subscription summary in memory updated to the merger of the two overlapping receipts, but all the receipts are stored in the DB nonetheless. We should delete those receipts since the last one already covers all of the past overlapping ones, so to get a cleaner output from getregistrationreceipt.

mariocynicys avatar Mar 23 '23 12:03 mariocynicys

IIRC if two subscriptions overlapped, the user was only supposed to be storing the latest receipt. However, I just tested this and two receipts were returned where receipt_a ranged Ta-Tb, and receipt_b ranged Ta-Tc with c>b.

Revising this, we made the merger on the tower side and not the client side. The client side though gets it's subscription summary in memory updated to the merger of the two overlapping receipts, but all the receipts are stored in the DB nonetheless. We should delete those receipts since the last one already covers all of the past overlapping ones, so to get a cleaner output from getregistrationreceipt.

Referenced this here https://github.com/talaia-labs/rust-teos/issues/208

sr-gi avatar Mar 24 '23 10:03 sr-gi

I am having some issues with squashing, I will submit squashed PR after resolving them. I am submitting code for review in case my squashing issues remain longer.

ShubhamBhut avatar Mar 29 '23 06:03 ShubhamBhut

@mariocynicys care to give this a look when you have some time?

sr-gi avatar Apr 28 '23 15:04 sr-gi