Open hats-bug-reporter[bot] opened 3 months ago
@party-for-illuminati
The
enrichSigHash
should be able to call even if theserializeOutgoingTransaction
set theisFinished()
is true.
"The enrichSigHash should be able to call even if the serializeOutgoingTransaction set the isFinished() is true." - why would it be needed?
We think that the enrichSigHash and serializeOutgoingTransaction both are different functions. Pls explain the sequence of calling these three functions partiallySignOutgoingTransaction, serializeOutgoingTransaction and enrichSigHash.
We think that the enrichSigHash and serializeOutgoingTransaction both are different functions. Pls explain the sequence of calling these three functions partiallySignOutgoingTransaction, serializeOutgoingTransaction and enrichSigHash.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x67f8774cefff6eb87badafaac75efb028c2d2c6ba736996a5b1538789c8e71a0 Severity: medium
Description: Description\
AbstractTxSerializer
is inherited by the TxSerilier and RefuelTxSerilzer.There are three different functions .
partiallySignOutgoingTransaction
,serializeOutgoingTransaction
andenrichSigHash
.The
enrichSigHash
should be able to call even if theserializeOutgoingTransaction
set theisFinished()
is true.But, the function
enrichSigHash
has the following check. when theserializeOutgoingTransaction
comppletes and update the_serializing.state
, then theenrichSigHash
will not pass through.enrichSigHash
The another issue is,
serializeOutgoingTransaction
updates the_skeleton.tx.inputs[i].scriptSig
by calling the_writeScriptSigs
The function
enrichSigHash
uses this_skeleton.tx.inputs[i].scriptSig
to wrtie the_sigHashSerializer
refer the code flow
enrichSigHash - serializeTx -> serializeTransactionInputs
if relayer calls the
enrichSigHash
function first , then then_skeleton.tx.inputs[i].scriptSig
written will not be a valid value.Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)
enrichSigHash