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

feat(jsonrpc): add support for allow-insecure-unlock #2375

Merged
merged 30 commits into from May 13, 2024

Conversation

timwhite2
Copy link
Contributor

Allow insecure account unlocking when account-related RPCs are exposed by http

Description

Closes: #1657


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the correct branch (see PR Targeting)

Reviewers Checklist

All items are required.
Please add a note if the item is not applicable
and please add your handle next to the items reviewed
if you only reviewed selected items.

I have...

  • added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code
  • reviewed content
  • tested instructions (if applicable)
  • confirmed all CI checks have passed

Allow insecure account unlocking when account-related RPCs are exposed by http
@timwhite2 timwhite2 requested a review from a team as a code owner February 23, 2024 08:57
@timwhite2 timwhite2 requested review from 0xstepit and GAtom22 and removed request for a team February 23, 2024 08:57
@0xstepit
Copy link
Contributor

Hey @timwhite2, this is cool! Thanks for the implementation of this feature. Will look into it ASAP

Copy link

codecov bot commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 59.55%. Comparing base (f097735) to head (738e2f6).
Report is 145 commits behind head on main.

❗ Current head 738e2f6 differs from pull request most recent head d642c59. Consider uploading reports for the commit d642c59 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2375       +/-   ##
===========================================
- Coverage   70.45%   59.55%   -10.90%     
===========================================
  Files         293      341       +48     
  Lines       22559    21598      -961     
===========================================
- Hits        15893    12862     -3031     
- Misses       5800     7689     +1889     
- Partials      866     1047      +181     
Files Coverage Δ
server/config/config.go 47.05% <100.00%> (+10.24%) ⬆️
server/flags/flags.go 71.42% <ø> (ø)
server/start.go 19.89% <100.00%> (ø)
rpc/backend/sign_tx.go 57.14% <0.00%> (-3.81%) ⬇️
rpc/backend/node_info.go 43.42% <0.00%> (-3.09%) ⬇️

... and 341 files with indirect coverage changes

Copy link
Contributor

@GAtom22 GAtom22 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @timwhite2!!

Left one comment.
Also, please add a changelog entry

rpc/backend/node_info.go Outdated Show resolved Hide resolved
GAtom22 and others added 3 commits February 29, 2024 17:51
1.remove JSONRPC.Enable check
2.add changelog
3.modify JSONRPC.Enable description
Copy link
Contributor

@GAtom22 GAtom22 left a comment

Choose a reason for hiding this comment

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

LGTM!! Thanks for this great contribution @timwhite2!

CHANGELOG.md Outdated Show resolved Hide resolved
rpc/backend/node_info.go Outdated Show resolved Hide resolved
rpc/backend/node_info.go Outdated Show resolved Hide resolved
@CLAassistant
Copy link

CLAassistant commented Mar 4, 2024

CLA assistant check
All committers have signed the CLA.

ramacarlucho
ramacarlucho previously approved these changes Mar 7, 2024
Copy link
Collaborator

@ramacarlucho ramacarlucho left a comment

Choose a reason for hiding this comment

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

LGTM!
Thank you for the contribution

@ramacarlucho ramacarlucho dismissed their stale review March 7, 2024 12:26

Test not passing

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@ramacarlucho ramacarlucho left a comment

Choose a reason for hiding this comment

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

Can you fix the tests that are not passing?

@timwhite2
Copy link
Contributor Author

Can you fix the tests that are not passing?

Sure

@timwhite2
Copy link
Contributor Author

The other errors seem to have nothing to do with this branch

@timwhite2
Copy link
Contributor Author

@ramacarlucho It seems that all required checks have passed

Copy link
Contributor

@MalteHerrmann MalteHerrmann left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, however I see it's being enabled in a lot of places but it's usage is actually not tested. There should be dedicated tests added to showcase the feature and that it is working, if we're going to enable it.

tests/solidity/init-node.sh Outdated Show resolved Hide resolved
local_node.sh Outdated Show resolved Hide resolved
server/config/config.go Outdated Show resolved Hide resolved
tests/nix_tests/configs/default.jsonnet Outdated Show resolved Hide resolved
timwhite2 and others added 4 commits March 29, 2024 09:36
Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
Signed-off-by: Tom <54514587+GAtom22@users.noreply.github.com>
Co-authored-by: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com>
Signed-off-by: Tom <54514587+GAtom22@users.noreply.github.com>
@GAtom22 GAtom22 merged commit 0c5f7db into evmos:main May 13, 2024
40 of 44 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.

Problem: keyring-backend test leading to accounts to be drained when 8545 exposed public
8 participants