Title: Ignoring selected inputs and outputs Post by: vjudeu on July 28, 2020, 11:17:18 AM 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 Title: Re: Ignoring selected inputs and outputs Post by: BrewMaster on July 28, 2020, 12:03:51 PM 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. Title: Re: Ignoring selected inputs and outputs Post by: vjudeu on July 28, 2020, 01:45:29 PM 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.Title: Re: Ignoring selected inputs and outputs Post by: TheArchaeologist on July 28, 2020, 02:04:11 PM 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.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.Title: Re: Ignoring selected inputs and outputs Post by: BrewMaster on July 28, 2020, 03:29:28 PM 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.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. Title: Re: Ignoring selected inputs and outputs Post by: odolvlobo on July 29, 2020, 03:44:58 AM 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 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. Title: Re: Ignoring selected inputs and outputs Post by: Husires on July 30, 2020, 03:41:07 PM 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 |