Skip to content

Masquerade bugfix + Allow masquerade in the node/watchtower loops. #1120

Open
thomaspanf wants to merge 6 commits into
masterfrom
fix-masquerade
Open

Masquerade bugfix + Allow masquerade in the node/watchtower loops. #1120
thomaspanf wants to merge 6 commits into
masterfrom
fix-masquerade

Conversation

@thomaspanf

Copy link
Copy Markdown
Member
  • Masquerade broke when we switched to a long-standing HTTP API process. The real node address is cached once and returned by the API every time the CLI called GetWallet. Previously rocketpool_api (now deprecated) would make a fresh read of masquerade address from disk every time the CLI called it. This PR resolves the issue by ensuring GetWallet returns the correct masquerade state and address when called from the CLI.

  • Added flag --observe to the wallet masquerade command. When this flag is passed, the node/watchtower loop will use the masqueraded address for all tasks except for manageFeeRecipient. Transactions cannot be submitted and oDAO nodes are blocked from using the flag.

@github-actions

Copy link
Copy Markdown

Coverage Report

@github-actions

Copy link
Copy Markdown

Coverage Report

@github-actions

Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/rocket-pool/smartnode/rocketpool-cli/wallet 0.00% (ø)
github.com/rocket-pool/smartnode/rocketpool/api/wallet 0.00% (ø)
github.com/rocket-pool/smartnode/rocketpool/node 0.65% (-0.01%) 👎
github.com/rocket-pool/smartnode/rocketpool/watchtower 0.89% (-0.00%) 👎
github.com/rocket-pool/smartnode/shared/services 0.24% (-0.00%) 👎
github.com/rocket-pool/smartnode/shared/services/rocketpool 0.00% (ø)
github.com/rocket-pool/smartnode/shared/services/wallet 0.00% (ø)
github.com/rocket-pool/smartnode/shared/types/api 7.01% (ø)
github.com/rocket-pool/smartnode/shared/utils/rp 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/rocket-pool/smartnode/rocketpool-cli/wallet/commands.go 0.00% (ø) 645 0 645
github.com/rocket-pool/smartnode/rocketpool-cli/wallet/masquerade.go 0.00% (ø) 378 (+151) 0 378 (+151)
github.com/rocket-pool/smartnode/rocketpool-cli/wallet/status.go 0.00% (ø) 480 (+124) 0 480 (+124)
github.com/rocket-pool/smartnode/rocketpool/api/wallet/masquerade.go 0.00% (ø) 321 (+203) 0 321 (+203)
github.com/rocket-pool/smartnode/rocketpool/api/wallet/routes.go 0.00% (ø) 1087 (+16) 0 1087 (+16)
github.com/rocket-pool/smartnode/rocketpool/api/wallet/status.go 0.00% (ø) 401 (+61) 0 401 (+61)
github.com/rocket-pool/smartnode/rocketpool/node/defend-pdao-props.go 0.00% (ø) 1638 0 1638
github.com/rocket-pool/smartnode/rocketpool/node/distribute-minipools.go 0.00% (ø) 1538 0 1538
github.com/rocket-pool/smartnode/rocketpool/node/download-reward-trees.go 0.00% (ø) 657 0 657
github.com/rocket-pool/smartnode/rocketpool/node/manage-fee-recipient.go 0.00% (ø) 969 (+144) 0 969 (+144)
github.com/rocket-pool/smartnode/rocketpool/node/metrics-exporter.go 0.00% (ø) 1075 0 1075
github.com/rocket-pool/smartnode/rocketpool/node/node.go 0.00% (ø) 3791 (+130) 0 3791 (+130)
github.com/rocket-pool/smartnode/rocketpool/node/provision-express-tickets.go 0.00% (ø) 1037 0 1037
github.com/rocket-pool/smartnode/rocketpool/node/set-latest-delegate.go 0.00% (ø) 1376 0 1376
github.com/rocket-pool/smartnode/rocketpool/node/verify-pdao-props.go 5.13% (ø) 2886 148 2738
github.com/rocket-pool/smartnode/rocketpool/watchtower/check-solo-migrations.go 0.00% (ø) 2143 0 2143
github.com/rocket-pool/smartnode/rocketpool/watchtower/dissolve-timed-out-minipools.go 0.00% (ø) 872 0 872
github.com/rocket-pool/smartnode/rocketpool/watchtower/finalize-pdao-proposals.go 0.00% (ø) 700 0 700
github.com/rocket-pool/smartnode/rocketpool/watchtower/respond-challenges.go 0.00% (ø) 590 0 590
github.com/rocket-pool/smartnode/rocketpool/watchtower/submit-network-balances.go 5.77% (ø) 4715 272 4443
github.com/rocket-pool/smartnode/rocketpool/watchtower/submit-rewards-tree-stateless.go 0.00% (ø) 3288 0 3288
github.com/rocket-pool/smartnode/rocketpool/watchtower/submit-rpl-price.go 0.26% (ø) 8578 22 8556
github.com/rocket-pool/smartnode/rocketpool/watchtower/submit-scrub-minipools.go 0.00% (ø) 4114 0 4114
github.com/rocket-pool/smartnode/rocketpool/watchtower/watchtower.go 0.00% (ø) 2749 (+130) 0 2749 (+130)
github.com/rocket-pool/smartnode/shared/services/rocketpool/wallet.go 0.00% (ø) 1981 (+46) 0 1981 (+46)
github.com/rocket-pool/smartnode/shared/services/services.go 0.00% (ø) 2719 (+58) 0 2719 (+58)
github.com/rocket-pool/smartnode/shared/services/wallet/address-manager.go 0.00% (ø) 557 (+188) 0 557 (+188)
github.com/rocket-pool/smartnode/shared/services/wallet/masquerade-wallet.go 0.00% (ø) 728 0 728
github.com/rocket-pool/smartnode/shared/services/wallet/wallet.go 0.00% (ø) 2078 0 2078
github.com/rocket-pool/smartnode/shared/types/api/wallet.go 0.00% (ø) 0 0 0
github.com/rocket-pool/smartnode/shared/utils/rp/fee-recipient.go 0.00% (ø) 968 (+141) 0 968 (+141)

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

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.

2 participants