For shared immutable key-value and time series databases
Today we’re proud to release the latest version of MultiChain, which implements a crucial new set of functionality called “streams”. Streams provide a natural abstraction for blockchain use cases which focus on general data retrieval, timestamping and archiving, rather than the transfer of assets between participants. Streams can be used to implement three different types of databases on a chain:
- A key-value database or document store, in the style of NoSQL.
- A time series database, which focuses on the ordering of entries.
- An identity-driven database where entries are classified according to their author.
These can be considered as the ‘what’, ‘when’ and ‘who’ of a shared database.
Any number of streams can be created in a MultiChain blockchain, and each stream acts as an independent append-only collection of items. Each item in a stream has the following characteristics:
- One or more publishers who have digitally signed that item.
- An optional key for convenient later retrieval.
- Some data, which can range from a small piece of text to many megabytes of raw binary.
- A timestamp, which is taken from the header of the block in which the item is confirmed.
Behind the scenes, each item in a stream is represented by a blockchain transaction, but developers can read and write streams with no awareness of this underlying mechanism. (More advanced users can use raw transactions to write to multiple streams, issue or transfer assets and/or assign permissions in a single atomic transaction.)
Streams integrate with MultiChain’s permissions system in a number of ways. First, streams can only be created by those who have permission to do so, in the same way that assets can only be issued by certain addresses. When a stream is created, it is open or closed. Open streams are writeable by anybody who has permission to send a blockchain transaction, while closed streams are restricted to a changeable list of permitted addresses. In the latter case, each stream has one or more administrators who can change those write permissions over time.
Each blockchain has an optional ‘root’ stream, which is defined in its parameters and exists from the moment the chain is created. This enables a blockchain to be used immediately for storing and retrieving data, without waiting for a stream to be explicitly created.
As I’ve discussed previously, confidentiality is the biggest challenge in a large number of blockchain use cases. This is because each node in a blockchain sees a full copy of the entire chain’s contents. Streams provide a natural way to support encrypted data on a blockchain, as follows:
- One stream is used by participants to distribute their public keys for any public-key cryptography scheme.
- A second stream is used to publish data, where each piece of data is encrypted using symmetric cryptography with a unique key.
- A third stream provides data access. For each participant who should see a piece of data, a stream entry is created which contains that data’s secret key, encrypted using that participant’s public key.
This provides an efficient way to archive data on a blockchain, while making it visible only to certain participants.
Retrieving from streams
The core value of streams is in indexing and retrieval. Each node can choose which streams to subscribe to, with the blockchain guaranteeing that all nodes which subscribe to a particular stream will see the same items within. (A node can also be configured to automatically subscribe to every new stream created.)
If a node is subscribed to a stream, information can be retrieved from that stream in a number of ways:
- Retrieving items from the stream in order.
- Retrieving items with a particular key.
- Retrieving items signed by a particular publisher.
- Listing the keys used in a stream, with item counts for each key.
- Listing the publishers in a stream, with item counts.
As mentioned at the start, these methods of retrieval allow streams to be used for key-value databases, time series databases and identity-driven databases. All retrieval APIs offer start and count parameters, allowing subsections of long lists to be efficiently retrieved (like a LIMIT clause in SQL). Negative values for start allow the most recent items to be retrieved.
Streams can contain multiple items with the same key, and this naturally solves the tension between blockchain immutability and the need to update a database. Each effective database ‘entry’ should be assigned a unique key in your application, with each update to that entry represented by a new stream item with its key. MultiChain’s stream retrieval APIs can then be used to: (a) retrieve the first or last version of a given entry, (b) retrieve a full version history for an entry, (c) retrieve information about multiple entries, including the first and last versions of each.
Note that because of a blockchain’s peer-to-peer architecture, items in a stream may arrive at different nodes in different orders, and MultiChain allows items to be retrieved before they are ‘confirmed’ in a block. As a result, all retrieval APIs offer a choice between global (the default) or local ordering. Global ordering guarantees that, once the chain has reached consensus, all nodes receive the same responses from the same API calls. Local ordering guarantees that, for any particular node, the ordering of a stream’s items will never change between API calls. Each application can make the appropriate choice for its needs.
Streams and the MultiChain roadmap
With the release of streams, we’ve completed the last major piece of work for MultiChain 1.0, and are now firmly on the path to beta. We expect to spend the next few months expanding our internal test suite (already quite large!), finishing the Windows and Mac ports, adding some more useful APIs, updating the Explorer for streams, tweaking aspects of the consensus mechanism, releasing our web demo, and generally tidying up code and help messages. Most importantly, we’ll continue to fix any bugs as soon as they’re discovered, so that our mistakes don’t interrupt your work.
In the longer term, where do streams fit into the MultiChain roadmap? Taking a step back, MultiChain now offers three areas of high-level functionality:
- Permissions to control who can connect, transact, create assets/streams, mine/validate and administrate.
- Assets including issuance, reissuance, transfer, atomic exchange, escrow and destruction.
- Streams with APIs for creating streams, writing, subscribing, indexing and retrieving.
After the release of MultiChain 1.0 (and a premium version), what’s next in this list? If you look at the API command which is used to create streams, you’ll notice an apparently superfluous parameter, with a fixed value of
stream. This parameter will allow MultiChain to support other types of high-level entity in future.
Possible future values for the parameter include
evm (for an Ethereum-compatible virtual machine),
sql (for an SQL-style database) or even
wiki (for collaboratively edited text). Any shared entity whose state is determined by an ordered series of changes is a potential candidate. Each such entity will need: (a) APIs which provide the right abstraction for updating its state, (b) appropriate mechanisms for subscribed nodes to track that state, and (c) APIs for efficiently retrieving part or all of the state. We’re waiting to learn which other high-level entities would be most useful, to be implemented by us or by third parties via a plug-in architecture.
What about smart contracts?
In a general sense, MultiChain takes the approach in which data is embedded immutably in a blockchain, but the code for interpreting that data is in the node or application layer. This is deliberately different from the “smart contracts” paradigm, as exemplified by Ethereum, in which code is embedded in the blockchain and runs in a virtual machine. In theory, because smart contracts are Turing complete, they can reproduce the behavior of MultiChain or any other blockchain platform. In practice, however, Ethereum-style smart contracts have many painful shortcomings:
- Every node has to perform every computation, whether it’s of interest or not. By contrast, in MultiChain each node decides which streams to subscribe to, and can ignore the data contained by others.
- The virtual machine used for smart contracts has drastically worse performance than code which has been natively compiled for a given computer architecture.
- Smart contract code is immutably embedded in a chain, preventing features from being added and bugs from being fixed. This was demonstrated forcefully in the demise of The DAO.
- Transactions sent to a smart contract cannot update a blockchain’s state until their final ordering is known, because of the nature of general purpose computation. This leads to delays (until a transaction is confirmed in a block) as well as possible reversals (in the event of a fork in the chain). By contrast, MultiChain can treat each type of unconfirmed transaction in the appropriate way: (a) incoming assets immediately update a node’s unconfirmed balance, (b) incoming stream items are instantly available, with their global ordering subsequently finalized, (c) permissions changes are applied immediately and then replayed in incoming blocks.
Nonetheless, as I’ve said before, we’re certainly not ruling out smart contracts as a useful paradigm for blockchain applications, if and when we see strong use cases. However, in MultiChain smart contracts would be implemented in a stream-like layer on top of the blockchain, rather than the lowest transaction level. This will preserve MultiChain’s superior performance for simpler blockchain entities like assets and streams, while offering slower on-chain computation where it’s really needed. But there are fewer such cases than you might think.
Please post any comments on LinkedIn.
All commands related to streams are documented in full in the MultiChain API page, but here is a brief summary:
- Create a stream using
createfrom ... stream
- Add an item to a stream with
- Retrieve a list of streams using
- Start or stop tracking a stream with
- Retrieve stream items using
- List stream keys and publishers with
- For large stream items, retrieve the full data using
- Control per-stream permissions with calls like
grant [address] stream1.write
- View a stream’s permissions using
Some other developer notes relating to streams:
createpermission allows an address to create streams.
- Relevant per-stream permissions are
- New blockchain parameters:
root-stream-name(leave empty for none),
- New runtime parameters:
autosubscribeto automatically subscribe to new streams created and
maxshowndatato limit the amount of data in API responses (see
- The maximum size of a stream item’s data is fixed by the
max-std-op-return-sizeblockchain parameter, as well as the smaller of the
max-std-tx-sizevalues minus a few hundred bytes.
- Nodes using the old wallet format cannot subscribe to streams, and should be upgraded.
President Maduro: Venezuela Seeks Opportunities To Use Cryptocurrency For Global Trade
- Venezuela’s cryptocurrency story continues as the country’s President Nicolas Maduro has presented new use cases.
- A recent report informed that the South American nation is studying the possibility of using digital assets in trades alongside the national Petro.
- President Maduro has presented new anti-sanctions law in the Constituent National Assembly. In a recent speech, he asserted:
“The anti-sanctions law is the first response to give new strength to the use of petro and other cryptocurrencies, national and global, in domestic and foreign trade, so that all cryptocurrencies of the world, state and private, could be used. This is an important project that is under development.”
- The news comes after Maduro suggested last year that his country could adopt cryptocurrency payments.
- Additionally, Venezuela signed a new tax agreement this summer that enabled the nation to start collecting taxes and fees in the Petro.
- A study reported by CryptoPotato revealed that digital assets already play an essential role in the country’s struggling economy. Venezuela’s intensifying financial crisis has catalyzed significant interest in cryptocurrencies as people seek opportunities to escape the devaluating national currency.
- The Bitcoin peer-to-peer volume exemplifies the growing interest in the primary cryptocurrency within the country. As per data from coin.dance, the BTC P2P volume on LocalBitcoins has been continuously surging in the past several months.
Leader That Allowed Scams: TRON’s Justin Sun Responds to Claims by Ex-Employees
Yesterday The Verge published an elaborate article portraying a picture of Justin Sun’s leadership at BitTorrent post the peer-to-peer file-sharing site’s acquisition by the TRON foundation.
Sun later responded to the ‘false-claims’ made by TRON/BitTorrent’s ex-employees in the article with ‘An Open Letter to Anyone Who Cares to Read’ on Medium.
Claim: Megalomaniac Leader; Response: True Libertarian
In the supposedly expose piece, author
Refuting the above portrayal of his leadership, Sun, in his response, stated that he has devoted his entire life ‘to being a responsible, global citizen’. Adding to this, Justin said that is a true champion of libertarian principles for a significant portion of his life.
I have devoted myself to being a responsible, global citizen throughout my entire life, spending significant portions of my personal and professional life to activities promoting universal values of respect, liberty, equality, and kindness.
The TRON and BitTorrent chief impressed further on his ‘global’ approach to things. He explained that the TRON Foundation harbors a ‘global team of talented contributors and developers’. And that he takes ‘pride in working’ with this global community to make TRON ‘one of the greatest decentralized blockchain protocols’.
Claim: Freedom Suppressor; Response: Upholder Of Human Rights, Individual Values
Dunaway reportedly engaged in conversations with folks who are/were associated with the TRON brand and the work culture. From what he gathered, Justin enforced a draconian company culture, with employees officially following the ‘9-9-6’ norm.
According to the article, TRON’s HR had Slack replaced with its Chinese counterpart DingTalk. The communication platform had an in-built surveillance mechanism that would use ‘Apple Health to count people’s steps’. Also, DingTalk used to ping employees literally all the time.
To this, Sun responded by saying that he has left no stone turned in, establishing a work culture that respects.
diversity and individuality through a culture that cherishes fundamental human values freedom of speech, user privacy, intellectual property protection, kindness, a diversified working environment, and compliance with legal standards.
Justin went on to comment that TRON and BitTorrent operate with a ‘globally collaborative team’. One that upholds and respects the ethos of cross-culture teams. Sun claimed that the folks at TRON folks have ‘worked hard’ to create a collaborative work culture. One that values freedom of speech and individual privacy.
Claim: Suppressed Criticism, Allowed Scams; Response: No Control Over Protocol Functioning
The Verge piece mentioned that ‘decentralization’ was just a facade for what was happening behind the curtains. Justin Sun and his core officials exercised strict control over content moving about and within the TRON network.
This involved allegedly paying a Redditor to ‘erase negative posts’. Which later drew the ire of the community.
Free speech is part of the ideology of decentralization, where ideas flow without gatekeepers. Tron started deleting any post it wanted.
The article also claimed that TRON’s administration team was silent and allowed the perpetration of scams on the network. While this happened, scammers and the scammed continue to grow in numbers while the management did nothing to interfere.
Justin, in his Medium post, said that he and the entire TRON administration team function sans control. Even though the team at TRON works to upgrade the platform, they do not exercise any censorship/regulation.
…we have no control or discretion over what applications use the protocol, what data is transmitted, or how its community members use it.
Sun went to add that he and his team are proud of TRON and BitTorrent’s achievement over the years. He went to quote that both have collectively ‘served 2 billion users around the world. These include ‘numerous enterprises, universities, and governments’.
Lastly, the TRON and BitTorrent boss struck down all claims made by ex-employees Lucasz Juraszek, Richard Hall, and Cong Li. Justin declared that the TRON foundation’s legal counsel has submitted all the requisite proofs and evidence pieces to the court. “We believe the decision will speak for itself”, he said.
BTT and TRX’s price didn’t seem to undergo any correction following the release of the bitterly scathing Verge piece. On the contrary, BTT is actually up 2.3% in the last 24 hours.
Featured image courtesy of QZ.com
Ethereum Price Analysis: Will ETH Surpass 2019 Highs Towards $400?
ETH/USD – Bulls Struggling To Pass 2019 Highs
Key Support Levels: $350, $336, $325.
Key Resistance Levels: $364, $378, $390.
Ethereum pushed higher last week to reach the 2019 highs at around $364 over the weekend. Unfortunately, it has not been able to overcome this resistance in the past four days of trading as bearish divergence popped up on the short term charts – highlighted in our last analysis.
For now, Ethereum is finding strong support between $350 and $355; however, it is looking increasingly likely to break this support soon as the short-term bearish divergence continues to play out.
ETH-USD Short Term Price Prediction
If ETH does penetrate back beneath $350, the first level of strong support lies at $336 (100-days EMA). Beneath this, additional support lies at $324 (.618 Fib), $320, $310, and $300.
On the other side, the first level of resistance lies at $364 (2019 highs). Above this, resistance is expected at $378 (bearish .382 Fib), $390, and $400.
The Daily RSI did dip beneath the mid-line to suggest that the sellers are battling to gain control of the market momentum.
ETH/BTC – Bears Continue To Face Resistance at Falling Trend Line
Key Support Levels: 0.033BTC, 0.032 BTC, 0.0315 BTC.
Key Resistance Levels: 0.0337 BTC, 0.0347 BTC, 0.0352 BTC.
Against Bitcoin, Ethereum continues to face the resistance at a falling trend line that has dictated price action during September. Each time ETH attempted to break above this falling trend line, the coin was rejected and headed lower.
On Monday, ETH attempted to push beyond the March 2019 support at 0.0337 BTC but could not pass it. As a result, ETH moved sideways this week and has returned to the falling trend line. Here, it can be expected that ETH should be heading lower – especially with the daily RSI flattening out in the bearish territory.
ETH-BTC Short Term Price Prediction
Looking ahead, if the trend line rejects the sellers, the first two levels of support lie at 0.033 BTC and 0.032 BTC. Beneath this, support lies at 0.0315 BTC (100-days EMA & downside 1.414 Fib Extension), 0.0311 BTC (.618 Fib Retracement), and 0.0305 BTC.
On the other side, if the bulls can penetrate the falling trend line, the first level of resistance lies at 0.0337 BTC (March 2019 Support). Above this, resistance lies at 0.0347 BTC, 0.0352 BTC, and 0.0361 BTC (March 2019 High).
Click here to start trading on BitMEX and receive 10% discount on fees for 6 months.
Disclaimer: Information found on CryptoPotato is those of writers quoted. It does not represent the opinions of CryptoPotato on whether to buy, sell, or hold any investments. You are advised to conduct your own research before making any investment decisions. Use provided information at your own risk. See Disclaimer for more information.
Cryptocurrency charts by TradingView.
Blockchain1 month ago
Market Wrap: Bitcoin’s Powell-Induced Price Swing; Ethereum Still High on Gas
Blockchain3 weeks ago
Blockchain Bites: Is DeFi an Inside Deal?
Blockchain2 months ago
The US Post Office Files a Patent for a Blockchain-Based Voting System
Blockchain4 months ago
How to Identify the ‘Third Wave’ of Cannabis Investments
Blockchain2 months ago
Wealthfront Lures Millenials With Crypto Memes and Tactics
Blockchain2 months ago
Top Five Most Advanced Cryptocurrencies
Blockchain4 months ago
5 Tips to Interest the Press in Your Cannabis Business
Blockchain3 months ago
Top 5 Most Effective Cannabis Marketing Strategies