edicted Blog Banner

edicted

Sneak Attack: Cost of Doing Business.

ninja mine craft.jpg

I did some RC cost tests last night to check how much it would cost to fill up the Steem blockchain with garbage data. The results were enlightening.

https://steempeak.com/test/@edicted/rc-test https://steempeak.com/test/@edicted/rc-test-2

Essentially, I added about 1MB to the blockchain last night and it only cost me around 4% of my RC with 1333 Steem Power. This means I could add 5MB a day with less than $300 worth of stake. Considering I acquired this stake simply by copy/pasting Hive posts over the last 3 months, this should be alarming to many.

bag holdergarbage.jpg

How are these costs calculated?

You know, I've never been exactly sure, and I'm not about to figure it out now when the process is so seemingly complicated and it's not that big of an issue yet. All we need to know at the moment is that RC costs start going up when their is more competition to spend them.

However, what I can say is that the standard characters stored on the blockchain use a protocol called ASCII (American Standard Code for Information Interchange). Specifically I think the default for Hive is UTF-8 (Unicode Transformation Format).

This means that every character you see on the screen is (by default) stored in a one byte (8-bit) data structure. Another way to think about it is that these characters are represented by two digits in Hexadecimal (0F or 0x0F would be character number 15). One byte can store 256 options (characters) max, and many of the standard ones are stored in the first 7 bits (first 128 options).

Why are you barraging me with technical specifications?

Gotta pad the length of my post to get those upvotes, amirite?
That's what I learned in school anyway.

schooloffish.jpg
Wrong kind of school

A+

The important thing to note is that every character is one byte, meaning if we want to fill up a block with data (65KB) we're gonna need around 65,000 ASCII characters (65 x 1024 = 66,560). Any more than that will be declined by the network.

In fact, even trying to completely fill up a block to the max is a fool's errand, because the node in question will know to deny your request in order to make room for all the smaller operations. It's much better to simply add around 50KB to a block so the operation doesn't get declined as there will be room for the other transactions.


It's also significant to note that the blocksize limit is defined by each individual node. Witnesses who want to allow bigger blocks can create them, in fact I remember reading information on the witnesses and saw that one node was allowing blocks of like 96KB or something, while every other node was 65KB. When it really comes down to it, witnesses can post whatever block they want, and it's up to the other consensus witnesses to decide if they are going to allow that block or not. Technically, there is no blocksize limit, it's simply a gentleman's agreement.

Everything the witnesses do is a gentleman's agreement, right down to the version number they claim to be running.

The only way to actually verify what a witness is doing is to monitor the blocks they are pumping out and confirm them by the consensus mechanics of your own node.


https://files.peakd.com/file/peakd-hive/edicted/mKE2WN4j-t2.png
https://files.peakd.com/file/peakd-hive/edicted/2Tzzf8Of-t3.png

Here's another test I ran on the Hive blockchain. This shows how many RCs it costs to claim five accounts. I had 20.3B RCs before claiming 5 accounts and 5.75B RCs after. This implies that the current RC cost for claiming account tokens is around 2.9 billion resource credits.

This is significant because accounts can also be claimed by burning 3 Hive. This puts a cap on resource credits of about 1 Hive per billion RCs. Granted, the cost of accounts goes up if more stake holders start claiming them, but that's irrelevant to the point I'm trying to make.

So what is the point?

There will be a hugely significant turning point in the network when 1 billion resource credits (or the number of RCs required to claim an account divided by 3) is worth more than 1 Hive. This implies that the value of RCs has shifted away from claiming free accounts and they're actually being used for their intended purpose of getting data on the immutable database.

Essentially, when this happens all hell will break loose. The value of Hive will spike and I can't imagine a single coin being worth less than $10 at that point. Remember, Hive creates RCs for free over time, so if RCs are worth ANYTHING Hive value has spiked massively. It will create yet another snowball effect of users powering up because upvotes are worth so much and RCs are starting to have value as well.

attack.jpg
I thought this was supposed to be another post about RC attack!

Quite right.

Rather than attack Steem outright and start filling up blocks with gibberish and absolute garbage, why wouldn't we just overload the network with more useful information? It's actually kinda embarrassing how devs in this space don't realize the value of an immutable blockchain. There already should be a scaling problem. The history of the entire Internet has been, in the words of Andreas Antonopoulos, "Failing to scale gracefully, over time."

So what's the problem? Why aren't blocks filling up? Why is there so little competition to use an immutable blockchain for its intended purpose? I would posit that 99.999% of the world doesn't understand how to use it because they've been brainwashed from birth by competition, the legacy economy, imperialism, intellectual property, patents, and corporate capitalism.

The biggest problem in this space is that devs don't understand the value of creating something and giving up ownership of it to the community. Everyone is on their own nodes creating siloed centralized services, and then claiming it to be a 'dapp' because it loosely connects to the blockchain by a small thread. These services do not tax the blockchain's scalability in the slightest, and they are also not going viral because none of the users can claim their fair share of ownership over the product as would be the case with a truly decentralized service.

Where do we begin?

What is useful but also has a much bigger size then text?
Pictures, audio, and video.
It's quite obvious that video is out because it is way too big.

I think pictures on the blockchain is a great start.

I've had this idea before back in the day, but I never really pursued it because it just seemed like a waste of space on the blockchain. Why fill up blocks with text that needs to be interpreted back into a picture when we can just use the same old centralized services? Now that we actually have a reason to fill up our rival blockchain with clutter, this idea has a lot more merit.

Take any of the pictures I've posted in this blog so far. All of them are less than 50KB in size. We could convert them to ASCII and post them on the Steem/Hive blockchain and link to them from our posts. Rather than have the picture on a centralized server that could go under at any time, they'd be on the immutable blockchain forever.


Even if the file in question is bigger than the maximum blocksize, we can simply break the file up onto multiple blocks and link them together with pointers.


How many times have your written a blog and realized the message greatly hinged on a picture you posted? That picture could easily disappear if the server hosting it goes down. Wouldn't it be nice to secure that information on a blockchain? We could make Steem our bitch in that way.

Sneak attack.

It's much smarter to do something like this than just post garbage. At least them we'd have an excuse and it wouldn't be seen as an outright attack. We might not even face retribution in this case because the data technically has value.

Other ideas would be to start posting books and/or huge segments of code on GitHub onto the Steem blockchain. These are things that can be argued to have value rather than straight gibberish.

Witnesses don't get to decide which transactions are spam.

In the words of Andreas Antonopoulos, there is no such thing as spam on a blockchain. These decentralized systems are designed specifically with this in mind. If someone pays the fee for a transaction, that transaction obviously has value to that person, the network must accept that or change its own rules of consensus for everyone. Targeting individual "bad actors" leads to the road of centralization and regulation; the exact concept we were trying to exit from in the first place.

I bring this up because of the following message on my last post:

https://peakd.com/steem/@apofis/qby5j9

The witnesses can also decline transactions coming from specific accounts with another softfork so an attack would not last for a long time...maybe.

I would make the argument that this would be extremely unacceptable. Witnesses do not get to decide which operations have value and which ones don't. You pay the cost, you get to post, end of story. The only legitimate response to any kind of bandwidth attack is to modify the cost to post for everyone. This is what I'm worried about.

Conclusion

We are on the verge of putting the RC system through a real stress test (and I think we should force Steem to bear that burden before we have to). Our last bandwidth stress-test came in 2017 during the last bubble, and with the next bubble probably only a year away, we'll get to see how the RC system holds up (as the RC system was created in the wake of 2017 and didn't exist yet).

I don't know how many of you remember before we had RCs, but it was really bad. So many users could not transact (myself included) because the system was so broken . Hopefully our "solution" will shine through the next hurricane of activity. If not, we'll keep working on it, just like always. We're chasing a moving target here, and that will never change.

More. Faster. Better. Now! Murica!

P.S.

After a grueling 14 day battle, I've won the #lastword war.

t1.png

Ah, sweet victory.

https://peakd.com/lastword/@edicted/lastword-unleash-your-inner-troll

Haven't you heard?

No such thing as spam on the blockchain!


Return from Sneak Attack: Cost of Doing Business. to edicted's Web3 Blog

Sneak Attack: Cost of Doing Business. was published on and last updated on 15 Jun 2020.