Friday, 24 January 2020

How Torrent work and full detail about it

Torrent is a software which allow the users to download a file in a decentralized way. There are many softwares which are using torrent service like uTorrent, BitTorrent etc.
But we need to understand what is decentratlized or we can say that what is peer to peer (P2P) systems.

There are three types of systems:
  • Centralized
  • Decentralized
  • Distributed

We only need to understand decentralized. So, a decentralized network has no central server (command and control centre), which means that it can operate with freely running nodes alone (P2P).

So lets see with example, A file name abc.mkv is on a multiple computers which are uploading them using torrent software like BitTorrent. You download an abc.torrent from the internet and open it in BitTorrent. BitTorrent just downloads it from these computers which are uploading it. This file will download in a chunks from the different computers without having the central server. If your one computer is shutdown, the file will still downloading from the other computers. But in case of server, if your server is down, you can't download a file from the server. So, without having server, you can easily download a file.

So, Expensive server equipment isn't necessary to send files to many people at once, and people has slow internet can just as easily download large sets of data because the file is not uploaded on a server but on the computers which are acting as server. 

The torrent file can download from two things: the .TORRENT file or a hash of the torrent, called magnet link. Magnet link has all the information of file on the torrent network same as torrent file

Torrent can be dangerous because if the file is downloading from the untrusted source, it can download the malware in your computer. Torrent can be use for piracy.

Common term on the torrents are:
Seed is the number of people sharing the file. Zero seeds means no one have full file and nobody can download the file.
A peer is someone downloading the file from a seeder.
Leechers only download the file. A leecher might instead upload nothing at all after the full file has been downloaded.
Swarm is a group of people downloading and sharing the same torrent.
Tracker is a server that tracks all the connected users and helps them find each other.
Client is a program or web service used by a torrent file or magnet link to understand how to download or upload files.

Wednesday, 1 January 2020

How to start mining and my research about Mining


Mining of Crypto Currency
So, our topic was to mine the crypto currency and present how to start mining. What you need for mining.

What is mining?

                Mining, or Crypto currency mining, or crypto mining is a process in which transactions are verified and added to the block chain digital ledger.
So, there are two methods for mining.
  • Solo Mining
  • Mining Pool

Solo Mining

A solo mining is a solo process where the miner completely does his task of mining operations without any helping hand.

Mining Pool

            A mining pool is the pooling of resources by miners, who share their processing over a network, to split the reward equally, according to the amount of work they contributed to the probability of finding a block.

Crypto currency for mining

There are many crypto currencies in the digital world like:
  •          Bitcoin
  •          Ethereum
  •          Litecoin
  •          Vertcoin
  •          Onecoin

But our topic was to mine onecoin because we need minimum specs for mining of Onecoin.

OneCoin

OneCoin is a Ponzi Scheme due to its organizational structure and because of the previous involvement of many of those central to OneCoin in similar schemes. It was described by The Times as one of the biggest scam in history.
US Prosecutors have alleged the scheme bought in approx $4 billion worldwide. In China, law enforcement recovered 1.7 billion yuan (US$267.5 million) while prosecuting 98 people. Ruja Ignatova disappeared in 2017 near the time a secret US warrant was filed for her arrest and was replaced by her brother, Konstantin Ignatov. Most of the leaders have now disappeared or been arrested. Greenwood was arrested in 2018, as was Ignatov in March 2019. In November 2019 Ignatov pleaded guilty to charges of money laundering and fraud. The total maximum sentence for the charges is 90 years in prison.

VertCoin

Vertcoin is an open-source cryptocurrency created in early 2014 that focuses on decentralization. Vertcoin uses a proof-of-work mechanism to issue new coins and incentivize miners to secure the network and validate transactions.
I downloaded the vertcoin application (One Click Minor) from their website www.vertcoin.org . But there are some errors in the application.



 

LiteCoin

                Then I search best software for mining and I found easy miner for this purpose. So, I downloaded it. Then I created my wallet in coin base.
And it was working great. But we need high specs for mining the litecoin. But after start of mining, my pc slowly got heated and I stopped it.
Generate public address for coin. And then copy a coin base address in given field and give the email address for logs. And start mining.
It'll work but you have to make a system with high specifications.

Hardware needed for mining:
  • GPU (atleast 6)
  • Processor (atleast Core i3)
  • Fan (for cooling)
  • And a electricity generator
Thank You

Monday, 16 December 2019

Application of Bitcoin Script

Application of Bitcoin Script:

Now you all know about Bitcoin Structure. If you don't know then please read about the structure of Bitcoin, please. Now we'll talk about applications of Bitcoin script.
There are five applications
  • Escrow transaction
  • Green addresses
  • Efficient micro-payment
  • Lock time
  • Smart contracts

Escrow Transaction:

