Public testing of Ethereum privacy and scalability solution on cloud platforms

The blockchain trend continues to gain momentum. More and more experts predict the universal adaptation of this technology in the near future. At the moment, several problems remain unresolved that impede this.

First of all, modern blockchain systems do not scale well. For example, Ethereum has a throughput of only 20 transactions per second, and despite its many advantages, it is not suitable for large businesses.

At the same time, Ethereum is valued for its powerful protection against hacking and network failures. So you shouldn't write it off. It is much more expedient to correct the shortcomings of Ethereum and turn them into advantages.

Public testing of Ethereum privacy and scalability solution on cloud platforms

Plasma Cash as a privacy and scalability solution for Ethereum

Plasma is a technology presented by Vitalik Buterin, co-founder of the Ethereum project, at the EthCC conference in Paris in 2018. It was developed jointly with Joseph Poon, co-founder of the Lightning Network, and is announced as a solution that increases the computing power of the Ethereum blockchain. The first news about Plasma leaked to the media in 2017.

This platform is an external layer of smart contracts that can interact with the main blockchain, thereby offloading the root chain, reducing transaction fees for smart contracts and decentralized applications (DApps).

Detailed information about the development was set out in the document "Plasma: Scalable Autonomous Smart Contracts”, dated August 2017.

Buterin acknowledged Plasma's inherent scalability issues: each user must download and authenticate each Plasma block, which prevents exponential scaling.

To remedy this shortcoming, Plasma Cash was developed, a child chain consisting of a smart contract and a Node.js-based private network that periodically transfers its state to the root chain (Ethereum). It brings decentralization, security, and scalability to the blockchain, thus solving the Scalability Trilemma.

An important advantage of Plasma Cash compared to Plasma is that it draws the attention of users only to those blocks that contain the coins they are interested in:

“Users now only need to check the availability and correctness of the Plasma chain for a specific index associated with the coins they want to spend, own, and are interested in,” Buterin said.

According to the developers, Plasma Cash is an effective cure for Ethereum hacks. Each Plasma coin has an owner and is unique. No one can take possession of another user's coins without his knowledge. The holder of the coin can prevent potential fraudulent withdrawals through the “complaint” system by presenting their “evidence data” in the history of their coin.

Testing Plasma Cash in Mongo Atlas

Due to its novelty, Plasma Cash is still little studied. Blockchain specialists are actively testing its interaction with various cloud services and databases, fixing shortcomings and finding ways to fix them. In particular, tests in Mongo Atlas revealed the following advantages when working with Plasma:

  1. Reliable protection against data loss, since several replicas are synchronized with each other in the cluster.
  2. Fast access, since the cluster can be created on the three most popular cloud platforms: Amazon, Google, Azure. As a result, the Plasma Cash node can be deployed in many data centers located close to Mongo Atlas. We have proven that the speed does not drop much, even if Plasma nodes are deployed in more remote data centers.
  3. Plasma nodes used in read-only mode can be connected to the same Mongo cluster and located in different parts of the world, which improves geo-scalability (nodes are closer to users).
  4. Deploying a new node is easy, because you don't need to sync everything again. You can simply connect to an existing Mongo cluster, or quickly make a copy and set up a connection to it.
  5. Scale your database easily. Over time, the data becomes larger, and you can increase the size of the nodes in the cluster as needed.

Public testing of Ethereum privacy and scalability solution on cloud platforms

We used the following servers for testing:

  • 3 virtual Azure servers Standard E4s v3 (4 vcpus, 32 GiB memory). On each server 3 nodes are raised. One of them can submit blocks to the root chain.
  • Each node is connected to its own Mongo Atlas M50 cluster containing 3 nodes in replica mode.

Test 1

3 nodes receive 100k transactions each. In total, all 9 nodes contain 300k transactions and tokens.


The initial state: last block #213; 0 transactions and tokens are stored in the database.

