Questions tagged [blockchain]

A blockchain is an open, distributed ledger that can record transactions between two parties in a verifiable and permanent way. The ledger itself can also be programmed to trigger transactions automatically.

A blockchain – originally block chain – is a distributed ledger that is used to maintain a continuously growing list of records, called blocks. Each block contains a timestamp and a link to a previous block. A blockchain is typically managed by a peer-to-peer network collectively adhering to a protocol for validating new blocks. By design, blockchains are inherently resistant to modification of the data. Once recorded, the data in any given block cannot be altered retroactively without the alteration of all subsequent blocks and the collusion of the network. Functionally, a blockchain can serve as "an open, distributed ledger that can record transactions between two parties in a verifiable and permanent way." The ledger itself can also be programmed to trigger transactions automatically.

Blockchains are secure by design and are an example of a distributed computing system with high Byzantine fault tolerance. Decentralized consensus can therefore be achieved with a blockchain. This makes blockchains potentially suitable for the recording of events, medical records, and other records management activities, identity management, transaction processing, and documenting provenance.

Definition taken from Wikipedia - Blockchain

One of the most well-known use-cases is cryptocurrencies, but can be used for distributed agreement on other things.

6711 questions
314
votes
10 answers

Why is Git not considered a "block chain"?

Git's internal data structure is a tree of data objects, wherein each objects only points to its predecessor. Each data block is hashed. Modifying (bit error or attack) an intermediate block will be noticed when the saved hash and the actual hash…
Paebbels
  • 15,573
  • 13
  • 70
  • 139
180
votes
2 answers

Query LOCAL Bitcoin blockchain with C# .NET

I am trying to check the balance of a given Bitcoin address by using ONLY the locally stored blockchain (downloaded via Bitcoin Core). Something similar to this (by using NBitCoin and/or QBitNinja), but without needing access to the network: private…
rvnlord
  • 3,487
  • 3
  • 23
  • 32
143
votes
4 answers

In Ethereum Solidity, what is the purpose of the "memory" keyword?

When looking at sample contracts, sometimes arrays are declared in methods with "memory" and sometimes they aren't. What's the difference?
fivedogit
  • 8,374
  • 7
  • 34
  • 43
53
votes
2 answers

Warning: SPDX license identifier not provided in source file

I created a new solidity contract. The contract is up and running but giving me this warning. Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier:…
user14606211
52
votes
5 answers

Data location must be "memory" for return parameter in function, but none was given

I tried solidity example like as above in remix, solidity version > 0.5.0 But I am getting this error now. What is the way to solve this error? contract MyContract { string value; function get() public view returns (string) { return…
venus12
  • 523
  • 1
  • 4
  • 4
46
votes
9 answers

Difference between various blockchain protocols

As the developers are constantly using different network protocols of blockchain such as Hyperledger, multichain, Ethereum, Corda, and others. Community will appreciate if the developers & blockchain enthusiasts can pour in some key differences…
Saurabh
  • 1,249
  • 2
  • 13
  • 14
41
votes
8 answers

How to convert uint to string in solidity?

In Solidity, is there a way I can convert my int to string ? Example: pragma solidity ^0.4.4; contract someContract { uint i; function test() pure returns (string) { return "Here and Now is Happiness!"; } function love()…
Bob Zheng
  • 825
  • 4
  • 14
  • 25
37
votes
4 answers

What's the difference between Hyperledger Fabric and Sawtooth?

Both Hyperledger Fabric and Hyperledger Sawtooth are platforms for building distributed ledger applications, supporting pluggable consensus mechanisms and smart contracts (chaincodes). What are the main differences between then? When to choose one…
Joaquim Oliveira
  • 1,208
  • 2
  • 16
  • 29
37
votes
8 answers

How to find out if an Ethereum address is a contract?

An address in Solidity can be an account or a contract (or other things, such as a transaction). When I have a variable x, holding an address, how can I test if it is a contract or not? (Yes, I've read the chapter on types in the doc)
bortzmeyer
  • 34,164
  • 12
  • 67
  • 91
31
votes
4 answers

PBFT algorithm in hyperledger

Can anyone explain PBFT Algorithm in detail without giving any link for the same? And how it works in hyperledger. So, once the transaction is sent to the blockchain: Who validates the transaction? How the consensus is achieved on the…
Saurabh
  • 1,249
  • 2
  • 13
  • 14
29
votes
14 answers

Truffle command not found after installation

I installed truffle through npm with the following: sudo npm install -g truffle but when I run truffle list on the console it just gives me bash: truffle: command not found
user3480478
  • 429
  • 1
  • 4
  • 5
28
votes
3 answers

Solidity basics: what "msg.sender" stands for

I just started to learn Solidity as a personal challenge. I'm not a developer so I've a loooooong way to go. I'm following the Ethereum.org tutorial, here is what I've got doubt about: What does [msg.sender] stand for? I guess it is the wallet…
Sumak
  • 319
  • 1
  • 3
  • 8
27
votes
6 answers

properties of a cryptographic hash function

In a bitcoin Coursera course, there is a discussion of the three properties of a cryptographic hash functions: Collision-resistance: A hash function H is said to be collision resistant if it is infeasible to find two values, x and y, such that x !=…
user2191332
  • 1,059
  • 3
  • 17
  • 24
27
votes
2 answers

What's the difference between distributed hashtable technology and the bitcoin blockchain?

This question could go into a bitcoin forum but I am trying to understand from a programming point of view. There are technologies used for distributed storage, like distributed hashtables (say kademlia or similar). How is the bitcoin blockchain…
transient_loop
  • 5,984
  • 15
  • 58
  • 117
26
votes
11 answers

How to generate a random number in solidity?

I have a couple of keccaks, which could be reduced to one if I would find a cheap way to get parts of the created uint. pragma solidity ^0.4.19; contract test { function test() { } function sup() returns (uint test) { uint _test =…
Garry Plays
  • 377
  • 1
  • 3
  • 5
1
2 3
99 100