First of all, we need to understand that what is escrow? So according to wikipedia, ESCROW is a contract between two parties with the help of trusted third party. This third party receive and pay money for the primary parites with plentiful terms and conditions.
Excrow transaction is useful in following situation:
  • Alice wants to buy some things from Bob.
  • She wants to pay with Bitcoins and Bob has to send physical goods to Alice.
  • Alice doesn't want to pay until she receives it. And Bob doesn't want to send it, until he has received the payment
There is a cool solution in bitcoin.
  • Alice creates a multi-signature, which is type of digital signature that makes it possible for two or more user to sign a document and verify it, named MULTISIG transaction that requires Alice, Bob And Third Party to sign in order to redeem the bitcoins.We can say that this third party is Huzaifa. Huzaifa is a judge, whose role stat when there is disagreement from any of them
  • Alice signs the transaction if he had coins to send. These coins are held an escrow between Alice, Bob, and Huzaifa.
  • At this point, Bob can safely send the goods to Alice and sign the transaction. After this bitcoin structure releases money to Bob.
  • If the goods arrive and goods was same as Alice expected, she can release the money towards Bob signing the transaction. The money will be sent to Bob without the need of Huzaifa.
  • This happens if both are honest.
  • Otherwise Alice could ask for her money back. And maybe Bob doesn't agree to sign the transactions that releases the money towards Alice.
  • So, now it's Huzaifa's turn to decide who's right and sign the transaction that releases money either towards Alice or Bob. In both cases, since only two signatures are required. After this the money will be sent to one of them

Green Addresses:


​If Alice wants to pay Bob, and Bob’s offline. Or due to some issues, Bob can’t go and look at the block chain and wait for the transactions to be confirmed. It's take some time like one hour for confirmation of transaction. But for some merchandise such as food, Bob can’t wait an hour before delivering and Alice will not wait for one hour for food.
To solve this problem, there is a app;ication named Green Addresses. We have to introduce another third party, which we’ll call the bank (for the easiness of you). Alice is going to talk to her bank, and confirm her identity and say that i want to make some transaction to Bob. And the bank will say, "Sure. I’m going to deduct some money out of your account. And draw up a transaction from one of my green addresses over to Bob."

So when Bob sees that this transaction is signed by the bank, which he trusts, he can accept money which will be his when it’s confirmed in the block chain.

Efficient Micro-Payments:


If Alice is a customer who wants to continually pay Bob small amounts of money for some service that Bob provides. For example, Bob may be Alice’s wireless service provider, and requires her to pay a small fee for every minute that she talks on her phone. 
Creating a Bitcoin transaction for every minute that Alice speaks on the phone won’t work. That will create too many transactions, and the transaction fees add up. If the value of each one of these transactions is on the order of what the transaction fees are, Alice is going to be paying a high cost to do this. 
The best way is combine all these small payments into one big payment at the end. We start with a MULTISIG, which we discussed before, transaction that pays the maximum amount Alice which is equal to the service which alice needs, requiring both Alice and Bob to sign to release the coins. Now, after the first minute that Alice has used the service and signs a transaction spending those coins that were sent to the MULTISIG address, sending one unit of payment to Bob. After the next minute of using the service, Alice signs another transaction, this time paying two units to Bob. Notice these are signed only by Alice, and haven’t been signed by Bob yet, nor are they being published to the block chain. Alice will keep sending these transactions to Bob every minute that she uses the service. When Alice will finish using the service, and tells Bob, "I’m done." At this point Alice will stop signing additional transactions. After this, Bob will say "Great. I’ll disconnect your service, and I’ll take that last transaction that you sent me, sign it, and publish that to the block chain."

Lock Time:

​If, before the micro-payment protocol can even start, Alice and Bob will both sign a transaction which refunds all of Alice’s money back to her, but the refund is “locked” until some time in the future. So after Alice signs, but before she broadcasts, the first MULTISIG transaction that puts her funds into escrow, she’ll want to get this refund transaction from Bob and hold on to it. That guarantees that if she makes it to time t ​and Bob hasn’t signed any of the small transactions that Alice has sent, Alice can publish this transaction which refunds all of the money directly to her. 
What does it mean that it’s locked until time t​? Recall when we looked at the metadata in Bitcoin transactions (please see, blockchain structure), that there was this lock_time parameter. The way it works is that if you specify any value other than zero for the lock time, it tells miners not to publish the transaction until the specified lock time. The transaction will be invalid before this time, based on the timestamps that are put into blocks. So this is a way of preparing a transaction that can only be spent in the future if it isn’t already spent by then. It works quite nicely in the micro-payment protocol as a safety valve for Alice to know that if Bob never signs, eventually she’ll be able to get her money back.

Smart Contracts:

These all applications are based on smart contracts. These are contracts for which we have some degree of technical enforcement in Bitcoin. We can use scripts, miners, and transaction validation to realize the escrow protocol or the micro-payment protocol without needing a centralized authority.