Bitcoin Forum
May 07, 2024, 03:46:59 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to tell if a transaction is legit?  (Read 187 times)
daiyj (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
October 20, 2019, 04:13:00 PM
 #1

Hi,

So I have been reading up on bitcoin and blockchain for awhile now, but I have yet to fully understand it. I understand that bitcoin leverage on DLT, which uses cryptography to verify transaction. This is what I have understood so far:

- When I make a transaction, this transaction is added to a pool of unconfirmed transactions
- this pool of unconfirmed transactions forms a block and miners will solve a mathematical problem as verification
- the first miner to solve it will have the block verified and added on to the chain

However, how do they know if my transaction is valid? What if I have 1 BTC but decide to send 2 BTC, how does the solving of mathematical problem verify that I do not have 2 BTC? What if I just purchased 5 BTC from Coinbase using fiat, how will anyone know that I have 5 BTC?

I believe this should not be a very difficult question but I cant seem to understand it fully. Hope someone can point be to the right direction and enlighten me thanks!
1715096819
Hero Member
*
Offline Offline

Posts: 1715096819

View Profile Personal Message (Offline)

Ignore
1715096819
Reply with quote  #2

1715096819
Report to moderator
1715096819
Hero Member
*
Offline Offline

Posts: 1715096819

View Profile Personal Message (Offline)

Ignore
1715096819
Reply with quote  #2

1715096819
Report to moderator
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715096819
Hero Member
*
Offline Offline

Posts: 1715096819

View Profile Personal Message (Offline)

Ignore
1715096819
Reply with quote  #2

1715096819
Report to moderator
1715096819
Hero Member
*
Offline Offline

Posts: 1715096819

View Profile Personal Message (Offline)

Ignore
1715096819
Reply with quote  #2

1715096819
Report to moderator
BrewMaster
Legendary
*
Offline Offline

Activity: 2114
Merit: 1292


There is trouble abrewing


View Profile
October 20, 2019, 04:27:31 PM
Merited by suchmoon (4), hugeblack (1)
 #2

- When I make a transaction, this transaction is added to a pool of unconfirmed transactions
- this pool of unconfirmed transactions forms a block and miners will solve a mathematical problem as verification

- "pool" is not one location on the internet that transactions go to. it is the memory (their RAM) of every single node that runs a bitcoin full node client.
- the "pool" doesn't turn into a block! the pool only contains transactions that are not yet in a block. then miners choose transactions from this pool to place in a block they mine.

Quote
However, how do they know if my transaction is valid? What if I have 1 BTC but decide to send 2 BTC, how does the solving of mathematical problem verify that I do not have 2 BTC? What if I just purchased 5 BTC from Coinbase using fiat, how will anyone know that I have 5 BTC?
mining has nothing to do with transaction verification. mining is just hashing the block header to find a result that is smaller than the block target.
the verification happens separately. and it is simply done by looking at the blockchain. when you receive 1 BTC you are receiving it in a transaction, that tx is recorded on the blockchain. when you spend coins, you are spending that tx and the amount of it is also on the blockchain. so when nodes see your spending tx they check to first see if it has not been spent before, then they check if you are spending an amount less than or equal to the amount of that input. if you spent more it will be considered invalid and rejected. if you send a tx that is already spent it will be considered invalid and rejected.

There is a FOMO brewing...
noormcs5
Hero Member
*****
Offline Offline

Activity: 2632
Merit: 613


Leading Crypto Sports Betting & Casino Platform


View Profile
October 20, 2019, 04:48:46 PM
 #3

However, how do they know if my transaction is valid? What if I have 1 BTC but decide to send 2 BTC, how does the solving of mathematical problem verify that I do not have 2 BTC? What if I just purchased 5 BTC from Coinbase using fiat, how will anyone know that I have 5 BTC?

If you have 1 BTC in your wallet, your wallet will not let you send 2 btc. If you are talking about double spending, that is not possible. You can confirm and see every Tx ID on the blockchain, even if it is not yet confirmed.

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
daiyj (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
October 20, 2019, 04:50:30 PM
 #4


Quote
the "pool" doesn't turn into a block! the pool only contains transactions that are not yet in a block. then miners choose transactions from this pool to place in a block they mine.

mining has nothing to do with transaction verification. mining is just hashing the block header to find a result that is smaller than the block target.
the verification happens separately.

So am I right to say that after miners mine a block, then they select a group of unconfirmed transactions from the pool and add it into the block?


BrewMaster
Legendary
*
Offline Offline

Activity: 2114
Merit: 1292


There is trouble abrewing


View Profile
October 20, 2019, 05:12:57 PM
 #5

So am I right to say that after miners mine a block, then they select a group of unconfirmed transactions from the pool and add it into the block?

they do the selection before they mine the block, you can't mine something that is not yet constructed.

so first the node receives transactions and verifies them. then the miner chooses transactions and adds them to their block. then based on those transactions they build something called a "merkle root" which is a final hash calculated from all the transactions inside the block (it is build like a tree, hash each 2 and add the result to next branch then hash the 2 results,... until you reach 1). that way it ensures the transactions in the block can not be changed. this merkle root is included in the header which is then hashed repeatedly by changing the nonce each time until the miner can find the hash that they are looking for.

There is a FOMO brewing...
BitMaxz
Legendary
*
Online Online

Activity: 3248
Merit: 2965


Block halving is coming.


View Profile WWW
October 20, 2019, 10:21:17 PM
 #6

So am I right to say that after miners mine a block, then they select a group of unconfirmed transactions from the pool and add it into the block?
As the above said miner's choose unconfirmed transactions from the pool to add in the block by default and after that, they will mine.
To understand better how does transaction works check these infographics below.





This one is more clear than the above.


Sources of the images got from Google images.

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Saint-loup
Legendary
*
Offline Offline

Activity: 2604
Merit: 2353



View Profile
October 20, 2019, 10:57:51 PM
Last edit: October 21, 2019, 01:01:54 AM by Saint-loup
 #7

Hi,

So I have been reading up on bitcoin and blockchain for awhile now, but I have yet to fully understand it. I understand that bitcoin leverage on DLT, which uses cryptography to verify transaction. This is what I have understood so far:

- When I make a transaction, this transaction is added to a pool of unconfirmed transactions
- this pool of unconfirmed transactions forms a block and miners will solve a mathematical problem as verification
- the first miner to solve it will have the block verified and added on to the chain

However, how do they know if my transaction is valid? What if I have 1 BTC but decide to send 2 BTC, how does the solving of mathematical problem verify that I do not have 2 BTC? What if I just purchased 5 BTC from Coinbase using fiat, how will anyone know that I have 5 BTC?

I believe this should not be a very difficult question but I cant seem to understand it fully. Hope someone can point be to the right direction and enlighten me thanks!
The validation of transactions and the consensus mechanism are 2 different things that don't really interact each other, the consensus mechanism can change without affecting the blockchain. For example Ethereum is planning to replace the proof of work system by a proof of stake one in few years/months and proof of work wasn't even related to the blockchain originally. It was firstly used for sending e-mail (hashcash) https://en.wikipedia.org/wiki/Hashcash
BrewMaster perfectly explained in few words how it works above.

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
Rmcdermott927
Legendary
*
Offline Offline

Activity: 2254
Merit: 1140


View Profile
October 21, 2019, 12:23:22 AM
 #8

If the transaction in question has 3 or more confirmations in your walllet I wouldn’t question it.  Personally, if it has one confirmation, I accept it as legit and go about it as normal.

nc50lc
Legendary
*
Offline Offline

Activity: 2408
Merit: 5591


Self-proclaimed Genius


View Profile
October 21, 2019, 02:42:01 AM
Merited by hugeblack (2), TryNinja (1)
 #9

No one mentioned how the tx can be verified.

Here's a simple answer: Each full node (ex. Bitcoin Core client) have a copy of the whole Blockchain where all of the past unspent and spent transactions were recorded (the blk files that took a lot of storage space).
When they received a new block, the program automatically verify if that block follows the network rules and what UTXO was spent and its value (search for the term).
That way, anyone can't spend a 1BTC UTXO that ends up with 2BTC output.

What if I just purchased 5 BTC from Coinbase using fiat, how will anyone know that I have 5 BTC?
Bitcoin and most cryptocurrencies don't function like a bank account. Your wallet contains nothing but Private keys to be able to spend those unspent outputs.

In simple terms, your balance is the accumulated outputs' value that was stored in the Blockchain, not in your wallet.
As I said above, each node have a copy of the blockchain and every node can verify it under the hood.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
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!