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

Remove unnecessary [ALL] inside hash. #1045

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

mathwhiz1212
Copy link

Remove unnecessary [ALL] inside hash. Problem found by @coolaj86 who asked me to do a PR.

@aantonop
Copy link
Collaborator

aantonop commented Jan 18, 2023 via email

@coolaj86
Copy link

@aantonop The [ALL] is an artifact from a bug in the copy function in the Insight Web UI (possibly due to some ellipsis-style truncation in a responsive view or something).

The Sighash Type is encoded in the hex, but the hex obviously won't parse correctly with invalid characters.

Remove the junk characters and it parses as expected.

@mathwhiz1212 the extra newline also needs to be removed.

@coolaj86
Copy link

coolaj86 commented Jan 18, 2023

3045 type and length of sig
0221 type and length of R
00 ASN.1 bigint pad
884d142d86652a3f47ba4746ec719bbfbd040a570b1deccbb6498c75c4ae24cb R value
0220 type and length of S
4b9f039ff08df09cbe9f6addac960298cad530a863ea8f53982c09db8f6e3813 S value
01 sighash type all - XXXX
Missing pub key length? - XXXX
04 pub key uncompressed
84ecc0d46f1918b30928fa0e4ed99f16a0fb4fde0735e7ade8416ab9fe423cc5
412336376789d172787ec3457eee41c04f4938de5cc17b4a10fa336a8d752adf Public key value

see dashhive/DashTx.js#1

It looks like 4 hex characters are missing - the sighash type - so maybe it's an encoder bug somewhere calling toString() rather than toString("hex") - and the public key length.

I just did that real quick by hand, but viewing it in fixed width, it checks out. In any case it's obviously invalid and non-parsable hex.

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 this pull request may close these issues.

None yet

3 participants