Hi,
I’m posting here because the French section needs another Merit source.
We recently got a new moderator. That was something we asked for a long time and since we have this new moderator, our section is really getting better. Our mod is also a Merit source - the only Merit source we have in the French subforum, apparently - and it is a really good thing, because there was almost no Merit in circulation there. There aren’t a lot of activity currently because of the summer (and maybe also Bitcoin’s correction) but there will surely be more (valuable) posts in a near future (I mean, in maybe a few weeks, maybe a month… with the end of the people’s summer holidays and, hopefully, Bitcoin’s value going up). Also, one Merit source will certainly not be enough (in fact, even now, it’s not enough), so I decided to submit my application.
1. Be a somewhat established member.
I know that my rank is only “Member”. So, for you, I might seem pretty new here. However, I’m not: it is true that I am not here since 2012 or 2013, but I am a member of this forum for around a year now, and read it for months before registering.
Besides, I’m very active in the French section and try to always be constructive and helpful, so even if I’m not the most important member of this section, people know me and my image is, I guess, pretty good there.
So even if I don’t have a very high rank, I think that I can consider me as a “somewhat established member” of the French subforum.
2. Collect TEN posts written in the last couple of months by other people that have not received nearly enough merit for how good they are, and post quotes for them all in a new Meta thread. The point of this is to demonstrate your ability to give out merit usefully.
As you certainly figured out, I am mostly active in the French part of the forum. Therefore, the posts I chose are mainly in French. Obviously, I am fully open if you want me to explain something or translate a part of a post that is not clear with automatic translators.
A few weeks ago, I took a couple hours to read the forum in English and find some examples of posts that (in my opinion) are worth giving merit, in order not to have only posts in French.
I’d just like to add that “the last couple of months” isn’t a precisely-determined period, so some of the posts I chose are 5 or 6 months old. I hope it isn’t a problem. Since there are less French-speaking posts than English-speaking posts, I think that it is normal to inscrease a little bit this period of time. Besides, I chose the posts a few weeks ago, and a few valuable posts were published since then.
So the following quote are organized like this:
- three quotes of English-speaking posts (plus one reply that I’d like to add)
- seven quotes of French-speaking posts (and one of them is in fact made of two posts)
Post N°1: Re: If Bitcoin chooses longest chain, how is it reliable at all ?
For example, from what I understand,
If Alice and Bob share an Bitcoin Account that holds 500 Bitcoin.
This statement is the root of your confusion.
Bitcoin does not have an account model -- like a bank -- but a UTXO model (like cash)
Think of every bitcoin payment (output) a wallet receives as a distinct cash bill.
So a wallet is a collection of "bills" (i.e output), so there's no way that Alice and Bob can share a wallet securely, but assuming for the sake of discussion that they have the same wallet.dat file or mnemonic seed phrase corresponding to the ownership of certain UTXOs worth 500
BTCWhatever happens depends on if the 500
BTC is in 1 UTXO or split in many UTXOs , and the amount being spent.
(continuing the analogy, it depends if the 500
BTC is in one 500 currency note or split in many eg $50 bills.)
Alice could spend all 500 bitcoins on a car in North America when Bob spends it on a different car
in Asia.
Since Alice spends ALL the UTXOs, Bob CANNOT spend the same UTXOs again, as other nodes in the network will reject it as they already have a conflicting transaction in their mempool.
Both transactions would go to "pool" to be processed.
Note that there is no global pool, but each node has its own mempool, so it's possible that both conflicting transactions spending the same UTXO get propagated.
Boh of them will be processed in the next block.
Only ONE of them CAN be added to a block.
Even though Alice's transaction went to miner A and he added it to his candidate block and is trying to find the target, while Bob's transaction went to miner B who also adds it to his candidate block, eventually one of them will find a valid block and whichever transaction is included in the block is the valid one, and the other transaction is rendered invalid and CANNOT be added to the blockchain again.
So if it was Alice's transaction that was mined, Bob's transaction is no longer valid and can't be mined; if it was Bob's transaction that was mined, Alice's transaction is invalid and can no longer be mined.
The blockchain is the arbiter and its decision is final.
What I don't understand is, 1) Would the transaction be visible on explorer site ? Both of them ?
Block explorers get their information from full nodes.
If , for example, Blockchain.info's node(s) first saw Alice's transaction when she broadcast it, it will display the transaction as unconfirmed, and it WILL NOT accept Bob's transaction since Alice's transaction spends the same UTXO, and so it will only show Alice's.
If Blockchair saw Bob's transaction first, it will not accept Alice's transaction, and will show Bob's transaction as unconfirmed.
When one transaction is finally included in a block, whichever node contained the invalid transaction will discard it in favour of the mined one.
2) I get that maybe a few blocks later, the longest chain would be taken and one of the transactions
would be revoked.
Imagine a rare case where miner A above mined Alice's transaction, while miner B simultaneously mined Bob's transaction.
Both blocks are valid, and there are 2 competing blocks..whichever block is mined on becomes the Prefered block because it has the most proof of work.
If the block containing Bob's transaction is mined on by other miners then the block containing Alice's transaction will eventually be orphaned by other nodes and Bob's transaction is the valid one.
But how is this reliable at all? The two cars are probably in possession of Alice and Bob already.
The seller needs to wait at least 4 blocks after the transaction is complete?
You answered your question yourself.
For merchants selling expensive goods, they have to wait for a certain number of blocks to be sure that the transaction that pays them won't be overwritten by a longer block with more proof for work.
6 confirmations is commonly but more expensive items can call for more confirmations eg 144 blocks (1 day)
Also, regarding the 1st question, what happens on the explorer when the longest chain is taken ??
The other one is dropped.
Post N°2: Trying to get a deeper understanding of atomic swaps
Hi together,
I'm an IT-student and writing a thesis about atomic swaps on BTC and BTC-like blockchains. For the thesis I decided to use BTC, LTC, BCH and DCR. These chains have a somehow similar codebase and the same scripting language (I'm not a professional, so there might be differences, but they are not that serious). And they all have a high enough marketcap to be relevant for atomic swaps.
So the goal of the thesis is to find hashed timelock contracts (HTLCs) and connect matching HTLCs from different chains to get the atomic swap. Therefore I first searched the web for anything on atomic swaps [1] and analyzed the input script of this transaction [2] to get a basic understanding how atomic swaps work and what they look like.
Then I wrote a go program to search for any script longer than simple P2PKH scripts. This gave me a list of many different scripts which I analyzed by hand to only take the HTLC ones. (Besides many multisig scripts, there is not much to find on BTC^^)
At this point I found multiple different types of HTLCs as listed below. Afterwards I crawled* BTC again saving all transactions with HTLC scripts, storing the interesting data like tx-id, input value, pubKeyHashes, the secrets and their hashes. I found about one hundret HTLCs on BTC so far.
I did the same for LTC and found about 400 HTLCs.
As far as I understood, the secrets of HTLCs have to be the same on both chains. So I wrote another go program to match the found HTLCs from BTC and LTC and got around 30 matches. The next steps would then be to crawl BCH and DCR and also match the HTLCs found there.
* Crawling in this case means that I start to search the blockchain backwards (to get the newest first, the beginning years are not that interesting in this case^^) until the beginning of 2017. So about 18 months. As stated in [1] the first known atomic swap between BTC and LTC was made on 19th April 2017 (or April 19th 2017 or 19.4.2017 or whatever you like). So there is not much sense in crawling any further.
My questions now are the following:
- Why are there so many different types? Is it compatibility with other chains? Or what?
- What are the differences between these types (besides length and hashing algorithm)?
- What are the advantages and disadvantages of these types?
- Why are there so many HTLCs on LTC and so few on BTC?
- Do you know other such HTLC scripts?
- Can you provide interesting resources on this topic?
I'm open to any constructive input and hope you have a few answers for me. Thank you in advance.
Type 1: sha256 secret, length=97byte
63 if
82 size
01 data1
20
88 equalverify
a8 sha256
20 data32
88 equalverify
76 dup
a9 hash160
14 data20
67 else
04 data4
b1 checklocktimeverify
75 drop
76 dup
a9 hash160
14 data20
68 endif
88 equalverify
ac checksig
Type 2a: sha256 secret, length=94byte
63 if
a8 sha256
20 data32
76 dup
a9 hash160
14 data20
88 equalverify
ac checksig
67 else
04 data4
b1 checklocktimeverify
75 drop
76 dup
a9 hash160
14 data20
88 equalverify
ac checksig
68 endif
Type 2b: sha256 secret, length=93byte
63 if
a8 sha256
20 data32
88 equalverify
76 dup
a9 hash160
14 data20
67 else
04 data4
b1 checklocktimeverify
75 drop
76 dup
a9 hash160
14 data20
68 endif
88 equalverify
ac checksig
Type 3: ripemd160 secret, length=81byte
63 if
a6 ripemd160
14 data20
88 equalverify
76 dup
a9 hash160
14 data20
67 else
04 data4
b1 checklocktimeverify
75 drop
76 dup
a9 hash160
14 data20
68 endif
88 equalverify
ac checksig
Type 4a: hash160 secret, length=86byte
63 if
03 data3
b1 checklocktimeverify
75 drop
76 dup
a9 hash160
14 data20
88 equalverify
ac checksig
67 else
76 dup
a9 hash160
14 data20
88 equalverify
ad checksigverify
82 size
01 data1
21 -> 33
88 equalverify
a9 hash160
14 data20
87 equal
68 endif
Type 4b: hash160 secret, length=82byte
63 if
03 data3
b1 checklocktimeverify
75 drop
76 dup
a9 hash160
14 data20
88 equalverify
ac checksig
67 else
76 dup
a9 hash160
14 data20
88 equalverify
ad checksigverify
a9 hash160
14 data20
87 equal
68 endif
Type 5a: hash160 secret, length=81byte
63 if
a9 hash160
14 data20
88 equalverify
76 dup
a9 hash160
14 data20
67 else
04 data4
b2 checksequenceverify
75 drop
76 dup
a9 hash160
14 data20
68 endif
88 equalverify
ac checksig
Type 5b: hash160 secret, length=78byte
63 if
a9 hash160
14 data20
88 equalverify
76 dup
a9 hash160
14 data20
67 else
01 data1
b2 checksequenceverify
75 drop
76 dup
a9 hash160
14 data20
68 endif
88 equalverify
ac checksig
Type 6: hash160 secret, length=79byte
63 if
54
b1 checklocktimeverify
75 drop
76 dup
a9 hash160
14 data20
88 equalverify
ac checksig
67 else
76 dup
a9 hash160
14 data20
88 equalverify
ad checksigverify
a9 hash160
14 data20
87 equal
68 endif
Type 7: multiple ripemd160 secrets, length=80 + n*23byte
63 if
a6 ripemd160
14 data20
88 equalverify
a6 ripemd160
14 data20
...
88 equalverify
a6 ripemd160
14 data20
88 equalverify
21 data33
ac checksig
67 else
04 data4
b1 checklocktimeverify
75 drop
21 data33
ac checksig
68 endif
Type 8: multiple ripemd160 secrets, length=81 + n*23byte
74 depth
60 16
87 equal
63 if
a6 ripemd160
14 data20
88 equalverify
a6 ripemd160
14 data20
...
88 equalverify
a6 ripemd160
14 data20
88 equalverify
21 data33
67 else
03 data3
b1 checklocktimeverify
75 drop
21 data33
68 endif
ac checksig
[1]
http://www.cryptovibes.com/crypto-news/charlie-lees-atomic-swap-between-litecoin-and-bitcoin-was-a-success/[2]
https://insight.bitpay.com/tx/0bb5a53a9c7e84e2c45d6a46a7b72afc2feffb8826b9aeb3848699c6fd856480
Post N°3: Is this basically just another way to make money?
My start with crypto/btc was that I invested a bit end of November last year. I had a few friends that told me about their small successes and how easy it was to just 'start'. It was indeed quite easy. I started to read and research into btc and every other relevant coin. Whitepapers, teams and such. Then I started to shift focus to the block chain, starting to get a grasp on what could be the future possibilities. I started to get real exited and invested some of my savings in a few projects with (to me) real potential. None of those projects appeared to be alive because of speculation only, mainly because they have a vision and actual plans.
So then I noticed that there are quite a few documentaries. I started to watch them all. A few from 2015, 2016 and 2017. I was disappointed to say the least. Everything was about bitcoin and the value/worth of bitcoin. It was about highs and lows, crashes and deceit. Only a few times the actual potential of the block chain was mentioned. Mostly it was about money.
Right now I am starting to feel like this is just a way to make money. Nothing more nothing less. You buy into btc or other coins and in no way are you really supporting the project, besides maybe adding to the order books at the exchanges with some minor effect until whales decided to take over. I sometimes have some sort of dishonest feeling, like the money I make through buying (and seldom) selling is somehow dirty as it comes from people that simply do less research, bail out or simply already had their take.
I started with high feelings of morality, being part of some new future where block chain would be the next internet. Right now it feels like a rat race where you have to grab as much money as possible before others take it before you or from you.
Not that I am ungrateful. I like many projects because of the team behind it that actually want to change the world. But if I look around me, it is mostly those that are in it to make money, a lot of money....and this money has to come from somewhere right (those that lose money)...
What is your take on this? Is this all a phase, part of how this game works?
Bonus:
one of the answers:
You know what op, my advice to you is to not think too much about things you know that you have never or can never ever really control like this one. Not that I am saying it is impossible for things to change around here in the crypto world, I am just saying that even if it is possible, it is on a point where it stands next to the line dividing impossible and possible. Now don't get me wrong, I completely agree with your point. In fact, I have been through the same conflict within my mind and still think that the way things work around here in the crypto world really sucks. But the thing is, I know that there is just nothing that I know of that I can do to make things better than what it already is today. Which is why I decided to adapt and take advantage of the opportunities while enjoying the innovation that cryptos bring to this modern world. Because let's face it, the world is too greedy to be good with things like this; if we do not adapt, we will get left behind. So, knowing ourselves, we can stay at ease because we know that we are not only in the game just because we want the money but the technology itself and the innovation it brings to our clearly outdated monetary system. Not to mention that there are thousands if not millions that are only in for the quick buck. So trust me man, there is nothing to be ashamed of. Just because you are earning(small or big) due to your hard work in studying how things work around here at the expense of others, doesn't mean that you are a bad person forgetting his morals. Because whether you like it or not, just like others you to have basic wants and needs that you need to satisfy or have.
But hey, for what it's worth, it already is a very big thing that you only choose to support projects that you think are really making a difference and are really honest with their goals in solving problems that are currently existing to help better the real world together with the other things in the virtual world. Hope this really does make you feel better and stop being too hard on yourself for the wrong reasons. Good luck with your crypto life man and good day.
Oh, and by the way, this message is not only intended for op himself but also for everyone who really does feel the same also. Thanks for reading and if you think it really helped you in any way, please do feel free to merit. It will be very much appreciated. (wink*)