AleoNet / anf-snarkOS

A Decentralized Operating System for Zero-Knowledge Applications
http://snarkos.org
Apache License 2.0
15 stars 4 forks source link

[Bug][Canary] Block times affected by transaction volume and type #3

Open krwang opened 7 months ago

krwang commented 7 months ago

We have observed variation in the block times, most notably when Demox executed a persistent deployment cannon on canary net.

Over the course of the 12 hour test, canary sustained 1 deployment per second, for a program with 280k constraints. During that time, block times consistently remained above 60 seconds. Immediately after the cannon was turned off, block times returned to the normal 4-5 seconds.

image

By adjusting the number of deployments per second, along with the constraint size of the program, we can reliably control the block times of canary.

Anecdotally, we have also observed slight variation in block times due to public transactions being fired at canary, varying from 1 TPS to 10. The block times were not drastically different and were often times faster than the usual 4-5 seconds. This is also visible in the above graph, illustrated by the changing slope of the line prior to the deployment slowdown.

Steps to Reproduce

Execute script to fire X deployments per second at a client node in canarynet.

Expected Behavior

Your Environment

The cannon was executed from EC2 linux machines and pointed at Demox's client node, running a fork of snarkOS with commits up to 6aba25d9193c30c82c9762130499554f5c9fea1a.

vicsn commented 7 months ago

Thank you for notifying. This is known behaviour. Noting that:

However, I recall @evanmarshall wanted to see if he could pull off the attack for way less credits, which is a valid endeavour.