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

Allow Setting of EVM Address by EOA #1082

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Nana-EC
Copy link
Contributor

@Nana-EC Nana-EC commented Nov 18, 2024

Description:
HIP 583 opened the doors for greater account compatibility with EVM flows by utilizing the account alias to encompass
the EVM address. However, given the static nature of the alias and concerns of complexity, existing accounts were not
allowed to update their alias and set one if it was null. This HIP aims to rectify this by allowing EOAs who have no
alias set to set it to an ECDSA key derived evm address value they own.

This HIP also replaces the need for HIP 631: Account Virtual Addresses as it
aimed to resolve this issue as well as provide even greater functionality. A form of HIP 631 could be revisited in the
future but not with the goal of providing address equivalence with the EVM.

Related issue(s):

Fixes #1070

Notes for reviewer:
1st draft, need to add a clarifying image and touch up

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Nana Essilfie-Conduah <[email protected]>
@Nana-EC Nana-EC self-assigned this Nov 18, 2024
Copy link

netlify bot commented Nov 18, 2024

Deploy Preview for hedera-hips ready!

Name Link
🔨 Latest commit fe1a3c1
🔍 Latest deploy log https://app.netlify.com/sites/hedera-hips/deploys/673ae187212bdd000831436b
😎 Deploy Preview https://deploy-preview-1082--hedera-hips.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Signed-off-by: Nana Essilfie-Conduah <[email protected]>
utilize that to identify them in future. The cached address could dictate balance access or other privileged access.

As such, an EOA that has interacted with a smart contract using their long zero address and then sets an ECDSA derived
EVM address after will be responsible for any unexpected interactions with the smart contract
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add a suggestion that such accounts should first transfer all contract assets to the EVM address, then update the account's EVM address ?

Copy link
Contributor

@ty-swirldslabs ty-swirldslabs left a comment

Choose a reason for hiding this comment

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

Great work! I added some clarifying questions to user stories section


## User stories

1. As an existing account with an ED key but no EVM address alias, I would like to set an ECDSA derived EVM address
Copy link
Contributor

Choose a reason for hiding this comment

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

In this user story, wouldn't the user have to update the ED key to the new ECDSA key that corresponds with the EVM address for 'ecrecover' to function? Maybe I'm misunderstanding the phrase 'correct ecrecover functionality', or is the implication that the key is being updated as well

2. As an existing account with an EC key but no EVM address alias, I would like to set an ECDSA derived EVM address
alias on my account that will identify my account on the EVM and allow for the correct `ecrecover` functionality.
3. As an existing account with a complex key but no EVM address alias, I would like to set an ECDSA derived EVM address
alias on my account that will identify my account on the EVM and allow for the correct `ecrecover` functionality.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same concern here as user story 1. Maybe we add the caveat to the stories, that the ECDSA signature that corresponds with the EVM address for ecrecover to function would need to be utilized on signatures for EVM of those transactions and not the key associated with the account on the hedera network.

4. As an account with an EVM address alias set after creation, I would like to set an evm address override to my
previous long zero address for a `ContractCreate` transaction.
5. As an account with an EVM address alias set after creation, I would like to set an evm address override to my
previous long zero address for a `ContractCall` transaction.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this out of scope / too complex for this HIPs user story?
As an existing account with an ED key but no EVM address alias, I would like to update my key to an ECDSA key and set my EVM address to be derived from the new ECDSA key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

3 participants