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

Metadata isn't updated when node's capabilities changes #1025

Open
andrevmatos opened this issue Jun 27, 2021 · 1 comment
Open

Metadata isn't updated when node's capabilities changes #1025

andrevmatos opened this issue Jun 27, 2021 · 1 comment
Labels
Bug 🐛 Something isn't working

Comments

@andrevmatos
Copy link
Contributor

andrevmatos commented Jun 27, 2021

Problem Definition

On the LC, we have some capabilities which can be updated at runtime. e.g.: by default, Receive is set to 1 if there's enough UDC balance to pay for one monitoring request, and to 0 if e.g. a udc withdraw process is initiated which makes it drop below the minimum required UDC deposit.

When these capabilities changes, we PUT the new avatar_url to the respective endpoint in our matrix server, AND after that also PUT a new status with the same online presence but a changed status_msg in order to force a m.presence update to be sent for us. Not sure if any/all of these cases aren't properly propagated by the matrix hook, or if the PFS is not reacting to these events, but it seems the PFS does not update our metadata when capabilities updates are posted, which is breaking functionality which depends on these staying more or less up to date.

Workaround for now in the user side is to disconnect, stay offline for ~30s (to be seen as offline by matrix), then coming back online and only then our capability is updated (since we came back online with the new capability).
One bug in our repo caused by this issue: raiden-network/light-client#2831

Actual Outcome

Capability isn't updated without going offline and then coming back online

Expected Outcome

PFS can pick up avatar_url updates (and/or status updates) and update our capabilities accordingly.

@andrevmatos andrevmatos added the Bug 🐛 Something isn't working label Jun 27, 2021
@andrevmatos
Copy link
Contributor Author

We managed to implement a workaround in raiden-network/light-client#2838 by quickly switching to offline then back to online upon capabilities changes, but of course this isn't ideal, PFS should listen to presence updates and avatar_url changes and update the capabilities accordingly.

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

No branches or pull requests

1 participant