Author

Topic: Ignoring selected inputs and outputs (Read 168 times)

legendary
Activity: 1596
Merit: 1288
July 30, 2020, 10:41:07 AM
#7
If I understand you correctly, you can perform it on top of the blockchain or on the side networks and not on the main network.
you are searching for bitcoin Sidechains, you bitcoin will be locked and you can run smart contract or any other alt
 https://blockstream.com/liquid/

OP_RETURN doesnot work list you list
legendary
Activity: 4466
Merit: 3391
July 28, 2020, 10:44:58 PM
#6
Is it possible to ignore some inputs and outputs when creating signatures? I think that atomic swaps could work in such way. For example we could create some transaction like that:
Code:
BTC A -> BTC B
ALT B -> ALT A
And then, if it is possible to ignore some inputs and outputs, it is possible to have this transaction signed by both parties and transmitted to both chains. Then, each chain would ignore some inputs and outputs (in the same way as opcodes after OP_RETURN are ignored).

I believe that the structure of your transaction is not possible (for Bitcoin). I think I understand that you want a single transaction with two inputs and two outputs, such that:

1. One output can be spent only on one chain and the other other can be spent only on another chain. That may be possible.
2. One input is ignored on one chain and the other input is ignored on the other chain. I believe that is not possible (at least not with Bitcoin).
3. The transaction is valid on two different chains. That may be possible for some coins.
legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
July 28, 2020, 10:29:28 AM
#5
Quote
because the node has to fully verify any transaction that it accepts
Why? If you are sending some BTC from one address to another and it is correct, then there is no need to check if ALT inputs and outputs are correct. If both parties will sign this transaction, then it means that both parties checked that everything they signed is correct.
checking the digital signature is only one part of the transaction verification. the other part is to check if the "coins" being spent even exist or not.
think of it as when you write a check. visually verifying if you signed the check with your real signature is only one part of the verification, the other part is the bank checking if you have the balance you are trying to give someone else.
that second step in bitcoin (checking balance) is done by checking if the inputs of a transaction exist and weren't spent before. so each full node has to have downloaded and verified the entire blockchain to create a database of all unspent transaction outputs.

Quote
And on BTC blockchain no miner have to worry about some ALT chain correctness, because it will be checked on this ALT chain by their miners.
the idea of decentralized bitcoin and similarly any decentralized altcoin is that you don't trust or rely on anybody else including miners or even other nodes. you download and verify everything yourself.

Quote
and when you can't verify a tx fully, it becomes possible to create fake transactions
Yes, it will be possible to create fake ALT inputs and outputs, but in such case it will not be signed by another party! I mean, miners will not check ALT inputs correctness, but they will check that both signatures are correct.
[/quote]
miners never check anything including signatures. nodes do.
as i said above the point is that a node has to be able to verify everything otherwise things become centrailzed. and you can never trust what other node tells you. it might be malicious and give you fake blocks and transactions from the other chain.
sr. member
Activity: 310
Merit: 727
---------> 1231006505
July 28, 2020, 09:04:11 AM
#4
Quote
because the node has to fully verify any transaction that it accepts
Why? If you are sending some BTC from one address to another and it is correct, then there is no need to check if ALT inputs and outputs are correct. If both parties will sign this transaction, then it means that both parties checked that everything they signed is correct. And on BTC blockchain no miner have to worry about some ALT chain correctness, because it will be checked on this ALT chain by their miners.
So you suggest you could add all kind of extra information into a transaction that does not get checked at all? So in your idea does the ALT inputs of the transaction also count towards transaction size? If not it would become an easy source to flood blocks with huge transactions. If so, do you expect this unchecked data to be stored in the blockchain forever?

Also: Bitcoin transactions expect inputs to be unlocked, and outputs to be locked to whoever can provide a script that unlocks this as input in a follow-up transaction. How do you expect both parties to sign  a transaction BTC A -> BTC B in your example?

Quote
because the node has to fully verify any transaction that it accepts
Quote
and when you can't verify a tx fully, it becomes possible to create fake transactions
Yes, it will be possible to create fake ALT inputs and outputs, but in such case it will not be signed by another party! I mean, miners will not check ALT inputs correctness, but they will check that both signatures are correct.
You do understand Bitcoin does not use accounts or anything alike? So if I want to sign as both the sender as a receiver in your example that would be no problem. Then I can add all kind of bogus ALT-inputs and voila we got a flooding attack.
copper member
Activity: 906
Merit: 2258
July 28, 2020, 08:45:29 AM
#3
Quote
What are you planning to do anyway?
Just trying to swap coins in a single transaction that would be the same on both chains, so it will be fully accepted or rejected. In this way we could avoid having some "not-yet-swapped-state" or the need to create additional transactions in case of another party being dishonest.

Quote
because the node has to fully verify any transaction that it accepts
Why? If you are sending some BTC from one address to another and it is correct, then there is no need to check if ALT inputs and outputs are correct. If both parties will sign this transaction, then it means that both parties checked that everything they signed is correct. And on BTC blockchain no miner have to worry about some ALT chain correctness, because it will be checked on this ALT chain by their miners.

Quote
and when you can't verify a tx fully, it becomes possible to create fake transactions
Yes, it will be possible to create fake ALT inputs and outputs, but in such case it will not be signed by another party! I mean, miners will not check ALT inputs correctness, but they will check that both signatures are correct.
legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
July 28, 2020, 07:03:51 AM
#2
no, that is not possible because the node has to fully verify any transaction that it accepts and to do that it needs to know all the inputs to be able to verify that tx and since each node is only running on one network not all of them they can not fully verify the transactions if they have inputs from another chain. the outputs don't matter because they are not verified during transaction validation.
and when you can't verify a tx fully, it becomes possible to create fake transactions.

the current way atomic swaps take place is good enough using OP_IF and and locktimes.
copper member
Activity: 906
Merit: 2258
July 28, 2020, 06:17:18 AM
#1
Is it possible to ignore some inputs and outputs when creating signatures? I think that atomic swaps could work in such way. For example we could create some transaction like that:
Code:
BTC A -> BTC B
ALT B -> ALT A
And then, if it is possible to ignore some inputs and outputs, it is possible to have this transaction signed by both parties and transmitted to both chains. Then, each chain would ignore some inputs and outputs (in the same way as opcodes after OP_RETURN are ignored).
Jump to: