Bitcoin Forum
February 06, 2026, 05:36:07 PM *
News: Community awards 2025
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: My technical journey  (Read 44 times)
Lal_bitcoin (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 7


View Profile
Today at 07:42:50 AM
Merited by ABCbits (2), stwenhao (1)
 #1

Good day everyone I'm going to be keeping this topic active by constantly asking questions especially the ones I got stucked on without an answer.

So here are my first few questions:

1. Where can P2SH multisignature wallet be applied since bitcoin is a decentralized currency which means we ought to treat it with anonymity and not sharing control access?

2. Since Segregated withness(SegWit) is an evolution of all standard bitcoin wallet address ranging from the P2PKH to P2SH. Can it be used as a multisignature wallet too?

3. During the course of my research I learnt that non standard transactions can still be included to the block if a miner accepts them. Please explain.

4. Is bitcoin ScriptPubKey different from Public key? I got confused when I came across the meaning of the word "ScriptPubKey"

5. I discovered that if a particular public key is hashed several number of times it would still result to same address. Then why is it impossible to retrieve a public key from an address? Or is it because a program to do that hasn't yet been developed?
ABCbits
Legendary
*
Offline Offline

Activity: 3514
Merit: 9653



View Profile
Today at 09:05:55 AM
Merited by stwenhao (1)
 #2

I only give short answer. But feel free to ask more detailed answer.

1. Where can P2SH multisignature wallet be applied since bitcoin is a decentralized currency which means we ought to treat it with anonymity and not sharing control access?

Here are few example usage of multi-signature address.
1. Someone try improve their security with 2-of-3 multisig address. He need to sign it using at least 2 different device. So if one of his device got hacked, his Bitcoin isn't lost immediately.
2. Company that require all Bitcoin spending approved by N of M people.
3. 2-of-3 multisig address between seller, buyer and escrow. In case of dispute, escrow (along with either buyer/seller) can move the Bitcoin based on escrow decision.

Besides, Bitcoin isn't anonymous.

2. Since Segregated withness(SegWit) is an evolution of all standard bitcoin wallet address ranging from the P2PKH to P2SH. Can it be used as a multisignature wallet too?

P2WSH can be used to create multisig address/wallet.

3. During the course of my research I learnt that non standard transactions can still be included to the block if a miner accepts them. Please explain.

Transaction usually broadcasted to all other nodes, including node owned by miner/mining pool. But most Bitcoin node doesn't broadcast non-standard transaction, so such transaction usually never reach miner/mining pool node.

5. I discovered that if a particular public key is hashed several number of times it would still result to same address. Then why is it impossible to retrieve a public key from an address? Or is it because a program to do that hasn't yet been developed?

Same input always leads to same output when hashed, because hashing is a deterministic/consistent task. There are many reason why you can't retrieve public key from address, for example.
1. Hashing have avalanche effect, where slightly different input leads to very different output.
2. There's no guarantee certain address types (such as P2SH, P2WSH or P2TR) is generated from single public key.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
stwenhao
Hero Member
*****
Offline Offline

Activity: 607
Merit: 1519


View Profile
Today at 09:41:54 AM
 #3

Quote
During the course of my research I learnt that non standard transactions can still be included to the block if a miner accepts them. Please explain.
I already did in the previous topic. Some transaction can be non-standard, but miners can accept it anyway, for example: https://mempool.space/tx/0301e0480b374b32851a9462db29dc19fe830a7f7d7a88b81612b9d42099c0ae

As you can see, in this example, the size of the transaction is set to 3.94 MB. And the fee is set to zero. It is non-standard, but miners can accept it, and include such things in their own blocks.

Quote
Is bitcoin ScriptPubKey different from Public key? I got confused when I came across the meaning of the word "ScriptPubKey"
Initially, it was called "pubKey" and "sig". Later, Satoshi added Script to the source code, and then it became "scriptPubKey" and "scriptSig". Since then, it was possible to use the whole scripting language, to do much more things, than just checking a public key, and a signature. Which means, that now you can lock coins on a single key, multiple keys, or even no keys at all.

Quote
I discovered that if a particular public key is hashed several number of times it would still result to same address.
No, if you hash different things, then you will get different results. For example:
Code:
pay to public key: "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 OP_CHECKSIG"
pay to public key hash: "OP_DUP OP_HASH160 751e76e8199196d454941c45d1b3a323f1433bd6 OP_EQUALVERIFY OP_CHECKSIG"
pay to public key double hash: "OP_DUP OP_HASH160 OP_HASH160 59abce1547c0d06c08f9e3c9ee8cb723624ebd79 OP_EQUALVERIFY OP_CHECKSIG"
pay to public key triple hash: "OP_DUP OP_HASH160 OP_HASH160 OP_HASH160 7c9a0b5037e38179949ff6e330078731a36d4551 OP_EQUALVERIFY OP_CHECKSIG"
And so on, and so forth. Of course, paying to double, triple, or more hashes, is non-standard, unless you wrap it into P2WSH, or P2TR.

Some tool for calculating hashes: https://learnmeabitcoin.com/technical/cryptography/hash-function/#hash160

Proof of Work puzzle in mainnet, testnet4 and signet.
Donneski
Full Member
***
Offline Offline

Activity: 560
Merit: 155


Contact Hhampuz for campaign


View Profile
Today at 01:06:14 PM
 #4

Good day everyone I'm going to be keeping this topic active by constantly asking questions especially the ones I got stucked on without an answer.
It’s good to see a newbie actually digging into how things work instead of just skimming the surface. I’ll try to keep this as simple and practical as possible

1. Where can P2SH multisignature wallet be applied since bitcoin is a decentralized currency which means we ought to treat it with anonymity and not sharing control access?
P2SH multisig is mostly used where shared control makes sense such as in company funds, escrow, inheritance or personal security setups. It’s not about anonymity but about reducing single-key risk

2. Since Segregated withness(SegWit) is an evolution of all standard bitcoin wallet address ranging from the P2PKH to P2SH. Can it be used as a multisignature wallet too?
Absolutely yes. Multisig works with SegWit using P2WSH or P2SH-wrapped SegWit. Same idea as before just that it is more efficient and usually cheaper

3. During the course of my research I learnt that non standard transactions can still be included to the block if a miner accepts them. Please explain.
Non-standard transactions are still valid but not relayed by most nodes. If a miner receives one directly and it follows consensus rules, it can still be mined

4. Is bitcoin ScriptPubKey different from Public key? I got confused when I came across the meaning of the word "ScriptPubKey"
The answer is yes. A public key is just cryptographic data while ScriptPubKey is the locking script that defines the conditions on how the coins can be spent.

5. I discovered that if a particular public key is hashed several number of times it would still result to same address. Then why is it impossible to retrieve a public key from an address? Or is it because a program to do that hasn't yet been developed?
Because an address is made by hashing the public key using one-way functions. You’ll always get the same address from the same public key but the process can’t be reversed. It’s like a fingerprint that you can recognize it but you can’t reconstruct the person from it.

stwenhao
Hero Member
*****
Offline Offline

Activity: 607
Merit: 1519


View Profile
Today at 01:50:35 PM
Last edit: Today at 02:03:28 PM by stwenhao
 #5

As an exercise in hashing things, you can try to spend these signet coins: https://mempool.space/signet/tx/2f38119b212f9f15b5769e424e38a5b05a9ea18028fff75698a30112b0b6e250

They are all P2WSH, where single-hashed, double-hashed, and triple-hashed key is used, for the private key, equal to one:
Code:
SHA-256(76a914751e76e8199196d454941c45d1b3a323f1433bd688ac)=3f4ae1eb3e75f3578491811d27eb59e23a512cf90c73b13c6acd4499f7c4d28b
SHA-256(76a9a91459abce1547c0d06c08f9e3c9ee8cb723624ebd7988ac)=1a075f8fa8abf83fff0fa90df79b72b687364e1402929fa293e3ce8580f2fc04
SHA-256(76a9a9a9147c9a0b5037e38179949ff6e330078731a36d455188ac)=31b1a57bf776e57410f3bc9f1900a1b33c02125d4042484b402efe064659d2c1
And then, you should clearly see, that by hashing some key multiple times, you will get a different hash each time, because a different data is used to make it.

For P2WSH, spending it is standard, but if it would be a raw Script, then only the first address would be standard, and others would require contacting signet miners.

Proof of Work puzzle in mainnet, testnet4 and signet.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!