Author

Topic: How to send an invalid transaction for testing purposes? (Read 1413 times)

legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
Yet it still happened.

Sort of, but not really.

It's not like the litecoins show up in the bitcoin wallet.

The litecoins were sent to a valid litecoin address.  It just so happened that the litecoin address was also a valid bitcoin address and that the litecoin address that the litecoins were sent to was copied from an address that was being published for the purpose of receiving bitcoins.

It's a bit like if there were more than one Danny Hamilton in the world.  If I then asked you to send me something in the mail, and you searched for my name on the internet and got the other Danny Hamilton's address, then you would have been sending the mail to "Danny Hamilton", but not to me.

It isn't possible to send litecoins to a bitcoin address.  It is possible to send litecoins to a litecoin address, and it is also possible for the litecoin address to also be a valid bitcoin address.

That's really quite fascinating, still.  I didn't find a link to the original description when reading above.  Danny, was this something that you were playing with?

EDIT: sorry, i see the link in Shorena's post now, following up myself.
legendary
Activity: 3472
Merit: 4801
Yet it still happened.

Sort of, but not really.

It's not like the litecoins show up in the bitcoin wallet.

The litecoins were sent to a valid litecoin address.  It just so happened that the litecoin address was also a valid bitcoin address and that the litecoin address that the litecoins were sent to was copied from an address that was being published for the purpose of receiving bitcoins.

It's a bit like if there were more than one Danny Hamilton in the world.  If I then asked you to send me something in the mail, and you searched for my name on the internet and got the other Danny Hamilton's address, then you would have been sending the mail to "Danny Hamilton", but not to me.

It isn't possible to send litecoins to a bitcoin address.  It is possible to send litecoins to a litecoin address, and it is also possible for the litecoin address to also be a valid bitcoin address.
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
Idk if this has anything to do with what the OP says, but I have heard that someone sent some litecoins to a btc Addy... Would this be of consideration?
This is meaningless bogus, complete and utter nonsense. Same as saying someone wire transferred US Dollars to a Litecoin address. Or emailed some bricks of gold to a gmail address.

Or someone posted some US quarter coins to store in their Dropbox account.

If someone does manage to send a transaction from the bitcoin blockchain across the ether to the litecoin blockchain I wonder what exchange rate they would get  Tongue

In all seriousness though it is difficult to counter such nonsensical rumors without more specific information or a link to the OP.

Yet it still happened. The main problem is that litecoin multisig addresses use the same prefix as bitcoin multisig, thus the address is considered valid on both networks. As they are derived from the same private keys they can still be spend, its just a big mess.

See Dannys post below its more precise and less likely to be understood wrong.

-> https://litecointalk.org/index.php?PHPSESSID=p5vju9t28dhs6hbd7acudemap2&topic=26513.0
-> https://www.reddit.com/r/Bitcoin/comments/24qal5/what_happens_if_i_send_bitcoin_to_a_litecoin/
legendary
Activity: 1001
Merit: 1005
Idk if this has anything to do with what the OP says, but I have heard that someone sent some litecoins to a btc Addy... Would this be of consideration?


+1. This is absolute nonsense drool that comes from trolling.
This is meaningless bogus, complete and utter nonsense. Same as saying someone wire transferred US Dollars to a Litecoin address. Or emailed some bricks of gold to a gmail address.
member
Activity: 78
Merit: 11
Idk if this has anything to do with what the OP says, but I have heard that someone sent some litecoins to a btc Addy... Would this be of consideration?
This is meaningless bogus, complete and utter nonsense. Same as saying someone wire transferred US Dollars to a Litecoin address. Or emailed some bricks of gold to a gmail address.

Or someone posted some US quarter coins to store in their Dropbox account.

If someone does manage to send a transaction from the bitcoin blockchain across the ether to the litecoin blockchain I wonder what exchange rate they would get  Tongue

