scrobble.life
#splinterlands

Splinterlands Move - STEEM blockchain BEFORE/AFTER

Dear blockchain friends and Splinterlands fans,

With Spliterlands move to HIVE I was interested to see the immediate impact it had on the activities on the STEEM blockchain. I had no real idea of how big drop it would be, but I was impressed to see that the activities are down over 50%.

Please see the simple graph below. Each dot represents all operations per hour. I guess it goes without saying that Splinterlands move occurred around the time of that huge drop in the chart.

STEEM operations per hour, before/after Splinterlands move to HIVE

I put together a simple python script to check the number of operations on the STEEM blockchain, before and after Splinterlands move to HIVE. The data is between May 29 04:00 and June 2 20:00, UTC time. I was using Beem to interact with the blockchain and matplotlib to render the graph.

Find below a copy of the script:

import time
import matplotlib.pyplot as plt
from datetime import datetime
from beem import Steem
from beem.blockchain import Blockchain
from beem.instance import set_shared_steem_instance

steem = Steem(['https://api.steemit.com'])
set_shared_steem_instance(steem)
chain = Blockchain()

def lineplot(x_data, y_data):
    plt.style.use('seaborn-whitegrid')
    plt.figure(figsize=(20, 10))
    ax = plt.axes()
    plt.plot(x_data, y_data, 'r-s', color = 'darkblue', linewidth=3, markersize=12, markeredgecolor='red')
    ax.set_title("Operations per Hour")
    ax.set_xlabel("Day-Hour")
    ax.set_ylabel("Nr of Ops")

start_time = time.time()
x_hour = []
y_ops = []
current_block = 43777926
hour_tag = "0"
ops_count = 0
for ops in chain.stream(start=current_block, max_batch_size=50):
    if hour_tag == "0":
        hour_tag = "{}-{}".format(ops['timestamp'].day, ops['timestamp'].hour)
    if "{}-{}".format(ops['timestamp'].day, ops['timestamp'].hour) == hour_tag:
        ops_count += 1
    else:
        print("Processing day-hour: {}".format(hour_tag))
        x_hour.append(hour_tag)
        y_ops.append(ops_count)
        ops_count = 1
        hour_tag = "{}-{}".format(ops['timestamp'].day, ops['timestamp'].hour)

print("Execution time: {} seconds".format(round((time.time() - start_time),2)))
lineplot(x_hour, y_ops)

Updated the script with the max_batch_size after optimization hint from @crokkon. Also added a print statement inside the loop to provide some feedback during execution. And added a total execution time.

Thanks for reading! I wish you all a lovely day/evening/night!

Comments · 9

  • @felipejoys(74)· 2099d

    @danielsaori did @dustsweeper halt again?

  • @felipejoys(74)· 2107d

    hi, is everything ok with @dustsweeper?

  • @schmidi(74)· 2259d

    Sehr spannend :) Very interessting. is this good for us?

  • @tomoyan(71)· 2277d

    When you run this script how long does it take to finish?

  • @crokkon(69)· 2277d

    .

  • @hivebuzz(74)· 2277d

    Congratulations @danielsaori! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

    You distributed more than 22000 upvotes. Your next target is to reach 23000 upvotes.

    You can view your badges on your board And compare to others on the Ranking If you no longer want to receive notifications, reply to this comment with the word STOP

    Do not miss the last post from @hivebuzz:

    Project Activity Update
    Support the HiveBuzz project. Vote for our proposal!
  • @rafaelaquino(70)· 2277d

    Interesting content and very clear graphics. But I confess that I was more surprised by how you made the script in python. Already this week I went into the study of data analysis and api consumption with python. And since I'm in this community I will investigate to practice with Havi's api. I'm learning constantly and by chance these are the study topics of this week. If you have any advice well received and grateful I will be. Today I already visited Hive Developer Portal.

  • @johndoer123(68)· 2278d

    I was curious about the same information yesterday. And I'm not smart enough to figure out how to get it. So it's extremely awesome that you posted this! Thanks for the great information 🤗🤗

  • @bashadow(70)· 2278d

    That is a pretty good drop.