HomeCoinsZilliqa (ZIL)Understanding The Network Outage & Our Next Steps

Understanding The Network Outage & Our Next Steps

- Advertisement -

As many of you already know, the Zilliqa mainnet went down on 29th July at 22:59:14 UTC. Through the combined efforts of our technical teams working together, we were able to ensure the mainnet recovery in under 24 hours.

This experience encapsulates the spirit and vision of Zilliqa 2.0. Our focus on building up technical capabilities and ongoing team expansion enabled us to emerge from this episode stronger and more prepared than ever, and is a significant moment for our collective growth.

The details of the outage have been published in an earlier post here, but we recognise that it may be difficult to understand for some because of its technical nature and the terms used.

If you’re one of them, we hope that this post can condense the topic in a way that’s easier for you to understand!

Part 1: The cause

It was discovered that the Scilla function ecdsa_recover_pk had received an out-of-range parameter input. This input was not handled properly by ecdsa_recover_pk‘s external cryptographic library secp256k1, which it depends on.

Let’s break things down. For starters, functions operate based on a set of parameters. Here are some details to demonstrate the situation more clearly. You can think of:

  1. the ecdsa_recover_pk function as a credit card reader;
  2. secp256k1 as the credit card reader software; and
  3. the cards it accepts (Visa, MasterCard, and American Express) as the parameters

What happened was that the credit card reader was presented with a Citibank card that the software did not recognise.

Keep these analogies in mind as we will return to them shortly!

Part 2: The effect

The valid range of parameters for secp256k1 is (0,1,2,3). In this case, it received an input of 28.

Here, secp256k1 did not check if the parameters were within its bounds and went on to call the unsafe code it received. This led to the segmentation fault that led to the Scilla server process terminating on the mining nodes, effectively causing the network to go down.

Now let’s return to our analogy. The credit card reader software did not first identify if the credit card it detected was accepted, and attempted to process payment. This triggered an internal fail-safe mechanism that caused the credit card reader to shut down.

Part 3: The fix

Upon identifying the cause of mainnet going down, our team rebuilt the Scilla binaries to pick up the latest version (0.4.4) of secp256k1’s OCaml wrapper library. This version was reprogrammed to ensure that it handled the out of range parameter correctly and mitigate a reoccurrence of the same issue.

To put the above in simpler terms, let’s assume that the credit card reader software can be updated and re-deployed from a desktop application. This desktop application essentially represents the Scilla binaries.

As you may have already guessed, the credit card reader software was updated through the application, and then re-deployed to all credit card readers. This update ensures that every reader now displays an error message (instead of shutting down) when it identifies cards that are not accepted.

Strengthening network resilience: Learnings for the road ahead

There are several positive aspects to this series of events, in particular the team’s success in resolving the network issues quickly. It has also helped us to pinpoint areas of improvement.

We will start by commence comprehensive happy path and out of bound (unhappy path) unit tests for all Scilla built-in functions.

Furthermore, it highlighted the need to find a way to update independent binaries in the nodes instead of updating the whole node, which was the Scilla server in this case. Once implemented, new binaries will be picked up by an overarching monitor process and replaced seamlessly.

Being able to independently update binaries will also help us make progress towards rolling upgrades in the future. At the same time, strengthening binary resilience of the nodes goes a long way in ensuring our network remains robust.

Above all, this has been a learning experience for Zilliqa and it reaffirms our commitment to constantly building and innovating. We will soon share more details about our plans to strengthen our DevOps practices, processes and capabilities.

Source link

- Advertisement -
Mr Bitcointe
Mr Bitcointehttps://www.bitcointe.com/
“Fact You Need To Know About Cryptocurrency - The first Bitcoin purchase was for pizza.” ― Mohsin Jameel
462FansLike
76FollowersFollow
4,567FollowersFollow
5,261FollowersFollow
1,580FollowersFollow
2,230SubscribersSubscribe

Most Popular

bitcoin
Bitcoin (BTC) $ 23,182.21
ethereum
Ethereum (ETH) $ 1,713.92
tether
Tether (USDT) $ 1.00
bitcoin-cash
Bitcoin Cash (BCH) $ 142.41
litecoin
Litecoin (LTC) $ 61.43
eos
EOS (EOS) $ 1.24
okb
OKB (OKB) $ 18.46
tezos
Tezos (XTZ) $ 1.89
leo-token
LEO Token (LEO) $ 4.94
cardano
Cardano (ADA) $ 0.517276
monero
Monero (XMR) $ 161.60
stellar
Stellar (XLM) $ 0.122896
chainlink
Chainlink (LINK) $ 7.86
huobi-token
Huobi (HT) $ 4.37
tron
TRON (TRX) $ 0.069935
usd-coin
USD Coin (USDC) $ 1.00
dash
Dash (DASH) $ 53.36
neo
NEO (NEO) $ 11.55
iota
IOTA (MIOTA) $ 0.3445
nem
NEM (XEM) $ 0.052709
zcash
Zcash (ZEC) $ 68.41
maker
Maker (MKR) $ 1,108.45
paxos-standard
Pax Dollar (USDP) $ 1.00
ethereum-classic
Ethereum Classic (ETC) $ 38.34
vechain
VeChain (VET) $ 0.031229
true-usd
TrueUSD (TUSD) $ 1.00
ftx-token
FTX (FTT) $ 30.75
kucoin-shares
KuCoin (KCS) $ 10.55
waves
Waves (WAVES) $ 6.19