Bitcoin Forum
November 09, 2024, 05:08:11 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin has no built-in addresses, only scripts.  (Read 155 times)
Alana Arden (OP)
Jr. Member
*
Offline Offline

Activity: 81
Merit: 7


View Profile
August 25, 2024, 03:56:54 PM
 #1

Each node in a Bitcoin network has no physical address in the mempool or Bitcoin blockchain, only scripts. A Bitcoin address represents just a number, and the number that the address represents is a simple way of talking about transferring control over value to us humans.
 Simply put, it's a human-friendly way to show senders and receivers what addresses are in their wallets, and if I send someone my address, I'm basically instructing the sender's wallet to generate new output with a script derived from that address.
My wallet can see the sender and receiver addresses, but it shows exactly my wallet address. Within the wider Bitcoin network, I can display the addresses used by my transactions by converting transaction output scripts into an address representation of how to represent that information as a number via standard rules.
Within my wallet software, bitcoin addresses exist as soon as my wallet private keys are selected. So any address will exist as long as the number position exists.
Cricktor
Legendary
*
Offline Offline

Activity: 938
Merit: 1450


Crypto Swap Exchange


View Profile
August 25, 2024, 05:30:24 PM
Merited by pooya87 (5), vapourminer (1), Hatchy (1)
 #2

Indeed the Bitcoin blockchain doesn't know anything about nor stores such things as a public address. I wouldn't call it a simple number, though. You can view a public address as a recipe for a wallet to construct a properly formed standard lock script when such a public address (or similar) is used as target for a transaction output.

If you send coins to a public key (P2PK transaction) the lock script is:
Code:
<public key>
OP_CHECKSIG
To unlock this (spend it) you just have to provide a valid signature with the corresponding private key from which the public key was derived.

If you send coins to a public address of form 1... (P2PKH transaction) the lock script is:
Code:
OP_DUP
OP_HASH160
OP_PUSHBYTES_20
<public key hash>
OP_EQUALVERIFY
OP_CHECKSIG
To unlock this recipe (spend it) you must provide the original non-hashed public key with a signature of the corresponding private key from which the public key was derived.

There are more recipe types like P2SH, P2WPKH and P2WSH (not mentioning all of them, only the most common ones).

For more details you can hop to https://learnmeabitcoin.com/technical/script/ and how various address types are translated to lock scripts P2PK, P2PKH, ... (I've taken my examples from there.)

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3626
Merit: 11020


Crypto Swap Exchange


View Profile
August 31, 2024, 11:49:43 AM
Merited by vapourminer (1)
 #3

Each node in a Bitcoin network has no physical address in the mempool or Bitcoin blockchain, only scripts.
The nodes in the network do have a physical address and that is their IP address and port  which is the way we can find other peers/nodes and connect to each other.

The rest of your statement is a bit strange. Perhaps by "node" you mean the person who is sending a transaction and the output they create doesn't contain an actual address, it only has a script.

Quote
A Bitcoin address represents just a number, and the number that the address represents is a simple way of talking about transferring control over value to us humans.
As it was mentioned it is also not just a number. It is more complex than that. Each output script is like a smart contract that holds the locking mechanism that is "locking" the coins in that output and can be "unlocked" by the spender when they provide the other half of the smart contract which will be executed by the nodes.

Quote
Within the wider Bitcoin network, I can display the addresses used by my transactions by converting transaction output scripts into an address representation of how to represent that information as a number via standard rules.
Technically you can only do that if the output script is one of the standard scripts that has a corresponding address format (like P2PKH, P2WSH, etc.). Otherwise if it doesn't (like the standard P2PK or OP_RETURN or P2MS scripts) or is non-standard, you can not convert it to an address.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1694
Merit: 8326


Fiatheist


View Profile WWW
August 31, 2024, 03:05:13 PM
Merited by vapourminer (1)
 #4

"Bitcoin has no built-in addresses" is somewhat misleading and confusing. In computers, nearly everything is abstraction. By "virtual memory", someone imagines of a separate piece of memory that is not stored in physical memory, whereas it's just a set of addresses within the physical memory.

Following this line of reasoning, we could also say there are no "built-in" locking scripts, because a locking script is merely an abstraction of a set of machine instructions.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
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!