Skip to content

Set up Diem ID Domains on mini wallet startup - #306

Merged
sunmilee merged 7 commits into
diem:masterfrom
sunmilee:miniwallet
Jun 16, 2021
Merged

Set up Diem ID Domains on mini wallet startup#306
sunmilee merged 7 commits into
diem:masterfrom
sunmilee:miniwallet

Conversation

@sunmilee

@sunmileesunmilee commented Jun 1, 2021

Copy link
Copy Markdown
Contributor
  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 xliJune 1, 2021 23:18
@sunmilee
sunmileeforce-pushed the miniwallet branch 3 times, most recently from 324eec0 to 6d23f01CompareJune 2, 2021 02:32
Comment threadsrc/diem/testing/cli.py Outdated
Comment threadsrc/diem/testing/cli.py Outdated
Comment threadsrc/diem/testing/cli.py Outdated
Comment threadsrc/diem/testing/miniwallet/app/app.py Outdated
Comment threadsrc/diem/testing/miniwallet/app/event_puller.py Outdated
Comment threadsrc/diem/testing/miniwallet/app/event_puller.py Outdated
Comment threadsrc/diem/testing/miniwallet/config.py Outdated
Comment threadsrc/diem/testnet.py Outdated
Comment threadsrc/diem/testnet.py Outdated
Comment threadsrc/diem/testing/miniwallet/app/models.py Outdated
@sunmilee
sunmileeforce-pushed the miniwallet branch 4 times, most recently from 154e987 to 16be7b9CompareJune 4, 2021 01:58
@sunmilee
sunmileeforce-pushed the miniwallet branch 3 times, most recently from c4b2845 to 9762ad4CompareJune 10, 2021 06:07
Comment threadsrc/diem/jsonrpc/client.py Outdated
Comment threadsrc/diem/utils.py Outdated
Comment threadsrc/diem/jsonrpc/client.py Outdated
Comment threadsrc/diem/testing/miniwallet/config.py Outdated
Comment threadsrc/diem/testing/suites/conftest.py Outdated
Comment threadsrc/diem/testing/suites/conftest.py Outdated
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
Copy Markdown

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.

Comment threadmini-wallet.md Outdated
Comment threadtests/miniwallet/conftest.py Outdated
Comment threadtests/miniwallet/conftest.py Outdated
@xli

xli commented Jun 11, 2021

Copy link
Copy Markdown

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

xli commented Jun 11, 2021

Copy link
Copy Markdown

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.

Comment threadsrc/diem/testnet.py Outdated
Comment threadtests/miniwallet/conftest.py Outdated
Comment threadsrc/diem/testing/suites/conftest.py Outdated
Comment threadsrc/diem/testing/suites/conftest.py Outdated
@sunmilee
sunmilee requested a review from xliJune 15, 2021 22:42
@sunmilee
sunmileeforce-pushed the miniwallet branch 2 times, most recently from a8cb4df to 8e4f53eCompareJune 15, 2021 22:45
Comment threadsrc/diem/testing/cli.py Outdated
Comment threadsrc/diem/testing/cli.py Outdated
Comment threadsrc/diem/testing/cli.py Outdated
Comment threadsrc/diem/testing/cli.py Outdated
Comment threadsrc/diem/testing/suites/conftest.py Outdated
Comment threadsrc/diem/jsonrpc/client.py
xli
xli approved these changes Jun 16, 2021
@sunmilee
sunmilee merged commit cc1a00d into diem:masterJun 16, 2021
This was referenced Jun 22, 2021
Sign up for freeto 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.

2 participants

@sunmilee@xli