Skip to content

Conversation

@thomaspanf
Copy link
Member

This PR introduces two commands:

  • rocketpool wallet masquerade - Change your node's effective address to a different one. Your node will not be able to submit transactions or sign messages since you don't have the corresponding wallet's private key.
  • rocketpool wallet end-masquerade - End a masquerade, restoring your node's effective address back to your wallet address if one is loaded.

While masquerading, the node and watchtower daemon will continue to submit tasks using the initialized (stored on disk) wallet.

Additionally, the NewWallet constructor in the wallet package has been refactored to return an interface rather than a concrete struct, allowing flexibility for future wallet implementations.

Copy link
Contributor

@jshufro jshufro left a comment

Choose a reason for hiding this comment

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

A few comments/questions

}

// Load the wallet store from disk and decrypt it
func (w *masqueradeWallet) loadStore() (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, does this ever get called? Seems like we should probably just return an error here- can't imagine why we'd want to read the wallet store while masquerading.

Copy link
Member Author

Choose a reason for hiding this comment

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

It gets called in the NewMasqueradeWallet() constructor and fails without an err in the case that a wallet is not loaded.

The only purpose it serves is to give you a nice printout of your loaded node wallet address in rp wallet status while you're masquerading.

The node wallet is initialized, but you are currently masquerading as 0xf6c1dCabF160d9A45691C67EfAA20EB2e89113e0
Wallet Address: 0xE8325F5f4486c2FF2AC7B522Fbc9eB249d46C936

Now that I'm taking another look, I'm pretty sure we don't need to be calling w.am.LoadAddress()within loadStore(): here and here

It already gets called within GetNodeAccount() when we're masquerading and need to fetch the masquerade address.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds like a reasonable vector to simplify this a bit, right?

thomaspanf and others added 28 commits May 21, 2025 15:01
…stead of GetAddress(). Delete isLoaded field from AddressManager
…dress, return err in TestRecovery while masquerading
@0xfornax 0xfornax merged commit 335d347 into master May 22, 2025
10 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