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

Set up Diem ID Domains on mini wallet startup #306

Merged
merged 7 commits into from
Jun 16, 2021

Conversation

sunmilee
Copy link
Contributor

@sunmilee sunmilee commented Jun 1, 2021

  1. Add domains to parent vasp account on-chain during wallet startup
  2. Read events to create a domain id -> on-chain address mapping
  3. Add payment metadata function

@sunmilee sunmilee marked this pull request as ready for review June 1, 2021 23:17
@sunmilee sunmilee requested a review from xli June 1, 2021 23:18
@sunmilee sunmilee force-pushed the miniwallet branch 3 times, most recently from 324eec0 to 6d23f01 Compare June 2, 2021 02:32
src/diem/testing/cli.py Outdated Show resolved Hide resolved
src/diem/testing/cli.py Outdated Show resolved Hide resolved
src/diem/testing/cli.py Outdated Show resolved Hide resolved
src/diem/testing/miniwallet/app/app.py Outdated Show resolved Hide resolved
src/diem/testing/miniwallet/app/event_puller.py Outdated Show resolved Hide resolved
src/diem/testing/miniwallet/app/event_puller.py Outdated Show resolved Hide resolved
src/diem/testing/miniwallet/config.py Outdated Show resolved Hide resolved
src/diem/testnet.py Outdated Show resolved Hide resolved
src/diem/testnet.py Outdated Show resolved Hide resolved
src/diem/testing/miniwallet/app/models.py Outdated Show resolved Hide resolved
@sunmilee sunmilee force-pushed the miniwallet branch 4 times, most recently from 154e987 to 16be7b9 Compare June 4, 2021 01:58
@sunmilee sunmilee force-pushed the miniwallet branch 3 times, most recently from c4b2845 to 9762ad4 Compare June 10, 2021 06:07
src/diem/jsonrpc/client.py Outdated Show resolved Hide resolved
src/diem/utils.py Outdated Show resolved Hide resolved
src/diem/jsonrpc/client.py Outdated Show resolved Hide resolved
src/diem/testing/miniwallet/config.py Outdated Show resolved Hide resolved
src/diem/testing/suites/conftest.py Outdated Show resolved Hide resolved
@@ -48,7 +49,9 @@ def stub_wallet_app(start_stub_wallet: Tuple[AppConfig, App]) -> App:

@pytest.fixture(scope="package")
def start_stub_wallet(diem_client: jsonrpc.Client) -> Tuple[AppConfig, App]:
conf = AppConfig(name="stub-wallet", server_conf=ServerConfig(**dmw_stub_server()))
conf = AppConfig(
name="stubwallet", server_conf=ServerConfig(**dmw_stub_server()), diem_id_domain=dmw_stub_diem_id_domain()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we probably should keep original name "stub-wallet", don't see a reason to rename it.

mini-wallet.md Outdated Show resolved Hide resolved
tests/miniwallet/conftest.py Outdated Show resolved Hide resolved
tests/miniwallet/conftest.py Outdated Show resolved Hide resolved
@xli
Copy link
Contributor

xli commented Jun 11, 2021

I suggest we split this PR into:

  1. generate new code from diem core for new PaymentMetadata and other data structures. this PR should be easy to review and land as you only include generated code and maybe txnmetadata.py change (add a test for it)
  2. change to jsonrpc/client get_diem_id_domain_map, and faucet#mint, also need add a test for them.
  3. add an option to testing/cli.py for customizing the diem-id-domain, including test_testing_cli to confirm it is good.
  4. miniwallet changes, generate dynamic diem id domain for starting app in test env, create a test to confirm the diem id is handled properly. current implementation only handle the reference id set on txn.

@xli
Copy link
Contributor

xli commented Jun 11, 2021

I suggest we split this PR into:

  1. generate new code from diem core for new PaymentMetadata and other data structures. this PR should be easy to review and land as you only include generated code and maybe txnmetadata.py change (add a test for it)
  2. change to jsonrpc/client get_diem_id_domain_map, and faucet#mint, also need add a test for them.
  3. add an option to testing/cli.py for customizing the diem-id-domain, including test_testing_cli to confirm it is good.
  4. miniwallet changes, generate dynamic diem id domain for starting app in test env, create a test to confirm the diem id is handled properly. current implementation only handle the reference id set on txn.

Or combine first 3 together, as they are pretty much finished in this PR.

src/diem/testnet.py Outdated Show resolved Hide resolved
tests/miniwallet/conftest.py Outdated Show resolved Hide resolved
src/diem/testing/suites/conftest.py Outdated Show resolved Hide resolved
@sunmilee sunmilee requested a review from xli June 15, 2021 22:42
@sunmilee sunmilee force-pushed the miniwallet branch 2 times, most recently from a8cb4df to 8e4f53e Compare June 15, 2021 22:45
src/diem/testing/cli.py Outdated Show resolved Hide resolved
src/diem/testing/cli.py Outdated Show resolved Hide resolved
src/diem/testing/cli.py Outdated Show resolved Hide resolved
src/diem/testing/cli.py Outdated Show resolved Hide resolved
src/diem/testing/suites/conftest.py Outdated Show resolved Hide resolved
@sunmilee sunmilee merged commit cc1a00d into diem:master Jun 16, 2021
This was referenced Jun 22, 2021
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.

None yet

2 participants