Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

accounts/keystore: Prevent Import race #2140

Merged
merged 2 commits into from
May 3, 2024

Conversation

blukat29
Copy link
Contributor

@blukat29 blukat29 commented Apr 25, 2024

Proposed changes

  • ethereum/go-ethereum@10c214f (#20915)
  • Add a mutex to keystore's Import, ImportECDSA, ImportECDSAWithAddress functions so that the duplicate keystores are not created.
  • Those functions are invoked via personal_importRawKey RPC and kcn accounts import command.

Types of changes

Please put an x in the boxes related to your change.

  • Bugfix
  • New feature or enhancement
  • Others

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING GUIDELINES doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes ($ make test)
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Related issues

  • Please leave the issue numbers or links related to this PR here.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@blukat29 blukat29 force-pushed the keystore-import-mutex branch 2 times, most recently from 02e612c to 7d95568 Compare April 25, 2024 05:47
@blukat29 blukat29 changed the title accounts/keystore: Prevent race in Import function accounts/keystore: Prevent Import race, Upgrade uuid lib Apr 25, 2024
@blukat29 blukat29 changed the title accounts/keystore: Prevent Import race, Upgrade uuid lib accounts/keystore: Prevent Import race Apr 25, 2024
@blukat29 blukat29 self-assigned this Apr 25, 2024
@blukat29 blukat29 force-pushed the keystore-import-mutex branch from 87118a0 to 0259a34 Compare April 30, 2024 02:00
@blukat29 blukat29 force-pushed the keystore-import-mutex branch from 0259a34 to 543a639 Compare April 30, 2024 03:29
@blukat29
Copy link
Contributor Author

blukat29 commented May 3, 2024

@JayChoi1736 @hyunsooda PTAL

@blukat29 blukat29 merged commit 6fc8f5f into klaytn:dev May 3, 2024
11 checks passed
@blukat29 blukat29 deleted the keystore-import-mutex branch May 3, 2024 07:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants