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

Every ~4th transaction generates bad JSON #15

Open
alexlmiller opened this issue Nov 17, 2024 · 1 comment · May be fixed by #17
Open

Every ~4th transaction generates bad JSON #15

alexlmiller opened this issue Nov 17, 2024 · 1 comment · May be fixed by #17
Assignees

Comments

@alexlmiller
Copy link

Creating and signing the test transactions when fine, but when trying to broadcast the first time, got this in the cli:

 alex@2021-MBP-Hiro multisig-cli % npm start -- broadcast --json-txs txs/ltt-1-test-full.json --out-file txs/ltt-1-test-broadcast.json
> start
> npm run cli -- broadcast --json-txs txs/ltt-1-test-full.json --out-file txs/ltt-1-test-broadcast.json
> cli
> ts-node ./src/index.ts broadcast --json-txs txs/ltt-1-test-full.json --out-file txs/ltt-1-test-broadcast.json
/Users/alex/Documents/GitHub/multisig-cli/node_modules/@stacks/transactions/src/builders.ts:548
      throw Error(`Failed to broadcast transaction: ${(e as Error).message}`);
            ^
Error: Failed to broadcast transaction: Unexpected token 'F', "Failed to "... is not valid JSON
    at broadcastRawTransaction (/Users/alex/Documents/GitHub/multisig-cli/node_modules/@stacks/transactions/src/builders.ts:548:13)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

I opened up ltt-1-test-full.json and removed the one line of JSON that looked different than the others (both the original file and the one where I removed the line are included), ran it again and it successfully broadcast (though with one transaction failing due to a bad nonce)
When running the real transactions, every 4th transaction was bad as well in the same way

JSON files sent via secure message

@jbencin
Copy link
Member

jbencin commented Nov 18, 2024

The transaction in question is not invalid, just partially signed (a 2-of-3 multisig with only 1 signature). So the question is why didn't it get signed a second time like the other txs? Possibly no matching pubkey => path mapping in your CSV file?

But yeah this error message is misleading, I will see if I can clean it up

@jbencin jbencin linked a pull request Nov 20, 2024 that will close this issue
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 a pull request may close this issue.

2 participants