Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

newaddr: various fixes for msggen and docs#7217

Merged
cdecker merged 2 commits intoElementsProject:masterElementsProject/lightning:masterfrom
daywalker90:newaddr-fixdaywalker90/lightning:newaddr-fixCopy head branch name to clipboard
Apr 17, 2024
Merged

newaddr: various fixes for msggen and docs#7217
cdecker merged 2 commits intoElementsProject:masterElementsProject/lightning:masterfrom
daywalker90:newaddr-fixdaywalker90/lightning:newaddr-fixCopy head branch name to clipboard

Conversation

@daywalker90
Copy link
Collaborator

There were various occurences of p2sh-segwit still left in msggen, tests and documentation. So i removed them. I also updated some documentation files to reflect the current state of newaddr.

Is it problematic that the values in message NewaddrResponse changed?

Fixes: #6996
Replaces: #7146

vincenzopalazzo

This comment was marked as off-topic.

.msggen.json Outdated Show resolved Hide resolved
.msggen.json Outdated Show resolved Hide resolved
@daywalker90
Copy link
Collaborator Author

So previously when generating cln-rpc's model.rs we would just count from 0 upwards for enum fields and it somehow worked until i start removing fields and want to preserve backward compatibility. Now i added a commit where we lookup .msggen.json for the field numbers for model.rs whenever we can find them. If not we go back to simple counting. Happy to hear your feedback.

@daywalker90
Copy link
Collaborator Author

this also found another wrong assigment in GetinfoBindingType btw

@cdecker
Copy link
Member

cdecker commented Apr 14, 2024

Yeah, we haven't removed fields so far, hence we never had a confirmation it'd be assigning stable field numbers. It seems you are hitting a couple of new and untested scenarios. Apologies for not having tried some of these before, and thanks for the incredible help 🙏

@daywalker90
Copy link
Collaborator Author

had to add another check for an edge case that would cause problems in #7218

@daywalker90
Copy link
Collaborator Author

added explicit numbering of rust enums

Copy link
Member

@cdecker cdecker left a comment

Choose a reason for hiding this comment

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

I think I found one place where we are still just iterating numbers rather than picking them from the .mssggen.json file in grpc.py, otherwise this is very much good to go 👍

.msggen.json Show resolved Hide resolved
contrib/pyln-testing/pyln/testing/grpc.py Outdated Show resolved Hide resolved
@daywalker90
Copy link
Collaborator Author

rebased and fixed

@daywalker90
Copy link
Collaborator Author

daywalker90 commented Apr 17, 2024

I think I found one place where we are still just iterating numbers rather than picking them from the .mssggen.json file in grpc.py, otherwise this is very much good to go 👍

Where in grpc.py? enums for node.proto get sorted. For convert.rs sorting should be irrelevant, right?

@cdecker
Copy link
Member

cdecker commented Apr 17, 2024

I think I found one place where we are still just iterating numbers rather than picking them from the .mssggen.json file in grpc.py, otherwise this is very much good to go 👍

Where in grpc.py? enums for node.proto get sorted. For convert.rs sorting should be irrelevant, right?

I meant the 1 that should be a 3 in the previous comment :-)

Copy link
Member

@cdecker cdecker left a comment

Choose a reason for hiding this comment

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

ACK a227b279ba26e3ff0d81a22247a7bdb2f7ea8aae

"NewaddrAddresstype": {
"all": 2,
"bech32": 0,
"p2sh-segwit": 1,
Copy link
Member

Choose a reason for hiding this comment

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

Technically we could leave these in, as a trace for future reference, so we don't end up reusing the same number for a new enum variant. But I'll merge this as is, since that's out of scope for this PR.

@cdecker cdecker merged commit 507c2de into ElementsProject:master Apr 17, 2024
@daywalker90 daywalker90 deleted the newaddr-fix branch April 22, 2024 11:38
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.

Unable to generate P2TR address via gRPC

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.