Friday, September 19, 2025

p2pkh – Tips on how to embrace arbitrary knowledge when spending an UTXO whereas conserving the transaction legitimate?

I need to embrace some random (for me it isn’t actually random 🙂) knowledge when unlocking an UTXO.

I want to maintain the spending secured by a traditional signature.

At first, I considered utilizing P2wpkhhowever from what I perceive, the witness should comprise precisely two parts (the signature and the general public key). If there are extra, the transaction turns into invalid.

1.Am I right?

Then I thought-about utilizing a traditional P2pkhthe place within the Scriptsig I may add my knowledge first (e.g. a easy push of 20 bytes), earlier than the signature and the general public key.
This could protect safety, as a result of after script execution solely the top-level stack ingredient is checked, so my further knowledge wouldn’t trigger any subject.

2.Am I right?

Nevertheless, I additionally discovered that whereas that is high quality from the consensus and safety perspective, coverage guidelines would stop such a transaction from being relayed throughout the community because it has a couple of ingredient left on stack.

3.Am I right?

It is rather vital for me to incorporate further knowledge when spending funds, however I’m not certain how to do that. Any concepts? Maybe to make use of another transaction kind to attain this?

Any assistance is welcome — even solutions to solely one of many above questions.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

0FansLike
0FollowersFollow
0SubscribersSubscribe
- Advertisement -spot_img

Latest Articles