-
Notifications
You must be signed in to change notification settings - Fork 29
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
Update to handle JSON-RPC amounts in either the old or new conventions #162
Conversation
92d2104
to
95ac392
Compare
What does this fix? |
Yes, this PR makes CLBOSS compatible with However, it is not currently backwards compatible; if you run this PR against older versions of CLN it won't work. It should be possible to make it backwards compatible, I will have a look at that next ... |
95ac392
to
41b73dd
Compare
@tsjk I've reworked the CLBOSS amount PR so it should be able to handle either the old or new conventions. |
It's running successfully on CLN v23.05, but I have not verified it on an older CLN. |
I'll try to find time to test this soon. |
@tsjk switching back to Draft, I'm seeing bogus swap reports in
The The values in the
Still looking, clues welcome ... |
The negative numbers don't look too good. :) |
41b73dd
to
a4bb019
Compare
@tsjk I force pushed a new version which uses a class method instead of a conversion constructor for the JSON -> Amount method. I have seen one swap since and it was correctly reported. Possibly the problem is fixed. TODO:
|
@tsjk I've observed more swaps with well-formed reports. I'm checking the first TODO box. Any chance you could try on an older CLN version to validate backwards compatibility? |
Sorry. I've been busy with other things. |
When is the solution going to be merged with master? Is it ok to wait? |
It still needs testing on older systems with the legacy msat format, modulo that it has been working great for us on |
I ended up upgrading my mainnet node, because the version I was using (v22.11.1 with some back-ported patches) actually back-ported the msat removal - voiding my reason for stay on that version. For now my build recipe for Gentoo only applies this patch if the installed version of core lightning is v23.05 or higher. |
Over time this will become more and more reasonable. Not sure if it is quite reasonable yet though (especially for mainnet where folks run more mature versions ...) |
Well, people using old versions of Core Lightning and not intending to upgrade have zero reasons to try this patch. So I think it is better to just release this and pass an important notice like "Not compatible with versions previous to v23.05". You may want to even test version in code and return an error if version is not equal or higher than v23.05.. |
Yes, checking for version sounds sensible. |
Would you please check if #147 is related to this? |
Testing this on 23.02 with a raspiblitz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK a4bb019
Update: ran overnight on raspiblitz with CLN 23.02, looks great. Let's merge! ACK a4bb019 |
I'm attempting resolve a conflict with recent commits on Having a build problem with master before any rebasing/merging: #166 |
rebasing on master |
a4bb019
to
2b6aedf
Compare
I'm going to smoke test this in my test nodes, will merge if problem free |
Was just about to ask whether this was tested on any pre-msat-drop nodes in the end. |
Looks stable on my testnet nodes, merging |
Any ETA on a release that might include this fix? |
The JSON-RPC interface has changed the type of amounts from string w/ "msat" suffix to a plain number.
The backtrace hack and removal of the Amount constructor-from-string are useful during debugging but we might want to drop them ...