In all seriousness though it is difficult to counter such nonsensical rumors without more specific information or a link to the OP.
legendary
Activity: 1176
Merit: 1011
Idk if this has anything to do with what the OP says, but I have heard that someone sent some litecoins to a btc Addy... Would this be of consideration?
This is meaningless bogus, complete and utter nonsense. Same as saying someone wire transferred US Dollars to a Litecoin address. Or emailed some bricks of gold to a gmail address.
hero member
Activity: 560
Merit: 509
I prefer Zakir over Muhammed when mentioning me!
Idk if this has anything to do with what the OP says, but I have heard that someone sent some litecoins to a btc Addy... Would this be of consideration?

It is not plausible.
sr. member
Activity: 322
Merit: 250
Verify my Bitcoin Address before EVERY transaction
Idk if this has anything to do with what the OP says, but I have heard that someone sent some litecoins to a btc Addy... Would this be of consideration?
copper member
Activity: 1498
Merit: 1528
No I dont escrow anymore.
How could I send an invalid transaction—for testing purposes, such as with testnet or regtest?

For example, I would like to to try to double-spend, spend non existent coins, etc.

(cf. the related Bitcoin StackExchange question.)

A double spend requires you "only" to send a TX with bitcoin core, close it, use pywallet to remove the TX from the wallet.dat, start bitcoin core again and create another TX that spends the exact same input. However - as Danny has noted - this TX will not get accepted by other nodes that already know about the 1st TX - by the time you are done with pywallet close to all nodes - and if you send it to often you will end up on their ban list.

On SE someone suggest you may use createrawtransaction which is correct as it does not require the TX to be valid, there are no sanity checks. You can try to broadcast it unsign, but again other nodes will not accept such a thing. Even if you signed a TX that is using inputs you never received (spend coins that do not exist) I doubt your unmodified bitcoin core will allow you to send it, but even if - or if you followed Dannys advice to write your own node - no other node in the network will accept it. If no other node accepts your TX they also dont spread it, thus all you accomplish with this is that you separate your node from the rest of the network as you (slowly) build up your banscore on other nodes.

Tbh I dont see the testing purpose. One fundamental concept of bitcoin is that no node in the network trusts any other node and is checking everything that is communicated. If you try to broadcast something that makes no sense to other nodes you will not get very far. This is no different on testnet or with regtest enabled. If you check your nodes debug.log you can see it dropping TX from time to time because they are not "standard". A non standard TX however might still get confirmed as they are valid, they are just difficult to send to a miner/pool.

This also sounds to me like an XY Problem[1]. What is the actual problem you try to solve here? What do you want to accomplish?

[1] http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem
hero member
Activity: 728
Merit: 500
How could I send an invalid transaction—for testing purposes, such as with testnet or regtest?

For example, I would like to to try to double-spend, spend non existent coins, etc.

(cf. the related Bitcoin StackExchange question.)
Yeah, sure . For testing purposes Cheesy
legendary
Activity: 3472
Merit: 4801
How could I send an invalid transaction—for testing purposes, such as with testnet or regtest?

For example, I would like to to try to double-spend, spend non existent coins, etc.

(cf. the related Bitcoin StackExchange question.)

Send it where?

Send it from where?

Most node and peer software will prevent the sending or relaying of invalid transactions, therefore you would need to write (or modify) your own node program to allow you to even attempt such a thing.  Then, if you wanted some software to accept the transaction and not simply disconnect and block your custom node, then you would need to write and run your own custom peer to connect to.  At that point you will essentially have created your own altcoin network since nearly every node on the bitcoin network will refuse to communicate with any of your peers once they start receiving invalid transactions from your nodes.
sr. member
Activity: 507
Merit: 253
How could I send an invalid transaction—for testing purposes, such as with testnet or regtest?

For example, I would like to to try to double-spend, spend non existent coins, etc.

(cf. the related Bitcoin StackExchange question.)
Jump to: