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

Feature/client manage multi addresses: Part 1 #428

Merged
merged 18 commits into from
Feb 11, 2022

Conversation

oxade
Copy link
Contributor

@oxade oxade commented Feb 11, 2022

This allows one Client to manage multiple addresses as shown in diagram from this issue: #275

image

Part 2:
Allow multithreaded instantiations
Improve naming of components
Addresses share the same archive store (?)

@oxade
Copy link
Contributor Author

oxade commented Feb 11, 2022

Please excuse all the commits. Workspace got screwed up. Will squash on merge.

lxfind
lxfind previously requested changes Feb 11, 2022
/// ------ SingleAddressStore3
/// |
/// ------ SingleAddressStore4
pub struct ClientAddressManagerStore {
Copy link
Contributor

Choose a reason for hiding this comment

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

A common practice I see from other blockchains is that there is a simple rule to name the store for each address. For example, each address's path is named as the public key of that address.
That way, you don't really need the ClientAddressManagerStore.

Copy link
Contributor

Choose a reason for hiding this comment

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

But I could be wrong. Maybe someone who is more familiar with blockchain client local store can comment. @huitseeker @sblackshear

Copy link
Contributor Author

@oxade oxade Feb 11, 2022

Choose a reason for hiding this comment

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

I can change it but does this matter much? It's not exposed to the user.
ClientAddressManagerStore is simple now but the plan is to in future do fancy stuff like shared immutable object archive across all addresses to reduce storage footprint and time spent fetching etc.

@oxade oxade linked an issue Feb 11, 2022 that may be closed by this pull request
Copy link
Contributor

@patrickkuo patrickkuo left a comment

Choose a reason for hiding this comment

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

Some minor issues and questions on the AccountManager store

sui/src/wallet_commands.rs Outdated Show resolved Hide resolved
sui_core/Cargo.toml Outdated Show resolved Hide resolved
sui/src/wallet_commands.rs Outdated Show resolved Hide resolved
sui/src/wallet_commands.rs Outdated Show resolved Hide resolved
sui/src/wallet_commands.rs Show resolved Hide resolved
sui/src/wallet_commands.rs Outdated Show resolved Hide resolved
sui_core/src/client.rs Show resolved Hide resolved
@oxade
Copy link
Contributor Author

oxade commented Feb 11, 2022

@patrickkuo will address the comments, thanks

Copy link
Contributor

@patrickkuo patrickkuo left a comment

Choose a reason for hiding this comment

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

LGTM

@oxade oxade dismissed lxfind’s stale review February 11, 2022 23:08

No movement

@oxade oxade merged commit 13ccdd2 into main Feb 11, 2022
@oxade oxade deleted the feature/client-manage-multi-addresses branch February 11, 2022 23:08
mwtian pushed a commit that referenced this pull request Sep 12, 2022
* Expose primary handles

* Expose workers handles
mwtian pushed a commit to mwtian/sui that referenced this pull request Sep 29, 2022
* Expose primary handles

* Expose workers handles
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.

[client] Extend client to manage multiple accounts
3 participants