Bitcoin Forum
September 01, 2024, 07:21:38 AM *
News: Latest Bitcoin Core release: 27.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin has no built-in addresses, only scripts.  (Read 109 times)
Alana Arden (OP)
Jr. Member
*
Offline Offline

Activity: 80
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: 868
Merit: 1273


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.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
james598grose
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
August 31, 2024, 05:47:04 AM
 #3

Hello,
In Bitcoin, addresses are a human-friendly way to represent scripts used in transactions. Your wallet converts these scripts into addresses, allowing you to easily share and receive funds. Addresses only exist when generated from private keys and are essentially numbers that map to scripts used to control value in the network.
pooya87
Legendary
*
Offline Offline

Activity: 3556
Merit: 10808



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

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.

BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1624
Merit: 7985


Bitcoin is a royal fork


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

"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.

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!