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

rusk-wallet: Add moonlight support #2289

Merged
merged 4 commits into from
Sep 10, 2024
Merged

Conversation

moCello
Copy link
Member

@moCello moCello commented Sep 6, 2024

This PR adds basic support of moonlight transactions.
In further issues we will also want to add specific methods to create moonlight-stake, moonlight-unstake and moonlight-stake-withdrawal transactions.

Resolves #2288

@moCello moCello force-pushed the mocello/2288_moonlight_wallet branch from cd53964 to da74081 Compare September 6, 2024 10:45
@moCello moCello mentioned this pull request Sep 9, 2024
@moCello moCello force-pushed the mocello/2288_moonlight_wallet branch from 3bab53c to 0f4ceab Compare September 9, 2024 18:25
@moCello moCello requested review from Daksh14 and ZER0 September 9, 2024 19:00
Daksh14
Daksh14 previously approved these changes Sep 9, 2024
Copy link
Contributor

@Daksh14 Daksh14 left a comment

Choose a reason for hiding this comment

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

LGTM. The stake unstake functions are there for testing across rusk not exposed yet via rusk wallet

Copy link
Contributor

@ZER0 ZER0 left a comment

Choose a reason for hiding this comment

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

Before I proceed with the review, I'd like to provide some general feedback. Please note that my review will focus solely on the wallet-core section. I will ensure it is properly structured for both FFI/WASM and native support. As for the other areas, I will leave those to your discretion.

  1. Remove #![allow(clippy::module_name_repetitions)]: If you are encountering Clippy warnings about module name repetitions, it suggests that the module, type, or function names are not appropriately chosen. The attribute is there for a reason, and removing it may help identify where naming improvements are needed.

  2. Avoid having a phoenix module: We already have a notes module, and since I’ve moved phoenix_balance there, we can consolidate. The notes module can serve as a "discriminant," meaning we can have one model using notes and another using account. Ensure that everything related to "notes" is handled within the notes namespace/module, and we can then decide how best to integrate moonlight from there.

I will proceed with the review of the wallet-core section once the aforementioned points are addressed.

Please @moCello note that any changes to wallet-core are currently blocking my work on FFI and w3sper. As my changes need to be built on top of yours, it’s crucial that your revisions are handled properly and promptly.

@Daksh14 Daksh14 requested a review from ZER0 September 9, 2024 19:50
@Daksh14 Daksh14 force-pushed the mocello/2288_moonlight_wallet branch from c1b2ff1 to 072b528 Compare September 10, 2024 03:56
ZER0
ZER0 previously approved these changes Sep 10, 2024
Copy link
Contributor

@ZER0 ZER0 left a comment

Choose a reason for hiding this comment

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

LGTM

@Daksh14 Daksh14 force-pushed the mocello/2288_moonlight_wallet branch from 4de4e2f to 679f47c Compare September 10, 2024 17:42
@Daksh14 Daksh14 force-pushed the mocello/2288_moonlight_wallet branch from edd8cf9 to e11c701 Compare September 10, 2024 17:44
@Daksh14 Daksh14 requested review from ZER0 and ureeves September 10, 2024 18:04
Copy link
Member

@ureeves ureeves left a comment

Choose a reason for hiding this comment

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

🙌

@Daksh14 Daksh14 merged commit db65642 into master Sep 10, 2024
15 checks passed
@Daksh14 Daksh14 deleted the mocello/2288_moonlight_wallet branch September 10, 2024 18:09
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.

rusk-wallet: Add support to create moonlight transactions
4 participants