Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: btctousd81 on July 31, 2017, 11:39:35 AM



Title: What will happen if i broadcast too many double spend trasnactions ?
Post by: btctousd81 on July 31, 2017, 11:39:35 AM
i am working one tx broadcast service.

what will happen if i keep on broadcasting double spend transactions ?

will my node get banned from bitcoin network ? or something else ?

thanks


Title: Re: What will happen if i broadcast too many double spend trasnactions ?
Post by: ranochigo on July 31, 2017, 12:49:36 PM
Technically, yes, if your nodes have a conflicting transaction. If you broadcast too many invalid transactions/nodes to a few nodes, they will note that you are a misbehaving peer and will disconnect you. However, you won't be banned from the entire network, just a few nodes.

If you are working on a transaction broadcasting service, you should implement checks to see if the transaction is valid and no other conflicting transaction is in your mempool.


Title: Re: What will happen if i broadcast too many double spend trasnactions ?
Post by: btctousd81 on July 31, 2017, 01:29:21 PM
Technically, yes, if your nodes have a conflicting transaction. If you broadcast too many invalid transactions/nodes to a few nodes, they will note that you are a misbehaving peer and will disconnect you. However, you won't be banned from the entire network, just a few nodes.

If you are working on a transaction broadcasting service, you should implement checks to see if the transaction is valid and no other conflicting transaction is in your mempool.

okie., will do that.

so there is no global node ban list ? something like that ?

how can i check if the tx_hex is valid ?

i guess by decoding hex and checking the inputs and outputs. ?



Title: Re: What will happen if i broadcast too many double spend trasnactions ?
Post by: Casy on July 31, 2017, 02:08:30 PM
Technically, yes, if your nodes have a conflicting transaction. If you broadcast too many invalid transactions/nodes to a few nodes, they will note that you are a misbehaving peer and will disconnect you. However, you won't be banned from the entire network, just a few nodes.

If you are working on a transaction broadcasting service, you should implement checks to see if the transaction is valid and no other conflicting transaction is in your mempool.

okie., will do that.

so there is no global node ban list ? something like that ?

how can i check if the tx_hex is valid ?

i guess by decoding hex and checking the inputs and outputs. ?



As far as I know, there is no global list.

You can check validity by decoding it, as you mentioned, and then compare it to what you have in the mempool. If the inputs were already spent in your mempool, then there's something fishy going on...


Title: Re: What will happen if i broadcast too many double spend trasnactions ?
Post by: ranochigo on July 31, 2017, 02:13:31 PM
so there is no global node ban list ? something like that ?
No, neither will it ever exist. Reason being this would just destroy the trustless nature of Bitcoin.
how can i check if the tx_hex is valid ?

i guess by decoding hex and checking the inputs and outputs. ?
Yes. If the inputs are unspent in your UXTO set and it has valid signature, follows protocol rules, it will be valid for the reference clients. Usually, the full nodes will does it automatically before relaying a transaction.