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

Add optional boundaries to getregistrationreceipt #97

Open
sr-gi opened this issue Aug 22, 2022 · 8 comments · May be fixed by #199
Open

Add optional boundaries to getregistrationreceipt #97

sr-gi opened this issue Aug 22, 2022 · 8 comments · May be fixed by #199
Labels
cln-plugin Stuff related to watchtower-plugin feature request New feature or request good first issue Good for newcomers

Comments

@sr-gi
Copy link
Member

sr-gi commented Aug 22, 2022

#83 added, amongst other commands, getregistrationreceipt which pulls the latest registration receipt from the wathctower-plugin database.

It'll be nice to add some optional parameters that will allow the user to pick the receipt they are interested in, in case it is not the lattest. The parameters should specify a start and end time, and the receipt (or receipts) that englobe such period should be returned.

@sr-gi sr-gi added feature request New feature or request good first issue Good for newcomers cln-plugin Stuff related to watchtower-plugin labels Aug 22, 2022
@sr-gi
Copy link
Member Author

sr-gi commented Feb 6, 2023

@1010adigupta this may be a good issue to start with

@1010adigupta
Copy link

Okay, will start looking into it immediately.

@amitpanwar789
Copy link

@sr-gi can you clarify whether we need to change the schema to add a timestamp column or get a registration receipt on the basis of subscription_start and end?

@sr-gi
Copy link
Member Author

sr-gi commented Mar 2, 2023

The schema has to remain the same, the query needs to add a boundary (start /end) so every receipt within that boundary is returned.

@amitpanwar789
Copy link

@sr-gi I will like to work on it, so what should be the format of our optional parameters, I guess we need to filter out it from DB on the basis of subscription_expiry, which is I guess the blocks count till which tower must cover the client. optional parameter can be blocks count. am i thinking in right direction?

@sr-gi
Copy link
Member Author

sr-gi commented Mar 2, 2023

The boundary should be a start and end block, given subscription times are accounted for in blocks.

https://github.com/talaia-labs/rust-teos/blob/master/watchtower-plugin/src/dbm.rs#L53-L54

This should be as straight-forward as adding two additional params to the RPC command, if those are present (both of them) then the DB query must be bounded by them, otherwise we pull the most recent receipt.

@ShubhamBhut
Copy link

ShubhamBhut commented Mar 3, 2023

I think I forked worng repo. @sr-gi anyway to fix this now ?

@sr-gi
Copy link
Member Author

sr-gi commented Mar 3, 2023

You have to create a PR against this repo and most likely rebase your base commit

@ShubhamBhut ShubhamBhut linked a pull request Mar 4, 2023 that will close this issue
ShubhamBhut added a commit to ShubhamBhut/rust-teos that referenced this issue Mar 9, 2023
ShubhamBhut added a commit to ShubhamBhut/rust-teos that referenced this issue Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cln-plugin Stuff related to watchtower-plugin feature request New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants