[AC-2678] Not able to Create ADI from lite account with “ETH”/"BTC"/"BTCLEGACY" key
Scenario:
Create ADI from lite account with “ETH” key
Steps to reproduce:
1.Create lite account with sigType "ETH" 2.Add faucet 3.Add Credits to lite identity 4.Generate new key with sigType "ETH"(addKeyeth9L2M) 5.export the private key of new key 6.Create ADI from lite account with "ETH" key
Expected:
We should be able to create ADI with ETH key
Actual :
Not able to create ADI
Commands
Step 1:
accumulate key generate --sigtype eth TestKeyethCOHUC -s [https://beta.testnet.accumulatenetwork.io/v2|https://beta.testnet.accumulatenetwork.io/v2] --use-unencrypted-wallet -j { name: 'TestKeyethCOHUC', url: 'acc://19d342767c6f35af4e365982fd5ed57825183dc837b05e28/ACME', identity: 'acc://19d342767c6f35af4e365982fd5ed57825183dc837b05e28', publicKey: '047a78391b7bfcbd41aa043926cddb42b92d24b5f8b518b56e6d9a76a0e0aa06365a8769966a83f7fa0124aacb77f214371ef3f9bd1fd9bc7eed8146287e2373ad', keyType: undefined }
Step 2:
accumulate faucet acc://19d342767c6f35af4e365982fd5ed57825183dc837b05e28/ACME acc://19d342767c6f35af4e365982fd5ed57825183dc837b05e28/ACME -s [https://beta.testnet.accumulatenetwork.io/v2|https://beta.testnet.accumulatenetwork.io/v2] --use-unencrypted-wallet
Step 3:
accumulate credits acc://19d342767c6f35af4e365982fd5ed57825183dc837b05e28/ACME acc://19d342767c6f35af4e365982fd5ed57825183dc837b05e28/ACME 10000 -s [https://beta.testnet.accumulatenetwork.io/v2|https://beta.testnet.accumulatenetwork.io/v2] --use-unencrypted-wallet
Step 4:
accumulate key generate --sigtype eth addKeyeth9L2M -s [https://beta.testnet.accumulatenetwork.io/v2|https://beta.testnet.accumulatenetwork.io/v2] --use-unencrypted-wallet -j
Step 5:
accumulate key export private addKeyeth9L2M -s [https://beta.testnet.accumulatenetwork.io/v2|https://beta.testnet.accumulatenetwork.io/v2] --use-unencrypted-wallet -j
Step 6:
accumulate adi create acc://19d342767c6f35af4e365982fd5ed57825183dc837b05e28/ACME automationAdi864.acme addKeyeth9L2M -s [https://beta.testnet.accumulatenetwork.io/v2|https://beta.testnet.accumulatenetwork.io/v2] --use-unencrypted-wallet -d accumulated: [https://beta.testnet.accumulatenetwork.io/v2|https://beta.testnet.accumulatenetwork.io/v2] --> {"jsonrpc":"2.0","method":"execute-direct","params":{"envelope":{"signatures":[{"type":"eth","publicKey":"047a78391b7bfcbd41aa043926cddb42b92d24b5f8b518b56e6d9a76a0e0aa06365a8769966a83f7fa0124aacb77f214371ef3f9bd1fd9bc7eed8146287e2373ad","signature":"3044022037d0002ebf6cb89502e0219df4483e9c059994167d6937ce1fb1b925292fa1d0022048d2e0a0c73cebe85d5423c95ec2943fffd50ade1702aedd311140f6b762e650","signer":"acc://19d342767c6f35af4e365982fd5ed57825183dc837b05e28","signerVersion":1,"timestamp":1658927065528,"transactionHash":"db119a966c9b3c4927e46609d1f7256daf61ae34f0da6f5eded5708b1383de87"}],"transaction":[{"header":{"principal":"acc://19d342767c6f35af4e365982fd5ed57825183dc837b05e28/ACME","origin":"acc://19d342767c6f35af4e365982fd5ed57825183dc837b05e28/ACME","initiator":"fabf8a69e0e3603570743995d7d696843b5c8d6f2c81f659dc16c7a3ee3c0883"},"body":{"type":"createIdentity","url":"acc://automationAdi864.acme","keyHash":"be50cf4651e4941e64ec7bc1fa4fb07acef17b54","keyBookUrl":"acc://automationAdi864.acme/book"}}]}},"id":893} <-- {"jsonrpc":"2.0","result":{"transactionHash":"db119a966c9b3c4927e46609d1f7256daf61ae34f0da6f5eded5708b1383de87","txid":"acc://db119a966c9b3c4927e46609d1f7256daf61ae34f0da6f5eded5708b1383de87@19d342767c6f35af4e365982fd5ed57825183dc837b05e28/ACME","signatureHashes":["3ca1e982a01695ffcb265f41ac128aa3fd2ec2480b799f71d20f51cb09fabeef"],"simpleHash":"42c541db701213cad00d17ab5ff3396e199882b38c40b3dead1653ad5ad145e4","hash":"42c541db701213cad00d17ab5ff3396e199882b38c40b3dead1653ad5ad145e4","code":4,"message":"One or more user transactions failed","result":{"txID":"acc://db119a966c9b3c4927e46609d1f7256daf61ae34f0da6f5eded5708b1383de87@19d342767c6f35af4e365982fd5ed57825183dc837b05e28/ACME","code":"badRequest","delivered":true,"failed":true,"codeNum":400,"error":{"message":"invalid Key Hash: length must be equal to 32 bytes","code":"badRequest","codeID":400},"result":null,"signers":null}},"id":893}
Error: invalid Key Hash: length must be equal to 32 bytes
{color:#bf2600}+*NOTE:*+{color}
{color:#bf2600}This issue exists for other signature type like “btc” & “btclegacy” as well.{color}
Issue metadata
- Issue type: Bug
- Priority: Lowest
- Fix versions: 1.1