Bitcoin Forum
August 25, 2019, 03:59:05 AM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Verifying Invalid Transactions  (Read 126 times)
vic.cebedo
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
June 21, 2019, 08:06:58 AM
 #1

Hi all,

I think I have already understood how Signing and Verifying means:
Signature = Hashed Message + Private Key of Wallet
Is Valid = Hashed Message + Signature + Public Key of Wallet

But what happens next after this?
Where/How does the network verify?

Consider the situation:
1) I declare a false message (send 10BTC to Bob), then hash it.
2) Sign false message with Private Key from wallet.
3) Broadcast it to the network.

After this phase, the miners will receive my transaction containing a false message.
And then what? How or where do they check that I have enough funds to transfer 10BTC?
Is there like a simple infographic that I can refer to so that I can understand the flow?
I have trouble understanding the bigger picture.

Thank you!
1566705545
Hero Member
*
Offline Offline

Posts: 1566705545

View Profile Personal Message (Offline)

Ignore
1566705545
Reply with quote  #2

1566705545
Report to moderator
1566705545
Hero Member
*
Offline Offline

Posts: 1566705545

View Profile Personal Message (Offline)

Ignore
1566705545
Reply with quote  #2

1566705545
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1566705545
Hero Member
*
Offline Offline

Posts: 1566705545

View Profile Personal Message (Offline)

Ignore
1566705545
Reply with quote  #2

1566705545
Report to moderator
1566705545
Hero Member
*
Offline Offline

Posts: 1566705545

View Profile Personal Message (Offline)

Ignore
1566705545
Reply with quote  #2

1566705545
Report to moderator
LoyceV
Legendary
*
Offline Offline

Activity: 1582
Merit: 4451


Largest Merit Circle on BPIP!


View Profile WWW
June 21, 2019, 08:22:18 AM
Last edit: June 21, 2019, 12:38:01 PM by LoyceV
Merited by Foxpup (3)
 #2

How or where do they check that I have enough funds to transfer 10BTC?
Transacions use inputs, if the address doesn't hold enough funds, it's simply rejected.

There are many videos on Bitcoin on Youtube if you want a simplified explanation.

It might help to manually create, verify and sign (don't enter private keys on an online website!) some transactions on https://coinb.in/ as an exercise.

vic.cebedo
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
June 21, 2019, 09:06:13 AM
 #3

Transacions use inputs, if the address doesn't hold enough funds, it's simply rejected.

There are many videos on Bitcoin on Youtube if you want a simplified explanation.

It might help to manually create, verify and sign (don't enter private keys on an online website!) some transactions on https://coinb.in/ as an exercize.

So, basically, before the Transaction is even made, there has to be a pointer to the FROM address to check if the funds are sufficient. Am I correct?
It's getting really hard to search for anything technical related to Bitcoin because there is alot of noise everywhere.
Thank you very much.
bob123
Legendary
*
Offline Offline

Activity: 994
Merit: 1415



View Profile WWW
June 21, 2019, 10:59:34 AM
Merited by dbshck (4), Foxpup (3), bones261 (2)
 #4

So, basically, before the Transaction is even made, there has to be a pointer to the FROM address to check if the funds are sufficient. Am I correct?

On a technical level, there are no 'addresses'.

Bitcoin is based on a UTXO (Unspent Transaction Outputs) model.

You 'destroy' UTXO and create new ones. If you use UTXOs as input which do not exist, each node will ignore it when validating it using their 'list' of all UTXOs.
Validating a transaction happens upon receiving it.


Does this answer your question ?

nc50lc
Hero Member
*****
Online Online

Activity: 686
Merit: 501


Self-proclaimed Genius ㊙️


View Profile WWW
June 21, 2019, 11:30:28 AM
Merited by dbshck (4), LoyceV (3), bones261 (2)
 #5

But what happens next after this?
Where/How does the network verify?
The "network" consists of all the nodes, each have a copy of the full (or partial) "blockchain" which is a chain of blocks where the UTXO (unspent outputs) are "recorded".

So, having a copy of the blockchain, every transaction that they will (usually automatically) save to their own mempool and relay to other nodes should have a valid UTXO, signature, specific preferences, etc. or else, it will be rejected and wont reach other/mining nodes.

Hope you get this.

 Newbies and Newbies at heart! Remember to Lock your Thread(s) after receiving enough replies/sufficient answers||                                    
39EKeFj43inkH6Ctkosh9E7oskx3tvhSXi ∙ Do not buy non-mainstream ASICs at second-batch onward, you know the risk!||Like Art?: MetalPosters Set1 / Set2
ETFbitcoin
Legendary
*
Offline Offline

Activity: 1736
Merit: 1990

Use SegWit and enjoy lower fees.


View Profile WWW
June 21, 2019, 06:04:52 PM
 #6

Additionally, if you use valid input/UTXO, but the outputs is bigger than all inputs combined, it's also rejected by nodes & miners.

vic.cebedo
Newbie
*
Offline Offline

Activity: 9
Merit: 1


View Profile
June 24, 2019, 01:25:25 AM
 #7

Thank you very much for your input guys, but I still find it difficult to understand.
I think, probably, the best way for me to understand the flow is just to code my own simple wallet and tinker on some parts of the API.
Thanks!
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!