Skip to content

perms: move perms.go into looprpc #930

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

Merged
merged 2 commits into from
Apr 28, 2025

Conversation

ffranr
Copy link
Contributor

@ffranr ffranr commented Apr 28, 2025

Overall plan and context: lightninglabs/lightning-node-connect#113 (comment)


The Lightning Node Connect (LNC) WASM client currently imports both looprpc and the entire loop module to access perms.go. This creates problems because loop imports taproot-assets, resulting in too many symbols for the WASM build.

To fix this, we will move perms.go—which defines RPC endpoint permissions—into looprpc. After this change, the LNC WASM client will import only looprpc, while the rest of loop can continue importing taproot-assets without affecting the LNC WASM build.

@ffranr ffranr force-pushed the mv-perms-into-looprpc branch from dd21649 to 201a900 Compare April 28, 2025 15:03
@ffranr
Copy link
Contributor Author

ffranr commented Apr 28, 2025

More changes will be necessary to fix the LNC WASM build issue, but they depend on taproot-assets changes that are not yet merged.

@levmi levmi requested review from starius and bhandras April 28, 2025 15:28
Copy link
Member

@bhandras bhandras left a comment

Choose a reason for hiding this comment

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

Changes LGTM 🎉 (still waiting for go mod check to run)

ffranr and others added 2 commits April 28, 2025 12:56
The Lightning Node Connect (LNC) WASM client currently imports both
`looprpc` and the entire `loop` module to access `perms.go`. This
creates problems because `loop` imports `taproot-assets`, resulting in
too many symbols for the WASM build.

To fix this, we will move `perms.go`—which defines RPC endpoint
permissions—into `looprpc`. After this change, the LNC WASM client will
import only `looprpc`, while the rest of `loop` can continue importing
`taproot-assets` without affecting the LNC WASM build.
@starius starius force-pushed the mv-perms-into-looprpc branch from 201a900 to 7b0c383 Compare April 28, 2025 16:21
@starius
Copy link
Collaborator

starius commented Apr 28, 2025

I ran go mod tidy in both loop and loop/looprpc. Also reverted d7d9e2d which was causing a mod check failure.

@hieblmi hieblmi merged commit 3d1ba4e into lightninglabs:master Apr 28, 2025
4 checks passed
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.

4 participants