CryptoCoinsInfoClub.com

How To Retrieve Data From Blockchain

Understanding Data Storage

Understanding Data Storage

I'm trying to understand how Ethereum stores data that I send, if I have a transaction that sends 20 bytes of data to a contract then before the contract has even been executed the blockchain has access to my sender account, the 20 bytes of data and my tx signature. Does this get stored in the blockchain? Can I access it via an API? Or do I need to make sure my contract uses storage to save the 20 bytes because its not saved in the blockchain? I would have thought the blockchain needs to store the full tx including 20 bytes so that other nodes can replicate it. Continue reading >>

So, You Want To Use A Blockchain For That? - Coindesk

So, You Want To Use A Blockchain For That? - Coindesk

So, You Want to Use a Blockchain for That? Antony Lewis is abitcoin and blockchain consultant and blogger, who previously served as the director of business development at bitcoin exchangeitBit. In this article, Lewis attempts to break down some of the more misunderstood questions circulating among institutions seeking to adapt distributed blockchain tech for alternative uses. There are good reasons and bad reasons to use blockchains. In conversations with people considering blockchain use cases, I have noticed common confusions arising from certain words. At issue, is that they were initially used in a narrow context (usually to describe bitcoin's blockchain), and are now being interpreted more generically for other blockchains, in cases where they may no longer apply. In this post, I hope to untangle some of these common misconceptions. Bitcoin has specific security features for writing data due to the burden of proof-of-work consensus . That is, in order to add blocks of transactions to the blockchain, you have to validate all the transactions within the block (easy) and then perform repeated calculations (called hashing) to find a magic number that makes your block valid and acceptable to the other participants according to the rules of the network (easy, but computationally expensive, therefore energy intensive, therefore expensive). This proof-of-work burden combined with the longest chain rule makes it expensive to mine your own subversive chain. Private blockchains on the other hand, with known block validators, may have other mechanisms replacing proof-of-work that limit the ability of others to subvert the chain. These rules can specify that blocks need to be signed by a limited, known list of signatories. The round-robin fashion by which entities take it in Continue reading >>

Using Blockchain To Improve Data Management In The Public Sector

Using Blockchain To Improve Data Management In The Public Sector

Using blockchain to improve data management in the public sector By Steve Cheng, Matthias Daub, Axel Domeyer, and Martin Lundqvist Using blockchain to improve data management in the public sector Its not just for financial institutions; government agencies can use this digital ledger technology to protect trusted records and simplify interactions with citizens. An important function of government is to maintain trusted information about individuals, organizations, assets, and activities. Local, regional, and national agencies are charged with maintaining records that include, for instance, birth and death dates or information about marital status, business licensing, property transfers, or criminal activity. Managing and using these data can be complicated, even for advanced governments. Some records exist only in paper form, and if changes need to be made in official registries, citizens often must appear in person to do so. Individual agencies tend to build their own silos of data and information-management protocols, which preclude other parts of the government from using them. And, of course, these data must be protected against unauthorized access or manipulation, with no room for error. Stay current on your favorite topics Subscribe Blockchain technology could simplify the management of trusted information, making it easier for government agencies to access and use critical public-sector data while maintaining the security of this information. A blockchain is an encoded digital ledger that is stored on multiple computers in a public or private network. It comprises data records, or blocks. Once these blocks are collected in a chain, they cannot be changed or deleted by a single actor; instead, they are verified and managed using automation and shared governance p Continue reading >>

Crab Create. Retrieve. Append. Burn. The Bigchaindb Blog

Crab Create. Retrieve. Append. Burn. The Bigchaindb Blog

We introduced queryable assets a few weeks ago. Using BigchainDBs HTTP endpoint /assets?search=, we were the first to enable blockchain developers to directly query for assets. Were eager to share our initial results exploring blockchain, CRUD, and CRAB. If youve ever worked with databases or APIs, youre likely familiar with CRUD. CRUD is short for Create, Read, Update, Delete. These are the basic operations of a persistent data store. So then, whats ORM? ORM is an abstraction layer where database items are represented as programming language objects with variables as data, relations between items and functions that represent operations on that specific item in database. Djangos ORM is among the most famous ones: >>> Post.objects.create(author=me, title='Sample title', text='Test') Now, blockchains alter this interface. They allow Create, as in creating an asset or minting a token. They allow Read, as in querying for a transaction using its ID. They dont allow to Update or Delete anything that has been written though. Enter CRAB. As the basic operations are different in blockchains, we needed to modify CRUD to CRAB. CRAB stands for Create, Retrieve, Append and Burn. The two main differences being that we cannot update or delete assets due to blockchains immutability. To change those two operations for use on blockchain, we use: Append: an update is represented by appending a new version of the data. This way the latest version represents the current state of the data and the entire version history is maintained in the blockchain through transactionHistory. Think of it as versioning the data level. Note that underlying the append/update function is represented by a TRANSFER transaction to the same owner. Burn: Deleting something from a blo Continue reading >>

Blockchain As A Database

Blockchain As A Database

Much has been written about the merits of private blockchains. including articles by Richard Brown of IBM, as well as the founders of Eris. A private blockchain involves a separate, essentially closed network, of blockchain participants (also known as nodes). Each participant has their own copy of the blockchain, essentially a ledger, with a locked down history of all of the transactions that took place in the network. The advantage that the blockchain offers over traditional databases is that the history of transactions (essentially a transaction log) is shared between participants, and locked down using cryptographic layers. This isimmutable data storage. Much has been written about trust-less model that the public blockchain enables. This is a true innovation. However, in the context of private blockchains, the participants are all known this is because they need to be on-boarded and brought into the private blockchain network. So knowing your participants gives one level of trust and actually negatesthe need for mining the Proof of Work activity that makes it difficult for bad participants to take over and control the blockchain network. Transaction integrity in a blockchain is achieved through the locked down history provided by the ledger. No single participant can modify or rewrite this history once it has been agreed and locked down in the blockchain (unless they gain control of 51% of the network). This second level of trust is the added value of the blockchain over traditional databases. Not only is data encrypted and shared, but the transaction log is locked down and agreed in a way that it cannot be modified by any one participant, yet it can be easily inspected at any time by any participant. Weve been experimenting with Ethereum. The reason we love Ethere Continue reading >>

Is Blockchain Technology Really The Answer To Decentralized Storage?

Is Blockchain Technology Really The Answer To Decentralized Storage?

Is Blockchain Technology Really the Answer to Decentralized Storage? Blockchain is extraordinary technology, but may not be appropriate for storing large files, other data. The Blockchain has become much more than a simple piece of technology. It has become a symbol for freedom, transparency and fairness. With this being said, its no wonder we see projects leveraging Blockchain tech as a one-size-fits-all tool to solve all sorts of problems, many of which could not be further from the original purpose of the Blockchain. Nowadays, the words Blockchain technology are thrown around alot and sometimes the use of the technology itself is unnecessary. Tim Swanson, Director of Market Research at R3CEV has even coined the term " chain washing "to describe companies/startups that are using or trying to use Blockchain technology in certain areas when in fact, they could be using more advanced technology for the purpose at hand. This becomes especially evident when it comes to file and data storage. Although the Bitcoin Blockchain is basically a decentralized database for transactions, accounts and balances, keeping that information on a decentralized ledger is already proving to be a challenge due to capacity issues. Nevertheless, several projects and companies insist on looking at Blockchain-based solutions for storage and, while there are clear cases of misguided enthusiasm when it comes to the use of Blockchain technology, there are some projects out there that are worth taking a look at. Blockchain Technology as an Incentive Layer When it comes to a mutualistic relation between Decentralized Ledger Technology (DLT) and data storage, the most common use case for the Blockchain is as an incentive layer. This means that data isnt stored on the Blockchain itself, but the network Continue reading >>

Learn To Securely Share Files On The Blockchain Withipfs!

Learn To Securely Share Files On The Blockchain Withipfs!

Precision medicine. Powered by the Blockchain. Learn to securely share files on the blockchain withIPFS! If you have any questions about the following tutorial or want to request a future tutorial, join our Telegram chat! Ask us anything! Before reading this article, we recommend reading our previous post Code your own blockchain in less than 200 lines of Go! . Interest in the blockchain has hit feverish levels lately. While much of the buzz has been around applications of the blockchain such as cryptocurrencies and ICOs, the technology itself is just as exciting. The blockchain provides a democratized trust and validation protocol that has already disrupted banking and is on the verge of overhauling healthcare, financial services, social apps and more. However, from a technological perspective, the blockchain is not without its warts. Current proof of work consensus mechanisms have slowed transaction speeds to near crippling levels. Waiting for Bitcoin transactions to complete makes the platform nearly unusable to some and Cryptokitties almost brought the Ethereum network to a grinding halt . This makes storing data or large files on the blockchain a non-starter. If the blockchain can barely sustain small strings of text that simply record a balance transfer between two parties, how on earth are we ever going to store large files or images on the blockchain? Are we just going to have to be OK with limiting the utility of the blockchain to things that can only be captured in tiny text strings? The most promising solution thats available today is IPFS , or Interplanetary File System, created by the folks at Protocol Labs. Its a peer-to-peer protocol where each node stores a collection of hashed files. A client who wants to retrieve any of those files enjoys access to a Continue reading >>

A Blockchain Integrated Api As The Ultimate Source Ofdata.

A Blockchain Integrated Api As The Ultimate Source Ofdata.

A blockchain integrated API as the ultimate source ofdata. We can now easily store and retrieve JSONs from distributed ledger blockchain technologies Easy for developers to deploy and configure Technology is now ready for the practitioners as well as pioneers You really need to get yourself involved! Technical guide here: Further reading here: We all want a bit of blockchain. It is hard to think of any digital project in 2017 where you cant add a bit of blockchain on top and it suddenly becomes the tastiest tech on the menu. Share it with your friends, tell your investors! Why? That is the million dollar question (in some cases quite literally). We all realise that blockchain technology has massive potential, and we all know that we definitely HAVE to be using it because it is going to be revolutionary; but we havent quite figured out exactly how just yet. This is especially true in my sector. From a web development perspective, we all want to be working with blockchain technologies, but we are still a little bit green as to how it will add value to our day to day projects. Massive corporations are integrating blockchain technology into their business processes; we already know that it adds tremendous value for auditing data and that it could eventually become a neutral arbitrator of all our processes. A referee with no hidden motives. This is great for commerce, and useful for creating distributed ledgers of information that belong to everyone and no-one, public voting records for example. Or in the case of a bank or giant multinational, incorruptible transaction records. But how How in the name of all that we hold sacred can this technology possibly be useful for a humble website. In 2017 something happened. You may not have noticed it, you may not have the slightest Continue reading >>

How Can I Retrieve The Data From Block In Ethereum Blockchain?

How Can I Retrieve The Data From Block In Ethereum Blockchain?

I did one small event registration smart contract (By using solidity()) in that I purchased a ticket for an event by giving the details of my email id and no.of tickets I want. Finally, I want to know how can I get back what are the details I was given. I am using testrpc, truffle, and private net.After clicking on purchase I got these details in tetrpc terminal Transaction: 0x35e92857102b0dbacd43234d1ea57790405eb9bef956b245c6b7737bc23d011b Gas usage: 106532 Block Number: 5 Block Time: Sat Feb 03 2018 12:05:57 GMT+0530 (IST) [email protected]:~/EventRegistration-POC/EventRegistration$ truffle consoletruffle(development)> web3.eth.getTransaction('0x35e92857102b0dbacd43234d1ea57790405eb9bef956b245c6b7737bc23d011b'){ hash: '0x35e92857102b0dbacd43234d1ea57790405eb9bef956b245c6b7737bc23d011b', nonce: 4, blockHash: '0x7c790dae57babfe40d68d8aad94913c2b748501c5734aec86cc3fcf0afc4f154', blockNumber: 5, transactionIndex: 0, from: '0x031e060414a0d2573f5b10bc75c0894d72288292', to: '0xa88a366e888bbccfb78092957ffc7760bc7c6db1', value: BigNumber { s: 1, e: 18, c: [ 60000 ] }, gas: 200000, gasPrice: BigNumber { s: 1, e: 0, c: [ 1 ] }, input: '0xa28f161c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000b6d40676d61696c2e636f6d000000000000000000000000000000000000000000' }truffle(development)> but I didn't get the details I was given while purchasing. Please tell me how can I do this? web3.eth.getTransaction(txHash) will returns transaction details like blockHash, transactionIndex, from, to, etc. It will take some time to miner to mine block and add to blockchain. So its not instant. If you want to know any storage value is added/modified in blockchain Continue reading >>

Blockchains Versus Traditional Databases

Blockchains Versus Traditional Databases

Blockchain | Artificial Intelligence | Creating Massive Value | Enhancing Transactions | Increasing Personal Freedoms | Twitter: @ShaanRay To understand the difference between a blockchain and a traditional database, it is worth considering how each of these is designed and maintained. Traditional databases use client-server network architecture. Here, a user (known as a client) can modify data, which is stored on a centralized server. Control of the database remains with a designated authority, which authenticates a clients credentials before providing access to the database. Since this authority is responsible for administration of the database, if the security of the authority is compromised, the data can be altered, or even deleted. Blockchain databases consist of several decentralized nodes. Each node participates in administration: all nodes verify new additions to the blockchain, and are capable of entering new data into the database. For an addition to be made to the blockchain, the majority of nodes must reach consensus. This consensus mechanism guarantees the security of the network, making it difficult to tamper with. In Bitcoin, consensus is reached by mining (solving complex hashing puzzles), while Ethereum seeks to use proof of stake as its consensus mechanism. To learn more about the difference between these two consensus mechanisms, read my earlier post. A key property of blockchain technology, which distinguishes it from traditional database technology, is public verifiability, which is enabled by integrity and transparency. Integrity: every user can be sure that the data they are retrieving is uncorrupted and unaltered since the moment it was recorded Transparency: every user can verify how the blockchain has been appended over time A map of Dashcoin Continue reading >>

Blockchain Data Api - Blockchain.info

Blockchain Data Api - Blockchain.info

Some API calls are available with CORS headers if you add a &cors=true parameter to the GET request You can also request the block to return in binary form (Hex encoded) using ?format=hex { "hash":"0000000000000bae09a7a393a8acded75aa67e46cb81f7acaa5ad94f9eacd103", "ver":1, "prev_block":"00000000000007d0f98d9edca880a6c124e25095712df8952e0439ac7409738a", "mrkl_root":"935aa0ed2e29a4b81e0c995c39e06995ecce7ddbebb26ed32d550a72e8200bf5", "time":1322131230, "bits":437129626, "nonce":2964215930, "n_tx":22, "size":9195, "block_index":818044, "main_chain":true, "height":154595, "received_time":1322131301, "relayed_by":"108.60.208.156", "tx":[--Array of Transactions--]{ You can also request the transaction to return in binary form (Hex encoded) using ?format=hex { "hash":"b6f6991d03df0e2e04dafffcd6bc418aac66049e2cd74b80f14ac86db1e3f0da", "ver":1, "vin_sz":1, "vout_sz":2, "lock_time":"Unavailable", "size":258, "relayed_by":"64.179.201.80", "block_height, 12200, "tx_index":"12563028", "inputs":[ { "prev_out":{ "hash":"a3e2bcc9a5f776112497a32b05f4b9e5b2405ed9", "value":"100000000", "tx_index":"12554260", "n":"2" }, "script":"76a914641ad5051edd97029a003fe9efb29359fcee409d88ac" } ], "out":[ { "value":"98000000", "hash":"29d6a3540acfa0a950bef2bfdc75cd51c24390fd", "script":"76a914641ad5051edd97029a003fe9efb29359fcee409d88ac" }, { "value":"2000000", "hash":"17b5038a413f5c5ee288caa64cfab35a0c01914e", "script":"76a914641ad5051edd97029a003fe9efb29359fcee409d88ac" } ]} { "values" : [ { "x" : 1290602498, //Unix timestamp "y" : 1309696.2116000003 }]} { "blocks" : [ --Array Of Blocks at the specified height-- ]} Optional limit parameter to show n transactions e.g. &limit=50 (Default: 50, Max: 50) Optional offset parameter to skip the first n transactions e.g. &offset=100 (Page 2 for limit 50) { Continue reading >>

How Can Blockchain Be Used As A Database To Store Data?

How Can Blockchain Be Used As A Database To Store Data?

How can blockchain be used as a database to store data? Currently decentralized blockchain applications have few options to store data. Decentralized storage options are: Decentralized cloud file storages, such as Storj, Sia, Ethereum Swarm, etc. Distributed Databases, such as Apache Cassandra, Rethink DB, etc. Storing everything in blockchain itself: Storing everything in blockchain is the simplest solution. Currently most of the simple decentralized applications work exactly this way. However, this approach has significant drawbacks. First of all transactions to blockchain are slow to confirm. It may seem to be fast for money transfer (anyone can wait a minute), but it is extremely slow for a rich application data flow. Rich application may require many thousands transactions per second. Secondly, it is immutable. The immutability is the strength of blockchain that gives it high robustness but it is a weakness for a data storage. User may change their profile or replace their photo, still all the previous data will sit in blockchain forever and can be seen by anyone. The immutability results in one more drawback - the capacity. If all the applications would keep their data in blockchain, the blockchain size will grow rapidly, exceeding publicly available hard drive capacity. Full nodes can require special hardware. It may result in dangerous centralization of blockchain. Thats why storing data in blockchain only is not a good option for a rich decentralized application. Peer to peer file system, such as InterPlanetary File System. IPFS allows to share files on client computers and unites them in the global file system. The technology is based on BitTorrent protocol and Distributed Hash Table. There are several good moments. It is really peer to peer - to share anythi Continue reading >>

Web3js - How Do I Access Data From Blockchain - Ethereum Stack Exchange

Web3js - How Do I Access Data From Blockchain - Ethereum Stack Exchange

I am using IPFS to store data [As per suggestion from an answer in ethereum stackexchange ,I couldnt find link to the question:( ]. The hash of file stored in ipfs is inserted into the data field of a transaction. But I couldnt find a way to access these datafields . Tried fetching transaction by using the transactionhash , but the retrieved result does not have a data field . Is there any function similar to eth.filter in web3 v1.0 ?. function(req,res){console.log(req.body)web3.eth.getAccounts(function(e,accounts){ web3.eth.personal.unlockAccount(accounts[0],req.body.pass, 1000000); web3.eth.sendTransaction({ from:accounts[0], to:req.body.address, data: req.body.id }, function(error, hash){ console.log(error) console.log(hash) });})} Running the above code returns a transaction hash . req.body.id is fetched from an api endpoint which returns hash of the uploaded file . To list all transactions , I tried to use web3.eth.filter but it returned an error : TypeError: web3.eth.filter is not a function Then I console logged web3.eth and couldnt find any filter function in the log .Is there any function to list all the transactions from/to an address ? Continue reading >>

Where And How Application Data Is Stored In Ethereum?

Where And How Application Data Is Stored In Ethereum?

Where and how application data is stored in Ethereum? Ethereum can host decentralized applications, DAPPs. These applications exist through small programs that live on the Blockchain: Smart Contracts. But when I write a Smart Contract, where is my application data Stored? We want to understand how data storage works before working on this platform. Code execution, servers and programming language are rarely critical to the design of an application. But the Data, its structure, and its security will constrain most of our design. Lets imagine we are porting apps to Ethereum: For a Facebook-like, where are the publications and comments data? For a Dropbox-like, where are my private files? Or for a Slack-like chat app, where do we store discussion channels? What about Private Messages? Were going to forget about the Blockchain for a minute: we already know its a machine that generates Consensus . We can forget the Blockchain and assume that Ethereum is a big, slow, reliable, computer. Were looking at the Ethereum System from a higher level of abstraction: the Software part. Ethereum holds a set of accounts. Every account has an owner and a balance (some Ether). If I prove my identity, I can transfer Ether from my account to another. The money will flow from one account to the other. Its an atomic operation called a Transaction. The Ethereum Software is a Transaction Processing System: 1. We have a state: the set of all accounts and their balance, 3. We get a new state: an updated set of accounts and their balances. Today we look into the ability to execute code and programs within a transaction. Thats where Smart Contracts come into play. Every account has an owner and a balance. But some of these accounts are special; they own themselves. At creation time, we give them a Continue reading >>

Blockchain - How To Access Bitcoin's Transaction Database? - Bitcoin Stack Exchange

Blockchain - How To Access Bitcoin's Transaction Database? - Bitcoin Stack Exchange

How to access Bitcoin's transaction database? I want to process the Bitcoin network's transactions. As I understand it, the Bitcoin-Qt client downloads and stores all that information locally. Since version 0.8 LevelDB has been used to access this data. I found two databases, in blocks/index and in chainstate. However, I cannot make sense of the content. The first entry looks like this: migrated from stackoverflow.com May 11 '13 at 21:14 This question came from our site for professional and enthusiast programmers. The data is stored in an application-specific format optimized for compact storage, and wasn't really intended to be easily parsed by other applications. You can access the data in the chainstate through the gettxout RPC call, and the data in the block index through getblock. I'll try to find time for a write-up of the exact format. Pieter Wuille Jul 29 '13 at 7:17 @PieterWuille Your comment would be a great start for an answer. Murch Oct 3 '14 at 10:47 The best way to write a parser of your own for the blockchain is to find the source code of one that already exists and from that deduce the precise underlying data structure and how to parse and interpret it. e.g. here in C++ and here in C# - and there are many others. The data in the blockchain is stored in a custom binary format that is a little tricky to untangle without some help; this link seems as good as any to get started on the overall structure. There are many"gotcha's" to watch out for. For example: 'endianess' i.e. having to reverse binary digits before interpretation and some of the interesting values associated with a transaction have to be calculated e.g. for addresses 'big numbers' where the numbers used internally are so huge you may need custom code/libraries to deal with them Comparing your Continue reading >>

More in ethereum