00:00 - 3 scripts are launched that generate and send 100k transactions each
00:29 — Sending 100k transactions to nodes #1 and #2 started
00:32 — Sending 100k transactions to node #3 started
00:32 — Node #1 took 11703 transactions from the pool and forms block #214 (9fb)
00:34 — Node #2 took 27088 transactions from the pool and forms block #214 (ef4)
00:34 — Block #214 (9fb) is signed and sent to other nodes for validation
00:36 — Node #3 took 11900 transactions from the pool and forms block #214 (983)
00:37 — Block #214 (9fb) validated and sent to the root chain
00:38 — Block #214 (983) is signed and sent to other nodes for validation
00:38 — Block #214 (ef4) is signed and sent to other nodes for validation
00:40 — Block #214 (983) validated and sent to the root chain
00:41 — All nodes received information from the root chain that block #214 (9fb) has been added and start applying 11703 transactions
00:45 — All nodes received information from the root chain that block #215 (983) has been added and start applying 11900 transactions
00:51 — Block #214 (ef4) validated and sent to the root chain
00:52 — Node #1 has taken 51469 transactions from the pool and forms block #216 (ea0)
00:56 — Node #3 took 55102 transactions from the pool and forms block #216 (f75)
00:58 — Demo script finished its work for node #2
00:58 — Block #216 (ea0) is signed and sent to other nodes for validation
00:58 — All nodes received information from the root chain that block #216 (ef4) has been added and start applying 27088 transactions
01:04 — Block #216 (f75) is signed and sent to other nodes for validation
01:14 — Node #2 took 72912 transactions from the pool and forms block #217 (f85)
01:15 — Demo script finished its work for nodes #1 and #2
01:17 — Blocks #216 (f75) and #216 (ea0) validated and sent to the root chain
01:21 — Block #217 (f85) is signed and sent to other nodes for validation
01:26 — Blocks #217 (f75) and #218 (ea0) are added to the root chain and nodes start applying 51469 and 55102 transactions respectively
01:27 — Block #217 (а85) validated and sent to the root chain
01:41 — Node #1 took 36828 transactions from the pool and forms block #219 (46f)
01:41 — Node #3 took 32998 transactions from the pool and forms block #219 (bb3)
01:43 — All nodes received information from the root chain that block #219 (a85) has been added and begin to apply 72912 transactions
01:46 — Block #219 (46f) is signed and sent to other nodes for validation
01:46 — Block #219 (bb3) is signed and sent to other nodes for validation
01:53 — Node #2 processed all 100k transactions that were in the pool
02:37 — Block #219 (bb3) validated and sent to the root chain
02:41 — Block #219 (46f) validated and sent to the root chain
02:48 — Blocks #220 (bb3) and #221 (46f) are added to the root chain and nodes start applying 32998 and 36828 transactions respectively
02:54 — Node #1 processed all 100k transactions that were in the pool
02:55 — Node #3 processed all 100k transactions that were in the pool
04:12 — All nodes contain 300k transactions and tokens last block #221

Test 2

3 nodes receive 1k transactions each. In total, all 9 nodes contain 3k transactions and tokens.

The initial state: last block #213; 0 transactions and tokens are stored in the database.

