symbol / symbol-cli

Command-line tool for Symbol
https://docs.symbolplatform.com/cli.html
Apache License 2.0
36 stars 24 forks source link

Crash when signing+announcing a complete tx #364

Open mm-s opened 3 years ago

mm-s commented 3 years ago
  1. Expected behavior and actual behavior. Signing and announcing a given transaction payload

  2. Steps to reproduce the problem.

    
    Obtain sig from TX payload:

symbol-cli transaction cosign

✔ Choose a transaction input type: › transaction payload(for off-chain tx) ✔ Enter the transaction payload: … B8010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001984141E0AB000000000000097C9CE8090000002523CE58C4030F76C0DFA763A61DCEB7C0348BBAD5A5E78C185CFF388D1DB1741001000000000000510000000000000050AC6D29B7E0BC919D4BC6AC2948E5997D798982A02EBE37BB919DBB7975C0370000000001984C417400672170875E5D6F6AB5AAA59A1C01AED4C9D6ED47B5191B2F0A63DF0DC8EA0100000000000000510000000000000050AC6D29B7E0BC919D4BC6AC2948E5997D798982A02EBE37BB919DBB7975C0370000000001984342D9684873F5A66DDDE83666D0C494F473A1CDED6F2A41F70A153566E6BEAE3DBC0100000000000000590000000000000050AC6D29B7E0BC919D4BC6AC2948E5997D798982A02EBE37BB919DBB7975C0370000000001984341E0C02BBEA7C0C24217C3FB680DB5191DEA959DE4D18BFE61E1733B985A50739D01000000B40500000100000000000000

SUCCESS Transaction to cosign: ┌────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ AGGREGATE_COMPLETE │ ├─────────────────────────────────┬──────────────────────────────────────────────────────────────────┤ │ Max fee: │ 44,000 │ ├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤ │ Network type: │ TEST_NET │ ├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤ │ Deadline: │ 2021-03-17 13:27:55.145 │ ├─────────────────────────────────┴──────────────────────────────────────────────────────────────────┤ │ Inner transaction 1 of 3 - ACCOUNT_KEY_LINK │ ├─────────────────────────────────┬──────────────────────────────────────────────────────────────────┤ │ [Inner tx. 1 of 3] Action: │ Link │ ├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤ │ [Inner tx. 1 of 3] Linked key: │ 7400672170875E5D6F6AB5AAA59A1C01AED4C9D6ED47B5191B2F0A63DF0DC8EA │ ├─────────────────────────────────┴──────────────────────────────────────────────────────────────────┤ │ Inner transaction 2 of 3 - VRF_KEY_LINK │ ├─────────────────────────────────┬──────────────────────────────────────────────────────────────────┤ │ [Inner tx. 2 of 3] Action: │ Link │ ├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤ │ [Inner tx. 2 of 3] Linked key: │ D9684873F5A66DDDE83666D0C494F473A1CDED6F2A41F70A153566E6BEAE3DBC │ ├─────────────────────────────────┴──────────────────────────────────────────────────────────────────┤ │ Inner transaction 3 of 3 - VOTING_KEY_LINK │ ├─────────────────────────────────┬──────────────────────────────────────────────────────────────────┤ │ [Inner tx. 3 of 3] Action: │ Link │ ├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤ │ [Inner tx. 3 of 3] Linked key: │ E0C02BBEA7C0C24217C3FB680DB5191DEA959DE4D18BFE61E1733B985A50739D │ ├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤ │ [Inner tx. 3 of 3] Start epoch: │ 1 │ ├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤ │ [Inner tx. 3 of 3] End epoch: │ 1460 │ └─────────────────────────────────┴──────────────────────────────────────────────────────────────────┘ ✔ Enter your wallet password: … **** Co-signed transaction:{"parentHash":"FA37887AFFDFB333160BFACC56823CCE4B7F229FDE21AE5BD1D70CF4369E3409","signature":"73CE912E2B5551D414F9C99BF57C0F355601D0870378C97E97B67D04075E97E395E37062E9F2710A3721EC2DE515035B767F6A205A72A9CB4CC49FB3E609F408","signerPublicKey":"50AC6D29B7E0BC919D4BC6AC2948E5997D798982A02EBE37BB919DBB7975C037","version":{"lower":0,"higher":0}}

2.-announce symbol-cli transaction payload


✔ Enter the transaction payload: … B8010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001984141E0AB000000000000097C9CE8090000002523CE58C4030F76C0DFA763A61DCEB7C0348BBAD5A5E78C185CFF388D1DB1741001000000000000510000000000000050AC6D29B7E0BC919D4BC6AC2948E5997D798982A02EBE37BB919DBB7975C0370000000001984C417400672170875E5D6F6AB5AAA59A1C01AED4C9D6ED47B5191B2F0A63DF0DC8EA0100000000000000510000000000000050AC6D29B7E0BC919D4BC6AC2948E5997D798982A02EBE37BB919DBB7975C0370000000001984342D9684873F5A66DDDE83666D0C494F473A1CDED6F2A41F70A153566E6BEAE3DBC0100000000000000590000000000000050AC6D29B7E0BC919D4BC6AC2948E5997D798982A02EBE37BB919DBB7975C0370000000001984341E0C02BBEA7C0C24217C3FB680DB5191DEA959DE4D18BFE61E1733B985A50739D01000000B40500000100000000000000

SUCCESS Transaction loaded:
┌────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                         AGGREGATE_COMPLETE                                         │
├─────────────────────────────────┬──────────────────────────────────────────────────────────────────┤
│ Max fee:                        │ 44,000                                                           │
├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤
│ Network type:                   │ TEST_NET                                                         │
├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤
│ Deadline:                       │ 2021-03-17 13:27:55.145                                          │
├─────────────────────────────────┴──────────────────────────────────────────────────────────────────┤
│                            Inner transaction 1 of 3 - ACCOUNT_KEY_LINK                             │
├─────────────────────────────────┬──────────────────────────────────────────────────────────────────┤
│ [Inner tx. 1 of 3] Action:      │ Link                                                             │
├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤
│ [Inner tx. 1 of 3] Linked key:  │ 7400672170875E5D6F6AB5AAA59A1C01AED4C9D6ED47B5191B2F0A63DF0DC8EA │
├─────────────────────────────────┴──────────────────────────────────────────────────────────────────┤
│                              Inner transaction 2 of 3 - VRF_KEY_LINK                               │
├─────────────────────────────────┬──────────────────────────────────────────────────────────────────┤
│ [Inner tx. 2 of 3] Action:      │ Link                                                             │
├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤
│ [Inner tx. 2 of 3] Linked key:  │ D9684873F5A66DDDE83666D0C494F473A1CDED6F2A41F70A153566E6BEAE3DBC │
├─────────────────────────────────┴──────────────────────────────────────────────────────────────────┤
│                             Inner transaction 3 of 3 - VOTING_KEY_LINK                             │
├─────────────────────────────────┬──────────────────────────────────────────────────────────────────┤
│ [Inner tx. 3 of 3] Action:      │ Link                                                             │
├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤
│ [Inner tx. 3 of 3] Linked key:  │ E0C02BBEA7C0C24217C3FB680DB5191DEA959DE4D18BFE61E1733B985A50739D │
├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤
│ [Inner tx. 3 of 3] Start epoch: │ 1                                                                │
├─────────────────────────────────┼──────────────────────────────────────────────────────────────────┤
│ [Inner tx. 3 of 3] End epoch:   │ 1460                                                             │
└─────────────────────────────────┴──────────────────────────────────────────────────────────────────┘
✔ Enter the cosignature json array (press enter to skip): … {"parentHash":"FA37887AFFDFB333160BFACC56823CCE4B7F229FDE21AE5BD1D70CF4369E3409","signature":"73CE912E2B5551D414F9C99BF57C0F355601D0870378C97E97B67D04075E97E395E37062E9F2710A3721EC2DE515035B767F6A205A72A9CB4CC49FB3E609F408","signerPublicKey":"50AC6D29B7E0BC919D4BC6AC2948E5997D798982A02EBE37BB919DBB7975C037","version":{"lower":0,"higher":0}}
TypeError: cosignaturesParsed.map is not a function
    at CosignatureResolver.resolve (/usr/local/lib/node_modules/symbol-cli/build/src/resolvers/cosignature.resolver.js:23:49)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async default_1.execute (/usr/local/lib/node_modules/symbol-cli/build/src/commands/transaction/payload.js:68:28)
  1. Specifications like the version of the project, operating system, or hardware. symbol-cli 1.0.0
yilmazbahadir commented 3 years ago

{"parentHash":"FA37887AFFDFB333160BFACC56823CCE4B7F229FDE21AE5BD1D70CF4369E3409","signature":"73CE912E2B5551D414F9C99BF57C0F355601D0870378C97E97B67D04075E97E395E37062E9F2710A3721EC2DE515035B767F6A205A72A9CB4CC49FB3E609F408","signerPublicKey":"50AC6D29B7E0BC919D4BC6AC2948E5997D798982A02EBE37BB919DBB7975C037","version":{"lower":0,"higher":0}}

Your cosignatures input is supposed to be an array (enclosed with square brackets). That's why it was failing.

I believe this alpha version gives more information about the format and fails gracefully on wrong format => https://www.npmjs.com/package/symbol-cli/v/1.0.1-alpha-202103261036

Can you re-try the same steps(with the same wrong co-signature format) using the new build(1.0.1-alpha-202103261036) ?