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

msggen: Add decode and decodepay to the mapped bindings #6229

Merged
merged 12 commits into from
May 5, 2023

Conversation

cdecker
Copy link
Member

@cdecker cdecker commented May 3, 2023

Builds on top of #6222 and starts at 51eecab

We had to do some drive-by fixes, and improvements to msggen itself:

  • Move the overrides into the model itself, so all generated artifacts have the same fields and are convertible to each other (good for roundtripping of conversions)
  • We now map more types, including previously unknown types such as arrays of hashes and signatures

But the meat of the PR is the addition of decode and decodepay, as such it should replace #6212

Closes #6212

cdecker added 10 commits May 3, 2023 10:31
We use overrides that omit fields in some cases, which makes the
conversion lossy. This also means that until we complete the mapping
we can't reconvert back.
This is still a huge response, so we better make sure we can actually
convert it correctly.
We were using per-type overrides which caused some asymmetries, where
conversions could end up dropping fields as we went along. Essentially
each conversion would need to override a superset of the previous one,
which then caused issues when attempting to close the loop. By
overriding on the model level we ensure that all representations are
equivalent and convertible into one another, at the expense of
overriding a bit more aggressively, which should be fine anyway.
@cdecker cdecker force-pushed the 202318-grpc-decodepay branch 2 times, most recently from 163f82f to 7bb6dca Compare May 3, 2023 14:31
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack 3098a5b

Changelog-Added: grpc: Added mapping for `listpeerchannels`, `listclosedchannels`, `decode` and `decodepay` RPC method
@cdecker
Copy link
Member Author

cdecker commented May 4, 2023

Added a Changelog-Added entry describing all 3 PRs in this stack.

Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack 5dc3a0b

@rustyrussell rustyrussell merged commit fc26675 into ElementsProject:master May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants