New Page Added: Steem Blockchain Overview

I feel it is useful to make a page which has listed key-value information for the steem blockchain. There you go:

https://steemyy.com/overview.php
Chinese version: https://steemyy.com/steemit-tools/overview.php

It may not be so much interesting for ordinary users (if you are not really into the programming stuffs), but in case you need these information, you can Ctrl+F to search in the page.

image.png

It is based on Steem-JS:

  • getChainProperties
  • getTicker
  • getVersion
  • getHardforkVersion
  • getNextScheduledHardfork
  • getWitnessCount
  • getDynamicGlobalProperties
  • getConfig

Every little helps! I hope this helps!

Steem On!~

If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘New Page Added: Steem Blockchain Overview’

Accelerate the Synchronization with the Steem Blocks

A few of my tools https://steemyy.com require pre-process the blocks into a SQLite relational database. It takes time, especially currently, there are more than 43 Millions blocks on steem blockchain.

Starting from Block 1 to Sync with the latest are expected to take days… But there are tips to accelerate the process.

Do it on your Witness Server

The first important tip is use your own witness server to send the API to. If you are using an external server, it takes time as the HTTPS request are slow (network hops are the bottom-necks).

First, on your witness server, you have to turn on the following plugins:

1
plugin = witness block_api webserver condenser_api

Second, you would need to expose the 8091 RPC port. Then you can make API calls to the localhost (which is your witness server)

Calling the localhost

Your script should make calls to http://0.0.0.0:8091 instead of https://api.steemit.com

Direct Calls instead of using Steem Class

instead of using Steem(nodes=node) you should make calls directly via the HTTP request object

1
2
data={"jsonrpc":"2.0", "method":"condenser_api.get_block", "params":[number_block], "id":1}
r=requests.post(url=node,json=data)

This is a lot faster especially you are making lots of calls!

Commit to Database every 1000 blocks

Instead of updating the database every block, you should only do this every 1000 blocks (of course this is an example number) or more.

You don’t want the I/O (especially write) to slow down crawling the blocks.

Add Index After

Another tip is to add index after the data is sync-ed. It makes a huge difference especially if you have a complex configuration of the database indices.


I hope this helps!

Steem On!~

If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘Accelerate the Synchronization with the Steem Blocks’

An update on RPC Node and Steem API Node Status Tool

After a few day’s replay, my RPC node is now fully sync with the blocks on 0.23.1

image.png

You can add the following to your config.ini to redirect the RPC messages - otherwise you will see RPC calls flooding your steemd.

1
2
log-appender = {"appender":"rpc", "file":"logs/rpc/rpc.log"}
log-logger = {"name":"rpc", "level":"info", "appender":"rpc"}

Steem API Node Status: https://steemyy.com/node-status.php
I have removed dead nodes and also If you see nodes missing from the list, please do let me know. I have added the Owner column.

image.png

Every little helps. Let’s all add something to the STEEM blockchain.


I hope this helps!

Steem On!~

If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘An update on RPC Node and Steem API Node Status Tool’

New Tool: Follow or Mute Multiple Accounts

I need a tool to follow, mute (block), or unfollow multiple accounts at the same time. Thus I develop this tool.

Tool: Batch Follow or Mute Tool on Steem Blockchain
URL: https://steemyy.com/follow-or-mute/
Chinese Version: https://steemyy.com/batch-follow-or-mute/

For example, you can use this tool to follow all your fans back (who follow you). Of course, you can also get a list of someone’s following or followers, and then decide to follow, mute or unfollow them.

image.png

Currently, there are five pre-define list:

image.png

You don’t need posting key to retrieve the list of followers/following. However, you do need Private Posting Key (which only stays in the browser, in the current page) to broadcast the transactions (five in a block).


I hope this helps!

Steem On!~

If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘New Tool: Follow or Mute Multiple Accounts’

Recursive Algorithm to Get Proxy Votes

Regarding this tool: https://steemyy.com/proxy/
In case you might not notice, this tool also returns the indirect proxy supporters.
For example,

danielhuhservice proxies to der-prophet, who sets proxy to steemchiller.

Recursion

If you perform real-time scan backwards on the steem blockchain, it is hard to obtain the indirect proxy because for each direct proxy, you have to spawn new thread search their account history.

Real-time processing is slow, and thus we process and sync the blocks into a database. Suppose you can use a SQL to obtain the direct proxy voters like this:

1
2
3
4
5
6
7
8
def getProxy(account):
sql = "select account from proxy where proxy=" + account;
con.exec(sql)
data = []
for row in cur.fetchall():
# recursive
data.append({"account": row[0], "voters": getProxy(row[0])
return data

Here it is the beauty of the recursion. We call the function itself to fill the voters array of the current proxy.

Terminating the Recursion

Usually, for recursion to work, you have to set a terminal condition, otherwise, the recursive calls might go forever which causes the infamous “Stack Overflow”.

But in our case, the steem blockchain, this might be ok without it. As you can’t broadcast a proxy vote to someone who proxies you back, or even proxies to someone who proxies to you - which causes a loop.

You can, however, pass a maximum depth value (as a second parameter), as a safety check.

1
2
3
4
5
6
7
8
9
10
11
def getProxy(account, depth = 5):
if depth == 0:
# max depth exceeded, just return empty array
return []
sql = "select account from proxy where proxy=" + account;
con.exec(sql)
data = []
for row in cur.fetchall():
# recursive
data.append({"account": row[0], "voters": getProxy(row[0], depth - 1)
return data

I hope this helps!
Reposted to the blog

Steem On!~

If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘Recursive Algorithm to Get Proxy Votes’

Another Tiny Tool: Steem Account Keys and Password Generator

I made another tiny tool: Steem Account Keys and Password Generator
What it does:

  1. generate a suggested (strong, secure) password for you to use
  2. retreive (both public and private) owner, posting, active, memo keys from your master password.

It is a one-page HTML tool. There is no login involved. Your password stays in the current page (your local browser) . There is no point to panic!

Tool URL: https://steemyy.com/keys/
Chinese Version: https://steemyy.com/account-keys/
The tool is based on dSteem v0.8.6

image.png

The Core dSteem code to Retrieve Keys from Master Password is:

1
2
3
4
const ownerKey = dsteem.PrivateKey.fromLogin(username, password, 'owner');
const activeKey = dsteem.PrivateKey.fromLogin(username, password, 'active');
const postingKey = dsteem.PrivateKey.fromLogin(username, password, 'posting');
const memoKey = dsteem.PrivateKey.fromLogin(username, password, 'memo');

The Suggested Password Source code:

1
2
3
4
5
function suggestPassword() { 
const array = new Uint32Array(10);
window.crypto.getRandomValues(array);
return 'P' + dsteem.PrivateKey.fromSeed(array).toString();
}


I hope this helps!

Steem On!~

If you like my work, please consider voting for me, thanks!
https://steemit.com/~witnesses type in justyy and click VOTE



Alternatively, you could proxy to me if you are too lazy to vote!

Also: you can vote me at the tool I made: https://steemyy.com/witness-voting/?witness=justyy

Visit me at: https://steemyy.com


This page is synchronized from the post: ‘Another Tiny Tool: Steem Account Keys and Password Generator’

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×