Author

Topic: How to tell if a transaction is legit? (Read 209 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
October 20, 2019, 09:42:01 PM
#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.
legendary
Activity: 2254
Merit: 1140
October 20, 2019, 07:23:22 PM
#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.
legendary
Activity: 2604
Merit: 2353
October 20, 2019, 05:57:51 PM
#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.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
October 20, 2019, 05: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.
legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
October 20, 2019, 12: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.
newbie
Activity: 2
Merit: 0
October 20, 2019, 11:50:30 AM
#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?


hero member
Activity: 2814
Merit: 618
Leading Crypto Sports Betting & Casino Platform
October 20, 2019, 11:48:46 AM
#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.
legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
October 20, 2019, 11:27:31 AM
#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.
newbie
Activity: 2
Merit: 0
October 20, 2019, 11:13:00 AM
#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!
Jump to: