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

internal/cli/server, eth: add option to disable personal wallet endpoints #394

Merged
merged 4 commits into from
May 23, 2022

Conversation

manav2401
Copy link
Contributor

This PR adds a new flag called disable-bor-wallet in the new-cli, which in-turn disables the rpc endpoints with personal namespace. Basically it won't allow the users to perform any wallet related operation. Incase it's a mining node, it will perform the authorisation using a dummy account manager.

Note: The endpoints will still exist and will also show up in the list of commands. It's just that the account manager has no keystore and hence those endpoints will be of no use.

The changes have been tested for developer mode as well as normal mode.

@codecov-commenter
Copy link

codecov-commenter commented May 11, 2022

Codecov Report

Merging #394 (d0c8f1f) into v0.3.0-dev (110ea65) will decrease coverage by 0.05%.
The diff coverage is 20.00%.

@@              Coverage Diff               @@
##           v0.3.0-dev     #394      +/-   ##
==============================================
- Coverage       55.79%   55.74%   -0.06%     
==============================================
  Files             601      601              
  Lines           69535    69585      +50     
==============================================
- Hits            38800    38789      -11     
- Misses          27377    27448      +71     
+ Partials         3358     3348      -10     
Impacted Files Coverage Δ
eth/backend.go 0.00% <0.00%> (ø)
internal/cli/server/flags.go 0.00% <0.00%> (ø)
internal/cli/server/server.go 24.53% <23.63%> (-3.47%) ⬇️
internal/cli/server/config.go 74.44% <100.00%> (+0.18%) ⬆️
p2p/simulations/mocker.go 17.77% <0.00%> (-17.78%) ⬇️
p2p/discover/v4_udp.go 72.75% <0.00%> (-4.35%) ⬇️
core/rawdb/chain_iterator.go 55.90% <0.00%> (-2.49%) ⬇️
consensus/ethash/ethash.go 54.19% <0.00%> (-1.53%) ⬇️
rpc/client.go 83.72% <0.00%> (-1.17%) ⬇️
les/costtracker.go 62.96% <0.00%> (-1.06%) ⬇️
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 110ea65...d0c8f1f. Read the comment docs.

@manav2401 manav2401 requested a review from cffls May 11, 2022 11:44
@linear
Copy link

linear bot commented May 11, 2022

POS-31 Deprecate personal/wallet endpoints from Bor

We still need to run this by the community to figure out if there is anyone using these features.

https://www.notion.so/polygontechnology/RFC-21-73e62b51690d459688b0bef0c8335ccd

Copy link
Contributor

@cffls cffls left a comment

Choose a reason for hiding this comment

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

LGTM

@manav2401 manav2401 merged commit 1b53044 into v0.3.0-dev May 23, 2022
@manav2401 manav2401 deleted the manav/POS-31-disable-personal-wallet-new branch May 23, 2022 08:36
manav2401 added a commit that referenced this pull request May 23, 2022
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