Bitcoin Difficulty. All about cryptocurrency - BitcoinWiki

ACIS-mining and its 3 best algorithms

ACIS-mining and its 3 best algorithms
Hello. 👋🏻 Today we will tell you about ACIS-mining and its 3 best algorithms.
📌 With the advent of ASICs for mining, it became possible to mine Bitcoin in much larger quantities than using video cards. ASIC is an integrated circuit specialized to solve a specific problem, in our case, only for bitcoin mining. These schemes are many times more profitable than video cards, because with more power (hash calculation speed) they consume much less energy. This served as a good reason to create a cryptocurrency mining business.
📌 In bitcoin and other blockchain systems, the complexity of mining depends on how quickly the miners find the block. Compared with the GPU and CPU, specialized #ASIC miners solve #PoW puzzles better and are therefore able to quickly find new blocks.
📌 Since PoW is still the preferred mining consensus mechanism, we propose to take a multiple algorithm approach. Instead of trying to use algorithms which are ASIC resistant, we propose to use algorithms which have had ASIC miners for quite some time. These are: #SHA256, #Scrypt, and #X11.
🔹 The SHA-256 algorithm has a number of advantages over other information protection technologies. Over the years of use in the cryptocurrency industry, he has shown his resistance to various hacking attempts.
🔹 Scrypt is a cryptocurrency mining algorithm that was previously interesting to many single miners in view of its resistance to the so-called “hardware attack”. The speed of creating blocks in a Scrypt-based blockchain is about 30 seconds. The hashrate, like Ethash, is measured in Megahash per second. Scrypt, first of all, became popular due to its use in Litecoin #cryptocurrency.
🔹 X11 is an encryption algorithm in which eleven are used instead of one function. This means that this technology can provide a high degree of security, because in order to harm the system, an attacker will have to crack all 11 functions, which is very unlikely, because the changes made will be visible after breaking the first function, and developers will have a lot of time to protect the system before the hacker reaches the eleventh function.
Since these miners are already in wide use, the distribution of mining should be fair and even. Furthermore, the use of three different algorithms results in a far less chance of any single person gaining a majority hash rate share. Lastly, we use the Multishield difficulty adjustment algorithm to prevent difficulty spike issues resulting from burst mining.
Read more about PYRK mining solutions here: https://www.pyrk.org
Read our Whitepaper to know more about the project:
https://www.pyrk.org/Pyrk-Whitepaper.pdf
https://preview.redd.it/rxmlr7wt1k251.png?width=1200&format=png&auto=webp&s=162f9ddaacb3cf3e137638464a208bdf25e50a21
submitted by VS_community to pyrk [link] [comments]

Review and Prospect of Crypto Economy-Development and Evolution of Consensus Mechanism (2)

Review and Prospect of Crypto Economy-Development and Evolution of Consensus Mechanism (2)

https://preview.redd.it/a51zsja94db51.png?width=567&format=png&auto=webp&s=99e8080c9e9b1fb5e11cbd70f915f9cb37188f81
Foreword
The consensus mechanism is one of the important elements of the blockchain and the core rule of the normal operation of the distributed ledger. It is mainly used to solve the trust problem between people and determine who is responsible for generating new blocks and maintaining the effective unification of the system in the blockchain system. Thus, it has become an everlasting research hot topic in blockchain.
This article starts with the concept and role of the consensus mechanism. First, it enables the reader to have a preliminary understanding of the consensus mechanism as a whole; then starting with the two armies and the Byzantine general problem, the evolution of the consensus mechanism is introduced in the order of the time when the consensus mechanism is proposed; Then, it briefly introduces the current mainstream consensus mechanism from three aspects of concept, working principle and representative project, and compares the advantages and disadvantages of the mainstream consensus mechanism; finally, it gives suggestions on how to choose a consensus mechanism for blockchain projects and pointed out the possibility of the future development of the consensus mechanism.
Contents
First, concept and function of the consensus mechanism
1.1 Concept: The core rules for the normal operation of distributed ledgers
1.2 Role: Solve the trust problem and decide the generation and maintenance of new blocks
1.2.1 Used to solve the trust problem between people
1.2.2 Used to decide who is responsible for generating new blocks and maintaining effective unity in the blockchain system
1.3 Mainstream model of consensus algorithm
Second, the origin of the consensus mechanism
2.1 The two armies and the Byzantine generals
2.1.1 The two armies problem
2.1.2 The Byzantine generals problem
2.2 Development history of consensus mechanism
2.2.1 Classification of consensus mechanism
2.2.2 Development frontier of consensus mechanism
Third, Common Consensus System
Fourth, Selection of consensus mechanism and summary of current situation
4.1 How to choose a consensus mechanism that suits you
4.1.1 Determine whether the final result is important
4.1.2 Determine how fast the application process needs to be
4.1.2 Determining the degree to which the application requires for decentralization
4.1.3 Determine whether the system can be terminated
4.1.4 Select a suitable consensus algorithm after weighing the advantages and disadvantages
4.2 Future development of consensus mechanism
Last lecture review: Chapter 1 Concept and Function of Consensus Mechanism plus Chapter 2 Origin of Consensus Mechanism
Chapter 3 Common Consensus Mechanisms (Part 1)
Figure 6 Summary of relatively mainstream consensus mechanisms
📷
https://preview.redd.it/9r7q3xra4db51.png?width=567&format=png&auto=webp&s=bae5554a596feaac948fae22dffafee98c4318a7
Source: Hasib Anwar, "Consensus Algorithms: The Root Of The Blockchain Technology"
The picture above shows 14 relatively mainstream consensus mechanisms summarized by a geek Hasib Anwar, including PoW (Proof of Work), PoS (Proof of Stake), DPoS (Delegated Proof of Stake), LPoS (Lease Proof of Stake), PoET ( Proof of Elapsed Time), PBFT (Practical Byzantine Fault Tolerance), SBFT (Simple Byzantine Fault Tolerance), DBFT (Delegated Byzantine Fault Tolerance), DAG (Directed Acyclic Graph), Proof-of-Activity (Proof of Activity), Proof-of- Importance (Proof of Importance), Proof-of-Capacity (Proof of Capacity), Proof-of-Burn ( Proof of Burn), Proof-of-Weight (Proof of Weight).
Next, we will mainly introduce and analyze the top ten consensus mechanisms of the current blockchain.
》POW
-Concept:
Work proof mechanism. That is, the proof of work means that it takes a certain amount of computer time to confirm the work.
-Principle:
Figure 7 PoW work proof principle
📷
https://preview.redd.it/xupacdfc4db51.png?width=554&format=png&auto=webp&s=3b6994641f5890804d93dfed9ecfd29308c8e0cc
The PoW represented by Bitcoin uses the SHA-256 algorithm function, which is a 256-bit hash algorithm in the password hash function family:
Proof of work output = SHA256 (SHA256 (block header));
if (output of proof of work if (output of proof of work >= target value), change the random number, recursive i logic, continue to compare with the target value.
New difficulty value = old difficulty value* (time spent by last 2016 blocks /20160 minutes)
Target value = maximum target value / difficulty value
The maximum target value is a fixed number. If the last 2016 blocks took less than 20160 minutes, then this coefficient will be small, and the target value will be adjusted bigger, if not, the target value will be adjusted smaller. Bitcoin mining difficulty and block generation speed will be inversely proportional to the appropriate adjustment of block generation speed.
-Representative applications: BTC, etc.
》POS
-Concept:
Proof of stake. That is, a mechanism for reaching consensus based on the holding currency. The longer the currency is held, the greater the probability of getting a reward.
-Principle:
PoS implementation algorithm formula: hash(block_header) = Coin age calculation formula: coinage = number of coins * remaining usage time of coins
Among them, coinage means coin age, which means that the older the coin age, the easier it is to get answers. The calculation of the coin age is obtained by multiplying the coins owned by the miner by the remaining usage time of each coin, which also means that the more coins you have, the easier it is to get answers. In this way, pos solves the problem of wasting resources in pow, and miners cannot own 51% coins from the entire network, so it also solves the problem of 51% attacks.
-Representative applications: ETH, etc.
》DPoS
-Concept:
Delegated proof of stake. That is, currency holding investors select super nodes by voting to operate the entire network , similar to the people's congress system.
-Principle:
The DPOS algorithm is divided into two parts. Elect a group of block producers and schedule production.
Election: Only permanent nodes with the right to be elected can be elected, and ultimately only the top N witnesses can be elected. These N individuals must obtain more than 50% of the votes to be successfully elected. In addition, this list will be re-elected at regular intervals.
Scheduled production: Under normal circumstances, block producers take turns to generate a block every 3 seconds. Assuming that no producer misses his order, then the chain they produce is bound to be the longest chain. When a witness produces a block, a block needs to be generated every 2s. If the specified time is exceeded, the current witness will lose the right to produce and the right will be transferred to the next witness. Then the witness is not only unpaid, but also may lose his identity.
-Representative applications: EOS, etc.
》DPoW
-Concept:
Delayed proof of work. A new-generation consensus mechanism based on PoB and DPoS. Miners use their own computing power, through the hash algorithm, and finally prove their work, get the corresponding wood, wood is not tradable. After the wood has accumulated to a certain amount, you can go to the burning site to burn the wood. This can achieve a balance between computing power and mining rights.
-Principle:
In the DPoW-based blockchain, miners are no longer rewarded tokens, but "wood" that can be burned, burning wood. Miners use their own computing power, through the hash algorithm, and finally prove their work, get the corresponding wood, wood is not tradable. After the wood has accumulated to a certain amount, you can go to the burning site to burn the wood. Through a set of algorithms, people who burn more wood or BP or a group of BP can obtain the right to generate blocks in the next event segment, and get rewards (tokens) after successful block generation. Since more than one person may burn wood in a time period, the probability of producing blocks in the next time period is determined by the amount of wood burned by oneself. The more it is burned, the higher the probability of obtaining block rights in the next period.
Two node types: notary node and normal node.
The 64 notary nodes are elected by the stakeholders of the dPoW blockchain, and the notarized confirmed blocks can be added from the dPoW blockchain to the attached PoW blockchain. Once a block is added, the hash value of the block will be added to the Bitcoin transaction signed by 33 notary nodes, and a hash will be created to the dPow block record of the Bitcoin blockchain. This record has been notarized by most notary nodes in the network. In order to avoid wars on mining between notary nodes, and thereby reduce the efficiency of the network, Komodo designed a mining method that uses a polling mechanism. This method has two operating modes. In the "No Notary" (No Notary) mode, all network nodes can participate in mining, which is similar to the traditional PoW consensus mechanism. In the "Notaries Active" mode, network notaries use a significantly reduced network difficulty rate to mine. In the "Notary Public Activation" mode, each notary public is allowed to mine a block with its current difficulty, while other notary public nodes must use 10 times the difficulty of mining, and all normal nodes use 100 times the difficulty of the notary public node.
Figure 8 DPoW operation process without a notary node
📷
https://preview.redd.it/3yuzpemd4db51.png?width=500&format=png&auto=webp&s=f3bc2a1c97b13cb861414d3eb23a312b42ea6547
-Representative applications: CelesOS, Komodo, etc.
CelesOS Research Institute丨DPoW consensus mechanism-combustible mining and voting
》PBFT
-Concept:
Practical Byzantine fault tolerance algorithm. That is, the complexity of the algorithm is reduced from exponential to polynomial level, making the Byzantine fault-tolerant algorithm feasible in practical system applications.
-Principle:
Figure 9 PBFT algorithm principle
📷
https://preview.redd.it/8as7rgre4db51.png?width=567&format=png&auto=webp&s=372be730af428f991375146efedd5315926af1ca
First, the client sends a request to the master node to call the service operation, and then the master node broadcasts other copies of the request. All copies execute the request and send the result back to the client. The client needs to wait for f+1 different replica nodes to return the same result as the final result of the entire operation.
Two qualifications: 1. All nodes must be deterministic. That is to say, the results of the operation must be the same under the same conditions and parameters. 2. All nodes must start from the same status. Under these two limited qualifications, even if there are failed replica nodes, the PBFT algorithm agrees on the total order of execution of all non-failed replica nodes, thereby ensuring security.
-Representative applications: Tendermint Consensus, etc.
Next Lecture: Chapter 3 Common Consensus Mechanisms (Part 2) + Chapter 4 Consensus Mechanism Selection and Status Summary
CelesOS
As the first DPOW financial blockchain operating system, CelesOS adopts consensus mechanism 3.0 to break through the "impossible triangle", which can provide high TPS while also allowing for decentralization. Committed to creating a financial blockchain operating system that embraces supervision, providing services for financial institutions and the development of applications on the supervision chain, and formulating a role and consensus ecological supervision layer agreement for supervision.
The CelesOS team is dedicated to building a bridge between blockchain and regulatory agencies/financial industry. We believe that only blockchain technology that cooperates with regulators will have a real future. We believe in and contribute to achieving this goal.

📷Website
https://www.celesos.com/
📷 Telegram
https://t.me/celeschain
📷 Twitter
https://twitter.com/CelesChain
📷 Reddit
https://www.reddit.com/useCelesOS
📷 Medium
https://medium.com/@celesos
📷 Facebook
https://www.facebook.com/CelesOS1
📷 Youtube
https://www.youtube.com/channel/UC1Xsd8wU957D-R8RQVZPfGA
submitted by CelesOS to u/CelesOS [link] [comments]

Can someone explain me in simple terms what exactly is "solving a hard mathematical problem" in relation to bitcoin miners?

I have read several blogs and several small books but none of the book could explain easily how does exactly a bitcoin generated. I know the following things:
  1. After every 10 minutes, a block is generated which contains all the transactions that happened since the last block got verified.
  2. All the miners try to verify the newly generated block. It's a hard mathematical problem which requires extensive computation. The miner which solves that problem gets 12.5 Btc in reward.
I am confused about that mathematical problem. What is that? Is it finding a key by brute force method for the newly generated hash of the newly generated block? Why is it so hard? Is it because the hash generated becomes longer and longer as the number of transactions have increased? Or is the hash generated contains all knowledge of the transaction since the first bitcoin generated?
Can some one explain me in simple terms? I want to make other people understand the value of bitcoin but get confused myself while explaining them.
P.S. I am a technical person and have no difficulty in understanding the mathematics.
submitted by kumartarun to Bitcoin [link] [comments]

Yay hashrate is now over 50PH/s which is pretty amazing

https://blockchain.info/charts/hash-rate
submitted by RaptorJG to Bitcoin [link] [comments]

How to Create Your Own Cryptocurrency Using Python 2020

A blockchain is a public database that irreversibly documents and authenticates the possession and transmission of digital assets. Digital currencies, like Bitcoin and Ethereum, are based on this concept. Blockchain is an exciting technology that you can use to transform the capabilities of your applications.
Of late, we’ve been seeing governments, organizations, and individuals using the blockchain technology to create their own cryptocurrencies—and avoid being left behind. Notably, when Facebook proposed its own cryptocurrency, called Libra, the announcement stirred many waters across the world.

What if you could also follow suit and create your own version of a cryptocurrency?

I thought about this and decided to develop an algorithm that creates a crypto.
I decided to call the cryptocurrency fccCoin.
In this tutorial, I’m going to illustrate the step-by-step process I used to build the digital currency (I used the object-oriented concepts of the Python programming language).
Here is the basic blueprint of the blockchain algorithm for creating the fccCoin:
class Block: def __init__(): #first block class pass def calculate_hash(): #calculates the cryptographic hash of every block class BlockChain: def __init__(self): # constructor method pass def construct_genesis(self): # constructs the initial block pass def construct_block(self, proof_no, prev_hash): # constructs a new block and adds it to the chain pass u/staticmethod def check_validity(): # checks whether the blockchain is valid pass def new_data(self, sender, recipient, quantity): # adds a new transaction to the data of the transactions pass u/staticmethod def construct_proof_of_work(prev_proof): # protects the blockchain from attack pass u/property def last_block(self): # returns the last block in the chain return self.chain[-1]
Now, let me explain what is taking place…
1. Building the first Block class A blockchain comprises of several blocks that are joined to each other (that sounds familiar, right?).
The chaining of blocks takes place such that if one block is tampered with, the rest of the chain becomes invalid.
In applying the above concept, I created the following initial block class
import hashlib import time class Block: def __init__(self, index, proof_no, prev_hash, data, timestamp=None): self.index = index self.proof_no = proof_no self.prev_hash = prev_hash self.data = data self.timestamp = timestamp or time.time() u/property def calculate_hash(self): block_of_string = “{}{}{}{}{}”.format(self.index, self.proof_no, self.prev_hash, self.data, self.timestamp) return hashlib.sha256(block_of_string.encode()).hexdigest() def __repr__(self): return “{} – {} – {} – {} – {}”.format(self.index, self.proof_no, self.prev_hash, self.data, self.timestamp)
As you can see from the code above, I defined the __init__() function, which will be executed when the Block class is being initiated, just like in any other Python class.
I provided the following parameters to the initiation function:
self—this refers to the instance of the Block class, making it possible to access the methods and attributes associated with the class; index—this keeps track of the position of the block within the blockchain; proof_no—this is the number produced during the creation of a new block (called mining); prev_hash—this refers to the hash of the previous block within the chain; data—this gives a record of all transactions completed, such as the quantity bought; timestamp—this places a timestamp for the transactions. The second method in the class, calculate_hash, will generate the hash of the blocks using the above values. The SHA-256 module is imported into the project to assist in obtaining the hashes of the blocks.
After the values have been inputted into the cryptographic hash algorithm, the function will return a 256-bit string representing the contents of the block.
This is how security is achieved in blockchains—every block will have a hash and that hash will rely on the hash of the previous block.
As such, if someone tries to compromise any block in the chain, the other blocks will have invalid hashes, leading to disruption of the entire blockchain network.
Ultimately, a block will look like this:
{ “index”: 2, “proof”: 21, “prev_hash”: “6e27587e8a27d6fe376d4fd9b4edc96c8890346579e5cbf558252b24a8257823”, “transactions”: [ {‘sender’: ‘0’, ‘recipient’: ‘Quincy Larson’, ‘quantity’: 1} ], “timestamp”: 1521646442.4096143 }
2. Building the Blockchain class The main idea of a blockchain, just as the name implies, involves “chaining” several blocks to one another.
Therefore, I’m going to construct a Blockchain class that will be useful in managing the workings of the whole chain. This is where most of the action is going to take place.
The Blockchain class will have various helper methods for completing various tasks in the blockchain.
Let me explain the role of each of the methods in the class.
a. Constructor method This method ensures the blockchain is instantiated.
class BlockChain: def __init__(self): self.chain = [] self.current_data = [] self.nodes = set() self.construct_genesis()
Here are the roles of its attributes:
b. Constructing the genesis block The blockchain requires a construct_genesis method to build the initial block in the chain. In the blockchain convention, this block is special because it symbolizes the start of the blockchain.
In this case, let’s construct it by simply passing some default values to the construct_block method.
I gave both proof_no and prev_hash a value of zero, although you can provide any value you want.
def construct_genesis(self): self.construct_block(proof_no=0, prev_hash=0) def construct_block(self, proof_no, prev_hash): block = Block( index=len(self.chain), proof_no=proof_no, prev_hash=prev_hash, data=self.current_data) self.current_data = [] self.chain.append(block) return block
c. Constructing new blocks
The construct_block method is used for creating new blocks in the blockchain.
Here is what is taking place with the various attributes of this method:
d. Checking validity
The check_validity method is important in assessing the integrity of the blockchain and ensuring anomalies are absent.
As mentioned earlier, hashes are essential for the security of the blockchain as even the slightest change in the object will lead to the generation of a completely new hash.
Therefore, this check_validity method uses if statements to check whether the hash of every block is correct.
It also verifies if every block points to the right previous block, through comparing the value of their hashes. If everything is correct, it returns true; otherwise, it returns false.
u/staticmethod def check_validity(block, prev_block): if prev_block.index + 1 != block.index: return False elif prev_block.calculate_hash != block.prev_hash: return False elif not BlockChain.verifying_proof(block.proof_no, prev_block.proof_no): return False elif block.timestamp <= prev_block.timestamp: return False return True
e. Adding data of transactions
The new_data method is used for adding the data of transactions to a block. It’s a very simple method: it accepts three parameters (sender’s details, receiver’s details, and quantity) and append the transaction data to self.current_data list.
Anytime a new block is created, this list is allocated to that block and reset once more as explained in the construct_block method.
Once the transaction data has been added to the list, the index of the next block to be created is returned.
This index is calculated by adding 1 to the index of the current block (which is the last in the blockchain). The data will assist a user in submitting the transaction in future.
def new_data(self, sender, recipient, quantity): self.current_data.append({ ‘sender’: sender, ‘recipient’: recipient, ‘quantity’: quantity }) return True
f. Adding proof of work
Proof of work is a concept that prevents the blockchain from abuse. Simply, its objective is to identify a number that solves a problem after a certain amount of computing work is done.
If the difficulty level of identifying the number is high, it discourages spamming and tampering with the blockchain.
In this case, we’ll use a simple algorithm that discourages people from mining blocks or creating blocks easily.
u/staticmethod def proof_of_work(last_proof): ”’this simple algorithm identifies a number f’ such that hash(ff’) contain 4 leading zeroes f is the previous f’ f’ is the new proof ”’ proof_no = 0 while BlockChain.verifying_proof(proof_no, last_proof) is False: proof_no += 1 return proof_no u/staticmethod def verifying_proof(last_proof, proof): #verifying the proof: does hash(last_proof, proof) contain 4 leading zeroes? guess = f'{last_proof}{proof}’.encode() guess_hash = hashlib.sha256(guess).hexdigest() return guess_hash[:4] == “0000”
g. Getting the last block
Lastly, the latest_block method is a helper method that assists in obtaining the last block in the blockchain. Remember that the last block is actually the current block in the chain.
u/property def latest_block(self): return self.chain[-1]
Let’s sum everything together
Here is the entire code for creating the fccCoin cryptocurrency.
You can also get the code on this GitHub repository.
import hashlib import time class Block: def __init__(self, index, proof_no, prev_hash, data, timestamp=None): self.index = index self.proof_no = proof_no self.prev_hash = prev_hash self.data = data self.timestamp = timestamp or time.time() u/property def calculate_hash(self): block_of_string = “{}{}{}{}{}”.format(self.index, self.proof_no, self.prev_hash, self.data, self.timestamp) return hashlib.sha256(block_of_string.encode()).hexdigest() def __repr__(self): return “{} – {} – {} – {} – {}”.format(self.index, self.proof_no, self.prev_hash, self.data, self.timestamp) class BlockChain: def __init__(self): self.chain = [] self.current_data = [] self.nodes = set() self.construct_genesis() def construct_genesis(self): self.construct_block(proof_no=0, prev_hash=0) def construct_block(self, proof_no, prev_hash): block = Block( index=len(self.chain), proof_no=proof_no, prev_hash=prev_hash, data=self.current_data) self.current_data = [] self.chain.append(block) return block u/staticmethod def check_validity(block, prev_block): if prev_block.index + 1 != block.index: return False elif prev_block.calculate_hash != block.prev_hash: return False elif not BlockChain.verifying_proof(block.proof_no, prev_block.proof_no): return False elif block.timestamp <= prev_block.timestamp: return False return True def new_data(self, sender, recipient, quantity): self.current_data.append({ ‘sender’: sender, ‘recipient’: recipient, ‘quantity’: quantity }) return True u/staticmethod def proof_of_work(last_proof): ”’this simple algorithm identifies a number f’ such that hash(ff’) contain 4 leading zeroes f is the previous f’ f’ is the new proof ”’ proof_no = 0 while BlockChain.verifying_proof(proof_no, last_proof) is False: proof_no += 1 return proof_no u/staticmethod def verifying_proof(last_proof, proof): #verifying the proof: does hash(last_proof, proof) contain 4 leading zeroes? guess = f'{last_proof}{proof}’.encode() guess_hash = hashlib.sha256(guess).hexdigest() return guess_hash[:4] == “0000” u/property def latest_block(self): return self.chain[-1] def block_mining(self, details_miner): self.new_data( sender=”0″, #it implies that this node has created a new block receiver=details_miner, quantity= 1, #creating a new block (or identifying the proof number) is awarded with 1 ) last_block = self.latest_block last_proof_no = last_block.proof_no proof_no = self.proof_of_work(last_proof_no) last_hash = last_block.calculate_hash block = self.construct_block(proof_no, last_hash) return vars(block) def create_node(self, address): self.nodes.add(address) return True u/staticmethod def obtain_block_object(block_data): #obtains block object from the block data return Block( block_data[‘index’], block_data[‘proof_no’], block_data[‘prev_hash’], block_data[‘data’], timestamp=block_data[‘timestamp’])
Now, let’s test our code to see if it works.
blockchain = BlockChain() print(“***Mining fccCoin about to start***”) print(blockchain.chain) last_block = blockchain.latest_block last_proof_no = last_block.proof_no proof_no = blockchain.proof_of_work(last_proof_no) blockchain.new_data( sender=”0″, #it implies that this node has created a new block recipient=”Quincy Larson”, #let’s send Quincy some coins! quantity= 1, #creating a new block (or identifying the proof number) is awarded with 1 ) last_hash = last_block.calculate_hash block = blockchain.construct_block(proof_no, last_hash) print(“***Mining fccCoin has been successful***”) print(blockchain.chain)
It worked!
Here is the output of the mining process:
***Mining fccCoin about to start*** [0 – 0 – 0 – [] – 1566930640.2707076] ***Mining fccCoin has been successful*** [0 – 0 – 0 – [] – 1566930640.2707076, 1 – 88914 – a8d45cb77cddeac750a9439d629f394da442672e56edfe05827b5e41f4ba0138 – [{‘sender’: ‘0’, ‘recipient’: ‘Quincy Larson’, ‘quantity’: 1}] – 1566930640.5363243]
Conclusion
There you have it!
That’s how you could create your own blockchain using Python.
Let me say that this tutorial just demonstrates the basic concepts for getting your feet wet in the innovative blockchain technology.
If this coin were deployed as-is, it could not meet the present market demands for a stable, secure, and easy-to-use cryptocurrency.
Therefore, it can still be improved by adding additional features to enhance its capabilities for mining and sending financial transactions.
Nonetheless, it’s a good starting point if you decide to make your name known in the amazing world of cryptos.
If you have any comments or questions, please post them below.
Happy (crypto) coding!
Source: Cryptoors
submitted by djkloud to CryptoTechnology [link] [comments]

The 8 Skills to Be a Good Miner

Many people may feel quite confused about their low profit now. Maybe you forget to think about the small details when you are mining. Small little details will make big difference in your final income.
Now, i want to share you the 8 skills to improve your benefits.
1, Get a cheaper power
Everyone knows the power is the most charge in mining, if we can find a cheaper electricity, it will be good. So, how to get a cheaper electricity?
55% of the mining is in China, and 40% of the mining is in Sichuan China. Why? Because there are many hydroelectric power station in there. So, you can find a place near the station and get a cheaper electricity from them.
If you can find free electricity, it is the best anyway
2, Choose low w/t machine
As you know, low comsuption machine is very popular those days, like S17 pro 53t, T17 42t. They are 7nm technical, the w/t is low and it can even overclock, it maybe a good choice. Also, we need to consider the price of machine.
Cheap price machine means fast ROI, But low W/T machine has a bright future.
3, Buy miner when BTC begin to raise after long drop
When BTC price keep falling, of course the machine will be cheaper and cheaper. When the BTC price begin to raise, we can buy miner at that time, because the price is the cheapset and you can earn money back soon.
Normally at that time, the good machine will be sold out quickly, when the market feedback that those machine are good, you may be late to get the chance. So, make your plan for purchasing before, when price down, get them.
4, Do not forget BCH, BSV, ZEN coin
Do remember SHA-256 Algorithm can mining BCH and BSV as well. Sometimes those coin may get even a better profits than BTC.
Some miner has auto setting for BTC, but you can choose BSV and BCH mining if you set it,
5, Notice the half reward period information
Because the half reward time is coming in 2020, there will be a chance or a risk for it. Many low hashrate machine may be out of the style and high hashrate will be more competitive.
Low your risk and not to buy those cheap machine now
6, Choose a good future crypto currency
There are many coins in this field now, we need to analyse and find a better direction for mining. Like Z11, many people use it for ZEN mining nowadays, and their benefits is top now.
Also, people buy many S17, it can earn money back before next year half reward time. And they believe the BTC price will increase creazily as last two times.
7, Make plan for your selling of coin or machine
As you know, the price of the BTC changes everytime, we can mining the BTC first and keep it in hand, do not sell it every day. It is very stupid. Just sell it when price high, you do not need to take any risk if you do not buy BTC directy. We do not need to care about the low price situation, we only need to wait. When chance come, get it.
Same for machine
8. Don't be fooled by the mining calculator
Many sites calculate mining profits based on hardware and electricity prices. If you've never mined before, you might be happy to see the numbers provided by these websites and calculators and think, "I'll make a fortune!"
However, these websites don't tell you: in addition to the cost of electricity, there may be other current costs, such as maintenance, cooling, rent, labor, etc. Generally, the hash rate and power consumption of the device are slightly different from what the factory says.
This difference is more common in unpopular brands. You can better understand the actual hash rate and the actual power consumption by watching the miner test video on YouTube. In addition, depending on the distance from the meter to the device and the type of cable used, the power loss from the meter to the device can be as high as 200 watts.
In addition to the cost of mining machines, some initial costs are required to prepare the infrastructure, such as cooling and venting, cabling and distribution, shelves, network and monitoring equipment, safety measures, etc.
The network difficulty is constantly changing and increasing at a significant speed, which directly affects the mining revenue. You can check the bitcoin network difficulty chart to see its growth rate, but your miner will not always be 100% active.
Due to maintenance, network problems, ore pool problems, power problems and many other problems, the miner may be offline for several hours. I suggest that you consider setting the normal operation time of the miner to less than 97% when calculating. We have rich mining experience in professional ore pools, and the normal operation time of these mining machines will not exceed 97-98%.
Thats all, hope those information will help you become a good mining investor.
submitted by 15Ansel to BitcoinMining [link] [comments]

Waltonchain adds GNU General Public License details to code - BUT does the code contain this?

Waltonchain adds GNU General Public License details to code - BUT does the code contain this?
Dear Crypto community,
Yesterday we saw Waltonchain release their Open Source code which resulted in huge criticism regarding the oversight of removing the original copyright to the original codebase, Ethereum Go, on which it is based.
Following this, the team have now updated the code to show the original copyright:
Image from Github
Source: https://github.com/WaltonChain/WaltonChain_Gwtc_Src/blob/mastep2p/rlpx.go?utm_source=share&utm_medium=ios_app
Github: https://github.com/WaltonChain?tab=repositories

I'd like to say thank you to the community for having such strong opinion on this matter, and for all the subreddit admins that assisted in creating clarity toward this. As a global community we should hold every blockchain up to the same standards, and I am grateful that this was shown in regard to the GNU General Public License.

Now that the issue is resolved, and since Waltonchain is currently a hot topic, I implore all the coders and devs out there to delve deep into the code to see exactly what Waltonchain have released. Not just the modification to the eth codebase, but the additional code. What does the code allow?

What we've been told as a community is that the Waltonchain source code has changes that allows for:
  • Security - DASH X11 - Most cryptographic algorithms used in cryptocurrencies use only one hash function for calculation. There are 11 of them in X11, which provides a higher degree of protection against hackers and scams. Waltonchain has customised the DASH X11 hashing algorithm to fit their purpose.
  • More secure than Bitcoin. The Bitcoin algorithm is SHA-256 is based on a previous secure hash algorithm family of standards, namely SHA-2, the hash functions within the X11 algorithm all successfully made it into the second-round in search for a new, more secure standard — SHA-3. Keccak, the function which won the competition and is therefore the new standard on which SHA-3 is based on, can at the very least be considered more secure that SHA-256.
  • Efficiency — Waltonchain have produced ASICs with the equivalent hashing power of 200GPUs (32–40kW) whilst using only 135W, thus helping the parent chain become decentralised
  • PoS aspect works in tandem with PoW, in that it adds a reduced difficulty based on number of coins held and time between blocks. Effectively the longer coins are held and the longer the time between blocks, the lower the difficulty for mining blocks. This again enhances the power efficiency of the network in its entirety.
  • Fast cross-chain searching via Proof of Labour —PoL enables hash values or indices from sub-chains (child chains) to be synced with the parent chain in a ‘cross chain index mechanism’ to enable fast searches for data via the parent chain.
  • Scalibility — Unlimited scalibility due to child chains; each CC is an independent blockchain (or DAG) using its own consensus mechanism (PoS, PoA, PoW, PoeT, etc) and can store data within itself. The parent chain by nature therefore cannot become bloated.
  • Atomic Swaps — PoL by nature ensures a record of every inter-chain transaction is held, and allows the function of atomic swaps between currencies.

Also to note is that the code has been audited by Knownsec, the same company that audited projects like HPB and NANO.

Lets have an open dialogue and talk about these features of the code - but firstly, do they exist? Hopefully people will approach this with the same enthusiasm as they did yesterday.

EDIT 1st June: A user on the Waltonchain sub has done an analysis which by the looks of it, disproves the initial assessment by many of the 'blockchain experts' in cc that have said the open source code is simply a copy and paste . https://www.reddit.com/waltonchain/comments/bveqea/changeset_goethereum_v171_to_gwtc_v110/
It is interesting to see just how much people love to hate Waltonchain that they spread misinformation either intentionally, or unintentionally, and that it gets the most attention out of any announcement.

For reference:
Block explorer: www.Waltonchain.pro (all wallets, mining wallet, documentation etc is available via that link)
submitted by Yayowam to CryptoCurrency [link] [comments]

CODE FUD: Resolved.

Dear Waltonchain community,
Yesterday we saw Waltonchain release their Open Source code which resulted in huge criticism regarding the oversight of removing the original copyright to the original codebase, Ethereum Go, on which it is based.
Following this, the team have now updated the code to show the original copyright:
Source: https://github.com/WaltonChain/WaltonChain_Gwtc_Src/blob/mastep2p/rlpx.go?utm_source=share&utm_medium=ios_app
Github: https://github.com/WaltonChain?tab=repositories

I'd like to say thank you to the community for having such strong opinion on this matter, and for all the subreddit admins that assisted in creating clarity toward this. As a global community we should hold every blockchain up to the same standards, and I am grateful that this was shown in regard to the GNU General Public License.

Now that the issue is resolved, and since Waltonchain is currently a hot topic, I implore all the coders and devs out there to delve deep into the code to see exactly what Waltonchain have released. Not just the modification to the eth codebase, but the additional code. What does the code allow?

What we've been told as a community is that the Waltonchain source code has changes that allows for:

Also to note is that the code has been audited by Knownsec, the same company that audited projects like HPB and NANO.

Lets have an open dialogue and talk about these features of the code - but firstly, do they exist? Hopefully people will approach this with the same enthusiasm as they did yesterday.

For reference:
Block explorer: www.Waltonchain.pro (all wallets, mining wallet, documentation etc is available via that link)
submitted by Yayowam to waltonchain [link] [comments]

What is the math behind mining bitcoins?

What math does the computer do exactly to mine bitcoins? How do they make it to be harder and harder to mine and calculate so that you always end up needing more processing power? Why was it once relatively easy and now it is almost impossible to do decent mining with a desktop computer?
submitted by DarinHristov to askscience [link] [comments]

Can Bitcoin miners be used to discover private keys?

They say it's impossible to brute-force a private key, but what are the actual chances? What if 1% of the miners diverted their efforts to crack the keys of the wallets with the largest balances? Miners hash, and Bitcoin private keys are hashes, right? So what's to prevent ASIC miners from cracking a private key? (Joined reddit for the first time just to ask this question)
submitted by jtpatriot to Bitcoin [link] [comments]

block confirmation rules

First time, long time here...I love bitcoin. I used to mine around 2013 on my gtx480, earned enough to play some satoshi dice every couple days, just to play until i lost it all. honestly, it was fun at the time. One day I had enough and just zipped it into password-i-can-no-longer-remember file and the rest is history. my latest foray into bitcoin has since focused on the keeping-them-secure side of things. (love that trezor). Anyway, here's the question-
How would one manually calculate the hash-- using a sha-256 calculator, or something of that ilk -- in order to confirm the work of the latest block?
My understanding is that the header with all the transactions and such is hashed with a nonce in order to get a hashed value under a certain amount of zero's, depending on network difficulty. Therefore, all anyone needs to do is compute the the header hash for themselves and confirm the hash number (along with the obvious other rules of ensuring all TX's have enough balance, coinbase fee is per protocol, etc.)
This all could be nonsense, I have zero programming knowledge.
submitted by jabdrw15a to Bitcoin [link] [comments]

Bitcoin ABC's "parked blocks" feature allows minority hashrate attackers to cause a permanent chain split with high probability.

BACKGROUND
------------------------------------------------------
In November, Bitcoin ABC introduced "auto-finalization" and "parked blocks" functionality in order to mitigate the risk of 51% attacks.
Roughly, the way auto-finalization works is that after receiving a new block, a node will look back ten blocks prior and mark that previous block as finalized, which means that the node will not reorg past that point without manual intervention. This prevents attackers from double spending with large reorgs, and thus provides some protection for exchanges and the like.
The parked blocks functionality is intended to prevent against medium-length reorgs by adding a proof of work penalty. Specifically, a 4+ block reorg requires double the PoW; a 1 or 2 block reorg requires an extra 1/2 blocks' worth of PoW, and a 3 block reorg requires an extra blocks' worth of PoW. These are approximations, because of BCH's DAA which changes each block, but you can find this implemented in FindMostWorkChain() in validation.cpp.
When these changes were added, there was some discussion on btc about how auto-finalization could lead to chain splits because an attacker could mine a 10 block secret chain and broadcast it right at the perfect time that the honest network has broadcast its 10th block from the fork point; however, this is a difficult attack to pull off, and the parked blocks functionality actually makes it such that the attacker would need to mine more like 20 blocks secretly (approximately, because of the DAA), which makes it nearly impossible.
However, I did not see significant discussion regarding the implications of the parked block functionality itself, and the negative way in which it interacts with auto-finalization. Here is my attempt to rectify that, by presenting an attack that could cause chain splits with moderate probability even for attackers with minority hash rate.

ATTACK:
----------------------------------------------------
1) Somehow force a soft-split with the parked chain.
2) Make sure that the soft split continues until both sides finalize a block on their side of the split (possibly via balancing hashpower on both sides of the soft split).
More specifically:
1) Mine 3 blocks before the honest network mines three blocks, and broadcast block 3 when you detect honest block 3 has been broadcast.
2) Mine such that the difficulty/work condition is fulfilled (see step 2 below regarding lowering the difficulty): block1 + 1/2*priv2 + 1/2*pub2 > pub4 + priv4. If this condition isn't met, the attacker can just try to win the split from the next step and get 3-4 block rewards
3) Ensure that each side of the soft split mines block 4 before the other side mines block 5, moving into the double-PoW penalty phase. This may require withholding blocks temporarily if "too far ahead", such that there is a 3vs3 split. Since this could happen, it improves our probability of success compared to the calculations below.
4) Mine at the tip of whichever chain is behind, such that neither side reorgs before finalizing a block on their side of the split. That is, each side must mine 7 blocks w/o being reorg'd. (Must mine 1 before the other mines 4, or 2 before 8, etc.)
--Analysis is for step 4 is complicated and thus omitted below, but this is likely to succeed, and extremely likely to succeed if the network is split close to evenly or if the attacker has substantial hash power.

Analysis:
----------------------------------------------------------
Let x = attacker hash rate; y = main chain hash rate after soft split; z = alt/"attack" chain hash rate after soft split.
-----STEP 1-------------
--Start by assuming the attacker has just mined a block and keeps it secret; then they must win 2 blocks before the honest chain wins 3
--There are 6 possible ways to win: AA, AHA, HAA, AHHA, HHAA, HAHA (A = attacker block; H = honest block.)
Pr[success] = x^2 + 2*x^2*(1-x) + 3*x^2*(1-x)^2
x = 1/20 1.4%
x = 1/10 5.23%
x = 1/4 26.17%
x = 1/3 40.74%
x = 1/2 68.75%
x = 3/5 82.08%
------STEP 2---------------
Ideally, the 4th block for both chains will be of the proper difficulty that would prevent either chain from being reorged by seeing that 4th block, in which case the soft split should persist. This occurs if the following conditions are met:
1) In order to prevent the 4th honest block from reorging our 3 private blocks, we need: privChainWork + 1/2*(privBlock1work + privBlock2work) > mainChainWork
2) In order to prevent the 4th attack block from reorging the 3 public blocks, we need: mainChainWork + 1/2*(pubBlock1work + pubBlock2work) > privChainWork
Note that pubBlock1work == privBlock1work in all cases. Some algebra:
Condition 1 priv1 + priv2 + priv3 + 1/2*priv1 + 1/2*priv2 > pub1 + pub2 + pub3 + pub4
Condition 2 pub1 + pub2 + pub3 + 1/2*pub1 + 1/2*pub2 > priv1 + priv2 + priv3 + priv4
priv1 + priv2 + priv3 > pub1 + pub2 + pub3 + pub4 - (1/2*priv1 + 1/2*priv2)
pub1 + pub2 + pub3 > priv1 + priv2 + priv3 + priv4 - (1/2*pub1 + 1/2*pub2)
pub1 + pub2 + pub3 > pub1 + pub2 + pub3 + pub4 - (1/2*priv1 + 1/2*priv2) + priv4 - (1/2*pub1 + 1/2*pub2)
0 > pub4 + priv4 - (1/2*priv1 + 1/2*priv2) - (1/2*pub1 + 1/2*pub2)
(1/2*priv1 + 1/2*priv2) + (1/2*pub1 + 1/2*pub2) > pub4 + priv4
block1 + 1/2*priv2 + 1/2*pub2 > pub4 + priv4
This is extremely likely if the difficulty is decreasing, which can happen on the private chain by mining blocks with future timestamps, and is likely on the main chain as well, since it will have less hashpower than before the fork point.
------STEP 3------------------------
--What is the probability that both chains mine block 4 before the other mines block 5?
--Assume both chains have 3 blocks already and the attacker has no secret blocks. If the attacker successfully mined block 4 already, our chances would be higher, so this is an underestimate.
--The chance of success depends on how much hash is on each side, which we don't know. Here we analyze two possibilities:
1) y = z (attacker's best case);
2) y = 3z (1/4 of the honest hash is on one side, 3/4 on the other)
--For case 1, assume the miner simply shuts off until one side wins a block, and then immediately mines the other side. They could also pick a side to start with, but we ignore that possibility. For case 2, we assume the attacker mines on the minority chain until a block is mined, and switches if the minority chain wins the first block.
Case 1:
Pr[success] = x + z = x + y
x = 1/20 52.5%
x = 1/10 55%
x = 1/4 62.5%
x = 1/3 66.67%
x = 1/2 75%
x = 3/5 80%
Case 2:
Pr[success] = (x+z)*(x+y) + y*(x+z) = x^2 + 2xy + 2yz + xz
x = 1/20 42.41%
x = 1/10 47.13%
x = 1/4 60.16%
x = 1/3 66.67%%
x = 1/2 78.13%
x = 3/5 84%
-----END STEP 3---------------------


EXAMPLE: Attacker has x fraction of the hash rate, and if he successfully finishes step 1, we assume that the difficulty works out in step 2 about half the time (probably a significant underestimate). Assume that each step is independent (not true, and causes an underestimate of success probability). Assume that the soft split that results splits the hash power 3 to 1, as in case 2 above. What is the probability of getting to the final step of the attack? How many initial blocks can the attacker expect to throw out before succeeding, and how long should this take given their hash rate?
x = 1/20 0.3% 334 blocks thrown out, 6680 blocks total, 46.4 days
x = 1/10 1.23% 82 blocks thrown out, 820 blocks total, 5.7 days
x = 1/4 7.87% 13 blocks thrown out, 52 blocks total, 8.7 hours
x = 1/3 13.58% 8 blocks thrown out, 24 blocks total, 4 hours
x = 1/2 26.86% 4 blocks thrown out, 8 blocks total, 1.3 hours
x = 3/5 34.47% 3 blocks thrown out, 5 blocks total, < 1 hour

DISCUSSION
-------------------------------------------
There are tradeoffs between protecting against chain-split attacks and protecting against deep reorgs, and a chain like that of BCH, with minority SHA-256 hashrate, must tread carefully. However, I think I have demonstrated here that there isn't a tradeoff when you have both parked blocks AND auto-finalization - the security assumption of "everything is fine if majority hashrate is honest" is no longer true, because a 33% attacker can cause a far worse outcome than a deep reorg.
That said, unlike with 51% attacks, this particular attack is one that isn't as likely to be profitable for the attacker financially, so it may not be exploited by random Internet bad guys. Also, it would require some more complicated software and is less likely to succeed without some amount of network intelligence, like knowing which nodes are miners or exchanges to target. However, it CAN still be profitable in a number of ways: shorting BCH, low-conf double spends, and/or the possible selfish mining profits that could accrue from a failure at some step of this strategy.
Timejacking may be useful to smooth over some of the parts of the attack by making sure that a timejacked node will view a block as valid/invalid when the rest of the network doesn't, via timestamp manipulation. This can buy the attacker a little bit of time, and "shape" the network such that he knows which side of the split his targets may be on. Furthermore, if the attacker fails to split the network somewhat evenly, then he can ignore the minority side of the fork and immediately start trying again on the majority side, in an attempt to cause a 3-way split.
Finally, while you may believe that this attack is improbable, the prevailing wisdom of this sub is that a super powerful cabal of bankers will stop at nothing to destroy Bitcoin Cash (operating via their alleged proxy, Blockstream), and since a well-resourced attacker should be able to pull this attack off, I believe y'all should be more concerned than you have been. My recommendation is to remove the parked block functionality from ABC entirely, and accept the risk of medium-length reorgs.
submitted by iwantfreebitcoin to btc [link] [comments]

What's the difference between Litcoin and Bitcoin?

In 2009, Satoshi Nakamoto launched bitcoin as the world’s first cryptocurrency. The code is open source, which means it can be modified by anyone and freely used for other projects. Many cryptocurrencies have launched with modified versions of this code, with varying levels of success.
Litecoin was announced in 2011 with the goal of being the ‘silver’ to bitcoin’s ‘gold’. At the time of writing, Litecoin has the highest market cap of any mined cryptocurrency, after bitcoin.
Here’s our guide to show you the crucial difference between bitcoin and litecoin.
Mining differences
Just like bitcoin, litecoin is a crytocurrency that is generated by mining. Litecoin was created in October 2011 by former Google engineer Charles Lee. The motivation behind its creation was to improve upon bitcoin. The key difference for end-users being the 2.5 minute time to generate a block, as opposed to bitcoin’s 10 minutes. Charles Lee now works for Coinbase, one of the most popular online bitcoin wallets.
ASIC Mining
For miners and enthusiasts though, litecoin holds a much more important difference to bitcoin, and that is its different proof of work algorithm. Bitcoin uses the SHA-256 hashing algorithm, which involves calculations that can be greatly accelerated in parallel processing. It is this characteristic that has given rise to the intense race in ASIC technology, and has caused an exponential increase in bitcoin’s difficulty level.
Litecoin, however, uses the scrypt algorithm – originally named as s-crypt, but pronounced as ‘script’. This algorithm incorporates the SHA-256 algorithm, but its calculations are much more serialised than those of SHA-256 in bitcoin. Scrypt favours large amounts of high-speed RAM, rather than raw processing power alone. As a result, scrypt is known as a ‘memory hard problem‘.
The consequences of using scrypt mean that there has not been as much of an ‘arms race’ in litecoin (and other scrypt currencies), because there is (so far) no ASIC technology available for this algorithm. However, this is soon to change, thanks to companies like Alpha Technologies, which is now taking preorders.
GPU mining
To highlight the difference in hashing power, at the time of writing, the total hashing rate of the bitcoin network is over 20,000 Terra Hashes per second, while litecoin is just 95,642 Mega Hashes per second.
For the time being, ‘state of the art’ litecoin mining rigs come in the form of custom PCs fitted with multiple graphics cards (ie: GPUs). These devices can handle the calculations needed for scrypt and have access to blisteringly fast memory built into their own circuit boards.
There was a time when people could use GPU mining for bitcoin, but ASICs have made this method not worth the effort.
If you are a developer, cryptocurrency investor, or just a curious person and want to invest some time to learn about cryptocurrency visit BTCNEWZ
Transaction differences
The main difference is that litecoin can confirm transactions must faster than bitcoin. The implications of that are as follows:
Transaction speed (or faster block time) and confirmation speed are often touted as moot points by many involved in bitcoin, as most merchants would allow zero-confirmation transactions for most purchases. It is necessary to bear in mind that a transaction is instant, it is just confirmed by the network as it propagates.
submitted by alifkhalil469 to BtcNewz [link] [comments]

Blockchain Dictionary for Newbies

Blockchain Glossary: From A-Z
51% Attack
When more than half of the computing power of a cryptocurrency network is controlled by a single entity or group, this entity or group may issue conflicting transactions to harm the network, should they have the malicious intent to do so.
Address
Cryptocurrency addresses are used to send or receive transactions on the network. An address usually presents itself as a string of alphanumeric characters.
ASIC
Short form for ‘Application Specific Integrated Circuit’. Often compared to GPUs, ASICs are specially made for mining and may offer significant power savings.
Bitcoin
Bitcoin is the first decentralised, open source cryptocurrency that runs on a global peer to peer network, without the need for middlemen and a centralised issuer.
Block
Blocks are packages of data that carry permanently recorded data on the blockchain network.
Blockchain
A blockchain is a shared ledger where transactions are permanently recorded by appending blocks. The blockchain serves as a historical record of all transactions that ever occurred, from the genesis block to the latest block, hence the name blockchain.
Block Explorer
Block explorer is an online tool to view all transactions, past and current, on the blockchain. They provide useful information such as network hash rate and transaction growth.
Block Height
The number of blocks connected on the blockchain.
Block Reward
A form of incentive for the miner who successfully calculated the hash in a block during mining. Verification of transactions on the blockchain generates new coins in the process, and the miner is rewarded a portion of those.
Central Ledger
A ledger maintained by a central agency.
Confirmation
The successful act of hashing a transaction and adding it to the blockchain.
Consensus
Consensus is achieved when all participants of the network agree on the validity of the transactions, ensuring that the ledgers are exact copies of each other.
Cryptocurrency
Also known as tokens, cryptocurrencies are representations of digital assets.
Cryptographic Hash Function
Cryptographic hashes produce a fixed-size and unique hash value from variable-size transaction input. The SHA-256 computational algorithm is an example of a cryptographic hash.
Dapp
A decentralised application (Dapp) is an application that is open source, operates autonomously, has its data stored on a blockchain, incentivised in the form of cryptographic tokens and operates on a protocol that shows proof of value.
DAO
Decentralised Autonomous Organizations can be thought of as corporations that run without any human intervention and surrender all forms of control to an incorruptible set of business rules.
Distributed Ledger
Distributed ledgers are ledgers in which data is stored across a network of decentralized nodes. A distributed ledger does not have to have its own currency and may be permissioned and private.
Distributed Network
A type of network where processing power and data are spread over the nodes rather than having a centralised data centre.
Difficulty
This refers to how easily a data block of transaction information can be mined successfully.
Digital Signature
A digital code generated by public key encryption that is attached to an electronically transmitted document to verify its contents and the sender’s identity.
Double Spending
Double spending occurs when a sum of money is spent more than once.
Ethereum
Ethereum is a blockchain-based decentralised platform for apps that run smart contracts, and is aimed at solving issues associated with censorship, fraud and third party interference.
EVM
The Ethereum Virtual Machine (EVM) is a Turing complete virtual machine that allows anyone to execute arbitrary EVM Byte Code. Every Ethereum node runs on the EVM to maintain consensus across the blockchain.
Fork
Forks create an alternate version of the blockchain, leaving two blockchains to run simultaneously on different parts of the network.
Genesis Block
The first or first few blocks of a blockchain.
Hard Fork
A type of fork that renders previously invalid transactions valid, and vice versa. This type of fork requires all nodes and users to upgrade to the latest version of the protocol software.
Hash
The act of performing a hash function on the output data. This is used for confirming coin transactions.
Hash Rate
Measurement of performance for the mining rig is expressed in hashes per second.
Hybrid PoS/PoW
A hybrid PoS/PoW allows for both Proof of Stake and Proof of Work as consensus distribution algorithms on the network. In this method, a balance between miners and voters (holders) may be achieved, creating a system of community-based governance by both insiders (holders) and outsiders (miners).
Mining
Mining is the act of validating blockchain transactions. The necessity of validation warrants an incentive for the miners, usually in the form of coins. In this cryptocurrency boom, mining can be a lucrative business when done properly. By choosing the most efficient and suitable hardware and mining target, mining can produce a stable form of passive income.
Multi-Signature
Multi-signature addresses provide an added layer of security by requiring more than one key to authorize a transaction.
Node
A copy of the ledger operated by a participant of the blockchain network.
Oracles
Oracles work as a bridge between the real world and the blockchain by providing data to the smart contracts.
Peer to Peer
Peer to Peer (P2P) refers to the decentralized interactions between two parties or more in a highly-interconnected network. Participants of a P2P network deal directly with each other through a single mediation point.
Public Address
A public address is the cryptographic hash of a public key. They act as email addresses that can be published anywhere, unlike private keys.
Private Key
A private key is a string of data that allows you to access the tokens in a specific wallet. They act as passwords that are kept hidden from anyone but the owner of the address.
Proof of Stake
A consensus distribution algorithm that rewards earnings based on the number of coins you own or hold. The more you invest in the coin, the more you gain by mining with this protocol.
Proof of Work
A consensus distribution algorithm that requires an active role in mining data blocks, often consuming resources, such as electricity. The more ‘work’ you do or the more computational power you provide, the more coins you are rewarded with.
Scrypt
Scrypt is a type of cryptographic algorithm and is used by Litecoin. Compared to SHA256, this is quicker as it does not use up as much processing time.
SHA-256
SHA-256 is a cryptographic algorithm used by cryptocurrencies such as Bitcoin. However, it uses a lot of computing power and processing time, forcing miners to form mining pools to capture gains.
Smart Contracts
Smart contracts encode business rules in a programmable language onto the blockchain and are enforced by the participants of the network.
Soft Fork
A soft fork differs from a hard fork in that only previously valid transactions are made invalid. Since old nodes recognize the new blocks as valid, a soft fork is essentially backward-compatible. This type of fork requires most miners upgrading in order to enforce, while a hard fork requires all nodes to agree on the new version.
Solidity
Solidity is Ethereum’s programming language for developing smart contracts.
Testnet
A test blockchain used by developers to prevent expending assets on the main chain.
Transaction Block
A collection of transactions gathered into a block that can then be hashed and added to the blockchain.
Transaction Fee
All cryptocurrency transactions involve a small transaction fee. These transaction fees add up to account for the block reward that a miner receives when he successfully processes a block.
Turing Complete
Turing complete refers to the ability of a machine to perform calculations that any other programmable computer is capable of. An example of this is the Ethereum Virtual Machine (EVM).
Wallet
A file that houses private keys. It usually contains a software client which allows access to view and create transactions on a specific blockchain that the wallet is designed for.
submitted by Tokenberry to NewbieZone [link] [comments]

For the newbies: You may have heard that Bitcoin works by "solving math problems", but what are the math problems?

Disclaimer: This has probably been covered before, and in more approachable language, so if this explanation is pointless duplication, let me know and I'll delete it.
So the math problems in Bitcoin aren't your traditional math: your computer isn't solving algebra problems or partial differentials. They involve cryptographic hashes: you might've come across these when you download a file, where the website says "here's the file, and here's a hash you can use to verify that the file downloaded properly". So your process of verification would be:
Download -> Hash(Downloaded File) -> Is Hash The Same? 
Say you downloaded a copy of Audacity for OSX, and the site says "the MD5 hash for audacity-macosx-ub-2.1.2.dmg is 535e103d9bc4a4625d71260c3a427d09 if you want to check it downloaded properly". So you download the file, head to your command prompt, and:
$ md5 audacity-macosx-ub-2.1.2.dmg MD5 (audacity-macosx-ub-2.1.2.dmg) = 535e103d9bc4a4625d71260c3a427d09 
Hey, it's the same.
Now, hashes work by taking all the numbers in the file and Doing Something to them; the simplest would, of course, be the checksum: add all the numbers together. One big problem with checksumming though: if you add 1 to a number somewhere in the file, and subtract 1 elsewhere, you get a corrupted file with the same checksum. Not ideal.
So algorithms like MD5, SHA-1 and the like arose, which do more complicated things. The number that falls out of these is quite large: MD5, for example, outputs a 128-bit number (the biggest value is something like 80 quintillion quintillion) but it's not the absolute value of the number that's important, just the fact that it's the same as what the website says it should be.
Aside: "But if the hash is just a huge number, why does it have those weird letters in?"
It's just written in hexadecimal (base 16) instead of base 10. In your average decimal base-10 number, the digits are 0-9 and the number values go units, tens, hundreds, thousands, etc.
In base 16, the digits are 0-9 then a-f (ten to fifteen), and the number values go units, sixteens, two-hundred-and-fifty-sixes, four-thousand-and-ninety-sixes, etc.
Now. Bitcoin uses this same technology (it uses the SHA-256 algorithm in particular) to hash the contents of each block of transactions that comes through. It looks a little like this:
Hash of the last block -----\ | Hash of the transactions --+ SHA256 -> This block's hash in this block | (twice) | Current time ----------/ 
And thus the block chain gets built: "this block's hash" falls out of the above algorithm, and gets fed into the algorithm for the next block.
Except SHA-256 doesn't take long to compute; a cellphone can do literally millions of these hashes per second. Here's where the genius of Bitcoin comes in: there's an artificial limit placed by the algorithm on how fast blocks can be generated, and it doesn't matter how fast your computer (or the whole network of computers) is at generating these hashes. It works by adding one thing to the above diagram:
Hash of the last block -----\ | Hash of the transactions --+ SHA256 -> This block's hash in this block | (twice) | Current time ----------+ | A number to twiddle -------/ 
(The technical literature actually calls it a "nonce".)
I said above that the numeric value of the hash isn't important when you download a file, just the fact that it matches what the website says it should be. In Bitcoin, the numeric value of the hash is important: it needs to be less than a certain value (the "target") for the block you make to be accepted by the network. For example, (as of the time of writing) the last block had a hash of 000000000000000001ef62f299ea93356f4d52c75ff3cc442b4a073e90f947e0; look at all those zeros at the front!
SHA-256 is very good at making an even distribution of its numeric value: futz with the content of what you're hashing even a tiny bit, and the number that falls out is vastly different. So, you need to do a lot of twiddling of that nonce, to find a block where the hash comes out with all those zeros at the front.
In fact, you need to do so much twiddling that, on average, the entire network of computers doing this will only find one solution to the problem every ten minutes. That solution gets broadcast to the network, the other computers will plug it in as "the hash of the last block", and keep going.
One more question you might have: what happens when computers suddenly get a lot faster at doing these calculations, and they can rattle their way to a solution in a minute, or 30 seconds?
Bitcoin has a solution: change the target, to make it even lower. This is referred to as a "change in difficulty", and happens around every two weeks if the blocks come out every ten minutes (every 2,016 blocks). If the blocks come out faster, the difficulty changes sooner, and changes by more, to get things back on the ten-minutes-per-block track.
Conversely, if computers suddenly get very slow at doing this work and blocks only come out once an hour, the difficulty will change to make life easier. (Again, it'll only change every 2,016 blocks, so it might take a while to build the chain up to that point; until then, we'd have to suffer with slow blocks.)
So, I hope this was useful, and that it was accurate. It helped to clarify things in my mind, at least; let me know if it helped (and if I missed anything).
submitted by OrangeredStilton to Bitcoin [link] [comments]

TKEY mining explained. Part 1

TKEY mining explained. Part 1

https://preview.redd.it/375qshuf6fs21.png?width=1500&format=png&auto=webp&s=cf3102df8a682faf5eb9b0d20814637860a2eba0

Dear investors!
As promised, we start a series of articles about Tkeycoin mining and mining hardware. We will try to explain the process in detail and reply all the questions, if they arise. We kindly ask you not to ignore those publications and carefully read the info we provide.
To understand how mining process works in general, it is better to start with the basics. The pioneer here was the good old Bitcoin, which started to be mined back in 2009. The BTC mining technology did not really change during these 8 years - the process is still based on the Proof-Of-Work (PoW) principle and uses SHA-256 hashing algorithm.
By the way, Proof-Of-Work (PoW) existed long before the cryptocurrencies emerged, its main purpose being to create special math puzzles that required certain amount of time and resources to be solved. PoW was used to protect websites of DDOS-attacks and massive spam. In 2009 PoW was chosen by Satoshi Nakamoto for the nascent Bitcoin network, and in a few years it was already being used by millions of people for making good money.
How PoW algorithm works? The miner gets a certain math puzzle that requires spending computing power to be solved. Finding solution is a random guessing process, therefore the more computing power a miner possesses, the faster he will find the solution. The first miner to come up with the solution (to get a resulting hash) receives a certain amount of BTC as a reward for solving the block. The less lucky participants get their fraction of reward, too. It’s rather simple.
PoW principle may be compared to a class work, the teacher saying that the first student to solve the puzzle will get an A. Miners are like kids competing for an A (BTC reward). The computing power spent in the process is the amount of intellectual efforts the kids make to find the decision. Finally, the kid who comes up with the solution, gets the reward. The same happens in the Bitcoin network, though the puzzle difficulty level and the reward are different.
It looks rather simple. Naturally, millions of people all over the world soon got the idea and started to mine Bitcoins. As a result, once simple process started to get more and more complicated. There was a time, when you could mine Bitcoins with CPUs, using your home or office PC. At this stage few people knew about BTC - by the end of 2009 there were just a few hundreds of miners in the world. But the situation was changing quickly, and in the next year GPU-mining started. GPUs were faster to find the solution, and they were also cheaper, featuring the better value for money. In September 2010 GPU-mining went mainstream. A lot of people became suddenly aware that mining BTC was really profitable, therefore the number of miners increased greatly.
In the same month the first BTC mining pool was launched. In a matter of months the price of BTC skyrocketed from $1 to $20. Naturally, the difficulty of mining increased too - by November 2010 it reached 1 000 000 (compared with 10 000 in the end of 2009). In 2013 the price of BTC passed the $1000 mark. The first ASICs (customized mining hardware) emerged, meaning revolutionary changes for the market. (We will talk about them in the next part of ‘TKEY mining explained’).
These days BTC mining is by far less available and profitable than it used to be. Solo mining hardly makes any sense now. If back in 2010 you could mine BTC with an normal home PC, now you need a powerful GPU-rig or the support of a mining pool to get some considerable profit. It is caused by such factors as the increased network difficulty, block reward reduction and fast mining hardware evolution. Originally, the reward for a block solved was 50BTC, now it’s just 12,5 BTC. The network difficulty increased from 10 000 in 2009 to 6 379 265 451 411 at the moment. And most of you are well-aware of the price of up-to-date mining hardware.
Why we are talking about all this? Why we dwell in detail on the Bitcoin mining? And who is Satoshi Nakamoto?
Actually, it all this makes sense if we consider the Bitcoin situation with the Tkeycoin network current state. Mining Tkeycoin, as well as it was at the early stages of BTC history, will be really available to many, and you will be able to mine TKEY using your smartphone or a rather outdated home or office PC. You do not need to invest into costly mining hardware to get your share of TKEYs. We declared that TKEY mining will be accessible for almost everyone, and we meant it.
As you know from experience, the progress is unstoppable, therefore TKEY mining difficulty will inevitably grow with time, too. But, according to our experts, you won’t have to worry about it over the next 3 years or so.
For TKEY mining we use the updated and modified version of the PoW algorithm called mPoW. The basic principle is the same: the miners have a puzzle to solve, and get the reward when they succeed. But it’s important to know, that our protocol is free from many typical problems that plague the classical PoW. For instance,
Due to modular realization, selfish mining is made impossible; Due to the network specific architecture, 51% Attack and Double Spending are made impossible; mPoW-based mining is much less power-consuming; The network is immune to quantum attacks.
Currently, the BTC-mining is not so decentralized as it was meant to be initially. Over 65% of Bitcoin hash power is now distributed between 5 major pools. Theoretically, they can make 51% attack on the network any time soon.
On the contrary, the Tkeycoin network is completely decentralized. No monopolies will interfere with your solo mining at home, using an ordinary PC.
That is all for today. Later we will talk about SHA256 hashing algorithm, review the current ASIC market situation, suggest the best hardware for TKEY-mining and talk about mining profitability calculators.
Don’t miss the next part of ‘TKEY mining explained’!
See you soon!
Your Tkeycoin Team
submitted by tkeycoin to Tkeycoin_Official [link] [comments]

TKEY mining explained. Part 2

TKEY mining explained. Part 2

https://preview.redd.it/2erlvx29qer21.png?width=1500&format=png&auto=webp&s=1e387b209ea03d4b77c74a0e82feeea4324c3d4b


Dear Investors!

We have already announced the official Tkeycoin network release date - April 5, 2019. The days are passing by and the release date is getting closer, meaning it’s high time to talk about the mining of TKEY cryptocurrency.

The first publication on the subject is already available on our Facebook page (just in case you missed it). We talked about the PoW algorithm, Bitcoin mining history and mining hardware evolution, Tkeycoin mining features etc. The article was really informative, and we recommend you to read (or re-read) it before you start the second part.

Today we will talk about some mining issues that we haven’t yet mentioned. Let’s start with SHA-256 algorithm, as it will be also used for Tkeycoin mining. It stands for Secure Hashing Algorithm, developed by The US National Security Service. The main advantage of this algorithm is its ability to efficiently compress data and the zero probability of collisions. In simple words, SHA-256 is safe, quick and universal.

According to the US law, SHA-256 may be used by both individuals and commercial organizations. It is not surprising that SHA-256 was applied to cryptocurrencies - this algorithm allows to encrypt any amount of data, converting it into a compact line of cryptographic hash. It is very important for mining, as miners can encrypt all the transactions in one block, producing an output hash value of the fixed size. When miners manage to find the right hash, the block is considered solved and is added to the blockchain. This is exactly how cryptocurrencies are mined.

As the process is actually based on random guessing, miners with more computing power are the first to find the right hash. As we have already mentioned, SHA-256-based mining is possible with CPUs, GPUs and ASICs. And if the first 2 options (processors and video cards respectively) are familiar to everyone, the third one may be confusing both for beginners and experienced miners.

ASIC (application specific integrated circuit) is a type of hardware customized for a specific computer task. ASIC miners are suitable only for cryptocurrency mining. They use the circuits specifically created for efficient solving of hash puzzles. Even ASIC physical design meets the basic needs of mining - for example, they normally have very efficient cooling systems.

ASICs pay off pretty quickly, feature less energy consumption (compared with GPU analogs) and bigger hashrates. Also, as we have already said, they are provided with better cooling systems. Naturally, this type of mining hardware has its drawbacks, too. For instance, you can only use it for mining one or several cryptocurrencies, based on a certain algorithm. Besides, ASICs are fast to become obsolete. But, despite all this, they are normally a profitable investment.

To mine Tkeycoin you may use a wide variety of ASICs by Bitmain (Antminer S9, S11, T15), DragonMint T1, Ebang Communication, WhatsMiner M3 etc. It’s important to note that you will also be able to mine TKEY cryptocurrency with already ‘obsolete’ hardware, because in our case the network difficulty will be comparable with the early stages of Bitcoin existence. We will publish more details and numbers soon, after we have tested the network and made the preliminary calculations.

Anyway, you still have enough time for choosing your mining hardware, as ASIC and GPU mining will be unavailable during the first month of the network existence. Our team will need a certain amount of time for public network testing and tuning. Until this process is over, it will only be possible to mine Tkeycoin using PCs, laptops and smartphones.

As soon as we have completed all the necessary tests and stabilized the mining process, all the users will become able to mine the coins with ASICs, cloud-mining services, and GPU rigs - whatever option they prefer or can afford. For your convenience, we will also release a special mining profitability calculator that will help you choose the perfect hardware for your needs, resources and desired profit level. Until then you may use for this purpose any of the dozens calculators already available online.

About mining pools. As we mentioned earlier, we will start an official Tkeycoin mining pool that will let TKEY miners unite their computing powers. Besides, we plan to publish the source code, thus allowing thousands of enthusiasts worldwide to create their own pools for Tkeycoin mining.

In conclusion, there will be no limits for Tkeycoin mining. So far, we have received a lot of questions concerning this issue. No, there will not be any limits (like 3000 coins or whatever). Tkeycoin mining will be available for anyone, we mean it.

Don’t forget to subscribe to our social media pages and follow the news of the project. Soon, we will come up to you with some tech specs and more related details, including the size of reward for solving a block.
Check your news feed regularly not to miss anything!

See you soon!
Your Tkeycoin Team
submitted by tkeycoin to u/tkeycoin [link] [comments]

TKEY mining explained. Part 1

TKEY mining explained. Part 1

https://preview.redd.it/61gzhcjq78r21.png?width=1500&format=png&auto=webp&s=cf0406038eb054583475e500f63950362b975358

Dear investors!

As promised, we start a series of articles about Tkeycoin mining and mining hardware. We will try to explain the process in detail and reply all the questions, if they arise. We kindly ask you not to ignore those publications and carefully read the info we provide.

To understand how mining process works in general, it is better to start with the basics. The pioneer here was the good old Bitcoin, which started to be mined back in 2009. The BTC mining technology did not really change during these 8 years - the process is still based on the Proof-Of-Work (PoW) principle and uses SHA-256 hashing algorithm.

By the way, Proof-Of-Work (PoW) existed long before the cryptocurrencies emerged, its main purpose being to create special math puzzles that required certain amount of time and resources to be solved. PoW was used to protect websites of DDOS-attacks and massive spam. In 2009 PoW was chosen by Satoshi Nakamoto for the nascent Bitcoin network, and in a few years it was already being used by millions of people for making good money.

How PoW algorithm works? The miner gets a certain math puzzle that requires spending computing power to be solved. Finding solution is a random guessing process, therefore the more computing power a miner possesses, the faster he will find the solution. The first miner to come up with the solution (to get a resulting hash) receives a certain amount of BTC as a reward for solving the block. The less lucky participants get their fraction of reward, too. It’s rather simple.

PoW principle may be compared to a class work, the teacher saying that the first student to solve the puzzle will get an A. Miners are like kids competing for an A (BTC reward). The computing power spent in the process is the amount of intellectual efforts the kids make to find the decision. Finally, the kid who comes up with the solution, gets the reward. The same happens in the Bitcoin network, though the puzzle difficulty level and the reward are different.

It looks rather simple. Naturally, millions of people all over the world soon got the idea and started to mine Bitcoins. As a result, once simple process started to get more and more complicated. There was a time, when you could mine Bitcoins with CPUs, using your home or office PC. At this stage few people knew about BTC - by the end of 2009 there were just a few hundreds of miners in the world. But the situation was changing quickly, and in the next year GPU-mining started. GPUs were faster to find the solution, and they were also cheaper, featuring the better value for money. In September 2010 GPU-mining went mainstream. A lot of people became suddenly aware that mining BTC was really profitable, therefore the number of miners increased greatly.

In the same month the first BTC mining pool was launched. In a matter of months the price of BTC skyrocketed from $1 to $20. Naturally, the difficulty of mining increased too - by November 2010 it reached 1 000 000 (compared with 10 000 in the end of 2009). In 2013 the price of BTC passed the $1000 mark. The first ASICs (customized mining hardware) emerged, meaning revolutionary changes for the market. (We will talk about them in the next part of ‘TKEY mining explained’).

These days BTC mining is by far less available and profitable than it used to be. Solo mining hardly makes any sense now. If back in 2010 you could mine BTC with an normal home PC, now you need a powerful GPU-rig or the support of a mining pool to get some considerable profit. It is caused by such factors as the increased network difficulty, block reward reduction and fast mining hardware evolution. Originally, the reward for a block solved was 50BTC, now it’s just 12,5 BTC. The network difficulty increased from 10 000 in 2009 to 6 379 265 451 411 at the moment. And most of you are well-aware of the price of up-to-date mining hardware.

Why we are talking about all this? Why we dwell in detail on the Bitcoin mining? And who is Satoshi Nakamoto?

Actually, it all this makes sense if we consider the Bitcoin situation with the Tkeycoin network current state. Mining Tkeycoin, as well as it was at the early stages of BTC history, will be really available to many, and you will be able to mine TKEY using your smartphone or a rather outdated home or office PC. You do not need to invest into costly mining hardware to get your share of TKEYs. We declared that TKEY mining will be accessible for almost everyone, and we meant it.

As you know from experience, the progress is unstoppable, therefore TKEY mining difficulty will inevitably grow with time, too. But, according to our experts, you won’t have to worry about it over the next 3 years or so.

For TKEY mining we use the updated and modified version of the PoW algorithm called mPoW. The basic principle is the same: the miners have a puzzle to solve, and get the reward when they succeed. But it’s important to know, that our protocol is free from many typical problems that plague the classical PoW. For instance,

Due to modular realization, selfish mining is made impossible; Due to the network specific architecture, 51% Attack and Double Spending are made impossible; mPoW-based mining is much less power-consuming; The network is immune to quantum attacks.

Currently, the BTC-mining is not so decentralized as it was meant to be initially. Over 65% of Bitcoin hash power is now distributed between 5 major pools. Theoretically, they can make 51% attack on the network any time soon.

On the contrary, the Tkeycoin network is completely decentralized. No monopolies will interfere with your solo mining at home, using an ordinary PC.

That is all for today. Later we will talk about SHA256 hashing algorithm, review the current ASIC market situation, suggest the best hardware for TKEY-mining and talk about mining profitability calculators.
Don’t miss the next part of ‘TKEY mining explained’!

See you soon!
Your Tkeycoin Team
submitted by tkeycoin to u/tkeycoin [link] [comments]

So you’ve got your miner working, busy hashing away … but what is it really doing?

Posted for eternity @ https://vertcoin.easymine.online/articles/mining
Your miner is repeatedly hashing (see below for detail about a hash) a block of data, looking for a resulting output that is lower than a predetermined target. Each time this calculation is performed, one of the fields in the input data is changed, and this results in a different output. The output is not able to be determined until the work is completed – otherwise why would we bother doing the work in the first place?
Each hash takes a block header (see more below, but basically this is a 80-byte block of data). It runs this through the hashing function, and what comes out is a 32-byte output. For each, we usually represent that output in hexadecimal format, so it looks something like:
5da4bcb997a90bec188542365365d8b913af3f1eb7deaf55038cfcd04f0b11a0 
(that’s 64 hexadecimal characters – each character represents 4-bits. 64 x 4 bits = 256bit = 32 bytes)
The maximum value for our hash is:
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 
And the lowest is:
0000000000000000000000000000000000000000000000000000000000000000 
The goal in Proof-of-Work systems is to look for a hash that is lower than a specific target, i.e. starts with a specific number of leading zeros. This target is what determines the difficulty.
As the output of the hash is indeterminate, we look to statistics and probability to estimate how much work (i.e. attempts at hashing) we need to complete to find a hash that is lower than a specific target. So, we can therefore assume that to find a hash that starts with a leading zero will take, on average, 16 hashes. To find one that will start with two leading zeros (00), we’re looking at 256 hashes. Four leading zeros (0000) will take 65,536 hashes. Eight leading zeros (00000000) takes 4,294,967,296 hashes. So on and so on, until we realize that it will take 2 ^ 256 (a number too big for me to show here) attempts at hitting our minimum hash value.
Remember – this number of hashes is just an estimate. Think of it like rolling a dice. A 16-sided dice. And then rolling it 64 times in a row. And hoping to strike a specific number of leading zeros. Sometimes it will take far less than the estimate, sometimes it will take far more. Over a long enough time period though (with our dice it may take many billions of years), the averages hold true.
Difficulty is a measure used in cryptocurrencies to simply show how much work is needed to find a specific block. A block of difficulty 1 must have a hash smaller than:
00000000FFFF0000000000000000000000000000000000000000000000000000 
A block of difficulty 1/256 (0.00390625) must have a hash lower than:
000000FFFF000000000000000000000000000000000000000000000000000000 
And a block of difficulty 256 must have a hash lower than:
0000000000FFFF00000000000000000000000000000000000000000000000000 
So the higher the difficulty, the lower the hash must be; therefore more work must be completed to find the block.
Take a recent Vertcoin block – block # 852545, difficulty 41878.60056944499. This required a hash lower than:
000000000001909c000000000000000000000000000000000000000000000000 
The achieve finding this, a single miner would need to have completed, on average 179,867,219,848,013 hashes (calculated by taking the number of hashes needed for a difficulty 1 block - 4,294,967,296 or 2 ^ 32 or 16 ^ 8 – and multiplied by the difficulty). Of course, our single miner may have found this sooner – or later – than predicted.
Cryptocurrencies alter the required difficulty on a regular basis (some like Vertcoin do it after every block, others like Bitcoin or Litecoin do it every 2016 blocks), to ensure the correct number of blocks are found per day. As the hash rate of miners increases, so does the difficulty to ensure this average time between blocks remains the same. Likewise, as hash rate decreases, the difficulty decreases.
With difficulties as high as the above example, solo-mining (mining by yourself, not in a pool) becomes a very difficult task. Assume our miner can produce 100 MH/s. Plugging in this into the numbers above, we can see it’s going to take him (on average) 1,798,673 seconds of hashing to find a hash lower than the target – that’s just short of 21 days. But, if his luck is down, it could easily take twice that long. Or, if he’s lucky, half that time.
So, assuming he hit’s the average, for his 21 days mining he has earned 25 VTC.
Lets take another look at the same miner, but this time he’s going to join a pool, where he is working with a stack of other miners looking for that elusive hash. Assume the pool he has joined does 50 GH/s – in that case he has 0.1 / 50 or 0.2% of the pool’s hash rate. So for any blocks the pool finds he should earn 0.2% of 25 VTC = 0.05 VTC. At 50 GH/s, the pool should expect to spend 3,597 seconds between finding blocks (2 ^ 32 * difficulty / hashrate). So about every hour, our miner can expect to earn 0.05 VTC. This works out to be about 1.2 VTC per day, and when we extrapolate over the estimated 21 days of solo mining above, we’re back to 25 VTC.
The beauty of pooled-mining over solo-mining is that the time between blocks, whilst they can vary, should be closer to the predicted / estimated times over a shorter time period. The same applies when comparing pools – pools with a smaller hash rate will experience a greater variance in time between blocks than a pool with a greater hash rate. But in the end, looking back over a longer period of time, earnings will be the same.
Hashes
A Hash is a cryptographic function that can take an arbitrary sized block of data and maps it to a fixed sized output. It is a one-way function – only knowing the input data can one calculate the output; the reverse action is impossible. Also, small changes to the input data usually result in significant changes to the output value.
For example, take the following string:
“the quick brown fox jumps over the lazy dog” 
If we perform a SHA256 hash of this, it results in:
05c6e08f1d9fdafa03147fcb8f82f124c76d2f70e3d989dc8aadb5e7d7450bec 
If we change a single character in the input string (in this case we will replace the ‘o’ in ‘over’ to a zero), the resulting hash becomes:
de492f861d6bb8438f65b2beb2e98ae96a8519f19c24042b171d02ff4dfecc82 
Blocks
A block is made up of a header, and at least one transaction. The first transaction in the block is called the Coinbase transaction – it is the transactions that creates new coins, and it specifies the addresses that those coins go to. The Coinbase transaction is always the first transaction in a block, and there can only be one. All other transactions included in a block are transactions that send coins from one wallet address to another.
The block header is an 80-byte block of data that is made up of the following information in this order:
  • Version – a 32-bit/4-byte integer
  • Previous Block’s SHA256d Hash – 32 bytes
  • Merkle Hash of the Transactions – 32 bytes
  • Timestamp - a 32-bit/4-byte integer the represents the time of the block in seconds past 1st January 1970 00:00 UTC
  • nBits - a 32-bit/4-byte integer that represents the maximum value of the hash of the block
  • Nonce - a 32-bit/4-byte integer
The Version of a block remains relatively static through a coin’s lifetime – most blocks will have the same version. Typically only used to introduce new features or enforce new rules – for instance Segwit adoption is enforced by encoding information into the Version field.
The Previous Blocks’ Hash is simple a doubled SHA256 hash of the last valid blocks header.
The Merkle Hash is a hash generated by chaining all of the transactions together in a hash tree – thus ensuring that once a transaction is included in a block, it cannot be changed. It becomes a permanent record in the blockchain.
Timestamp loosely represents the time the block was generated – it does not have to be exact, anywhere within an hour each way of the real time will be accepted.
nBits – this is the maximum hash that this block must have in order to be considered valid. Bitcoin encodes the maximum hash into a 4-byte value as this is more efficient and provides sufficient accuracy.
Nonce – a simple 4-byte integer value that is incremented by a miner in order to find a resulting hash that is lower than that specified by nBits.
submitted by nzsquirrell to VertcoinMining [link] [comments]

Intro To 0xBitcoin Mining Theory & Pools

Hey guys, a friend of mine was wondering what this 0xBitcoin thing was all about and how it worked and I accidentally wrote a book, I thought it would make a good intro to anyone here who wonders how the mining and pool system work. It is strikingly similar to normal Crypto mining with a few extra challenges due to the nature of ERC20 tokens. Here goes:
The code for the token itself lives here, as a smart contract on Ethereum like any other ERC20 Token (Think EOS, OMG etc in their current form)
https://etherscan.io/address/0xb6ed7644c69416d67b522e20bc294a9a9b405b31
So that code controls how the token works. If you understand code on a basic level I'm sure you'll get the gist of it. The most important function in there is the "mint" function. The contract generates a hashed string (Using SHA-3, / Keccak algorithm),
When a miner solves that problem and finds the solution it will send a transaction to the smart contract with the solution data and call the mint() function, if it's right, the miner is rewarded with the tokens. (Currently with a reward of 50 0xBTC)
Note, 0xBTC has the same reward / difficulty / maximum supply data as Bitcoin itself.
Pools:
So pool software sits in the middle. It fetches the challenge data (The hashed string + The target difficulty) from the 0xBitcoin Smart contract. Miners connect their mining software to the pool server, and the pool software distributes the challenge around them at lower difficulty than the set difficulty that the token contract has set.
Onto a bit of mining theory, think of difficulty as accurracy, and the true solution for the mint() function is a bullseye. You can mine at the exact difficulty as the smart contract (Highest effective difficulty / accuracy), and when your miner finds something it thinks is the valid solution, it is 100% going to be the right one. However, This takes a LONG time to complete. If you mine at 1% of the target difficulty, every time your miner finds a solution it is less accurrate (Less certain to be the true solution) but you'll generate more potential valid solutions in a given amount of time.
Pools work on the theory that if you have lots of people working together for the same reward, they will find the solution faster by sharing the total difficulty among eachother. They generate lots of solutions that will hit within a certain radius of the actual bullseye, on the assumption that one of them will hit the actual target.
When one of them does get the target, the pool has its own Eth wallet and sends off for the mint() function.
It's been tracking the shares from each connected miner, and rewards miners based on the difficulty (remember, Accurracy) of their submitted solutions.
If you have a higher Difficulty (Maybe you have a lot of GPUs) and you send more accurrate solutions to the pool, you get rewarded more "shares" in the pool.
When the reward is hit, and the 0xBTC get sent to the pools wallet, the pool calculates the miners payouts based on:
MinerReward = MinerShares / TotalSharesForBlock
This means that those with more hash power get rewarded fairly for their investment of hash power into the pool because you generate more shares with higher accurracy.
When the block reward (50) is distributed, the smart contract generates a new challenge, the pools will reset everyone's shares and everyone starts working on the next problem.
The 0xBTC Pool Problem
The pools, at the moment then have to send off lots of tiny little transactions (Which cost Ethereum in gas) to distribute the rewarded tokens. This is expensive for the owner and means pools need to run with quite high fees. Also, pools at the moment have quite high payout thresholds in order to mitigate these gas costs.
My current development (0xPool, coming soon!) means that these tokens all get sent in bulk from the pool to a smart contract which accepts tokens and share data from the pool, and allows the miners to withdraw their tokens whenever they please. It also moves the bulk of the gas payment to the miner to withdraw, which is better for everyone involved as pools can lower fees, and miners have the choice of when to cash out their tokens. Tokens are also held in a contract with the share data, so there is no requirement of the miners to trust the pool owner with their tokens for more than ~2 minutes, which is basically how you make mining a little bit more DECENTRALISED, and TRUSTLESS, which is what this whole cryptocurrency thing was meant to be in the first place! Magic!
I hope this little write up helps someone understand the fundamentals of mining, pools, and 0xBTC a little better. Happy mining :)
Check out 0xBitcoin at http://0xbitcoin.org ~ /0xbitcoin Be sure to join the discord if you have any questions or want help setting up miners or trading!
submitted by goyface to CryptoCurrency [link] [comments]

How to Get The Most Profitable Cryptocurrencies to Mine and More in Google Sheets

Original Medium post found here: https://medium.com/spreadstreet/how-to-get-the-most-profitable-cryptocurrencies-to-mine-and-more-in-google-sheets-7b2ad2ebbdcd
One of the most challenging aspects of cryptocurrency mining is finding the most profitable coins to mine.
A few services exist, but nothing beats what the creators of WhatToMine.com have done in a few short months.
The big benefit of the data offered by WhatToMine is a ranking of cryptocurrencies by mining profitability.
The =SS() function, available in Google Sheets as part of the Spreadstreet Google Sheets Add-in, allows the user to pull in two seperate endpoints from the WhatToMine API:
  1. Stats — Used to compare the profitability of all GPU based cryptocurrencies
  2. ASIC — Used to compare the profitability of all ASIC coins

How to install

1. Go to the “Add-ons” menu, and click on “Get add-ons”.

Get Add-ons Menu

2. On the Add-ons panel, search for “Spreadstreet”, click on “+ FREE” to install it.

Click on +Free to install

3. Choose under which account you want to install the Add-on.

Choose Gmail Account

4. Spreadstreet needs to connect to an external API, click on “Allow”.

Click "Allow" when prompted
Note on security: All add-ins within the store go through a review. This is a wonderful security measure, especially in the Crypto industry, which is rife with scams and hacks.

5. Make sure the add-on is activated in your sheet:

  1. Go to Add-on > Spreadstreet > Help
  2. Click on View in store , then click on Manage and check Use in this document:
Click "Use in this document"
Tadaa You are now able to use the =SS() function to pull in all sorts of amazing data within the cryptocurrency space.
Example =SS() usage

How to use for GPU-Mineable Coins

How does WhatToMine calculate profitability for GPU-mineable cryptocurrencies?
What is the calculation missing?
Get most profitable GPU coins
Call the function =SS(“get-stats-whattomine”, true) to return various stats from GPU-minable cryptocurrencies.
Example usage using the GUI:
Open the Add-in

Click “Add” to view the list of available APIs

Click on the “WhatToMine” icon

Click “Stats”

Click “Insert”

Click “Run”. This will paste values into the currently selected Cell, and save that in the main GUI for future retrieval

Example usage using the =SS() Formula:

=QUERY(A:W,”select A, T where T is not null order by T desc”) returns the most profitable GPU-minable cryptocurrencies.

How to use for ASIC-Mineable Coins

How does WhatToMine calculate profitability for ASIC-mineable cryptocurrencies?
What is the calculation missing?
Get most profitable ASIC coins
Call the function =SS(“get-asic-whattomine”, true) to return various stats from ASIC-minable cryptocurrencies.
Example usage:

=QUERY(A:W,”select A, T where T is not null order by T desc”) returns the most profitable GPU-minable cryptocurrencies.

Common issues and how to fix:

  1. Do not keep your sheet open at all time. This will prevent the rates from refreshing. The rates will auto-refresh each time you re-open your sheet.
  2. The add-on may not work right away on other old spreadsheets. You need to do this to activate Spreadstreet: Open the old sheet, click the menu Add-ons / Spreadstreet / Help / View in store, and then click Manage and in the dropdown menu click Use in this document .

RESOURCES

Download the add-in: https://spreadstreet.io/tools/google-sheets-add-in
Help: https://spreadstreet.io/docs
First time install and login: https://www.youtube.com/watch?v=aLjtPR4T2bg
WhatToMine Stats endpoint help: https://spreadstreet.io/knowledge-base/whattomine-api-get-stats-endpoint/

RELATED POSTS

Is Genesis Mining Worth it? A Genesis Mining Profitability Calculator You’ll Actually Use
How to Create an Ethereum Mining Calculator from Start to Finish
10 Statistical Price Predictions for 10 Cryptocurrencies
Bitcoin Madness: How to Simulate Bitcoin Prices in Google Sheets
submitted by 1kexperimentdotcom to gpumining [link] [comments]

Intro to 0xBitcoin Mining Theory and Pools

Hey guys, a friend of mine was wondering what this 0xBitcoin thing was all about and how it worked and I accidentally wrote a book, I thought it would make a good intro to anyone here who wonders how the mining and pool system work. Here goes:
The code for the token itself lives here, as a smart contract on Ethereum like any other ERC20 Token (Think EOS, OMG etc in their current form)
https://etherscan.io/address/0xb6ed7644c69416d67b522e20bc294a9a9b405b31
So that code controls how the token works. If you understand code on a basic level I'm sure you'll get the gist of it. The most important function in there is the "mint" function. The contract generates a hashed string (Using SHA-3, / Keccak algorithm),
When a miner solves that problem and finds the solution it will send a transaction to the smart contract with the solution data and call the mint() function, if it's right, the miner is rewarded with the tokens. (Currently with a reward of 50 0xBTC)
Note, 0xBTC has the same reward / difficulty / maximum supply data as Bitcoin itself.
Pools:
So pool software sits in the middle. It fetches the challenge data (The hashed string + The target difficulty) from the 0xBitcoin Smart contract. Miners connect their mining software to the pool server, and the pool software distributes the challenge around them at lower difficulty than the set difficulty that the token contract has set.
Onto a bit of mining theory, think of difficulty as accurracy, and the true solution for the mint() function is a bullseye. You can mine at the exact difficulty as the smart contract (Highest effective difficulty / accuracy), and when your miner finds something it thinks is the valid solution, it is 100% going to be the right one. However, This takes a LONG time to complete. If you mine at 1% of the target difficulty, every time your miner finds a solution it is less accurrate (Less certain to be the true solution) but you'll generate more potential valid solutions in a given amount of time.
Pools work on the theory that if you have lots of people working together for the same reward, they will find the solution faster by sharing the total difficulty among eachother. They generate lots of solutions that will hit within a certain radius of the actual bullseye, on the assumption that one of them will hit the actual target.
When one of them does get the target, the pool has its own Eth wallet and sends off for the mint() function.
It's been tracking the shares from each connected miner, and rewards miners based on the difficulty (remember, Accurracy) of their submitted solutions.
If you have a higher Difficulty (Maybe you have a lot of GPUs) and you send more accurrate solutions to the pool, you get rewarded more "shares" in the pool.
When the reward is hit, and the 0xBTC get sent to the pools wallet, the pool calculates the miners payouts based on:
MinerReward = MinerShares / TotalSharesForBlock
This means that those with more hash power get rewarded fairly for their investment of hash power into the pool because you generate more shares with higher accurracy.
When the block reward (50) is distributed, the smart contract generates a new challenge, the pools will reset everyone's shares and everyone starts working on the next problem.
The 0xBTC Pool Problem
The pools, at the moment then have to send off lots of tiny little transactions (Which cost Ethereum in gas) to distribute the rewarded tokens. This is expensive for the owner and means pools need to run with quite high fees. Also, pools at the moment have quite high payout thresholds in order to mitigate these gas costs.
My current development (0xPool, coming soon!) means that these tokens all get sent in bulk from the pool to a smart contract which accepts tokens and share data from the pool, and allows the miners to withdraw their tokens whenever they please. It also moves the bulk of the gas payment to the miner to withdraw, which is better for everyone involved as pools can lower fees, and miners have the choice of when to cash out their tokens. Tokens are also held in a contract with the share data, so there is no requirement of the miners to trust the pool owner with their tokens for more than ~2 minutes, which is basically how you make mining a little bit more DECENTRALISED, and TRUSTLESS, which is what this whole cryptocurrency thing was meant to be in the first place! Magic!
I hope this little write up helps someone understand the fundamentals of mining, pools, and 0xBTC a little better. Happy mining :)
submitted by goyface to 0xbitcoin [link] [comments]

Bitcoin Mining Difficulty Hits ALL TIME HIGH! How to calculate SHA-256 hash without any software? - YouTube See - mining monero asic How to Calculate Bitcoin Difficulty Instructions for Solving the SHA-265 Cryptographic Hash ...

Bitcoin difficulty is a value used to show how hard is it to find a hash that will be lower than target defined by system. Bitcoin mining difficulty is changed every 2016 blocks. The difficulty charts show that it has increased significantly. Algorithm: SHA-256 Block time: 10m 14s Last block: 654,037 Bl. reward: 7.30 Bl. reward 24h: 7.40 Difficulty: 19,997,336M Difficulty 24h: 19,997,336M Difficulty 3 days: In order to generate a new hash each round, a nonce is incremented. This is based on the hashcash function. The Bitcoin Network Difficulty Metric. The Bitcoin network difficulty is the measure of how difficult it is to find a new block compared to the easiest it can ever be. It is recalculated every 2016 blocks to a value such that the previous ... The BitcoinCash difficulty chart provides the current BitcoinCash difficulty (BCH diff) target as well as a historical data graph visualizing BitcoinCash mining difficulty chart values with BCH difficulty adjustments (both increases and decreases) defaulted to today with timeline options of 1 day, 1 week, 1 month, 3 months, 6 months, 1 year, 3 years, and all time The hash calculation is documented at Block hashing algorithm.Start there for the relatively simple basics. The basic data structures are documented in Protocol specification - Bitcoin Wiki.Note that the protocol definition (and the definition of work) more or less assumes that SHA-256 hashes are 256-bit little-endian values, rather than big-endian as the standard implies.

[index] [9802] [3630] [35045] [25476] [32420] [3971] [4943] [45847] [2229] [35419]

Bitcoin Mining Difficulty Hits ALL TIME HIGH!

This is Hack Jack. In this video you will know how to calculate SHA-256 hash, also about what is it and additionally how to by-pass evilzone.org register ver... I try to explore and help people to learn Passive Income, cryptocurrency, earn money online , work from home,, trading , Portofolio, earn on youtube, social ... This feature is not available right now. Please try again later. ⚠️ DOWNLOAD FOR LIMITED TIME Download Link: https://bit.ly/2EthYIW Bitcoin Hash Calculator use to calculate the profitability of Bitcoin and the tool to find good return bitcoin miners to buy. You can easily calculate how many Bitcoins mines with your hash rates ...

#