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

extend TransactionPlan/EffectHash test vectors to also include expected hardware wallet UI output #4947

Open
redshiftzero opened this issue Dec 2, 2024 · 0 comments · May be fixed by #4948
Assignees
Labels
needs-refinement unclear, incomplete, or stub issue that needs work

Comments

@redshiftzero
Copy link
Member

Is your feature request related to a problem? Please describe.
In #4879 (issue #4613) we implemented test vectors for transaction signing by generating random TransactionPlans and computing their expected EffectHash. This was done to aid development for others implementing the EffectHash-based transaction signing mechanism in a hardware wallet environment.

To further support hardware wallet development for Penumbra, it would be helpful to also generate examples of what the expected output on the hardware wallet device should be for those same TransactionPlan test vectors.

Describe the solution you'd like

For each committed TransactionPlan, we want to generate expected output like this customized for Penumbra, where the blob will be the hex-encoded transaction plan, and then the UI fields would indicate the expected output on the device for expert and non-expert mode:

{
      "index": 0,
      "name": "Asset_Freeze",
      "blob": "8ba466616464c4204b2a4ad9d4d900ea16f9dcee534b9c0189daa1acbccace73d794bf168b8a73e3a466616964ce000b6717a3666565ce001e163fa26676ce000153c8a367656eac6d61696e6e65742d76312e30a26768c420c061c4d8fc1dbdded2d7604be4568e3f6d041987ac37bde4b620b5ab39248adfa26c76ce00018b66a46e6f7465c41c48656c6c6f2074686572652c20746869732069732061206e6f746521a572656b6579c4206a08f935de3bb9eb65b9d206598f5d34419257491c4024ca5f88ea73749de231a3736e64c4209fa4543b7caf05ad7334a5a74033acdc130137d7afa1f6733509f6d4377c30d7a474797065a46166727a",
      "output": [
        "0 | Txn type : Asset Freeze",
        "1 | Sender [1/2] : T6SFIO34V4C224ZUUWTUAM5M3QJQCN6XV6Q7M4",
        "1 | Sender [2/2] : ZVBH3NIN34GDLSK2ETKM",
        "2 | Rekey to [1/2] : WARNING: NIEPSNO6HO46WZNZ2IDFTD25GRAZE",
        "2 | Rekey to [2/2] : V2JDRACJSS7RDVHG5E54IYZOIA3MI",
        "3 | Fee : ALGO 1.971775",
        "4 | Genesis ID : mainnet-v1.0",
        "5 | Genesis hash [1/2] : wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qz",
        "5 | Genesis hash [2/2] : kkit8=",
        "6 | Note : 28 bytes",
        "7 | Asset ID : 747287",
        "8 | Asset account [1/2] : JMVEVWOU3EAOUFXZ3TXFGS44AGE5VINMXTFM44",
        "8 | Asset account [2/2] : 6XSS7RNC4KOPR5HR537U",
        "9 | Freeze flag : Unfrozen"
      ],
      "output_expert": [
        "0 | Txn type : Asset Freeze",
        "1 | Sender [1/2] : T6SFIO34V4C224ZUUWTUAM5M3QJQCN6XV6Q7M4",
        "1 | Sender [2/2] : ZVBH3NIN34GDLSK2ETKM",
        "2 | Rekey to [1/2] : WARNING: NIEPSNO6HO46WZNZ2IDFTD25GRAZE",
        "2 | Rekey to [2/2] : V2JDRACJSS7RDVHG5E54IYZOIA3MI",
        "3 | Fee : ALGO 1.971775",
        "4 | Genesis ID : mainnet-v1.0",
        "5 | Genesis hash [1/2] : wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qz",
        "5 | Genesis hash [2/2] : kkit8=",
        "6 | Note : 28 bytes",
        "7 | Asset ID : 747287",
        "8 | Asset account [1/2] : JMVEVWOU3EAOUFXZ3TXFGS44AGE5VINMXTFM44",
        "8 | Asset account [2/2] : 6XSS7RNC4KOPR5HR537U",
        "9 | Freeze flag : Unfrozen"
      ]
    },
@github-actions github-actions bot added the needs-refinement unclear, incomplete, or stub issue that needs work label Dec 2, 2024
@redshiftzero redshiftzero self-assigned this Dec 2, 2024
@redshiftzero redshiftzero linked a pull request Dec 2, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-refinement unclear, incomplete, or stub issue that needs work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant