Mining Calculator Bitcoin, Ethereum, Litecoin, Dash and Monero

Ruby Quiz - Challenge #2 - Calculate the Bitcoin Genesis Block Hash (SHA-256)

Ruby Quiz - Challenge #2 - Calculate the Bitcoin Genesis Block Hash (SHA-256) submitted by geraldbauer to ruby [link] [comments]

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]

merle tree

Hi, I understand that there is a merkle root hash in every block of the blockchain.
I did not really understand what it is used for.
if miners are doing the validation by solving a puzzle, why do we need the merkle root?
submitted by jcoder42 to BitcoinBeginners [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]

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]

How many qubits would it take to break Bitcoins SHA 256 bit encryption?

INFORMATION I GATHERED
Where are we at? 512 qubit computer ... But these are low quality qubits mainly due to issues with sufficient isolation from our universe, getting clear readings, and speeding up the gates. Also Dwave computers are currently limited in a way that supposedly does not have the capability for encryption cracking
If the qubits worked optimally how much does it take to break existing encryption? 2048-bit RSA requires roughly 4096 qubits while a quantum computer to break the equivalently secure 224-bit Elliptic Curve Cryptography requires between 1300 and 1600 qubits Yes this is not bitcoins 256 bit, nor the same math, but its the closest information I could reasonably find.
The NSA is preparing to make a computer that can crack any currently used difficult encryption except types that are quantum protected like the new Lattice encryption. When the NSA is done it will be able to crack Bitcions SHA256 private keys using the public. Right now they are currently working with a 2 qubit computer to do testing before the production implementation
Remember those /bitcoin frontpage posts about how cracking bitcoin would require a computer the size of the universe? Check out this excerpt about a 300 qubit computer "The projected performance of this new experimental quantum simulator eclipses the current maximum capacity of any known computer by an astonishing 10 to the power of 80. That is 1 followed by 80 zeros, in other words 80 orders of magnitude, a truly mind-boggling scale," Dr Michael Biercuk, at the University of Sydney, said. "[It] has the potential to perform calculations that would require a supercomputer larger than the size of the known universe - and it does it all in a diameter of less than a millimetre.
Adding to alarm is that quantum computers double in their ability to calculate with every qubit. In general, a quantum computer with n qubits can be in an arbitrary superposition of up to 2n different states simultaneously To build more powerful quantum computers, though is currently restrained by the quality of the qubit. If you read the timeline of quantum computing advancements you will see progress is being made on this at a decent pace though. Once we have a clean method down, the multidimensional sky is the limit.
Yes the rest of the banking industry is also largely vulnerable if such a quantum computer was made, as they also use common public key encryption.
Another caveat is that bitcoin uses 2 encryption methods. SHA256 for mining. Elliptic Curve for relating the pubic keys and private keys.
QUESTIONS FOR BITCOIN
Ok so, that is what related information I could find.
Yes I realize there is plenty of material written about how bitcoin code can be updated, or other reasons quantum computers are not a concern, but the point here is that the community needs to know about when this risk will happen and be prepared. It could be sooner or further away than we expected and everyone's finances should not be caught off guard. This post is about when bitcoin should expect a risk, not gauging the risk (unless it is zero)
submitted by imkharn to Bitcoin [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]

Got this in my inbox a couple of minutes back

A new user sent me this to my inbox, its a description of the events after the fork, with a signed message at the bottom. I've gone through it once but its very late here in my timezone, have to go through it again tomorrow. I'm sure I'm not the the only receipient, but just in case pinging some people here.
https://honest.cash/kiarahpromise/sigop-counting-4528

*** EDIT 2 ***
Before you continue. From the Bitcoin whitepaper:
" The system is secure as long as honest nodes collectively control more CPU power than any cooperating group of attacker nodes."

*** EDIT ***
Ok, I have slept over this.
How big is the chance that these two events, the sigop tx spamming of the network and the intended theft of funds stuck in segwit by an unknown miner, were coordinated and not coincidential? I slept over this message and am wondering if that was one two-phased plan and even this message was planned (probably a bit different but it was adapted afterwards to the new situation, that's why the first half of it is such a mess to read) to spread fear after the two plans got foiled.

The plan consisted of various Acts
Act 1) Distract and spam the network with sigop transactions that exploit a bug to cause distraction and halt all BCH transaction volume. The mempool would become filled with unconfirmed transactions
Act 2) When a patch is deployed, start your mining pool and mine the hell out of it to quickly create a legitimate block. They prepared the theft transactions and would hide them in the (predicted) massive mempool of unconfirmed transactions that would have been accumulated. They would mine a big block, everyone would be so happy that BCH works again, and devs would be busy looking for sigop transactions.
Act 3) Hope that the chain gets locked in via checkpoint so the theft cannot be reverted
Act 4) Leak to the media that plenty of BCH were stolen after the fork and the ABC client is so faulty it caused a halt of the network after the upgrade
Act 5) Make a shitload of money by shorting BCH (there was news about a appearance of a big short position right after the fork)

But the people who planned this attack have underestimated the awareness and speed of the BCH dev team. They were probably sure that Act 1 would take hours or even days so the mempool would be extremely bloated (maybe they speculated that everyone paniced and wanted to get out of BCH) and Act 2 would consequently be successful because no one would spot their theft transactions quick enough.

But they didn't calculate that someone is working together with various BCH pools in precaution to prevent exactly this scenario (segwit theft) and even prepared transactions to move all locked coins back to their owners.

Prohashings orphaned block was likely unpredicted collateral damage as Jonathan suggests below, because they were not involved in the plan of the two pools who prepared to return the segwit coins. I'm guessing that the pools did not expect a miner with an attacking theft block that early and had to decide quickly what to do when they spotted it.

So now that both plans have been foiled, Plan B) is coming into place again. Guerrilla style fear mongering about how BCH is not decentralized. Spread this info secretly in the community with the proof in form of a signed message connected to the transactions. Of course, the attacker worked actually alone, attacked us for our own good, and will do so again, because the evil dictatorship devs have to be eradicated....

As an unwanted side effect of these events the BTC.top and BTC.com "partnership" has been exposed. So what do we do with this new revelation is a question that we probably have to discuss.

They worked together with someone who wanted to return the segwit coins and avoided a theft. They used their combined hashing dominance to avoid a theft. I applaud them for that. From a moral perspective this is defendable and my suspicion that we have more backing for BCH than you can see with your eye by following hash rate charts is now being revealed as true again.

But the dilemma BCH has is revealed again as well. we need more of the SHA-256 hash rate cake because we actually do not want that any entity in this space has more than 50% hash power.

*** EDIT 2 ***
Added Satoshi's quote from the whitepaper.
submitted by grmpfpff to btc [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]

It's been a while, so let's do things a bit differently. [Update & Draw #32]

If you're looking for the winner, please check to see if there's a stickied comment on this post.

Hello, I'm your newest mod, lilfruini, and I thought it's been a while since we did a drawing.
Will you be doing drawings as they've been done before? I'm not going to perform the drawing as before, but I have my reasons. First, I'm not able to use Amazon Web Services, which seems to be a prerequisite for using the drawing source code. Second, I am not a good coder at all, this subreddit was my first experience with using Python, which makes yet another obstacle.
To make up for my shortcomings, though, I want to share the files I used on Dropbox. You can see every comment ID indexed, the SHA-256 hash to confirm I haven't tampered with the list, and I included the Python file used to download the comments, with PRAW.
How will you select a MakingMillionaire this time? Well, instead of choosing a date and a time, instead, I'll be pre-selecting a block from the Bitcoin Cash blockchain. The block's hash will be used to determine the winner. I made an effort to have the hash come near the third of each Friday, and to make sure the blocks are a factor of 250, to ensure consistency. However, this means the time held for drawings will vary greatly.
Anyway, which block will we be using?

BLOCK #539750

When the block is mined, you will be able to see the returning hash here: https://blockchair.com/bitcoin-cash/block/539750
How will we know you aren't some deceiving scum? Well, like before, I will still use the SHA-256 of the IDs combined. I also made sure to check if the list of IDs were consistent by checking the SHA-256 of each group of text, to ensure information is constant. You can see this for yourself in the Dropbox folder.
In addition, I WILL NOT EDIT THIS POST! (excluding ninja edits) That means, to check the winner of the drawing, see the future stickied comment. This is to ensure I do not change the SHA-256 hash of any texts.
This means everything will run smoothly, right? Well, not exactly. I have the entirety of the comment IDs of the 32nd Thread, but I said before that I'm not a good coder by any means. I will have to figure out how to use hashlib or OpenSSL in order to hash the numbers and retrieve the winning index. If you're investigative, you may also notice that the folder, "Files used for Hash", is incomplete. This is intentional, but once I figure out how to calculate a winning index, I will upload the necessary files to the folder.
On the subject of that, if anyone knows how to replicate retrieving the winning index of past drawings through Python or any other means, please PM me.
Also, I cannot guarantee this by any means, but I may, MAY livestream the release of Block #539750 on my Twitch channel, https://www.twitch.tv/nandinmaste
This livestream, however, may be done through a phone, as I don't feel prepared to download screen-capturing software on my laptop.
Thank you for your patience! It's literally been a year since the last post was made, but now I feel prepared, despite some flaws. If you have any questions, or have the need to say something, please comment.
Also, I'd like to give special credit to TyrSniper from /AskProgrammers for guiding me with using Python. This post may have not been made in the first place without his coding help.
Information Used For Drawing #32:
Dropbox Folder: https://www.dropbox.com/sh/0zqohzjdjrifo4j/AABnXjsBaaK0v875Be8d5Wewa?dl=0 SHA-256 (from movable-type.co.uk and passwordsgenerator.net): 95af6c340986b59dd40a8b597859c980f1b8710f5155d7b8a035f212d6093ef6 Word Document with every ID indexed: https://www.dropbox.com/s/83bmpx7guxwk14w/Drawing%20Thread%20%2332%20-%20Every%20Comment%20Indexed.docx?dl=0 Text File of Every Comment ID (Python actions removed): https://www.dropbox.com/s/1a2105yjj00vke4/MillionaireMaker%20Fixed%20Output%20Text%20%28July%2018%20-%2012%2052%20AM%29.txt?dl=0 Text File of Every Comment ID (revised, with repeats removed): https://www.dropbox.com/s/867p1fybwourgmf/MillionaireMaker%20Revised%20Output%20Text%20%28July%2018%20-%2012%2052%20AM%29.txt?dl=0 Block 539750: https://blockchair.com/bitcoin-cash/block/539750 Total Participants: 35,704 
So, in a few days, we'll be making a millionaire. Get excited! or don't, I guess...
submitted by lilfruini to millionairemakers [link] [comments]

Is Crypto Currency truly at risk due to Quantum Computers, and what can you do about it?

Is Crypto Currency truly at risk due to Quantum Computers, and what can you do about it?

There is no denying that the Quantum revolution is coming. Security protocols for the internet, banking, telecommunications, etc... are all at risk, and your Bitcoins (and alt-cryptos) are next!
This article is not really about quantum computers[i], but, rather, how they will affect the future of cryptocurrency, and what steps a smart investor will take. Since this is a complicated subject, my intention is to provide just enough relevant information without being too “techy.”

The Quantum Evolution

In 1982, Nobel winning physicist, Richard Feynman, hypothesized how quantum computers[ii] would be used in modern life.
Just one year later, Apple released the “Apple Lisa”[iii] – a home computer with a 7.89MHz processor and a whopping 5MB hard drive, and, if you enjoy nostalgia, it used 5.25in floppy disks.
Today, we walk around with portable devices that are thousands of times more powerful, and, yet, our modern day computers still work in a simple manner, with simple math, and simple operators[iv]. They now just do it so fast and efficient that we forget what’s happening behind the scenes.
No doubt, the human race is accelerating at a remarkable speed, and we’ve become obsessed with quantifying everything - from the everyday details of life to the entire universe[v]. Not only do we know how to precisely measure elementary particles, we also know how to control their actions!
Yet, even with all this advancement, modern computers cannot “crack” cryptocurrencies without the use of a great deal more computing power, and since it’s more than the planet can currently supply, it could take millions, if not billions, of years.
However, what current computers can’t do, quantum computers can!
So, how can something that was conceptualized in the 1980’s, and, as of yet, has no practical application, compromise cryptocurrencies and take over Bitcoin?
To best answer this question, let’s begin by looking at a bitcoin address.

What exactly is a Bitcoin address?

Well, in layman terms, a Bitcoin address is used to send and receive Bitcoins, and looking a bit closer (excuse the pun), it has two parts:[vi]
A public key that is openly shared with the world to accept payments. A public key that is derived from the private key. The private key is made up of 256 bits of information in a (hopefully) random order. This 256 bit code is 64 characters long (in the range of 0-9/a-f) and further compressed into a 52 character code (using RIPEMD-160).
NOTE: Although many people talk about Bitcoin encryption, Bitcoin does not use Encryption. Instead, Bitcoin uses a hashing algorithm (for more info, please see endnote below[vii]).
Now, back to understanding the private key:
The Bitcoin address “1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm” translates to a private key of “5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf” which further translates to a 256 bit private key of “0000000000000000000000000000000000000000000000000000000000000001” (this should go without saying, but do not use this address/private key because it was compromised long ago.) Although there are a few more calculations that go behind the scenes, these are the most relevant details.
Now, to access a Bitcoin address, you first need the private key, and from this private key, the public key is derived. With current computers, it’s classically impractical to attempt to find a private key based on a public key. Simply put, you need the private key to know the public key.
However, it has already been theorized (and technically proven) that due to private key compression, multiple private keys can be used to access the same public key (aka address). This means that your Bitcoin address has multiple private keys associated with it, and, if someone accidentally discovers or “cracks” any one of those private keys, they have access to all the funds in that specific address.
There is even a pool of a few dedicated people hunting for these potential overlaps[viii], and they are, in fact, getting very efficient at it. The creator of the pool also has a website listing every possible Bitcoin private key/address in existence[ix], and, as of this writing, the pool averages 204 trillion keys per day!
But wait! Before you get scared and start panic selling, the probability of finding a Bitcoin address containing funds (or even being used) is highly unlikely – nevertheless, still possible!
However, the more Bitcoin users, the more likely a “collision” (finding overlapping private/public key pairs)! You see, the security of a Bitcoin address is simply based on large numbers! How large? Well, according to my math, 1.157920892373x1077 potential private keys exist (that number represents over 9,500 digits in length! For some perspective, this entire article contains just over 14,000 characters. Therefore, the total number of Bitcoin addresses is so great that the probability of finding an active address with funds is infinitesimal.

So, how do Quantum Computers present a threat?

At this point, you might be thinking, “How can a quantum computer defeat this overwhelming number of possibilities?” Well, to put it simple; Superposition and Entanglement[x].
Superposition allows a quantum bit (qbit) to be in multiple states at the same time. Entanglement allows an observer to know the measurement of a particle in any location in the universe. If you have ever heard Einstein’s quote, “Spooky Action at a Distance,” he was talking about Entanglement!
To give you an idea of how this works, imagine how efficient you would be if you could make your coffee, drive your car, and walk your dog all at the same time, while also knowing the temperature of your coffee before drinking, the current maintenance requirements for your car, and even what your dog is thinking! In a nutshell, quantum computers have the ability to process and analyze countless bits of information simultaneously – and so fast, and in such a different way, that no human mind can comprehend!
At this stage, it is estimated that the Bitcoin address hash algorithm will be defeated by quantum computers before 2028 (and quite possibly much sooner)! The NSA has even stated that the SHA256 hash algorithm (the same hash algorithm that Bitcoin uses) is no longer considered secure, and, as a result, the NSA has now moved to new hashing techniques, and that was in 2016! Prior to that, in 2014, the NSA also invested a large amount of money in a research program called “Penetrating Hard Targets project”[xi] which was used for further Quantum Computer study and how to break “strong encryption and hashing algorithms.” Does NSA know something they’re not saying or are they just preemptively preparing?
Nonetheless, before long, we will be in a post-quantum cryptography world where quantum computers can crack crypto addresses and take all the funds in any wallet.

What are Bitcoin core developers doing about this threat?

Well, as of now, absolutely nothing. Quantum computers are not considered a threat by Bitcoin developers nor by most of the crypto-community. I’m sure when the time comes, Bitcoin core developers will implement a new cryptographic algorithm that all future addresses/transactions will utilize. However, will this happen before post-quantum cryptography[xii]?
Moreover, even after new cryptographic implementation, what about all the old addresses? Well, if your address has been actively used on the network (sending funds), it will be in imminent danger of a quantum attack. Therefore, everyone who is holding funds in an old address will need to send their funds to a new address (using a quantum safe crypto-format). If you think network congestion is a problem now, just wait…
Additionally, there is the potential that the transition to a new hashing algorithm will require a hard fork (a soft fork may also suffice), and this could result in a serious problem because there should not be multiple copies of the same blockchain/ledger. If one fork gets attacked, the address on the other fork is also compromised. As a side-note, the blockchain Nebulas[xiii] will have the ability to modify the base blockchain software without any forks. This includes adding new and more secure hashing algorithms over time! Nebulas is due to be released in 2018.

Who would want to attack Bitcoin?

Bitcoin and cryptocurrency represent a threat to the controlling financial system of our modern economy. Entire countries have outright banned cryptocurrency[xiv] and even arrested people[xv], and while discrediting it, some countries are copying cryptocurrency to use (and control) in their economy[xvi]!
Furthermore, Visa[xvii], Mastercard[xviii], Discover[xix], and most banks act like they want nothing to do with cryptocurrency, all the while seeing the potential of blockchain technology and developing their own[xx]. Just like any disruptive technology, Bitcoin and cryptocurrencies have their fair share of enemies!
As of now, quantum computers are being developed by some of the largest companies in the world, as well as private government agencies.
No doubt, we will see a post-quantum cryptography world sooner than most realize. By that point, who knows how long “3 letter agencies” will have been using quantum technology - and what they’ll be capable of!

What can we do to protect ourselves today?

Of course, the best option is to start looking at how Bitcoin can implement new cryptographic features immediately, but it will take time, and we have seen how slow the process can be just for scaling[xxi].
The other thing we can do is use a Bitcoin address only once for outgoing transactions. When quantum computers attack Bitcoin (and other crypto currencies), their first target will be addresses that have outgoing transactions on the blockchain that contain funds.
This is due to the fact that when computers first attempt to crack a Bitcoin address, the starting point is when a transaction becomes public. In other words, when the transaction is first signed – a signed transaction is a digital signature derived from the private key, and it validates the transaction on the network. Compared to classical computers, quantum computers can exponentially extrapolate this information.
Initially, Bitcoin Core Software might provide some level of protection because it only uses an address once, and then sends the remaining balance (if any) to another address in your keypool. However, third party Bitcoin wallets can and do use an address multiple times for outgoing transactions. For instance, this could be a big problem for users that accept donations (if they don’t update their donation address every time they remove funds). The biggest downside to Bitcoin Core Software is the amount of hard-drive space required, as well as diligently retaining an up-to-date copy of the entire blockchain ledger.
Nonetheless, as quantum computers evolve, they will inevitably render SHA256 vulnerable, and although this will be one of the first hash algorithms cracked by quantum computers, it won’t be the last!

Are any cryptocurrencies planning for the post-quantum cryptography world?

Yes, indeed, there are! Here is a short list of ones you may want to know more about:

Full disclosure:

Although I am in no way associated with any project listed above, I do hold coins in all as well as Bitcoin, Litecoin and many others.
The thoughts above are based on my personal research, but I make no claims to being a quantum scientist or cryptographer. So, don’t take my word for anything. Instead, do your own research and draw your own conclusions. I’ve included many references below, but there are many more to explore.
In conclusion, the intention of this article is not to create fear or panic, nor any other negative effects. It is simply to educate. If you see an error in any of my statements, please, politely, let me know, and I will do my best to update the error.
Thanks for reading!

References

[i] https://www.youtube.com/watch?v=JhHMJCUmq28 – A great video explaining quantum computers.
[ii] https://www.doc.ic.ac.uk/~nd/surprise_97/journal/vol4/spb3/ - A brief history of quantum computing.
[iii] https://en.wikipedia.org/wiki/Apple_Lisa - More than you would ever want to know about the Apple Lisa.
[iv] https://www.youtube.com/watch?v=tpIctyqH29Q&list=PL8dPuuaLjXtNlUrzyH5r6jN9ulIgZBpdo - Want to learn more about computer science? Here is a great crash course for it!
[v] https://www.collinsdictionary.com/dictionary/english/quantify - What does quantify mean?
[vi] https://en.bitcoin.it/wiki/Private_key - More info about Bitcoin private keys.
[vii] https://www.securityinnovationeurope.com/blog/page/whats-the-difference-between-hashing-and-encrypting - A good example of the deference between Hash and Encryption
[viii] https://lbc.cryptoguru.org/stats - The Large Bitcoin Collider.
[ix] http://directory.io/ - A list of every possible Bitcoin private key. This website is a clever way of converting the 64 character uncompressed key to the private key 128 at a time. Since it is impossible to save all this data in a database and search, it is not considered a threat! It’s equated with looking for a single needle on the entire planet.
[x] https://uwaterloo.ca/institute-for-quantum-computing/quantum-computing-101#Superposition-and-entanglement – Brief overview of Superposition and Entanglement.
[xi] https://www.washingtonpost.com/world/national-security/nsa-seeks-to-build-quantum-computer-that-could-crack-most-types-of-encryption/2014/01/02/8fff297e-7195-11e3-8def-a33011492df2_story.html?utm_term=.e05a9dfb6333 – A review of the Penetrating Hard Targets project.
[xii] https://en.wikipedia.org/wiki/Post-quantum_cryptography - Explains post-quantum cryptography.
[xiii] https://www.nebulas.io/ - The nebulas project has some amazing technology planned in their roadmap. They are currently in testnet stage with initial launch expected taking place in a few weeks. If you don’t know about Nebulas, you should check them out. [xiv] https://en.wikipedia.org/wiki/Legality_of_bitcoin_by_country_or_territory - Country’s stance on crypto currencies.
[xv] https://www.cnbc.com/2017/08/30/venezuela-is-one-of-the-worlds-most-dangerous-places-to-mine-bitcoin.html - Don’t be a miner in Venezuela!
[xvi] http://www.newsweek.com/russia-bitcoin-avoid-us-sanctions-cryptocurrency-768742 - Russia’s plan for their own crypto currency.
[xvii] http://www.telegraph.co.uk/technology/2018/01/05/visa-locks-bitcoin-payment-cards-crackdown-card-issue - Recent attack from visa against crypto currency.
[xviii] https://www.ccn.com/non-government-digital-currency-junk-says-mastercard-ceo-rejecting-bitcoin/ - Mastercards position about Bitcoin.
[xix] http://www.livebitcoinnews.com/discover-joins-visa-mastercard-barring-bitcoin-support/ - Discovers position about Bitcoin.
[xx] http://fortune.com/2017/10/20/mastercard-blockchain-bitcoin/ - Mastercard is making their own blockchain.
[xxi] https://bitcoincore.org/en/2015/12/21/capacity-increase/ - News about Bitcoin capacity. Not a lot of news…
[xxii] https://learn.iota.org/faq/what-makes-iota-quantum-secure - IOTA and quantum encryption.
[xxiii] https://eprint.iacr.org/2011/191.pdf - The whitepaper of Winternitz One-Time Signature Scheme
[xxiv] https://cardanoroadmap.com/ - The Cardano project roadmap.
[xxv] https://eprint.iacr.org/2017/490 - More about the BLISS hash system.
[xxvi] https://www.ethereum.org/ - Home of the Ethereum project.
[xxvii] https://en.wikipedia.org/wiki/SHA-3#Security_against_quantum_attacks – SHA3 hash algorithm vs quantum computers.
[xxviii] https://en.wikipedia.org/wiki/Lamport_signature - Lamport signature information.
[xxix] https://theqrl.org/ - Home of the Quantum Resistant Ledger project.
submitted by satoshibytes to CryptoCurrency [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]

Google’s Quantum Computing Breakthrough Brings Blockchain Resistance Into the Spotlight Again

Google’s Quantum Computing Breakthrough Brings Blockchain Resistance Into the Spotlight Again


News by Forbes: Darryn Pollock
Quantum computing has been on the tech radar for some time now, but it has also been lurking in the background of the blockchain ecosystem for very different reasons. The new advancement of computing allows for complex equations and problems to be solved exponentially quicker than is currently available.
However, it has always been predominantly a futuristic, almost science fiction-like pursuit; for blockchain that has been just fine as well because we have been warned that quantum computation could render existing encryption standards obsolete, threatening the security of every significant blockchain.
This week, news has emerged that Google has made a recent quantum computing breakthrough, achieving quantum supremacy. It is being reported that Google, using a quantum computer, managed to perform a calculation in just over three minutes that would take the world’s most powerful supercomputer 10,000 years.
This could mean panic stations for blockchain as all that has been achieved thus far could be wiped out, and without the right provisions, all the promise and potential could be eliminated overnight.
However, the term quantum supremacy refers to the moment when a quantum computer outperforms the world’s best classical computer in a specific test. This is just the first step, but it is a rather large step that means the spotlight is once again on blockchain to try and resist this kind of technology which can unravel its cryptographic algorithms in minutes.
Google’s first steps
Google has described the recent achievement as a “milestone towards full-scale quantum computing.” They have also said this milestone puts a marker in the ground on which they can start rapidly progressing towards full quantum computing — another concerning statement form blockchains.
Details are a little scarce on what Google has achieved, and how they have done it, but previous proposals essentially involve the quantum computer racing a classical computer simulating a random quantum circuit.
According to Gizmodo, it has been long known that Google has been testing a 72-qubit device called Bristlecone with which it hoped to achieve quantum supremacy and the initial report from the Financial Times says that the supremacy experiment was instead performed with a 53-qubit processor codenamed Sycamore.
However, it would be a little early to start abandoning all hope with Bitcoin, blockchain, and the emerging technology as it is a bit more complicated than that. More so, there is already technology and projects in place that has been trying to prepare for an age of quantum computing where blockchain is resistant.
Are blockchains ready to resist?
So, if quantum computing is making significant breakthroughs, is there any evidence of blockchain’s being prepared for this new age, and a new threat? There has been news of blockchain builders putting out quantum-resistant chains, such as E-cash inventor David Chaum and his latest cryptocurrency, Praxxis.

David Chaum, Elixxir on Moneyconf Stage during day two of Web Summit 2018 (Photo by Eoin Noonan /Web Summit via Getty Images)

WEB SUMMIT VIA GETTY IMAGES
QAN is another project that says it is ready for the quantum computing age, has reacted quickly to the news of Google’s breakthrough with Johann Polecsak, CTO of QAN, telling Bitcoin.com: “The notion of Google achieving a quantum breakthrough sounds very dramatic, but in reality, it’s hard to gauge the significance at this time. How can we be sure that Google’s quantum computer is more powerful than D-wave’s, for example, which surpassed 1,000 qubits four years ago?”
I also reached out to Polecsak to find out more about the threat of quantum computing when, and if, it reaches its pinnacle.
“We should definitely be worried,” he told me, “Many IT professionals and CTOs, including the earlier m, are neglecting and denying quantum computing threats with the simple reasoning that once it’s seriously coming, we’ll have to redesign almost everything from scratch, and that must surely be a long time ahead.”
“The truth is that one can already rent quantum computers for experimenting with possible attack algorithms and testing theoretical approaches. The maths behind breaking currently used public key cryptography — EC and RSA — were proven, we just need more qubits.”
“In cryptography, it’s best to prepare for the worst, and one can observe in recent literature that past skeptics now instantiate their crypto protocols in a post-quantum setting — just it case. Users shouldn’t worry now, but experts should prepare before it’s too late.”
QAN CTO Johann Polecsak speaking about the threat of quantum computing at a conference in Seoul, South Korea.

SUPPLIED
What it means to be quantum-resistant
Of course, the technological aspect of the race between quantum computing and blockchain quantum resistance is immense, and it is also quite nuanced. It is not as if quantum computing will, like a light switch, be available and all blockchains will suddenly be vulnerable — but it is still important to be prepared. As it stands, there probably is not enough preparation and planning in place, according to Polecsak.
“Blockchains won’t be ready for such a breakthrough. Since transaction history is the backbone of blockchains, such an improvement in quantum computing could be catastrophic for the whole transaction history,” added the CTO. “There is an extra layer of protection with Bitcoin’s double hashing but assuming a quantum computer is capable of Shor on secp256k1 it’s safe to assume it’s also capable of Grover256. Also, we don’t know bounds for SHA regarding quantum circuits.”
“As for QAN blockchain platform, it is not a linear comparison or a race where we need to keep up side-by-side with increasing qubits. Being Quantum-safe does not mean that we are just increasing bits in currently used algorithms, but that we take a totally different approach which resists the known Quantum attacks by design.”
Prepare to resist
As science-fictiony as it sounds, quantum computing is a threat that needs to be taken seriously in the world of blockchains. It may not be the kill switch that everyone imagines because of media hype, but it certainly something that should be on the radar for anyone involved in the ecosystem.
It is not only because of what has been accomplished in blockchain thus far but also because of what is being built and promised in the space. Blockchain is a major technology revolution on the horizon, and as it permeates deeper into enterprises and governments it would be catastrophic for all that has been done to be undone, and all that has been promised to be eliminated.
submitted by GTE_IO to u/GTE_IO [link] [comments]

Some information for new comers

I am by no means an expert. I have only been mining with Hashflare for 2 weeks now, but here are some things to know if you are new here.
  1. Your used to instant satisfaction. This is not that. There are delays at the moment with all aspects from payment processing for buying hash rate to withdrawing btc to your wallet. Please expect this. Use some patience. You will see this sub overloaded with why didn't X happen immediately. Dont be that guy.
  2. We are not financial advisers. We cannot tell you if mining with Hashflare is a good or bad choice. That has to be decided for yourself. The general rule is that you should only invest what your willing to lose. Mining bitcoin is a volatile investment. It should be treated as such.
  3. No one here can help you with your trouble tickets with Hashflare. See item #1.
  4. In my experience so far, Hashflare is legit. I get my daily payouts and I am re-investing them daily and watching my hash rate grow. Posts here about how you feel Hashflare is a scam, help no one. They do no good. The folks here that have decided to invest will not be swayed by your post. Dont be that guy.
  5. Please dont spam your affiliate link code. It can only be used for new sign ups and is of no use to most of the people here. It just makes you look like a douche. There are even folks on here trying to trick folks into using their affiliate code. Dont be a douche. Dont be that guy.
Other than that, this community is growing and tons of members here are happy to answer questions. I am in it for the long haul. Lets all be decent to each other and try to make some of that sweet sweet crypto currency.
Edit #1 for formatting and grammar.
Edit #2: Resources:
submitted by lonelliott to hashflare [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]

What's the f*****ng benefit of the reactivated OP_Codes?

Nobody explained what we can do with the soon to be reactivated OP_Codes for Bitcoin Cash, and nobody explained why we need them. It's a fact that there are risks associated with them, and there is no sufficient testing of these risks by independent developers, nor is there a sufficient explanation why they carry no risk. BitcoinABC developers, explain yourselves, please.
Edit: Instead of calling me a troll, please answer the question. If not, ask someone else.
Edit Edit: tomtomtom7 provided a resfreshing answer on the question:
https://www.reddit.com/btc/comments/7z3ly4/to_the_people_who_thing_we_urgently_need_to_add/dulkmnf/
The OP_Codes were disabled because bugs were found, and worry existed that more bugs could exist.
They are now being re-enabled with these bugs fixed, with sufficient test cases and they will be put through thorough review.
These are missing pieces in the language for which various use cases have been proposed over the years.
The reason to include these, is because all developers from various implementations have agreed that this is a good idea. No objections are raised.
Note that this does not mean that all these OP_Codes will make it in the next hardfork. This is obviously uncertain when testing and reviewing is still being done.
This is not yet the case for OP_GROUP. Some objection and questions have been raised which takes time to discuss and time to come to agreement. IMO this is a very healthy process.
Another good comment is here
https://www.reddit.com/btc/comments/7z49at/whats_the_fng_benefit_of_the_reactivated_op_codes/dullcek/
One precise thing: Allowing more bitwise logical operators can (will) yield smaller scripts, this saves data on the blockchain, the hex code gets smaller.
Here is a detailled answer. I did not goe through it if it is satisfying, but at least it is a very good start, Thank you silverjustice.
But further, if you want specific advantages for some of these, then I recommend you check out the below from the scaling Bitcoin conference:
opcodes are very useful, such as in for example with CAT you can do tree signatures even if you have a very complicated multisig design using CAT you could reduce that size to log(n) size. It would be much more compact. Or with XOR we could do some kind of deterministic random number generator by combining secret values from different parties so that nobody could cheat. They could combine and generate a new random number. If people think-- ... we could use LEFT to make weaker hash. These opcodes were re-enabled in sidechain elements project. It's a sidechain from Bitcoin Core. We can reintroduce these functions to bitcoin.
The other problem are the ... numeric operations which were disabled by Satoshi. There's another problem. Which is that the range of values accepted by script is limited and confused because the CScript.. is processed at ..... bit integers internally. But to these opcodes it's only 32 bits at most. So it's quite confusing. The other problem is that we have this.. it requires 251 encode or calculate or manipulate this number. So we need at least 52 bits. But right now it is only 32 bits. So the proposal is to expand the valid input range to 7 bytes which would allow 56 bits. And it limits the maximum size to 7 bytes so we could have the same size for inputs and outputs. For these operations, we could re-enable them within these safe limits. It would be safe for us to have these functions again.
The other problem is that we currently cannot commit to additional scripts. In the original design of bitcoin, we could have script operations inside of the signature. But the problem is that the signature is not covered by the signature itself. So any script in the scriptSig is modifiable by any third party in the network. For example, if we tried to do a CHECKSIG operation in the signature, people could simply replace it with an OP_0 and invalidate the transaction. This is a bypass of the.. signature check in the scriptSig. But actually this function is really useful, for example, we can do... delegation, people could add additional scripts to a new UTXO without first spending it. So people could do something like let's say to let their son spend their coin within a year if it is not first spent otherwise.. and also, people, talk about replay protection. So we have some ohter new opcode like pushing the blockhash to the stack, with this function we could have replay protection to make sure the transaction is valid only in a specified blockchain.
So the proposal is that in the future the CHECKSIG should have the ability to sign additional script and to execute these scripts. And finally the other problem is that the script has limited access to different parts of the transaction. There is only one type of operation that allowed to investigate different parts of the transaction, which is CHECKSIG and CHECKMULTISIG. But it is very limited. There are sighash limitations here... there are only 6 types of sighash. The advantage of doing this is that it's very compact and could use only one byte to indicate which component to sign. But the problem is that it's inflexible. The meaning of this sighash is set at the beginning and you can't change it. You need a new witness version to have another checksig. And the other problem is that the sighash can be complex and people might make mistakes so Satoshi made this mistake in the sighash design such as the well-known bug in validation time and also the SIGHASH_SINGLE bug. It's not easy to prevent.
The proposal is that we might have the next generation of sighash (sighashv2) to expand to two bytes, allow it to cover different parts of the transaction and allow people to choose which components they would like to sign. This would allow more flexibility and hopefully not overly complicated. But still this is probably not enough for more flexible design.
Another proposal is OP_PUSHTXDATA which pushes the value of different components of a transaction to the stack. It's easy to implement, for example, we could just push the scriptpubkey of the second output to the stack, okay. So it is actually easier to implement. We could do something more than just... because we have sighash, we could check where something is equal to the specified value. But if we could push the value, like the value of an output to the stack, then we could use other operations like more than or less than and then we could do something like checking whether the value of output x must be at least y bitcoin, which is a fixed value.
There are some other useful functions like MAST which would allow for more compact scripts by hiding the other unexecuted branches. There's also aggregation that would allow n-of-n multisig to be reduced to a single signature and so on. In the elements project, they implemented CHECKSIGFROMSTACK where they don't check the transaction structure but instead they verify a message on the stack. So it could be some message like not bitcoin maybe, perhaps cross-chain swap, or another bitcoin UTXO. And also we might have some elliptic curve point addition and operations which are also useful in lightning network design.
Here are some related works in progress. If you are interested in this topic, I would like to encourage you to join our discussions because it's a very active topic. jl2012 bip114 MAST, maaku's MBV, luke-jr or version-1 witness program, Simplicity, etc.
so you have your script template the amount value and there is a block impactor beause we have the sha chain whih allows you to hae the hashes.. we can hae that errortate constant beause you need the HTLC chashes, to properly reoke the prior states and if you an't do that then you can't onstruct the redeem script. Right now it ineeds a signature for eery state, you need all the HTLCs, it needs the netowrk erification state, and there's another cool thing you can do with which is like trap door erification and you can include it in the transaction itself and there can be a alsue where there is some margin for it.. Which make sit powerful, and then you can make it more private with these constructs. We only have a few minutes left, we can cover this.
One furthe rthing is that in the transformation, we have privacy issue because we need to keep going forward, we need to have hte private state, so there's a history of this in the ages in the past, the current one used replications, which was one of the cool things about lightning. We used to have deckman signatures we had a sequence value of like 30 days, we did an update, we had to switch sides then we make it 29 then 27 etc. You can only broadcast the most recent state because otherwise the other party can transact the other transaction. If you start with 30 days then you can only do about 30 bidirectiona lswitches. Then there was cdecker's payment channels where you have a root tree and every time you need to- you had two payment channels, you had to rebalance htem and then it's on your part of the channel you can reset the channel state. You can do 30 this way, you have another tree, you can do it that way, and then there's a new version of it in the indefinite lifetime... by keeping the transaction in CSV, the drawback on that paproahc because you have al arge validation tree, in the worst cas eyou have 8 or 10 on the tree, and then you nee dfor the prior state and then you do the 12 per day, and every time you have to make a state, you have to revoke the preimage from the prior state, this is cool because if they ever broadcast the entire state, eahc one has the caluse so that you can draw the entire money in the event o f a violation. There are some limitations for doing more complex verifications and you have this log(n) state that you have to deal with ehen you deal with that.
We're going to do the key power on the stack to limit key verifications on this main contract. this is all composable. You can do discreet log contracts. You can now check signtures on arbitrary messages. You can sign a message nad then we can enforce structure on the messages themselves. Right now you need to have sequene numbers. So each state we are going to increment the sequence numbers. So you give me a siequence number on that state. On the touputs we have a commitment ot the sequence number and the value r. So people on chain will know that how many places we did in that itself. The ool part about this is that because we have a seq number then I have the one if it's highest neough. Then I am opening that commitment to say this is state 5 and I present to you a new signed ommitment and open that as well, that's in a validation state. The cool things is that you only need one of those m. So we have to some auxiliary state, and each time I have a new state I an drop the old state. I have a signed commitment to revoke the prior state. This is a ibg deal beause the state is much smaller. Currently we require you to fwe use a state mahcine on state 2, and it also has implications for verifications and watch tower
So on lightning, there's this technique itself- it's timelocks CSV value and if you can't react within that value then you can't go to court and enforce judgement on this attacker. So the watchtower is a requirement, you delegate the state watching to the watchtower. They know which channels you're watching. You send some initial points, like a script template. For every one you send the signautre and the verification state. They can use the verification stat ethat collapses into a log(n) tree, you can basically use state where you send half the txids, you can decrypt this in... some time.
submitted by Der_Bergmann to btc [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]

howmanyconfs.com - How does the security of different Proof-of-Work blockchains compare to Bitcoin?

https://howmanyconfs.com
Original post in Bitcoin here: https://np.reddit.com/Bitcoin/comments/biokgy/howmanyconfscom_how_does_the_security_of/

https://github.com/lukechilds/howmanyconfs.com/raw/mastescreenshot.png

How are these values calculated?

It's easy to compare blockchain hashrates when the Proof-of-Work algorithm is the same. For example if Bitcoin has a hashrate of SHA-256 @ 40 PH/s and Bitcoin Cash has a hashrate of SHA-256 @ 2 PH/s, it's easy to see that for a given period of time the Bitcoin blockchain will have 20x (40/2) the amount of work securing it than the Bitcoin Cash blockchain. Or to say that differently, you need to wait for 20x more Bitcoin Cash confirmations before an equivalent amount of work has been done compared to the Bitcoin blockchain. So 6 Bitcoin confirmations would be roughly equivalent to 120 Bitcoin Cash confirmations in the amount of work done.
However if the Proof-of-Work algorithms are different, how can we compare the hashrate? If we're comparing Bitcoin (SHA-256 @ 40 PH/s) against Litecoin (Scrypt @ 300 TH/s), the hashes aren't equal, one round of SHA-256 is not equivalent to one round of Scrypt.
What we really want to know is how much energy is being consumed to provide the current hash rate. Literal energy, as in joules or kilowatt hours. It would be great if we had a universal metric across blockchains like kWh/s to measure immutability.
However that's fairly hard to calculate, we need to know the average power consumption of the average device used to mine. For GPU/CPU mined Proof-of-Work algorithms this varies greatly. For ASIC mined Proof-of-Work algorithms it varies less, however it's likely that ASIC manufacturers are mining with next generation hardware long before the public is made aware of them, which we can't account for.
There's no automated way to get this data and no reliable data source to scrape it from. We'd need to manually research all mining hardware and collate the data ourself. And as soon as newer mining hardware comes out our results will be outdated.
Is there a simpler way to get an estimated amount of work per blockchain in a single metric we can use for comparisons?
Yeah, there is, we can use NiceHash prices to estimate the cost in $ to secure a blockchain for a given timeframe. This is directly comparable across blockchains and should be directly proportionate to kWh/s, because after all, the energy needs to be paid for in $.
How can we estimate this?
Now we have an estimated total Proof-of-Work metric measured in dollars per second ($/s).
The $/s metric may not be that accurate. Miners will mark up the cost when reselling on NiceHash and we're making the assumption that NiceHash supply is infinite. You can't actually rent 100% of Bitcoin's hashpower from NiceHash, there isn't enough supply.
However that's not really an issue for this metric, we aren't trying to calculate the theoretical cost to rent an additional 100% of the hashrate, we're trying to get a figure that allows us to compare the cost of the current total hashrate accross blockchains. Even if the exact $ value we end up with is not that accurate, it should still be proportionate to kWh/s. This means it's still an accurate metric to compare the difference in work done over a given amount of time between blockchains.
So how do we compare these values between blockchains?
Once we've done the above calculations and got a $/s cost for each blockchain, we just need to factor in the average block time and calculate the total $ cost for a given number of confirmations. Then see how much time is required on the other blockchain at it's $/s value to equal the total cost.
So to calculate how many Litecoin confirmations are equivalent to 6 Bitcoin confirmations we would do:
Therefore we can say that 240 Litecoin confirmations are roughly equal to 6 Bitcoin confirmations in total amount of work done.

Notes

$/s doesn't mean what it sounds like it means.

The $/s values should not be taken as literal costs.
For example:
This is does not mean you could do a 51% attack on Bitcoin and roll back 6 blocks for a cost of $360,000. An attack like that would be much more expensive.
The $/s value is a metric to compare the amount of work at the current hashrate between blockchains. It is not the same as the cost to add hashrate to the network.
When adding hashrate to a network the cost will not scale linearly with hashrate. It will jump suddenly at certain intervals.
For example, once you've used up the available hashrate on NiceHash you need to add the costs of purchasing ASICs, then once you've bought all the ASICs in the world, you'd need to add the costs of fabricating your own chips to keep increasing hashrate.

These metrics are measuring "work done", not security.

More "work done" doesn't necessarily mean "more security".
For example take the following two blockchains:
Bitcoin Cash has a higher $/s value than Zcash so we can deduce it has more "work done" over a given timeframe than Zcash. More kWh/s are required to secure it's blockchain. However does that really mean it's safer?
Zcash is the dominant blockchain for it's Proof-of-Work algorithm (Equihash). Whereas Bitcoin Cash isn't, it uses the same algorithm as Bitcoin. In fact just 5% of Bitcoin's hashrate is equivalent to all of Bitcoin Cash's hashrate.
This means the cost of a 51% attack against Bitcoin Cash could actually be much lower than a 51% attack against Zcash, even though you need to aquire more kWh/s of work, the cost to aquire those kWh/s will likely be lower.
To attack Bitcoin Cash you don't need to acquire any hardware, you just need to convince 5% of the Bitcoin hashrate to lend their SHA-256 hashpower to you.
To attack Zcash, you would likely need to fabricate your own Equihash ASICs, as almost all the Equihash mining hardware in the world is already securing Zcash.

Accurately calculating security is much more complicated.

These metrics give a good estimated value to compare the hashrate accross different Proof-of-Work blockchains.
However to calculate if a payment can be considered "finalised" involves many more variables.
You should factor in:
If the cryptocurrency doesn't dominate the Proof-of-Work it can be attacked more cheaply.
If the market cap or trading volume is really low, an attacker may crash the price of the currency before they can successfully double spend it and make a profit. Although that's more relevant in the context of exchanges rather than individuals accepting payments.
If the value of the transaction is low enough, it may cost more to double spend than an attacker would profit from the double spend.
Ultimately, once the cost of a double spend becomes higher than an attacker can expect to profit from the double spend, that is when a payment can probably be considered "finalised".
submitted by dyslexiccoder to CryptoCurrency [link] [comments]

Now that we've had a few 8MB blocks, let's dispel this centralisation myth once and for all.

Preface

Firstly, I'm just a Bitcoin enthusiast who is getting tired of the notion that BTC is some censorship-resistant bastion of decentralisation and BCH is not due to its larger blocks.
The data below is publicly available and I've tried to include sources, so if there are any errors in my work or findings, please share them below and I'll update this post.
Edit: zcc0nonA has provided a brief write-up describing what decentralisation actually is in the comments below which is well worth a read.
The bulk of the calculation is done assuming assuming 5MB blocks (~36tx/sec), which is a healthy capacity for BCH currently (if miners consistently mine 4MB < 8MB blocks) and what BTC was averaging before the holidays.
If there are any other factors which I've missed out, please let me know and ideally provide some data.

Storage

Almost the simplest argument to refute is the storage problem:
5MB blocks * 6 blocks/hr = 30MB/hr
30MB/hr = ~22GB/month = ~263GB/year
Current avg. price for a 4TB HDD is ~$150 [source]
4TB (~3.8TB usable) / 263GB = ~14 years of 5MB blocks

Bandwidth

The bandwidth issue is slightly more complex, since full nodes will download the blockchain (which increases in proportion to blocksize), but their main network function is to upload/share data with the network.
With this in mind, I've found a source for data usage on a typical node for both BCH and BTC, and fortunately the past 6 hours have seen several 8MB blocks so the data should be representative.
We can leave the additional rx bandwidth from the larger blocksize out of the equation since this will correlate roughly to the capacity calculation above.
In those 6 hours the BTC node sent ~8.3GB of network related data, whereas the BCH node sent 3.6GB.
The transaction volume/second for that period appears to roughly match up to the data ratio (2.3:1, BTC:BCH) so that would suggest that this figure increases based on network adoption/transaction volume, rather than being influenced by blocksize.

Development

83.39% of the current 1288 nodes on the BCH chain are running Bitcoin ABC [source]
87.26% of the current 10124 nodes on the BTC chain are running Bitcoin Core [source]
Both projects are open source, but commit access is limited to a few individuals in both cases so this is the area where both could improve the most.

Mining

This is the easiest argument to dispel, since both chains use the SHA-256 hashing algorithm which means they can both use the same mining pools and hardware.
Edit: LexGrom has also added that the development of a fee market is not only bad for for users, but small miners as well. This is because they have to pay fees on their withdrawals from their respective pools.
This creates a market which favours larger miners, since small miners cannot claim their funds until they reach a threshold high enough that they can withdraw and spend.

Roger

He's a man who likes Bitcoin and wants it to succeed, not the king of BCH. The personal attacks on this guy are signs of weak arguments and true trolls. This also goes for arguments around China, Jihan, or CSW since they tend to rest on an ad-hominem (ad-countrinem?) foundations too.

Conclusion

Not only is BCH not centralised, but it's actually about as decentralised as BTC, if not more so. (I haven't even mentioned Blockstream and their relationship with the Core devs). Larger blocks do not significantly impact a regular users ability to run a full node, and in fact the main barrier will be bandwidth used (tx) for either chain as adoption increases.
The arguments against raising blocksize seem to disappear the moment one examines the data more closely, except for one:
If Bitcoin scales on-chain it will remain censorship-resistant and largely decentralised, which is exactly the opposite of what governments want, but was exactly the goal of the original project.
submitted by thegreatmcmeek to btc [link] [comments]

Over the last 6 weeks I've written a functioning Crypto trading bot in VB.NET and here are some of the important tips & things I've learned and some VB.NET code for you to use.

I started on December 18th when I was playing about with Google Sheets and pulling prices from exchanges using the CRYPTOFINANCE() plugin... it was slow, clunky and the data was wildly old - I knew I could do something better in VB.NET but at this point had absolutely no idea where to start, no idea about trading, no idea how exchanges or API's worked and no idea just how bad I was at programming. I've asked a lot of dumb questions, I've lost a bunch of money making mistakes & learning as I go... Fast forward to today however and I have a fully functioning, cross-exchange trading bot. Sweet!
1) Truncate your numbers, don't round.**
Hindsight makes this seem so obvious to me now, but when you're working with Bitcoin balances to 8 decimal places, exchange rates to 5 decimal places and sums that can increase your decimal places exponentially, it helps to be precise. Even an extra 0.00000001 in the wrong place can cause an exchange to reject your request. Honestly if I'd have realised this sooner I'd be about 2 weeks ahead right now and nowhere near as bald.
The below functions in will truncate any decimal number with no rounding:
Public Function Trunc8(numbertoTuncate As Decimal) As Decimal Return Math.Truncate(numbertoTuncate * 100000000) / 100000000 End Function Public Function Trunc5(numbertoTuncate As Decimal) As Decimal Return Math.Truncate(numbertoTuncate * 100000) / 100000 End Function 
** Absolutely do round when exchange such as Bitstamp does it's fee calculations in spot USD price. Below is the logic I use to do this:
Dim amount_btc As Decimal = BTCtoSpend / ASK ' Full amount in BTC Dim fee_btc As Decimal = amount_btc * 0.0025 ' Get 0.25% of the BTC amount Dim fee_USD As Decimal = fee_btc * BitstampBTCUSD ' Convert to USD Dim round_USD As Decimal = Math.Round(fee_USD, 2, MidpointRounding.AwayFromZero) ' Round up Dim round_BTC As Decimal = round_USD / BitstampBTCUSD ' Convert back to BTC Dim amount = amount_btc - round_BTC ' minus the fee 
2) Websockets are your friend.
It's really easy to query Bitstamp or GDAX's API for the prices(Last/Bid/Ask). The query might take a 3rd of a second to get there, a 3rd of a second to get back - by the time your software has interpreted it it may have been nearly a full second. The prices you end up being sent back can some times be stale/out of date. Couple this with the API rate limits (Once a second on Bitstamp if you end up polling it continuously) and you can soon end up with stale information. The websockets allow the exchanges to push information to you, in real-time, as it happens. Seriously, they're fucking rad and you can query that data til the cows come home. Millisecond timers FTW!
Bitstamp uses Pusher, GDAX is a plain old web socket. It took me an age to figure it out, and honestly I've done it rather arse-about-tit, but here's the code I ended up using:
Bitstamp:(You'll need PusherClient from Nuget)
Imports PusherClient Imports Newtonsoft.Json.Linq Public WithEvents pusherClient As New Pusher("de504dc5763aeef9ff52") Public WithEvents BitstampLTCBTCOrderbook As Channel Public WithEvents BitstampLTCBTCTrades As Channel Public WithEvents BitstampBTCUSDTrades As Channel Public WithEvents BitstampEURUSDTrades As Channel pusherClient.Connect() Public Sub pusher_Connected() Handles pusherClient.Connected BitstampLTCBTCTrades = pusherClient.Subscribe("live_trades_ltcbtc") End Sub Public Sub BitstampLTCBTCTrades_Subscribed(Sender As Object) Handles BitstampLTCBTCTrades.Subscribed BitstampLTCBTCTrades.Bind("trade", AddressOf BitstampLTCBTCTrade) End Sub Public Sub BitstampLTCBTCTrade(data) Dim jss = JObject.Parse(data.ToString) BitstampPrice = CDec(jss("price_str").ToString) BitstampLastAmount = CDec(jss("amount_str").ToString) End Sub 
That's basically it - the different channels are all documented in the API and you can format the JSON til your little crypto heart's content.
GDAX:(You'll need Websocket4NET from Nuget) P.S. I know my sending raw JSON is a fucking abomination.
Imports WebSocket4Net Imports Newtonsoft.Json.Linq Public WithEvents websocketGDAX As WebSocket websocketGDAX = New WebSocket("wss://ws-feed.gdax.com") websocketGDAX.Open() Public Sub gdax_Connect() Handles websocketGDAX.Opened Dim Data As String = "{ ""type"": ""subscribe"", ""product_ids"":[""BTC-EUR""], ""channels"": [""heartbeat"", { ""name"": ""ticker"", ""product_ids"": [""LTC-BTC""] }]}" websocketGDAX.Send(Data) End Sub Public Sub gdax_Data(sender As Object, args As WebSocket4Net.MessageReceivedEventArgs) Handles websocketGDAX.MessageReceived Dim jss = JObject.Parse(args.Message) Try If jss("type").ToString = "ticker" Then Select Case jss("product_id") Case "LTC-BTC" GDAXPrice = CDec(jss("price")) GDAXBid = CDec(jss("best_bid")) GDAXAsk = CDec(jss("best_ask")) GDAXLastSize = CDec(jss("last_size")) Case "EUR-USD" GDAXEURUSD = CDec(jss("price")) Case "BTC-USD" End Select End If Catch ex As Exception Exit Sub End Try End Sub 
Again, that's kind of it. Some proper error handling wouldn't go amiss, but I'm lazy and I use GOTO's all over the shop anyway so I'm basically a terrible human being.
3) Hashing. Fucking Hashing.
Ok so basically when sending authenticated/private API calls you need to hash bits of the message in order to prove authenticity. This was a bitch to try and cobble together the right code. Here, have it. It's yours:
Imports System.Security.Cryptography Imports System.Text Module Hashing Public Function HMACSHA256_Encrypt(ByVal message As String, secret As String) As String Try Dim secretkey As String = secret Dim sha As New System.Security.Cryptography.HMACSHA256(System.Text.ASCIIEncoding.ASCII.GetBytes(secretkey)) Dim Hash() As Byte = sha.ComputeHash(System.Text.ASCIIEncoding.ASCII.GetBytes(message)) Dim sb As New StringBuilder(Hash.Length * 2) For Each B As Byte In Hash sb.Append(Hex(B).PadLeft(2, "0")) Next Return sb.ToString.ToUpper Catch ex As Exception Debug.Print(Date.Now & " SHA256_Encrypt error " & ex.Message) Return Nothing End Try End Function Public Function HashString(ByVal str As String, ByVal secret As Byte()) As String Dim bytes As Byte() = Encoding.UTF8.GetBytes(str) Using hmac = New HMACSHA256(secret) Dim hash As Byte() = hmac.ComputeHash(bytes) Return Convert.ToBase64String(hash) End Using End Function End Module 
Top one for Bitstamp, Bottom one for GDAX. They differ slightly in the way they do things and the output they provide, hence there being two. Don't ask me what they do, couldn't tell you. Not a clue.
4) Verbose logging. Verbose logging. Verbose logging.
So you've made your bot, hit the button and....nothing. Now these things don't happen instantly; Even if you place an order at Ask or Bid, it might be minutes, even hours until it gets filled. Maybe your bot keeps erroring out and you don't know why. Write yourself a little logging function that you can copy and paste into your functions & subs that outputs the data you're sending and the data you're receiving along with a timestamp so you can debug if stuff isn't working. Again, I'm lazy and shit and this took me way longer to realise than it should have.
5) Don't be afraid to ask questions.
One of the biggest things that totally blew my mind was just how closed up some people are; on Reddit, forums, discord rooms... you name it. There's this weird stigma about people who trade & write bots that if they share their knowlege they'll somehow be doing themselves out of returns. Don't be afraid to ask questions. Ask enough, and eventually someone will come along and help. For every 10 people who chastised me for asking for coding help, trading help or whatever, 1 person would help out - it's worth enduring the rough for that... also, fuck those 10 people.
6) God damn Nonce generation.
A nonce is basically a unique, yet increasing number. Again, this was all massive trial and error. Bitstamp nonces and GDAX nonces work slightly differently and are interpreted slightly differently. Here's the code I use:
Module Nonces Public Function GenerateStampNonce() As String Static lastnonce As String Dim newNonce As String = Replace(Math.Round((DateTime.UtcNow - New DateTime(1970, 1, 1, 0, 0, 0)).TotalMilliseconds / 1000, 1).ToString("#0.0"), ".", "") Do While lastnonce = newNonce Threading.Thread.Sleep(10) newNonce = Replace(Math.Round((DateTime.UtcNow - New DateTime(1970, 1, 1, 0, 0, 0)).TotalMilliseconds / 1000, 1).ToString("#0.0"), ".", "") Loop lastnonce = newNonce Return newNonce End Function Public Function GenerateGDAXNonce() As Decimal Static lastnonce As Decimal Dim newNonce As Decimal = (DateTime.UtcNow - New DateTime(1970, 1, 1, 0, 0, 0)).TotalMilliseconds / 1000 Do While lastnonce = newNonce Threading.Thread.Sleep(10) newNonce = (DateTime.UtcNow - New DateTime(1970, 1, 1, 0, 0, 0)).TotalMilliseconds / 1000 Loop lastnonce = newNonce Return newNonce End Function End Module 
It's dirty...I know (I like it that way) - however it just simply works. I'm sure there's a more elegant way of generating these but honestly I ran out of patience on this because it's so simple when you look at it once it works.
7) Don't bog yourself down with a GUI.
Seems kind of daft, but running a bot as a console app forced me not only to be more verbose, but also helped really train my though process in terms of what all the timers in the background are doing. Not to mention, if you're anything like me you'll probably end up bogging it right down with all kinds of unnecessary GUI crap... in fact my first bot that was a total failure had more code to make the GUI whistle and pop than it did quality trading code.
You need so little input for a trading bot besides a config file full of preferences that your only real commands for any kind of interaction are quite simply:
 Console.WriteLine() Console.ReadKey() 
7.5) Limit orders on GDAX - FREE! As in... no fees!
Some people act like this is some kind of trade secret (haha, puns) but if you put a limit order on GDAX you almost always pay absolutely no fees. If you want to GUARANTEE you pay no fees, have your order set to post_only=true. This forces the order onto the books, which means you MUST place it AT Bid/Ask (depending on direction) or above/below, it'll get rejected if you try and eat into the other side of the spread.
8) Async/Multithread your requests to the API's.
I haven't done this, so I have no code to share. But if you suddenly lose connection or there's a blip or whatever, there's often no way of specifying a timeout and it could potentially freeze/crash your application.
-----------------------------------------
I guess that's all I can think of. It might seem like simple, trivial stuff but when it comes to writing something in a language like VB.NET there's very little resources out there at all... I went through some pretty mind-bending trial and error that while fun and now rewarding, was very frustrating at the time.
All in all, writing a program that can interact with an exchange is a wholly steep learning experience and I've learned more in terms of my general programming ability and my knowlege and understanding of trading & exchanges in general than I had in months or even years before doing this.
Feel free to ask any questions, I'll try to answer them as best I can.
submitted by DotNetBarry to BitcoinMarkets [link] [comments]

Hashshiny.io Cloud Mining 2020 App Bitcoin ETHEREUM LiteCoin Dash 2 years Contract + Referral (SHA-256) Algorithm Private key bitcoin wallet Generator & Finder tool full version 2018 Bitcoin Hash Calculator What is a Bitcoin hash and SHA-256 SHA-2 Cryptographic Hash Function

SHA stands for Secure Hash Algorithm and the 256 refers to the algorithm output length in bits. A Secure Hash Algorithm’s input data can be anything and provide a unique encrypted string. The most famous application is bitcoin, but there are a lot of other usages of the SHA-2 hash function in security applications and protocols, including SSL. 24 Months Bitcoin Mining; SHA-256 Mining Algorithm; Maintenance Fees Apply (2%) Withdraw Monthly Profits; Fees ( 0.045 $/Th/s ) Daily; Payout in BTC The Bitcoin hashrate is number of possible solutions (hashes) being generated per second. As of January 2020, the Bitcoin hashrate peaked at 131 EH/s. Bitcoin mining also generates new Bitcoin. When a Bitcoin miner finds the correct hash to solve the next Bitcoin block, the miner is rewarded with Bitcoin. SHA-512 is a function of cryptographic algorithm SHA-2, which is an evolution of famous SHA-1.. SHA-512 is very close to Sha-256 except that it used 1024 bits "blocks", and accept as input a 2^128 bits maximum length string. SHA-512 also has others algorithmic modifications in comparison with Sha-256. HashingRate is most Bitcoin mining platform fast, simple, safest in the world , HashingRate only the platform using offline wallet Daily , weekly and monthly transactions; Bitcoin payments; Free processing fees in some plans; Safety from hacking the wallets

[index] [25070] [8661] [7757] [5727] [11464] [6505] [1794] [653] [26785] [30711]

Hashshiny.io Cloud Mining 2020 App Bitcoin ETHEREUM LiteCoin Dash 2 years Contract + Referral

(SHA-256) Algorithm 📢📢Private key bitcoin wallet Generator & Finder tool full version 2018 ... What is a Bitcoin hash and SHA-256 - Duration: 1:54. Ofir Beigel 62,993 views. 21 videos Play all Learn Bitcoin with 2 Minute Videos 99Bitcoins Hashing Algorithms and Security - Computerphile - Duration: 8:12. Computerphile 916,658 views This video explains the concept of hashing and SHA-256 for newbies. For more information visit http://99bitcoins.com/what-is-bitcoin-hash/ Esta é a aula 2 do Curso e hoje falaremos sobre o hash SHA256. Se você tiver alguma dúvida sobre blockchain ou criptomoedas é só deixar sua pergunta logo abaixo, nos comentários. What is a SHA-256 Cryptographic Hash Algorithm? Learn more about blockchain, and Bitcoin on my online video course Blockchain and Bitcoin Fundamentals at:

Flag Counter