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: use a single id for account id #309

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

Conversation

cpb8010
Copy link
Contributor

@cpb8010 cpb8010 commented Feb 19, 2025

Description

Use the same hashed id for both the create2 salt and the static id which is used to derive an account id.

This avoids the problem of having contention over account ids, but removes the ability for a deployer to select a specific account id. (an account mapping of msg.sender to account id to address would have the same effect, but now we only hash once or off-chain)

Additional context

Instead of subtly breaking backwards comparability by changing the account ids, this changes the interface so it's clear that the ids work differently now. The SDK previously expected to be able to read-back the account id to check if an account was already deployed, so it (and other SDK users) will need to be updated from this breaking change.

Instead of having a known salt which is used to derive the create2
salt, and a static id which is used to derive an account id, use
the same hashed id for both.

This avoids the problem of having contention over account ids, but
removes the ability for a deployer to select a specific account id.
(an account mapping of msg.sender to account id would have the
same effect)
@cpb8010 cpb8010 self-assigned this Feb 19, 2025
@cpb8010 cpb8010 changed the title feat: use a single random id for account id feat: use a single id for account id Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant