• Login
Crypto Newsmart
No Result
View All Result
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • ALTCOIN
    • ETEREUM
    • NFT’s
    • CRYPTO PRICE ANALYSIS
  • LEARN CRYPTO
  • CRYPTO EXCHANGES
  • BLOCKCHAIN
  • MINING
  • SCAM ALERT
  • PRESS RELEASE
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • ALTCOIN
    • ETEREUM
    • NFT’s
    • CRYPTO PRICE ANALYSIS
  • LEARN CRYPTO
  • CRYPTO EXCHANGES
  • BLOCKCHAIN
  • MINING
  • SCAM ALERT
  • PRESS RELEASE
No Result
View All Result
Crypto Newsmart
No Result
View All Result

Announcing the new MultiChain wallet

in Blockchain
Reading Time: 6 mins read
Announcing the new MultiChain wallet
34
VIEWS
Share on Facebook

 

An important step forwards for performance and scalability

After two months of intensive development and testing, we’re proud to release the latest alpha of MultiChain, with a completely rewritten in-node wallet. This new wallet transforms the performance and scalability of creating, receiving and storing transactions in MultiChain.

Before we get into the details, let me provide some context. When we began developing MultiChain, we made the decision to use Bitcoin Core, the standard node for the public bitcoin network, as a starting point. In programming terms, this means that MultiChain is a “fork” of the bitcoin software. Our primary reasoning was that bitcoin was (and continues to be) the highest valued and most battle-tested cryptocurrency ecosystem, by quite some way.

On the plus side, this decision helped us get to market quickly, compared to coding up a blockchain node from scratch. Despite the many differences between public and private blockchains, they share a large amount of technical common ground, including the peer-to-peer protocol, transaction and block structure, digital signature creation and verification, consensus rules, key management, and the need for a node API. Forking from Bitcoin Core allowed us to leverage its maturity and focus on what MultiChain adds to blockchains – configurability, permissioning and native asset support. As a result, we were able to release the first alpha in June 2015, just 6 months after starting development.

However, alongside these benefits, we also had to accept the fact that some aspects of Bitcoin Core are poorly architected. While they work just fine at small scales, their performance degrades dramatically as usage grows. With the public bitcoin network still restricted to a few transactions per second, this won’t be an issue for most Bitcoin Core users for a long time. But with private blockchains aiming for hundreds or thousands of transactions per second, we knew that, sooner or later, these bottlenecks would need to be removed.

Bitcoin Core’s wallet

The “wallet” within Bitcoin Core was always the most crucial of these pain points. Its job is to store the transactions which are of particular relevance to the node, because they involve a blockchain address which it owns or a “watch-only” address whose activity it is tracking. For example, every transaction which sends funds to or from a node must be stored in that node’s wallet. And every time a node creates a transaction, it must search for one or more “unspent outputs” of previous wallet transactions which the new transaction will spend.

So what’s wrong with the wallet we inherited from Bitcoin Core? Actually, three things:

  • All wallet transactions are held in memory. This causes slow startup times and rapidly increasing memory usage.
  • Many operations perform an inefficient “full scan” of every transaction in the wallet, whether old or new.
  • Every transaction in the wallet is stored in full, including any arbitrary “metadata” which has no meaning from the node’s perspective and is already stored in the blockchain on disk. This is very wasteful.

The consequence is that, with around 20,000 transactions stored, Bitcoin Core’s wallet slows down significantly. After 200,000 or so, it practically grinds to a halt. Even worse, since a MultiChain blockchain allows up to 8 MB of metadata per transaction (compared to bitcoin’s 80 bytes), the wallet’s memory requirements can balloon rapidly even with a small number of transactions.

It’s important to clarify that these shortcomings apply only to Bitcoin Core’s wallet, rather than its general transaction processing capacity. In other words, it can comfortably process and store millions (or even billions) of transactions which don’t relate to its own addresses, since these are held on disk rather than in memory. For example, many popular bitcoin exchanges and wallets use Bitcoin Core as-is, but store their own transactions externally rather than inside the node.

MultiChain’s new wallet

We could have made the same demand of MultiChain users, to store their own transactions outside of the node. However this didn’t feel like the right solution because it would greatly complicate the setup and maintenance for each of a chain’s participants. So instead, we bit the bullet and rewrote the wallet from the ground up.

How does the new wallet differ? If you have any experience with databases, the answers may be obvious:

  • Rather than keeping the wallet transactions in memory, they are stored on disk in a suitable format, with transactions of interest retrieved when necessary.
  • Instead of performing full wallet scans, the transactions are “indexed” in various ways to enable those which fulfill particular criteria to be rapidly located.
  • Any piece of transaction metadata which is larger than 256 bytes is not stored in the wallet. Instead, the wallet contains a pointer to that metadata’s position in the blockchain itself.

In other words, we’ve rebuilt the in-node wallet to be properly database-driven (using LevelDB), rather than relying on a naïve in-memory structure that can’t be searched efficiently. Unsurprisingly, the difference (as measured on a 3.4 GHz Intel Core i7) is rather dramatic:

Memory Usage

The graphs show that, once the old wallet contains 250,000 transactions, its send rate drops to 3 tx/sec and it adds 600 MB to the node’s memory usage. By contrast, the new wallet sustains over 100 tx/sec and only adds 90 MB. We stopped testing the old wallet at this point, but even with 6-8 million stored transactions, the new wallet continues to send over 100 tx/sec, and it tops out at around 250 MB of RAM used (due to database caching).

These tests were performed under realistic conditions, with multiple addresses and assets (and therefore many unspent transaction outputs) in the node’s wallet. In an idealized scenario (one address, one asset, few UTXOs), the sustained send rate was over 400 tx/s. Either way, as part of this rewrite, we have also properly abstracted all of the wallet’s functionality behind a clean internal interface. This will make it easy to support other database engines in future, for even greater robustness and speed.

To reiterate, all of these numbers refer to the rate at which a node can create, send and store transactions in its local wallet, rather than its throughput in terms of processing transactions created by others. For general network throughput, MultiChain can currently process 200 to 800 tx/sec, depending on the hardware it’s running on. (Be skeptical of any blockchain software promising numbers like 100,000 tx/sec on regular hardware, because the bottleneck is digital signature verification, which takes real time to perform. If nodes are not verifying individual transaction signatures, a blockchain cannot possibly be used across trust boundaries, making it no better than a regular distributed database.)

To finish, I’d like to mention the next major feature coming to MultiChain, which required this wallet rewrite. This feature, called streams, provides a high-level abstraction and API for general purpose data storage on a blockchain. You can think of a stream as a time-series or key-value database, with the added blockchain-related benefits of decentralization, digital signatures, timestamping and immutability. We know of many blockchain use cases that could use this functionality, and we’re already hard at work on building it. Watch this space.

Please post any comments on LinkedIn.

Technical addendum

Starting in MultiChain alpha 22, you can verify which version of the wallet is currently running by examining the walletdbversion field of the getinfo or getwalletinfo API calls. A value of 1 means the original Bitcoin Core wallet, and 2 means the new MultiChain wallet.

If you run the new version of MultiChain on an existing chain, it will not immediately switch to the new wallet. You can upgrade the wallet by stopping the node and then re-running multichaind with the parameters -walletdbversion=2 –rescan. You can downgrade similarly using –walletdbversion=1 –rescan.

By default, when you start a node on a new chain, it will automatically use the new wallet. You can change this by running multichaind for the first time with the parameter –walletdbversion=1.

With the new wallet, all MultiChain APIs work exactly the same way as before, with the exception of the old transaction querying APIs getreceivedbyaddress, listreceivedbyaddress and listtransactions (use listwallettransactions or listaddresstransactions instead). In addition, the new wallet does not support API calls and parameters relating to Bitcoin Core’s poorly implemented and soon-to-be-deprecated “accounts” mechanism, which was never properly supported by MultiChain. These calls are safely disabled with an error message.

Source link


Next Article: What Cryptocurrency to Invest in-2021-2022 
Next Article:Ethereum price prediction
Next Article: Cryptocurrency for Dummies
Next Article: Is crypto the future?
Next Article: Opensea volume, what it is? how it works?


  • Trending
  • Comments
  • Latest
Expert Bitcoin Price Predictions: From K to K in 2023, and Beyond

Expert Bitcoin Price Predictions: From $20K to $38K in 2023

1 February 2023
How Investigators Trace Crypto Criminals?

How Investigators Trace Crypto Criminals?

30 January 2023
How to trade cryptocurrency on Coinbase

How to trade cryptocurrency on Coinbase

31 January 2023
MoneyGram Partners With Circle To Enable USDC Cross-Border Stablecoin Transactions on Stellar (XLM) Blockchain

MoneyGram Partners With Circle To Enable USDC Cross-Border Stablecoin Transactions on Stellar (XLM) Blockchain

2 February 2023
How to trade cryptocurrency on Binance

How to trade cryptocurrency on Binance

27 January 2023
Sberbank Cover 1024x538 1

Russia’s Largest Bank to Launch Ethereum-Compatible DeFi Platform

5 February 2023
upload 7d22bc5d7be9c0d5d8f50161734559ae

KZG Ceremony Grant Round | Ethereum Foundation Blog

5 February 2023
Article Post Images 23

Bitcoin (BTC) Price to Surge 8x If This Scenario Plays Out – Here’s How and When

5 February 2023
crypto hacking

Hackers Stole $3.8 Billion From Crypto Firms in 2022, Says Chainalysis – Featured Bitcoin News

4 February 2023
ripple sec lawsuit

Ripple Vs SEC Update: Latest Hearing Offers Hope, XRP Gains Upper Hand

3 February 2023

  • Home
  • Disclaimer
  • Privacy Policy
  • Digital Millennium Copyright Act Policy (DMCA)
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us
CRYPTO NEWSMART

Copyright © 2021 Crypto Newsmart.

No Result
View All Result
  • HOME
  • BITCOIN
  • CRYPTO UPDATES
    • ALTCOIN
    • ETEREUM
    • NFT’s
    • CRYPTO PRICE ANALYSIS
  • LEARN CRYPTO
  • CRYPTO EXCHANGES
  • BLOCKCHAIN
  • MINING
  • SCAM ALERT
  • PRESS RELEASE

Copyright © 2021 Crypto Newsmart.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
  • bitcoinBitcoin(BTC)€21,137.33-2.57%
    BITCOIN
    24H : -2.57%
    Volume : €26,306,917,870.80
    Marketcap : €407,589,633,389.56
  • ethereumEthereum(ETH)€1,508.19-2.49%
    ETHEREUM
    24H : -2.49%
    Volume : €7,767,239,028.61
    Marketcap : €181,753,287,882.13
  • usdex-stablecoinUSDEX(USDEX)€0.995-0.96%
    USDEX
    24H : -0.96%
    Volume : €118,440.27
    Marketcap : €102,881,883,688.82
  • tetherTether(USDT)€0.9280.070%
    TETHER
    24H : 0.070%
    Volume : €35,341,306,565.44
    Marketcap : €63,160,595,854.03
  • binancecoinBNB(BNB)€300.60-2.45%
    BNB
    24H : -2.45%
    Volume : €425,931,132.49
    Marketcap : €40,601,722,514.65
  • usd-coinUSD Coin(USDC)€0.9270.0100%
    USD COIN
    24H : 0.0100%
    Volume : €2,565,708,549.10
    Marketcap : €38,918,421,499.30
  • rippleXRP(XRP)€0.371-2.59%
    XRP
    24H : -2.59%
    Volume : €933,888,976.02
    Marketcap : €18,855,772,103.33
  • binance-usdBinance USD(BUSD)€0.927-0.03%
    BINANCE USD
    24H : -0.03%
    Volume : €8,726,677,716.02
    Marketcap : €15,090,279,780.63
  • cardanoCardano(ADA)€0.364-2.02%
    CARDANO
    24H : -2.02%
    Volume : €354,775,505.53
    Marketcap : €12,756,755,303.58
  • dogecoinDogecoin(DOGE)€0.085-3.40%
    DOGECOIN
    24H : -3.40%
    Volume : €859,384,831.89
    Marketcap : €11,796,476,269.74
  • okbOKB(OKB)€41.241.19%
    OKB
    24H : 1.19%
    Volume : €24,439,238.80
    Marketcap : €10,199,365,728.85
  • matic-networkPolygon(MATIC)€1.10-4.13%
    POLYGON
    24H : -4.13%
    Volume : €567,280,089.32
    Marketcap : €9,933,446,725.83
  • shiba-inuShiba Inu(SHIB)€0.000014-2.58%
    SHIBA INU
    24H : -2.58%
    Volume : €989,533,959.18
    Marketcap : €8,016,413,698.97
  • solanaSolana(SOL)€21.46-5.13%
    SOLANA
    24H : -5.13%
    Volume : €640,509,619.92
    Marketcap : €8,014,915,958.03
  • staked-etherLido Staked Ether(STETH)€1,505.04-2.38%
    LIDO STAKED ETHER
    24H : -2.38%
    Volume : €12,579,810.79
    Marketcap : €7,611,260,847.43
  • polkadotPolkadot(DOT)€6.18-3.14%
    POLKADOT
    24H : -3.14%
    Volume : €244,255,888.68
    Marketcap : €7,425,616,261.57
  • litecoinLitecoin(LTC)€88.95-2.59%
    LITECOIN
    24H : -2.59%
    Volume : €481,433,222.38
    Marketcap : €6,423,419,058.62
  • avalanche-2Avalanche(AVAX)€18.44-5.09%
    AVALANCHE
    24H : -5.09%
    Volume : €325,754,616.09
    Marketcap : €5,821,084,541.01
  • tronTRON(TRX)€0.059-1.87%
    TRON
    24H : -1.87%
    Volume : €478,635,395.00
    Marketcap : €5,400,012,676.14
  • uniswapUniswap(UNI)€6.32-5.93%
    UNISWAP
    24H : -5.93%
    Volume : €142,322,118.82
    Marketcap : €4,779,223,412.60
Manage Cookie Consent

We use cookies to optimise our website and our service.

Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
Preferences
{title} {title} {title}