00:00 - 3 scripts are launched that generate and send 1k transactions each
02:29 — Sending 1k transactions to nodes #1 and #2 started
02:33 — Node #1 took 11668 transactions from the pool and forms block #222 (510)
02:35 — Block #222 (510) is signed and sent to other nodes for validation
02:37 — Block #222 (510) validated and sent to the root chain
02:38 — Node #2 has taken 46378 transactions from the pool and forms block #222 (a9d)
02:38 — Sending 1k transactions to node #3 started
02:41 — Node #3 took 5504 transactions from the pool and forms block #222 (387)
02:42 — Block #222 (387) is signed and sent to other nodes for validation
02:44 — Block #222 (a9d) is signed and sent to other nodes for validation
02:44 — Block #222 (387) validated and sent to the root chain
02:49 — Block #222 (a9d) validated and sent to the root chain
02:56 — Blocks #222 (510) #223 (387) and #224 (a9d) are added to the root chain and nodes start applying 11668, 5504 and 46378 transactions respectively
03:09 — Node #1 has taken 177170 transactions from the pool and forms block #225 (e50)
03:09 — Node #3 took 119327 transactions from the pool and forms block #225 (ccc)
03:10 — Node #2 took 149772 transactions from the pool and forms block #225 (404)
03:26 — Block #225 (ccc) signed and sent to other nodes for validation
03:32 — Block #225 (404) is signed and sent to other nodes for validation
03:33 — Block #225 (e50) signed and sent to other nodes for validation
03:53 — Block #225 (ccc) validated and sent to the root chain
04:03 — Block #225 (e50) validated and sent to the root chain
04:04 — Block #225 (404) validated and sent to the root chain
04:06 — All nodes received information from the root chain that block #225 (ccc) has been added and start applying 119327 transactions
04:14 — All nodes received information from the root chain that block #226 (404) has been added and start applying 149772 transactions
04:16 — All nodes received information from the root chain that block #227 (e50) has been added and start applying 177170 transactions
04:32 — Node #3 took 209436 transactions from the pool and forms block #228 (1e9)
04:40 — Node #2 has taken 212669 transactions from the pool and forms block #228 (e38)
04:40 — Node #1 took 190144 transactions from the pool and forms block #228 (861)
05:02 — Block #228 (1e9) signed and sent to other nodes for validation
05:08 — Block #228 (861) is signed and sent to other nodes for validation
05:10 — Block #228 (e38) signed and sent to other nodes for validation
06:13 — Block #228 (1e9) validated and sent to the root chain
06:13 — Block #228 (861) validated and sent to the root chain
06:13 — Block #228 (e38) validated and sent to the root chain
06:39 — Blocks #228 (861) #229 (1e9) and #230 (e38) are added to the root chain and nodes start applying 190144, 209436 and 212669 transactions respectively
07:07 — Node #1 has taken 199770 transactions from the pool and forms block #231 (e04)
07:09 — Node #2 has taken 190473 transactions from the pool and forms block #231 (36e)
07:09 — Node #3 took 178807 transactions from the pool and forms block #231 (f43)
07:34 — Block #231 (e04) signed and sent to other nodes for validation
07:37 — Block #231 (36e) signed and sent to other nodes for validation
07:37 — Block #231 (f43) is signed and sent to other nodes for validation
08:49 — Block #231 (e04) validated and sent to the root chain
08:51 — Block #231 (f43) validated and sent to the root chain
08:52 — Block #231 (36e) validated and sent to the root chain
09:47 — Blocks #231 (e04) #232 (f43) and #233 (36e) are added to the root chain and nodes start applying 199770, 178807 and 190473 transactions respectively
10:16 — Node #1 has taken 153075 transactions from the pool and forms block #234 (e04)
10:16 — Node #2 has taken 168035 transactions from the pool and forms block #234 (36e)
10:16 — Node #3 took 166685 transactions from the pool and forms block #234 (f43)
10:42 — Block #234 (56d) signed and sent to other nodes for validation
11:59 — Block #234 (1bb) validated and sent to the root chain
12:02 — Block #234 (58a) validated and sent to the root chain
12:02 — Block #234 (56d) validated and sent to the root chain
12:48 — Blocks #234 (1bb) #235 (58a) and #236 (56d) are added to the root chain and nodes start applying 153075, 168035 and 166685 transactions respectively
13:14 — Node #1 has taken 112226 transactions from the pool and forms block #237 (5c0)
13:16 — Node #2 has taken 87550 transactions from the pool and forms block #234 (58a)
13:16 — Node #3 took 99594 transactions from the pool and forms block #234 (56d)
13:30 — Block #237 (5c0) signed and sent to other nodes for validation
13:32 — Block #237 (58a) signed and sent to other nodes for validation
13:34 — Block #237 (56d) signed and sent to other nodes for validation
14:47 — Block #237 (58a) validated and sent to the root chain
14:53 — Block #237 (5c0) was not validated within the specified time
14:53 — All nodes received information from the root chain that block #237 (58a) has been added and start applying 87550 transactions
14:54 — Block #237 (56d) validated and sent to the root chain
15:02 — Node #1 has taken 181206 transactions from the pool and forms block #238 (c5f)
15:06 — All nodes received information from the root chain that block #238 (56d) has been added and start applying 99594 transactions
15:12 — Node #2 has taken 51990 transactions from the pool and forms block #239 (ad8)
15:20 — Block #239 (ad8) is signed and sent to other nodes for validation
15:25 — Node #3 took 46685 transactions from the pool and forms block #239 (857)
15:30 — Block #238 (c5f) signed and sent to other nodes for validation
15:34 — Block #239 (857) is signed and sent to other nodes for validation
16:32 — Block #239 (857) validated and sent to the root chain
16:42 — All nodes received information from the root chain that block #239 (857) has been added and start applying 46685 transactions
16:42 — Block #238 (c5f) validated and sent to the root chain
16:42 — Block #239 (ad8) was not validated within the specified time
16:54 — Node #2 has taken 96882 transactions from the pool and forms block #240 (e6e)
16:56 — Node #3 took 39704 transactions from the pool and forms block #240 (a47)
17:02 — Block #240 (a47) signed and sent to other nodes for validation
17:02 — Block #240 (e6e) signed and sent to other nodes for validation
17:18 — All nodes received information from the root chain that block #240 (c5f) has been added and start applying 181206 transactions
17:45 — Block #240 (a47) validated and sent to the root chain
17:47 — Node #1 took 54956 transactions from the pool and forms block #241 (170)
17:59 — Block #241 (170) is signed and sent to other nodes for validation
18:09 — All nodes received information from the root chain that block #241 (a47) has been added and start applying 181206 transactions
18:20 — Node #3 took 39104 transactions from the pool and forms block #242 (955)
18:24 — Block #240 (e6e) validated and sent to the root chain
18:28 — Block #242 (955) is signed and sent to other nodes for validation
18:09 — All nodes received information from the root chain that block #242 (e6e) has been added and start applying 96882 transactions
19:06 — Demo script finished its work for node #1
19:08 — Demo script finished its work for node #2
19:08 — Node #2 took 48241 transactions from the pool and forms block #243 (fde)
19:14 — Block #243 (fde) signed and sent to other nodes for validation
19:18 — Block #241 (170) was not validated within the specified time
19:28 — Node #1 has taken 86967 transactions from the pool and forms block #243 (37c)
19:35 — Block #242 (955) validated and sent to the root chain
19:40 — Block #243 (37c) signed and sent to other nodes for validation
20:05 — All nodes received information from the root chain that block #243 (955) has been added and start applying 39104 transactions
20:15 — Block #243 (fde) validated and pushed to the root chain
20:19 — Node #3 took 42981 transactions from the pool and forms block #244 (9b5)
20:26 — Block #244 (9b5) signed and sent to other nodes for validation
20:28 - all nodes received information from the root chain that block #244 (fde) has been added and start applying 48241 transactions
20:32 — Node #2 processed all 1k transactions that were in the pool
21:05 — Block #243 (37c) was not validated within the specified time
21:15 — Node #1 has taken 86967 transactions from the pool and forms block #245 (37c)
21:32 — Block #245 (37c) signed and sent to other nodes for validation
21:42 — Block #244 (9b5) validated and sent to the root chain
21:50 — All nodes received information from the root chain that block #245 (9b5) has been added and start applying 42981 transactions
22:04 — Node #3 took 45361 transactions from the pool and forms block #246 (3f9)
22:11 — Block #246 (3f9) signed and sent to other nodes for validation
22:51 — Block #245 (37c) was not validated within the specified time
23:01 — Node #1 has taken 86967 transactions from the pool and forms block #246 (37c)
23:08 — Demo script finished its work for node #3
23:15 — Block #246 (37c) signed and sent to other nodes for validation
23:32 — Block #246 (3f9) was not validated within the specified time
23:42 — Node #3 took 52173 transactions from the pool and forms block #246 (71d)
23:51 — Block #246 (71d) signed and sent to other nodes for validation
24:38 — Block #246 (37c) was not validated within the specified time
25:01 — Node #1 has taken 86967 transactions from the pool and forms block #246 (37c)
25:06 — Block #246 (71d) validated and sent to the root chain
25:12 — Block #246 (37c) signed and sent to other nodes for validation
25:14 — All nodes received information from the root chain that block #246 (71d) has been added and start applying 52173 transactions
25:29 — Node #3 processed all 1k transactions that were in the pool
26:40 — Block #247 (37c) was not validated within the specified time
26:47 — Node #1 has taken 86967 transactions from the pool and forms block #247 (37c)
27:03 — Block #247 (37c) signed and sent to other nodes for validation
28:29 — Block #247 (37c) was not validated within the specified time
28:35 — Node #1 has taken 86967 transactions from the pool and forms block #247 (37c)
28:49 — Block #247 (37c) signed and sent to other nodes for validation
30:13 — Block #247 (37c) was not validated within the specified time
30:23 — Node #1 has taken 86967 transactions from the pool and forms block #247 (37c)
30:38 — Block #247 (37c) signed and sent to other nodes for validation
32:00 — Block #247 (37c) was not validated within the specified time
32:11 — Node #1 has taken 86967 transactions from the pool and forms block #247 (37c)
32:26 — Block #247 (37c) signed and sent to other nodes for validation
33:49 — Block #247 (37c) was not validated within the specified time
33:59 — Node #1 has taken 86967 transactions from the pool and forms block #247 (37c)
34:12 — Block #247 (37c) signed and sent to other nodes for validation
35:34 — Block #247 (37c) validated and sent to the root chain
35:54 — All nodes received information from the root chain that block #247 (37c) has been added and start applying 86967 transactions
36:11 — Node #1 processed all 1k transactions that were in the pool
55:12 — the first node processed all 3k transactions

Public testing of Ethereum privacy and scalability solution on cloud platforms

Results

Azure Virtual Servers were found to have insufficient processing power to process such a large number of transactions. But with the main task of the tests, namely to demonstrate the work of Plasma Cash with MongoDB, the system coped well.

We invite you to visit GitHub project: https://github.com/opporty-com/Plasma-Cash/tree/new-version

The article was co-authored with Alexander Nashivan, senior developer Clever Solution Inc..

Former development team Opporty already tested the speed of Plasma Cash. The results are presented in this article.

Source: habr.com

Add a comment