Connect with us

Blockchain

Introducing MultiChain Streams

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… Read more »

Republished by Plato

Published

on

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:

  1. A key-value database or document store, in the style of NoSQL.
  2. A time series database, which focuses on the ordering of entries.
  3. 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.

Streams basics

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:

  1. One stream is used by participants to distribute their public keys for any public-key cryptography scheme.
  2. A second stream is used to publish data, where each piece of data is encrypted using symmetric cryptography with a unique key.
  3. 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.

 

Technical addendum

All commands related to streams are documented in full in the MultiChain API page, but here is a brief summary:

  • Create a stream using create stream or createfrom ... stream
  • Add an item to a stream with publish or publishfrom
  • Retrieve a list of streams using liststreams
  • Start or stop tracking a stream with subscribe and unsubscribe
  • Retrieve stream items using liststreamitems, liststreamkeyitems and liststreampublisheritems
  • List stream keys and publishers with liststreamkeys and liststreampublishers
  • For large stream items, retrieve the full data using gettxoutdata (see maxshowndata below)
  • Control per-stream permissions with calls like grant [address] stream1.write
  • View a stream’s permissions using listpermissions stream1.*

Some other developer notes relating to streams:

  • The create permission allows an address to create streams.
  • Relevant per-stream permissions are write, admin and activate
  • New blockchain parameters: root-stream-name (leave empty for none), root-stream-open, anyone-can-create, admin-consensus-create, max-std-op-returns-count
  • New runtime parameters: autosubscribe to automatically subscribe to new streams created and maxshowndata to limit the amount of data in API responses (see gettxoutdata above).
  • The maximum size of a stream item’s data is fixed by the max-std-op-return-size blockchain parameter, as well as the smaller of the maximum-block-size and max-std-tx-size values minus a few hundred bytes.
  • Nodes using the old wallet format cannot subscribe to streams, and should be upgraded.

 

Source: https://www.multichain.com/blog/2016/09/introducing-multichain-streams/

Blockchain

Beware: Latest Ledger Email Phishing Scam Making The Rounds

Republished by Plato

Published

on

Consumers who have purchased Ledger hardware wallets have been waking up to nasty emails claiming that their crypto assets are in danger of being stolen. It is the latest in a long list of phishing attacks designed to lure the uninitiated into divulging their secret phrases or downloading malware.

The first round of spurious emails was asking for the 24-word recovery phrase and Ledger responded with a warning emailed to customers confirming that it would never ask for this.

The second round of emails is a little more insidious as they claim that a data breach on Ledger servers has affected the wallet associated with the target email account. It asks users to download the latest version of Ledger Live, via an email embedded link, and reset their PIN numbers.

It was reported that Ledger did suffer a data breach in July resulting in 9,500 users having their personal information compromised.

Ledger scam email

Sneaky Social Engineering

On initial glance, the email looks genuine but there are a number of key giveaways that are easy to spot for the trained eye. Firstly, the domain name is not from ledger.com but legder.com

Secondly, hovering over the link in the box (but being careful not to click it) reveals a dodgy URL; http://url9594.legder.com which is likely to result in the downloading of malware which may be able to log keystrokes, steal credentials, or mine cryptocurrency.

Crypto investors and traders have already taken to twitter to share this phishing scam and warn others about it;

Additionally, Ledger itself has published a list confirming knowledge of these phishing attempts and reinforcing the premise that funds are safe providing the recovery phrase is;

The company stated that nobody, including Ledger, should ever ask for the PIN number of recovery phrase, but this latest email was a call to action prompting the clicking of a malicious link.

Risk Mitigation

Hardware wallets, such as those produced by Ledger or Trezor, take an extra step to mitigate these risks. Ledger stated that crypto assets cannot be sent from a Ledger device unless the user physically connects it to the computer and verifies the transaction on both the computer and the device.

If malware is controlling the PC or smartphone, it cannot control the Ledger wallet, even when it is plugged into the computer.

SPECIAL OFFER (Sponsored)

Binance Futures 50 USDT FREE Voucher: Use this link to register & get 10% off fees and 50 USDT when trading 500 USDT (limited offer).


Source: https://cryptopotato.com/beware-latest-ledger-email-phishing-scam-making-the-rounds/

Continue Reading

Blockchain

After The Storm: Bitcoin Holds $13K Despite Wall Street Monday’s Plunge

Republished by Plato

Published

on

Despite a brief price slump to $12,800, Bitcoin has perhaps indicated signs of decoupling from the stock markets. Wall Street bled out rather viciously yesterday, while BTC has risen above $13,000 again.

Bitcoin Decouples From Stocks?

During the past several weeks, Bitcoin’s price performance has resembled that of the US stock markets. For example, when news broke out that US President Donald Trump tested positive for the COVID-19 virus, both asset groups tanked. Shortly after, when Trump left the hospital, BTC, and the stock market surged.

However, Bitcoin displayed a few yearly signs of decoupling last week. The three most prominent US-based stock indexes, namely the S&P 500, the Nasdaq Composite, and the Dow Jones Industrial Average, lost value, while BTC went on an impressive roll, resulting in a fresh yearly high of above $13,350.

Yesterday’s trading session was also quite negative for Wall Street. The growing COVID-19 confirmed cases and concerns regarding the new US stimulus brought massive drops. The S&P 500 and Nasdaq declined by nearly 2%, while the Dow closed with a 2.3% decrease.

Initially, Bitcoin also followed the adverse performance. BTC was trading high above $13,200, but it vigorously tanked to its daily low of about $12,800. However, the primary cryptocurrency has recovered most of its losses since then and trades closely to $13,100.

btcusdt_char
BTC/USDT. Source: TradingView

Red Dominates The Altcoin Market

On a 24-hour scale, most altcoins have lost significant chunks of value. Ethereum has dived by 3% and trades well below $400. Just a few days ago, ETH touched $420.

Ripple (-1.8%) has dipped beneath $0.25. Bitcoin Cash (-3.1%), Chainlink (-4.6%), Cardano (-1.5%), and Litecoin (-2%) are all in the red from the top 10.

There’re two obvious exceptions – Binance Coin and Polkadot. BNB has jumped by over 1% to $31.26, while DOT has surged by 9% to $4.7.

heatmap
Cryptocurrency Market Heatmap. Source: Quantify Crypto

Further losses are evident from lower and mid-cap altcoins. Quant leads the way with a 13% decrease. Reserve Rights (-10.3%), HedgeTrade (-10%), CyberVein (-10%), Elrond (-9%), and Ampleforth (-8.5%) follow.

Nevertheless, a few coins are deep in green as well. Kusama is the most impressive gainer with a 26% surge, Ocean Protocol (14%), and Velas (9%) are next.

SPECIAL OFFER (Sponsored)

Binance Futures 50 USDT FREE Voucher: Use this link to register & get 10% off fees and 50 USDT when trading 500 USDT (limited offer).

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.


Source: https://cryptopotato.com/after-the-storm-bitcoin-holds-13k-despite-wall-street-mondays-plunge/

Continue Reading

Blockchain

Here’s Why Bitcoin’s Hashrate May Drop Further This Week

Republished by Plato

Published

on

Yesterday, the Bitcoin network witnessed approximately 22 exahashes per second (EH/s) exit the ecosystem, as noted by Hashr8’s Thomas Heller on Twitter.

The self-professed “mining maximalist” also shared his estimation that we’ll see the BTC mining difficulty decline somewhere between 7.4% to 8.8% by the end of the week — a drop that, if true, would be the worst negative difficulty adjustment since the infamous, COVID-19-induced “Black Thursday” crash in March.

However, none of this is a mere random anomaly or coincidence.

hash-rate
Bitcoin’s hash rate has dropped significantly over recent days, with further drops likely. Source: Blockchain.com

Seasonal Migration

The root cause of Bitcoin’s hash rate drop may be attributed to the end of the rainy season in China’s Sichuan province — where miners seasonally migrate to to reap the advantages of cheap hydro-electric power as the rains raise water levels and, in turn, BTC miners’ profit margins. This has made Sichuan one of the world’s foremost Bitcoin mining hotspots… at least, while it’s raining.

Sichuan most recently represented 18.5% of Bitcoin’s global hash rate in the spring of 2020, according to data from the University of Cambridge’s Bitcoin Electricity Consumption Index. However, this share of the world’s BTC hash rate declines after the province’s rainy season.

To put it simply, when the rains stop, the Bitcoin miners leave.

Kevin Zhang of Foundry, a subsidiary of Digital Currency Group, also noted that approximately 20 EH/s left the Bitcoin network yesterday — illustrating a weekly-average hash rate of 132.9 EH/s against the daily hash rate of 112.9 EH/s.

cambridge_data
Sichuan represented 9.66% of Bitcoin’s hash rate in China in April 2020. Source: Cambridge Bitcoin Electricity Consumption Index

The Bitcoin Network Resolves Itself

While the Bitcoin network is currently hemorrhaging hash rate, there’s little reason to fear.

As noted by Heller, the seasonal migration of Bitcoin miners will likely see many relocate out of Sichuan into places like Xinjian or Inner Mongolia — both of which are also powerhouses when it comes to the leading cryptocurrency’s hash rate.

Still, the rainy season won’t return again until next year — a fact which will undoubtedly be, at least temporarily, reflected in Bitcoin’s hash rate.

However, the Bitcoin network automatically undergoes regular mining difficulty adjustments that have, historically, ensured a competitive environment remains… even during the most FUD-inducing times.

SPECIAL OFFER (Sponsored)

Binance Futures 50 USDT FREE Voucher: Use this link to register & get 10% off fees and 50 USDT when trading 500 USDT (limited offer).


Source: https://cryptopotato.com/heres-why-bitcoins-hashrate-may-drop-further-this-week/

Continue Reading
Blockchain5 days ago

PayPal’s crypto integration means Bitcoin could triple its user base

Blockchain5 days ago

What is driving Wrapped Bitcoin’s growth this year?

Blockchain5 days ago

Here’s The Next Likely Price Target For Bitcoin After Surpassing $13k, According to Several Popular Analysts

Blockchain5 days ago

Chainlink is “On the Edge of Glory” as Indicators Begin Flipping Bullish

Blockchain3 days ago

JPMorgan turns bullish on Bitcoin citing ‘potential long-term upside’

Blockchain4 days ago

Ripple Board Member Ken Kurson Arrested For Cyberstalking

Blockchain3 days ago

Kanye West Just Dropped the Bitcoin Bomb on Joe Rogan’s Podcast

Blockchain3 days ago

China’s central bank lays regulatory foundation for CBDC

Blockchain2 days ago

3 reasons Bitcoin suddenly dropped 3% in 1 hour and recovered

Blockchain2 days ago

How to build a crypto mining rig in 2020 to earn Bitcoin and Ether

Blockchain2 days ago

Bitcoin Breaks New 2020 High As Total Market Cap Topped $400 Billion (Market Watch)

Blockchain3 days ago

Market Pundit On Why Bitcoin Price Is Poised For Second Highest Monthly Close Ever

Blockchain3 days ago

Why is this decoupling a great sign for Bitcoin in the coming days?

Blockchain2 days ago

What is Harvest Finance? $FARM

Blockchain2 days ago

Bitcoin’s price theories apply under these conditions

Blockchain2 days ago

Ethereum Dev Virgil Griffith’s Attorney Files Motion to Dismiss Charges of Aiding North Korea

Blockchain2 days ago

Filecoin (FIL) Surges 30% Amid Massive Short Squeeze

Blockchain4 days ago

Bullish: Huge H&S Pattern Developing in Bitcoin With $20K Target At ATH

Blockchain2 days ago

Crypto Long & Short: Why the PayPal Rally Isn’t What It Seems, and Why That’s OK

Blockchain2 days ago

Bitcoin’s market still has plenty to fear from OKEx halt

Blockchain2 days ago

Bitcoin’s Price is Failing to Convince the Margin Markets That It is Bullish

Blockchain13 hours ago

North America and Europe Control 88% of All Lightning Network Nodes, Research Finds

Blockchain4 days ago

Why Ripple Is Considering Relocating To London, According To CEO Brad Garlinghouse (Hint: It Involves XRP)

Blockchain2 days ago

Ripple Board Member Arrested on Cyberstalking Charges

Blockchain2 days ago

BOJ Official: Japan’s Central Bank Can’t Launch A CBDC Without Public Support

Blockchain13 hours ago

BTC hash rate slumps amid seasonal miner migration in China

Blockchain13 hours ago

Someone Just Transferred $1.15 Billion (0.4% Of Total Bitcoins) for $3.6 Fees

Blockchain5 days ago

Not Wasting Time: PayPal Reportedly Considering to Buy Crypto Companies, Including BitGo

Blockchain13 hours ago

The PayPal Effect: Billionaire Chamath Palihapitiya And Libra’s Chief Believe Banks Will Support Bitcoin

Blockchain2 days ago

Morpher Labs attempts to crack knotty prediction market problems

Trending